Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Format String Attacks (2000) (seclists.org)
24 points by aragonite on May 21, 2024 | hide | past | favorite | 3 comments


There’s a whole library (pwntools.fmtstr) to help automate the (tedious) process of building format string exploits: https://docs.pwntools.com/en/stable/fmtstr.html

There’s a bunch of nice features in glibc that make exploiting format strings much easier. For example, it supports the %hn and %hhn modifiers for doing short-sized and byte-sized writes respectively. It also supports positional arguments (%N$x) so you can target arbitrary items on the stack without having to go through all the previous arguments first.

Of course, it also sports mitigations for format string exploits too. IIRC, setting _FORTIFY_SOURCE to 2 or higher will cause it to abort if a %n placeholder is found in a format string and the string is in writable memory.


PDF with the same content:

http://forum.ouah.org/FormatString.PDF


Someone take C out behind the barn already




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: