-
Notifications
You must be signed in to change notification settings - Fork 7
A Simple Demo Without Heuristics
cxreet edited this page Jul 16, 2020
·
1 revision
-
Go to the ./simple-demo directory:
cd ~/workspace/razor/simple-demo/
. -
Trace the program with two inputs:
python debloat_simple.py -c trace -a 1 -b y
-
python debloat_simple.py -c trace -a 0 -b y
This would generate two trace logs under directory ./logs.
-
Run Razor step by step:
- Merge the logs:
python debloat_simple.py -c merge_log
. The output is ./simple-trace.log. - Dump the executed instructions:
python debloat_simple.py -c dump_inst
. The output is ./instr.s. - Instrument the executed instructions:
python debloat_simple.py -c instrument
. The output is ./simple.s. - Rewrite the binary:
python debloat_simple.py -c rewrite
. The output is ./simple_temp/simple.debloated.
- Merge the logs:
-
Run the debloated binary:
- ./simple_temp/simple.debloated 1 y
- ./simple_temp/simple.debloated 0 y
- ./simple_temp/simple.debloated 1 n
- ./simple_temp/simple.debloated 0 n