Real-Time Detection of Windows Shellcode Injection via the Cross-Process W^X Principle
Chengchun Wang, Xing Tian, Xiaoyu Wang, Yuxuan Zhu, Yaqin Cao, Jie Yin, Yuling Liu, Qixu Liu
Key points
From the paper's conclusion- Compared to three existing detection methods, XMemGuard can detect all 33 manually constructed PoC variants, while the strongest baseline method can only detect 30.
Abstract
Shellcode injection allows attackers to execute arbitrary code inside a target process without writing files to disk, and remains a common technique in modern malware and advanced persistent threats. Existing defenses cover only part of this threat landscape: Data Execution Prevention (DEP) prevents a process from executing its own data pages, and Arbitrary Code Guard (ACG) restricts dynamic code operations initiated by protected processes. However, neither mitigation prevents a remote process from acquiring executable memory in a target process through cross-process system calls. This paper presents XMemGuard , a kernel-mode detection framework that enforces the cross-process write-XOR-execute ( $$\text {W}\,\hat{\phantom{a}}\,\text {X}$$ W a ^ X ) principle: cross-process system calls must not create attacker-controlled executable memory in the target process. XMemGuard employs a pre-dispatch system-call interception mechanism based on Windows Event Tracing (ETW). This mechanism intercepts three categories of system calls responsible for cross-process acquisition of executable memory, removes the execution bit during the acquisition stage, and then uses an in-process monitoring component to capture the runtime outcomes of subsequent execution attempts. Compared to three existing detection methods, XMemGuard can detect all 33 manually constructed PoC variants, while the strongest baseline method can only detect 30. On in-the-wild samples, it achieves the highest accuracy, recall, and F1 score among the compared methods, with 99.79% precision. Furthermore, performance evaluations show that the overhead of XMemGuard is mainly concentrated in workloads with intensive cross-process memory operations, with a limited impact on overall system performance.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Breaking Windows Malware Detection: A Comprehensive Evaluation of Problem-Space Adversarial RobustnessarXiv · 2026
- EVAX: Towards a Practical, Pro-active & Adaptive Architecture for High Performance & SecurityarXiv · 2026
- PIMROP: A Feasibility Study of Return-Oriented Programming on Commercial Processing-in-Memory ArchitecturesarXiv · 2026
- Intrusion Models for Security Assessment: Methodology and Case Study on XenProceedings of the ACM on Software Engineering · 2026
- RACCO : Stateful and Cooperative Control‐Flow Integrity With Data‐Flow GuardingConcurrency and Computation: Practice and Experience · 2026
- PMO Checker: A Framework for Protecting Persistent Memory Objects Against Security AttacksACM Transactions on Architecture and Code Optimization · 2026