Skip to main navigation Skip to search Skip to main content

Retrofitting XoM for Stripped Binaries without Embedded Data Relocation

  • Department of Computer Science

Research output: Contribution to conference › Conference Paper › peer-review

Abstract

System programs are frequently coded in memory-unsafe languages such as C/C++, rendering them susceptible to a variety of memory corruption attacks. Among these, just-in-time return-oriented programming (JIT-ROP) stands out as an advanced form of code-reuse attack designed to circumvent code randomization defenses. JIT-ROP leverages memory disclosure vulnerabilities to dynamically harvest reusable code gadgets and construct attack payloads in real-time. To counteract JIT-ROP threats, researchers have developed multiple execute-only memory (XoM) prototypes to prevent dynamic reading and disassembly of memory pages. XoM, akin to the widely deployed W circle plus X protection, holds promise in enhancing security. However, existing XoM solutions may not be compatible with legacy and commercial off-the-shelf (COTS) programs, or they may require patching the protected binary to separate code and data areas, leading to poor reliability. In addition, some XoM methods have to modify the underlying architectural mechanism, compromising compatibility and performance. In this paper, we present PXoM, a practical technique to seamlessly retrofit XoM into stripped binaries on the x86-64 platform. As handling the mixture of code and data is a well-known challenge for XoM, most existing methods require the strict separation of code and data areas via either compile-time transformation or binary patching, so that the unreadable permission can be safely enforced at the granularity of memory pages. In contrast to previous approaches, we provide a fine-grained memory permission control mechanism to restrict the read permission of code while allowing legitimate data reads within code pages. This novelty enables PXoM to harden stripped binaries but without resorting to error-prone embedded data relocation. We leverage Intel's hardware feature, Memory Protection Keys, to offer an efficient fine-grained permission control. We measure PXoM's performance with both micro- and macro-benchmarks, and it only introduces negligible runtime overhead. Our security evaluation shows that PXoM leaves adversaries with little wiggle room to harvest all of the required gadgets, suggesting PXoM is practical for real-world deployment.
Original languageEnglish
Number of pages20
DOIs
StatePublished - 24 Feb 2025
Event2025 Network and Distributed System Security Symposium-NDSS - San Diego,CA, San Diego, Canada
Duration: 24 Feb 2025 → 28 Feb 2025

Conference

Conference2025 Network and Distributed System Security Symposium-NDSS
Country/TerritoryCanada
CitySan Diego
Period24/02/25 → 28/02/25

Funding

We thank our shepherd and all the anonymous reviewers for their valuable comments to improve this paper. This work is supported by the National Nature Science Foundation of China under Grant No. 62272351, 61972297, and 62172308. Jiang Ming was supported by NSF grants 2312185 & 2417055 and Google Research Scholar Award.

Indexed by

  • CPCI-S

Fingerprint

Dive into the research topics of 'Retrofitting XoM for Stripped Binaries without Embedded Data Relocation'. Together they form a unique fingerprint.

Cite this