Visible to the public Juggling the Gadgets: Binary-level Code Randomization Using Instruction Displacement

TitleJuggling the Gadgets: Binary-level Code Randomization Using Instruction Displacement
Publication TypeConference Paper
Year of Publication2016
AuthorsKoo, Hyungjoon, Polychronakis, Michalis
Conference NameProceedings of the 11th ACM on Asia Conference on Computer and Communications Security
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-4233-9
Keywordscode diversification, composability, Metrics, pubcrawl, Resiliency, return-oriented programming, rop attacks, Scalability

Code diversification is an effective mitigation against return-oriented programming attacks, which breaks the assumptions of attackers about the location and structure of useful instruction sequences, known as "gadgets". Although a wide range of code diversification techniques of varying levels of granularity exist, most of them rely on the availability of source code, debug symbols, or the assumption of fully precise code disassembly, limiting their practical applicability for the protection of closed-source third-party applications. In-place code randomization has been proposed as an alternative binary-compatible diversification technique that is tolerant of partial disassembly coverage, in the expense though of leaving some gadgets intact, at the disposal of attackers. Consequently, the possibility of constructing robust ROP payloads using only the remaining non-randomized gadgets is still open. In this paper we present instruction displacement, a code diversification technique based on static binary instrumentation that does not rely on complete code disassembly coverage. Instruction displacement aims to improve the randomization coverage and entropy of existing binary-level code diversification techniques by displacing any remaining non-randomized gadgets to random locations. The results of our experimental evaluation demonstrate that instruction displacement reduces the number of non-randomized gadgets in the extracted code regions from 15.04% for standalone in-place code randomization, to 2.77% for the combination of both techniques. At the same time, the additional indirection introduced due to displacement incurs a negligible runtime overhead of 0.36% on average for the SPEC CPU2006 benchmarks.

Citation Keykoo_juggling_2016