January 08, 2018

ROPgadget : Find ROP gadget

❑ ROPgadget is a tool to find ROP gadget(Link).

❑ Feature
❍ It supports ELF/PE/Mach-O format on x86, x64, ARM, ARM64, PowerPC, SPARC and MIPS.
❍ It can be used without debugging.

❑ How to install
❍ Install capstone : $ sudo pip install capstone
❍ Download ROPgadget(Link)


❑ How to use : Use it with appropriate options, without any installation.

usage of ROPgadget program

--binary : An option to select a file to extract ROP gadgets.

--only "pop|ret" : An option to extract only gadgets that include pop and ret instructions.

--depth 2 : An option to extract gadgets with a maximum length of 2.

※ It is also useful to extract the entire result into a file and extract only the necessary part with text editor.