Automated Format String Attack Prevention for Win32/X86 Binaries

Wei Li, Tzi-cker Chiueh
2007 Twenty-Third Annual Computer Security Applications Conference (ACSAC 2007)  
A format string attack exploits the fact that functions with a variable number of input arguments such as printf() determine the exact number of input arguments used in a call based on the format string argument, and compromises the victim application's address space by accessing data areas beyond the original input argument list the caller prepares. Although there have been several attempts that aim to protect application programs from format string attacks, all of them are limited in one way
more » ... r another. Moreover, none of them has been applied to commercially distributed Win32 binaries. This paper describes the design, implementation and evaluation of a Win32 binary transformation tool called Lisbon, which transparently inserts into Win32 binaries additional checks that protect them from all format string vulnerabilities announced in public security advisory lists. Lisbon casts the format string attack prevention problem as an input argument list bound checking problem. To reduce the run-time checking overhead, Lisbon exploits the debug register hardware, which is available in most mainstream CPUs including Intel's X86 architecture, to detect if a callee accesses data outside the input argument list. Moreover, Lisbon is able to detect format string attacks without interpreting their format strings and is thus potentially applicable to similar attacks against other functions that access input arguments in the same way as printf(). The run-time throughput penalty of the first Lisbon prototype is under 2% for a set of test network applications that are known to be vulnerable to format string attacks.
doi:10.1109/acsac.2007.23 dblp:conf/acsac/LiC07 fatcat:fyn7sm54oraptgdhldhjglzp6q