Documentation
README
Exploiting Format String Vulnerabilities
When to Use
- During authorized binary/exploitation assessments when attacker input is passed as the first argument (the format)
to
printf,fprintf,sprintf,snprintf,vprintf,syslog, or similar. - When you need a memory-disclosure primitive to leak stack contents, a libc/PIE pointer, or a stack canary to defeat ASLR/PIE/canary protections.
- When you have an arbitrary-write primitive opportunity via
%n/%hnto overwrite a GOT entry,.fini_array, a saved return address, or a function pointer. - On Windows x64 services where a buggy
_snprintf(dst, len, attacker_fmt)call provides no varargs and conversions read pointers out of RCX/RDX/R8/R9 registers.
Critical: Concepts/Steps Most Often Missed
This is the opening of the README. Read the full README on GitHub.