From b66bdb98e0b903bf69b53352a8b336ff11892dcd Mon Sep 17 00:00:00 2001 From: AndrewQuijano Date: Sat, 30 Nov 2024 20:20:40 -0500 Subject: [PATCH] [Scripts] Remove dead args from file_taint --- install.sh | 3 +-- scripts/bug_mining.py | 49 ++++++++++++++----------------------------- 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/install.sh b/install.sh index fafa1c81..97b417da 100755 --- a/install.sh +++ b/install.sh @@ -39,8 +39,7 @@ else exit 1 fi -curl -LJO https://github.com/panda-re/panda/releases/download/v1.8.23/pandare_22.04.deb -mv *.deb /tmp +curl -LJ -o /tmp/pandare_22.04.deb https://github.com/panda-re/panda/releases/download/v1.8.45/pandare_22.04.deb $SUDO apt-get -y install /tmp/pandare_22.04.deb rm /tmp/*.deb diff --git a/scripts/bug_mining.py b/scripts/bug_mining.py index 3c25ee20..64782612 100644 --- a/scripts/bug_mining.py +++ b/scripts/bug_mining.py @@ -171,49 +171,32 @@ def progress(msg): dwarfout = subprocess.check_output(dwarf_cmd) dwarfdump.parse_dwarfdump(dwarfout, binpath) -# Based on this example: -# https://github.com/panda-re/panda/blob/dev/panda/python/examples/file_taint/file_taint.py panda.set_pandalog(pandalog) -panda.load_plugin("pri") +panda.load_plugin("loaded", + args={ + 'debug': True, + }) panda.load_plugin("taint2", args={ - 'no_tp': True + 'no_tp': True, + 'enable_hypercalls' : False }) panda.load_plugin("tainted_branch") - panda.load_plugin("dwarf2", args={ 'proc': proc_name, 'g_debugpath': installdir, - 'h_debugpath': installdir + 'h_debugpath': installdir, + 'debug' : True }) - -if 'use_stdin' in project and project['use_stdin']: - print("Using stdin for taint analysis") - panda.load_plugin("file_taint", - args={ - 'filename': input_file_guest, - 'pos': True, - 'cache_process_details_on_basic_block': True, - 'first_instr': 1, - 'use_stdin': proc_name, - 'verbose': True - }) -else: - print("Using open for taint analysis") - panda.load_plugin("file_taint", - args={ - 'filename': input_file_guest, - 'pos': True, - 'cache_process_details_on_basic_block': True, - 'enable_taint_on_open': True, - 'verbose': True - }) - - +panda.load_plugin("file_taint", + args={ + 'filename': input_file_guest, + 'pos': True, + 'verbose': True + }) panda.load_plugin("pri_taint", args={ - 'hypercall': True, - 'chaff': False + 'debug' : True }) # Default name is 'recording' @@ -246,7 +229,7 @@ def progress(msg): fbi_args = [join(lavadir, 'tools', 'install', 'bin', 'fbi'), host_json, project_name, pandalog_json, input_file_base] -# Command line curtial argument takes priority, otherwise use project specific one +# Command line curtail argument takes priority, otherwise use project specific one # global curtail if curtail != 0: fbi_args.append(str(curtail))