Add KLEE support to angr executor

This commit is contained in:
Joe Ranweiler
2018-02-23 14:49:21 -08:00
parent 4edfccd953
commit 330f58b944
2 changed files with 8 additions and 1 deletions

View File

@@ -125,6 +125,10 @@ class DeepState(object):
"--take_over", action='store_true',
help="Explore the program starting at the `TakeOver` hook.")
parser.add_argument(
"--klee", action='store_true',
help="Expect the test binary to use the KLEE API and use `main()` as entry point.")
parser.add_argument(
"binary", type=str, help="Path to the test binary to run.")

View File

@@ -363,7 +363,8 @@ def hook_apis(project, run_state):
def main_take_over(args, project, takeover_symbol):
takeover_ea = find_symbol_ea(project, takeover_symbol)
hook_function(project, takeover_ea, TakeOver)
if not args.klee:
hook_function(project, takeover_ea, TakeOver)
if not takeover_ea:
L.critical("Cannot find symbol `{}` in binary `{}`".format(
@@ -490,6 +491,8 @@ def main():
if args.take_over:
return main_take_over(args, project, 'DeepState_TakeOver')
elif args.klee:
return main_take_over(args, project, 'main')
else:
return main_unit_test(args, project)