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 between START and END
  • --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 expression EXPR
  • --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 🌈✨