Common Information
Type Value
Value
Process Injection - T1055
Category Attack-Pattern
Type Mitre-Enterprise-Attack-Attack-Pattern
Misp Type Cluster
Description Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process. ===Windows=== There are multiple approaches to injecting code into a live process. Windows implementations include: (Citation: Engame Process Injection July 2017) * '''Dynamic-link library (DLL) injection''' involves writing the path to a malicious DLL inside a process then invoking execution by creating a remote thread. * '''Portable executable injection''' involves writing malicious code directly into the process (without a file on disk) then invoking execution with either additional code or by creating a remote thread. The displacement of the injected code introduces the additional requirement for functionality to remap memory references. Variations of this method such as reflective DLL injection (writing a self-mapping DLL into a process) and memory module (map DLL when writing into process) overcome the address relocation issue. (Citation: Endgame HuntingNMemory June 2017) * '''Thread execution hijacking''' involves injecting malicious code or the path to a DLL into a thread of a process. Similar to Process Hollowing, the thread must first be suspended. * '''Asynchronous Procedure Call''' (APC) injection involves attaching malicious code to the APC Queue (Citation: Microsoft APC) of a process's thread. Queued APC functions are executed when the thread enters an alterable state. AtomBombing (Citation: ENSIL AtomBombing Oct 2016) is a variation that utilizes APCs to invoke malicious code previously written to the global atom table. (Citation: Microsoft Atom Table) * '''Thread Local Storage''' (TLS) callback injection involves manipulating pointers inside a portable executable (PE) to redirect a process to malicious code before reaching the code's legitimate entry point. (Citation: FireEye TLS Nov 2017) ===Mac and Linux=== Implementations for Linux and OS X/macOS systems include: (Citation: Datawire Code Injection) (Citation: Uninformed Needle) *'''LD_PRELOAD, LD_LIBRARY_PATH''' (Linux), '''DYLD_INSERT_LIBRARIES''' (Mac OS X) environment variables, or the dlfcn application programming interface (API) can be used to dynamically load a library (shared object) in a process which can be used to intercept API calls from the running process. (Citation: Phrack halfdead 1997) *'''Ptrace system calls''' can be used to attach to a running process and modify it in runtime. (Citation: Uninformed Needle) *'''/proc/[pid]/mem''' provides access to the memory of the process and can be used to read/write arbitrary data to it. This technique is very rare due to its complexity. (Citation: Uninformed Needle) *'''VDSO hijacking''' performs runtime injection on ELF binaries by manipulating code stubs mapped in from the linux-vdso.so shared object. (Citation: VDSO hijack 2009) Malware commonly utilizes process injection to access system resources through which Persistence and other environment modifications can be made. More sophisticated samples may perform multiple process injections to segment modules and further evade detection, utilizing named pipes or other inter-process communication (IPC) mechanisms as a communication channel. Detection: Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. API calls such as CreateRemoteThread, SuspendThread/SetThreadContext/ResumeThread, QueueUserAPC, and those that can be used to modify memory within another process, such as WriteProcessMemory, may be used for this technique. (Citation: Engame Process Injection July 2017) Monitoring for Linux specific calls such as the ptrace system call, the use of LD_PRELOAD environment variable, or dlfcn dynamic linking API calls, should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods. (Citation: ArtOfMemoryForensics) (Citation: GNU Acct) (Citation: RHEL auditd) (Citation: Chokepoint preload rootkits) Monitor for named pipe creation and connection events (Event IDs 17 and 18) for possible indicators of infected processes with external modules. (Citation: Microsoft Sysmon v6 May 2017) Monitor processes and command-line arguments for actions that could be done before or after code injection has occurred and correlate the information with related event information. Code injection may also be performed using PowerShell with tools such as PowerSploit, (Citation: Powersploit) so additional PowerShell monitoring may be required to cover known implementations of this behavior. Platforms: Linux, macOS, Windows Data Sources: API monitoring, Windows Registry, File monitoring, DLL monitoring, Named Pipes, Process Monitoring Effective Permissions: User, Administrator, SYSTEM, root Defense Bypassed: Process whitelisting, Anti-virus Permissions Required: User, Administrator, SYSTEM, root Contributors: Anastasios Pingios
Details Published Attributes CTI Title
Details Website 2023-03-30 141 New TACTICAL#OCTOPUS Attack Campaign Targets US Entities with Malware Bundled in Tax-Themed Documents
Details Website 2023-03-27 90 DBatLoader Actively Distributing Malwares Targeting Europea
Details Website 2023-03-25 3 BC Security Empire Ops I & II
Details Website 2023-03-24 15 Dark Web Threat Profile: CLOP Ransomware - SOCRadar
Details Website 2023-03-23 16 MrRobot (Cyberdefenders)
Details Website 2023-03-23 29 BlackGuard stealer extends its capabilities in new variant - Cybersecurity Insiders
Details Website 2023-03-17 191 Inside Mispadu massive infection campaign in LATAM - Metabase Q
Details Website 2023-03-15 168 APT-C-36: from NjRAT to LimeRAT
Details Website 2023-03-15 243 DotRunpeX - demystifying new virtualized .NET injector used in the wild - Check Point Research
Details Website 2023-03-14 59 The slow Tick‑ing time bomb: Tick APT group compromise of a DLP software developer in East Asia | WeLiveSecurity
Details Website 2023-03-13 3 ScrubCrypt Attack Detection: 8220 Gang Applies Novel Malware in Cryptojacking Operations Exploiting Oracle WebLogic Servers - SOC Prime
Details Website 2023-03-12 1 How I managed to get 92% on the GIAC GREM CyberLive exam!
Details Website 2023-03-10 4 Emotet Again! The First Malspam Wave of 2023 | Deep Instinct
Details Website 2023-03-09 86 Stealing the LIGHTSHOW (Part One) — North Korea's UNC2970 | Mandiant
Details Website 2023-03-08 1 Phishing Campaign Targeting Eastern Europe Delivers Remcos RAT Malware
Details Website 2023-03-06 4 MQsTTang Backdoor Detection: New Custom Malware by Mustang Panda APT Actively Used in the Latest Campaign Against Government Entities   - SOC Prime
Details Website 2023-03-06 58 2022 Year in Review - The DFIR Report
Details Website 2023-03-06 3 Old Windows ‘Mock Folders’ UAC bypass used to drop malware
Details Website 2023-03-02 199 Russia/Ukraine Update - February 2023
Details Website 2023-03-01 103 BlackLotus UEFI bootkit: Myth confirmed | WeLiveSecurity
Details Website 2023-03-01 70 Multi-Year Spearphishing Campaign Targets the Maritime Industry Likely for Financial Gain 
Details Website 2023-02-28 56 Anomali Cyber Watch: Newly-Discovered WinorDLL64 Backdoor Has Code Similarities with Lazarus GhostSecret, Atharvan Backdoor Can Be Restricted to Communicate on Certain Days
Details Website 2023-02-27 76 Lumma Stealer targets YouTubers via Spear-phishing Email
Details Website 2023-02-27 19 Twice around the dance floor - Elastic discovers the PIPEDANCE backdoor — Elastic Security Labs
Details Website 2023-02-24 2 FIRP — First Incident Response Framework