Fsop 4 Noobz - 2
" _wide_data my beloved… "
This FSOP attack targets the stderr object itself. Once you get a 0xF0
sized arbitrary write, you can overwrite stderr in glibc with this payload,
and trigger _IO_flush_all (One easy way of doing it us through exit -> __run_exit_handlers -> _IO_cleanup -> _IO_flush_all)
It has the following requirements:
- Libc leak
0xF0sized write onstderr
Feel free to read the exploit along with the cradle that I used to learn this: fsop-4-noobz-2.zip.
Function chain
TEXT
exit
-> __run_exit_handlers
-> _IO_cleanup
-> _IO_flush_all
-> _IO_wfile_oveflow
-> _IO_wdoallocbuf
-> _IO_WDOALLOCATE (fp)
=> system(fp)Optimisation
This attack arranges the fields in such a way that the three necessary structs (struct _IO_FILE, struct _IO_wide_data, struct _IO_jumps_t) overlap while also meeting necessary constraints.
Exploit
Write the to stderr, and trigger _IO_flush_all.
Write the below to stderr:
PY
| |