Skip to content

Commit 65af9f3

Browse files
authored
Merge pull request #30 from ivg/propagate-taint-with-primus
Propagate taint with primus
2 parents f39fc06 + ed194e9 commit 65af9f3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

plugins/bap/plugins/bap_taint.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@
2727
('taints', 'yellow')
2828
]
2929

30-
3130
class 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

5566
class BapTaint(idaapi.plugin_t):

0 commit comments

Comments
 (0)