hackweb
notes on hacking and technology
IT EN
main menu
user menu
you are not logged in

one_gadget and the glibc heap "houses"

August 24, 2025 · 1 min read · #binary-exploitation #heap #glibc

Often, after getting a write, you do not want to build a full ROP: you want one address that, jumped to with the right state, runs execve("/bin/sh").

one_gadget

In libc there are sequences that call execve("/bin/sh", ...) if certain registers/memory hold known values. The one_gadget tool finds them and lists their constraints:

one_gadget /lib/x86_64-linux-gnu/libc.so.6

Overwriting __free_hook/__malloc_hook (in glibc < 2.34) or a function in __exit_funcs with a one_gadget yields a shell without a chain.

The houses

House of Force, of Spirit, of Orange, of Botcake: families of techniques that corrupt heap metadata (top chunk, freelist, unsorted bin) to get a write where needed. They change with each glibc version.

Defence

Recent glibc removed the hooks and added metadata checks. Hardened allocators, ASLR, and absence of memory bugs remain the real defence.


« back to home

latest posts
 
your IP address:
216.73.216.108
visitor #1
MOTD:
Every abstraction leaks somewhere.
Here we look at where.
topics