Bump yard from 0.9.35 to 0.9.36 (#214)
Bumps yard from 0.9.35 to 0.9.36.
updated-dependencies:
- dependency-name: yard dependency-type: direct:development …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
OneGadget
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 magicInstallation
Available on RubyGems.org!
Note: requires ruby version >= 2.1.0, you can use
ruby --version
to check.Supported Architectures
Implementation
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.
Usage
Command Line Interface
Given BuildID
Gadgets Near Functions
Why
Consider this scenario when exploiting:
In this scenario you can choose to write two low-byte on a GOT entry with one-gadget’s two low-byte. If the function offset on GOT is close enough with the one-gadget, you will have at least 1/16 chance of success.
Usage
Reorder gadgets according to the distance of given functions.
Regular expression is acceptable.
Pass an ELF file as the argument, OneGadget will take all GOT functions for processing.
Show All Gadgets
Sometimes
one_gadget
finds too many gadgets to show them in one screen, by default gadgets would be filtered automatically according to the difficulty of constraints.Use option
--level 1
to show all gadgets found instead of only those with higher probabilities.Other Architectures
i386
AArch64
Combine with Script
Pass your exploit script as
one_gadget
‘s arguments, it can try all gadgets one by one, so you don’t need to try every possible gadgets manually.In Ruby Scripts
To Python Lovers
Make OneGadget Better
Any suggestion or feature request is welcome! Feel free to send a pull request.
Please let me know if you find any libc that make OneGadget fail to find gadgets. And, if you like this work, I’ll be happy to be starred