ROPGADGET(1)
Okay bestie, welcome to the ROPGADGET(1) manual from the General Commands Manual πβ¨ This tool is giving security research energy and I am OBSESSED π
β¨ NAME β¨
ROPgadget π search executables for exploitable ROP gadgets π¦
π SYNOPSIS π
Here's the basic shape of the command, no cap π
ROPgadget [--binary FILE] [options]
πΈ DESCRIPTION πΈ
Okay so ROPGadget is a tool for security research and vulnerability exploitation π₯ It lets you search binaries for sequences of useful machine code instructions that end in a return statement. Those are called "gadgets" π§
If an exploit can manipulate the callstack to point at a sequence of gadgets, the return statements redirect the program flow so it runs that sequence. That's "return oriented programming" π By reusing existing code out of context, an attacker can potentially get around security measures that stop injected code from running. Lowkey iconic, highkey concerning π
ROPgadget supports ELF/PE/Mach-O format on x86, x64, ARM, PowerPC, SPARC and MIPS architectures π
Here are the options you can play with β¨
--binary FILEπ point it at the executable you want to analyze--opcode OPCODESπ¦ search for particular opcodes in executable sections--string STRINGπ search for a particular string in readable sections--memstr STRINGπΈ search for each byte in readable sections--depth DEPTHπ limit the search depth for the internal engine (default: 10)--only KEYβ¨ only show specific instructions--filter KEYπ suppress specific instructions--range START-ENDπ§ limit the search to the address range betweenSTARTandEND--badbytes BYTESπ reject specific bytes in the address of a gadget--rawArch ARCHπ specify the architecture for raw binaries--rawMode MODEπ specify the mode for raw binaries--re EXPRπ₯ search for gadgets using the regular expressionEXPR--offsetOFFSETπ¦ add an offset to all gadget addresses--ropchainπ enable ROP chain generation--thumbπ use thumb mode for ARM architecture binaries--consoleπ«Ά enable the interactive console for the search engine--noropπ disable the ROP search engine--nojopπ disable the JOP search engine--nosysπ disable the SYS search engine--multibrβ enable multiple branch gadgets--allπ show all gadgets, even duplicates--dumpπ output the gadget bytes
β οΈ Bestie, this is powerful stuff, so use it responsibly and only on things you're allowed to analyze π«Ά
π¦ AUTHOR π¦
This manual page was written for Debian by Timo RΓΆhling and may be used without restriction π
That's the whole tea, bestie π«Ά ROPGADGET(1) signing off πβ¨
π¦ where this page comes from
- debian bookworm: python3-ropgadget 7.2+dfsg-1 Β· BSD-3-Clause
- debian trixie: python3-ropgadget 7.6+dfsg-1 Β· BSD-3-Clause
- ubuntu jammy: python3-ropgadget 6.6+dfsg-2 Β· BSD-3-Clause
- ubuntu noble: python3-ropgadget 7.4+dfsg-1 Β· BSD-3-Clause
- ubuntu questing: python3-ropgadget 7.6+dfsg-1
- ubuntu resolute: python3-ropgadget 7.7+dfsg-1 Β· BSD-3-Clause
- ubuntu stonking: python3-ropgadget 7.7+dfsg-1 Β· BSD-3-Clause
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms