DocumentCode
647193
Title
Who allocated my memory? Detecting custom memory allocators in C binaries
Author
Xi Chen ; Slowinska, Asia ; Bos, Herbert
Author_Institution
Vrije Univ. Amsterdam, Amsterdam, Netherlands
fYear
2013
fDate
14-17 Oct. 2013
Firstpage
22
Lastpage
31
Abstract
Many reversing techniques for data structures rely on the knowledge of memory allocation routines. Typically, they interpose on the system´s malloc and free functions, and track each chunk of memory thus allocated as a data structure. However, many performance-critical applications implement their own custom memory allocators. Examples include webservers, database management systems, and compilers like gcc and clang. As a result, current binary analysis techniques for tracking data structures fail on such binaries. We present MemBrush, a new tool to detect memory allocation and deallocation functions in stripped binaries with high accuracy. We evaluated the technique on a large number of real world applications that use custom memory allocators. As we show, we can furnish existing reversing tools with detailed information about the memory management API, and as a result perform an analysis of the actual application specific data structures designed by the programmer. Our system uses dynamic analysis and detects memory allocation and deallocation routines by searching for functions that comply with a set of generic characteristics of allocators and deallocators.
Keywords
C language; data structures; program compilers; program diagnostics; storage management; C binaries; MemBrush tool; Web servers; application program interface; binary analysis techniques; clang compilers; custom memory allocators detection; data structures; database management systems; free functions; gcc compilers; malloc function; memory allocation function; memory chunk; memory deallocation function; memory management API; performance-critical applications; reversing techniques; Context; Data structures; Instruments; Memory management; Monitoring; Resource management; Tracking;
fLanguage
English
Publisher
ieee
Conference_Titel
Reverse Engineering (WCRE), 2013 20th Working Conference on
Conference_Location
Koblenz
Type
conf
DOI
10.1109/WCRE.2013.6671277
Filename
6671277
Link To Document