Skip to content

Commit 20d386c

Browse files
committed
adds a support for Primus taint propagation
1 parent d0d7bf8 commit 20d386c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

plugins/bap/plugins/bap_taint.py

Lines changed: 11 additions & 2 deletions
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,12 @@ def __init__(self, addr, kind):
5053
'--emit-ida-script-file', self.script.name
5154
]
5255

56+
if self.ENGINE == 'primus':
57+
self.args += [
58+
'--primus-propagate-taint-run',
59+
'--primus-promiscuous-mode',
60+
'--primus-greedy-scheduler'
61+
]
5362

5463

5564
class BapTaint(idaapi.plugin_t):

0 commit comments

Comments
 (0)