27
27
('taints' , 'yellow' )
28
28
]
29
29
30
-
31
30
class PropagateTaint (BapIda ):
31
+ ENGINE = 'primus'
32
+
32
33
"Propagate taint information using BAP"
33
34
def __init__ (self , addr , kind ):
34
35
super (PropagateTaint ,self ).__init__ ()
36
+
35
37
self .action = 'taint propagating from {:s}0x{:X}' .format (
36
38
'*' if kind == 'ptr' else '' ,
37
39
addr )
38
- self .passes = ['taint' ,'propagate-taint' ,'map-terms' ,'emit-ida-script' ]
40
+ propagate = 'run' if self .ENGINE == 'primus' else 'propagate-taint'
41
+ self .passes = ['taint' , propagate , 'map-terms' ,'emit-ida-script' ]
39
42
self .script = self .tmpfile ('py' )
40
43
scheme = self .tmpfile ('scm' )
41
44
for (pat ,color ) in patterns :
@@ -50,6 +53,14 @@ def __init__(self, addr, kind):
50
53
'--emit-ida-script-file' , self .script .name
51
54
]
52
55
56
+ if self .ENGINE == 'primus' :
57
+ self .args += [
58
+ '--run-entry-points=all-subroutines' ,
59
+ '--primus-limit-max-length=100' ,
60
+ '--primus-propagate-taint-run' ,
61
+ '--primus-promiscuous-mode' ,
62
+ '--primus-greedy-scheduler'
63
+ ]
53
64
54
65
55
66
class BapTaint (idaapi .plugin_t ):
0 commit comments