{"id":117143,"date":"2022-06-30T06:30:00","date_gmt":"2022-06-30T13:30:00","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/?p=117143"},"modified":"2023-05-26T14:29:18","modified_gmt":"2023-05-26T21:29:18","slug":"using-process-creation-properties-to-catch-evasion-techniques","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2022\/06\/30\/using-process-creation-properties-to-catch-evasion-techniques\/","title":{"rendered":"Using process creation properties to catch evasion techniques"},"content":{"rendered":"\n

We developed a robust detection method in Microsoft Defender for Endpoint<\/a> that can catch known and unknown variations of a process execution class used by attackers to evade detection. This class of stealthy execution techniques breaks some assumptions made by security products and enables attackers to escape antimalware scans by circumventing process creation callbacks using a legacy process creation syscall. Publicly known variations of this class are process doppelganging, process herpaderping, and process ghosting.<\/p>\n\n\n\n

Evasion techniques used by attackers often involve running malware within the context of a trusted process or hiding code from filesystem and memory scanners. More sophisticated attackers even carefully choose their process host so that their actions are run by a process that often performs these actions for benign reasons. For example, a browser process communicating with the internet seems completely normal, while an instance of cmd.exe<\/em> doing the same sticks out like a sore thumb. This class of stealthy execution techniques, however, allows malware to create its own malicious process and prevent antimalware engines from detecting it.<\/p>\n\n\n\n

This blog post presents our detailed analysis of how this process execution class works and how it takes advantage of Windows functionalities to evade detection. It also presents a peek into the research, design, and engineering concerns that go into the development of a detection method aiming to be as robust and future-proof as possible.<\/p>\n\n\n\n

Common classes of stealthy process execution<\/h2>\n\n\n\n

On Windows systems, most methods attackers use to run code within another process fall within two classes: process injection<\/em> and process hollowing<\/em>. These classes allow attackers to run their code within another process without explicitly creating it from an executable, or making it load a dynamic link library (DLL).  Similar classes of techniques are often also called process injection, but this term will be used in a more specific definition for clarity.<\/p>\n\n\n\n

Process injection<\/h3>\n\n\n\n

Process injection, the widest and most common class, consists of different techniques that introduce attacker-supplied executable memory into an already running process. Techniques in this class consist of two main parts:<\/p>\n\n\n\n