logo

StackMoonwalk: A Novel approach to stack spoofing on Windows x64

Conference:  Defcon 31

2023-08-01

Authors:   Alessandro Magnosi Principal Security Consultant - BSI, Arash Parsa, Athanasios "trickster0" Tserpelis Red Teamer and Malware Developer


Abstract

The rapid advancement of cyber defense products has led to an increase in sophisticated memory evasion techniques employed by Red Teaming and Malware Development communities. These techniques aim to bypass the detection of malicious code by concealing its presence in a target process's memory. Among these methods, "Thread Stack Spoofing" is a technique that hides malicious calls in the stack by replacing arbitrary stack frames with fake ones. In this talk, we present two novel approaches, "Full Moon" and "Half Moon," for tampering with call stacks in a manner that is both opaque and difficult to detect. These techniques manipulate the call stack to produce unwinding or logically valid stacks, thwarting conventional detection methods. We also introduce a detection algorithm, Eclipse, designed to identify instances of these tampering techniques. This algorithm extends the functionality of RtlVirtualUnwind to perform strict checks on specific instructions and call sequences, enabling the detection of tampered call stacks. We evaluate the efficacy of Eclipse against both Full Moon and Half Moon techniques and discuss its performance and limitations. Additionally, we explore the possibility of combining these techniques to create an even more robust method for call stack tampering that is resistant to detection. Our study contributes to the growing body of knowledge in the field of call stack tampering and detection and provides valuable insights for researchers and security professionals aiming to mitigate such threats.

Materials:

Post a comment

Related work


Conference:  Defcon 31
Authors: STÖK Hacker / Creative - Truesec
2023-08-01

Conference:  Defcon 31
Authors: Jonathan Birch Principal Security Software Engineer, Microsoft
2023-08-01



Conference:  Defcon 31
Authors: Sharon Brizinov Director of Security Research @ Claroty Team82, Noam Moshe Vulnerability Researcher @ Claroty Team82
2023-08-01