[EN] T1055 - Process Injection
Platforms: Linux, macOS, Windows Created: 2025-06-03
Description
Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. 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.
There are many different ways to inject code into a process, many of which abuse legitimate functionalities. These implementations exist for every major OS but are typically platform specific.
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.
Details
Related Tactics
defense-evasion, privilege-escalation
Data Sources
Process: Process Access, Process: Process Modification, File: File Modification, Process: Process Metadata, File: File Metadata, Process: OS API Execution, Module: Module Load
Sub-techniques
T1055.013, T1055.012, T1055.009, T1055.015, T1055.014, T1055.005, T1055.011, T1055.001, T1055.003, T1055.008, T1055.004, T1055.002
Recommended Mitigations
M1026 - Privileged Account Management
M1040 - Behavior Prevention on Endpoint
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. Windows API calls such as CreateRemoteThread
, SuspendThread
/SetThreadContext
/ResumeThread
, QueueUserAPC
/NtQueueApcThread
, and those that can be used to modify memory within another process, such as VirtualAllocEx
/WriteProcessMemory
, may be used for this technique.(Citation: Elastic Process Injection July 2017)
Monitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process.
Monitoring for Linux specific calls such as the ptrace system call 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)
Analyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.
Response Procedures
Customize these procedures for your organization:
Detection:
Add your detection methods here
Containment:
Outline containment steps
Eradication:
Specify eradication actions
Recovery:
Document recovery procedures
References
GNU Acct - GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.
Elastic Process Injection July 2017 - Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.
RHEL auditd - Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.
Microsoft Sysmon v6 May 2017 - Russinovich, M. & Garnier, T. (2017, May 22). Sysmon v6.20. Retrieved December 13, 2017.
Chokepoint preload rootkits - stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.
Isto foi útil?