When playing ctf pwn challenges we usually need the one-gadget RCE (remote code execution),
which leads to call
execve('/bin/sh', NULL, NULL).
This gem provides such gadgets finder, no need to use objdump or IDA-pro every time like a fool
To use this tool, type
one_gadget /path/to/libc in command line and enjoy the magic
Available on RubyGems.org!
Note: requires ruby version >= 2.1.0, you can use
ruby --version to check.
OneGadget uses symbolic execution to find the constraints of gadgets to be successful.
The article introducing how I develop this tool can be found on my blog.
Command Line Interface
$ one_gadget # Usage: one_gadget <FILE|-b BuildID> [options] # -b, --build-id BuildID BuildID[sha1] of libc. # -f, --[no-]force-file Force search gadgets in file instead of build id first. # -l, --level OUTPUT_LEVEL The output level. # OneGadget automatically selects gadgets with higher