Hi,
I am trying to use this tool to compare the number of gadgets in a particular section in the binary with the number of overall gadgets in the binary. As the script doesn't take in address information about the binary, instead of modifying the internals of the script to support my use-case, I have used the following workflow:
- I dump the relevant section of the binary in a raw form using obdump:
objcopy -O binary --only-section=.text1 ./original.bin ./original.text1.bin
- From the raw binaries I create an elf:
objcopy.exe --input-target=binary --output-target=elf32-little ./original.text1.bin ./original.text1.bin.elf
- Lastly, I run the tool on the two binaries:
./src/GSA.py --output_metrics --output_addresses ./original.bin "{'Aggressive':'./original.text1.bin.elf'}" --output_console
Since I am not familiar with the internals, I assume the way gadgets are counted in the original and debloated binary are independent so the comparison between these two binaries should work. However, in all cases, I see 100% gadget reduction and wanted to confirm if the workflow I used is compatible with GSA, as the tool is supposed to be used as a tool for debloated binaries. Note that, I don't see any warnings/errors from GSA in this workflow.
Thanks,
Arslan
Hi,
I am trying to use this tool to compare the number of gadgets in a particular section in the binary with the number of overall gadgets in the binary. As the script doesn't take in address information about the binary, instead of modifying the internals of the script to support my use-case, I have used the following workflow:
objcopy -O binary --only-section=.text1 ./original.bin ./original.text1.binobjcopy.exe --input-target=binary --output-target=elf32-little ./original.text1.bin ./original.text1.bin.elf./src/GSA.py --output_metrics --output_addresses ./original.bin "{'Aggressive':'./original.text1.bin.elf'}" --output_consoleSince I am not familiar with the internals, I assume the way gadgets are counted in the original and debloated binary are independent so the comparison between these two binaries should work. However, in all cases, I see 100% gadget reduction and wanted to confirm if the workflow I used is compatible with GSA, as the tool is supposed to be used as a tool for debloated binaries. Note that, I don't see any warnings/errors from GSA in this workflow.
Thanks,
Arslan