Skip to main content

What Is one_gadget?

one_gadget is an open-source tool that finds one-gadget execve("/bin/sh", ...) candidates in glibc binaries. It reports the register and memory constraints required for each gadget to succeed and is built for CTF pwn challenges and exploit development against glibc.

Use Cases

Finding one-gadget candidates in specific glibc versions during CTF challenges and exploit research.

Strengths and Limitations

Strengths

  • +Looks up gadgets from a libc file or from its BuildID.
  • +Reports precise register and memory constraints for each candidate gadget.
  • +Supports i386, amd64, aarch64, 32-bit ARM, RISC-V 64, and MIPS glibc builds.

Limitations

  • -Targets glibc specifically; other libc implementations are outside its documented scope.
  • -Gadget constraints may not be satisfiable in a given exploit context.

Defensive Use

Assessing the feasibility of one-gadget RCE in specific glibc versions to evaluate ASLR and libc hardening.

one_gadget Alternatives

3 tools
ToolPricing
pwntools

Python framework and exploit development library tailored for rapid prototyping, socket handling, and binary exploitation.

Open Source
ROPgadget

Gadget finder tool that searches binary files for ROP and JOP sequences for exploit development and mitigation research.

Open Source
Ropper

Command-line tool and Python library for finding ROP and JOP gadgets in ELF, PE, and Mach-O binaries during exploit research.

Open Source

Frequently Asked Questions

What is one_gadget?→

one_gadget is an open-source tool that finds one-gadget execve("/bin/sh", ...) candidates in glibc binaries. It reports the register and memory constraints required for each gadget to succeed and is built for CTF pwn challenges and exploit development against glibc.

What is one_gadget used for?→

Finding one-gadget candidates in specific glibc versions during CTF challenges and exploit research.

What are the strengths of one_gadget?→
  • +Looks up gadgets from a libc file or from its BuildID.
  • +Reports precise register and memory constraints for each candidate gadget.
  • +Supports i386, amd64, aarch64, 32-bit ARM, RISC-V 64, and MIPS glibc builds.
What are the limitations of one_gadget?→
  • +Targets glibc specifically; other libc implementations are outside its documented scope.
  • +Gadget constraints may not be satisfiable in a given exploit context.
How is one_gadget used defensively?→

Assessing the feasibility of one-gadget RCE in specific glibc versions to evaluate ASLR and libc hardening.