2727 ('taints' , 'yellow' )
2828]
2929
30-
3130class PropagateTaint (BapIda ):
31+ ENGINE = 'primus'
32+
3233 "Propagate taint information using BAP"
3334 def __init__ (self , addr , kind ):
3435 super (PropagateTaint ,self ).__init__ ()
36+
3537 self .action = 'taint propagating from {:s}0x{:X}' .format (
3638 '*' if kind == 'ptr' else '' ,
3739 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' ]
3942 self .script = self .tmpfile ('py' )
4043 scheme = self .tmpfile ('scm' )
4144 for (pat ,color ) in patterns :
@@ -50,6 +53,14 @@ def __init__(self, addr, kind):
5053 '--emit-ida-script-file' , self .script .name
5154 ]
5255
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+ ]
5364
5465
5566class BapTaint (idaapi .plugin_t ):
0 commit comments