When malicious code runs inside a trusted process, process-based allowlists, firewall rules and parent-child analytics all see the trusted process, not the intruder. MITRE ATT&CK T1055 Process Injection covers executing code in the address space of another live process, which hides execution and can inherit that process's privileges, network access and memory. In ATT&CK v20 it belongs to both Stealth (TA0005) and Privilege Escalation (TA0004) and has twelve sub-techniques across Windows and Linux, plus macOS at the parent level. This guide explains the families at the level of the ATT&CK descriptions, then covers the telemetry and detection strategies that expose injection, the operating system mitigations that block it, and how to roll them out without breaking software. It is for detection engineers, endpoint owners and incident responders; it contains no injection code or procedures.
Key takeaways
- Injection is a cross-process event. Almost every method needs one process to open, write to or start a thread in another, which Sysmon 8 and 10, ETW and Linux audit can record.
- Target choice is the best filter. Injection into LSASS, browsers, security agents or long-running system services from an unusual source is rare in benign software; broad cross-process access is common.
- Memory evidence outlives events. Executable memory not backed by a file on disk, and hollowed images that do not match their file, are strong indicators for EDR and memory forensics.
- The platform can say no. LSA protection, exploit protection mitigations, ASR rules and Linux Yama ptrace restrictions block whole classes of injection.
- Test before enforcing. Exploit protection and LSA protection have audit modes because legitimate software, including security tools, sometimes uses the same mechanisms.
How the attack works
ATT&CK defines process injection as "a method of executing arbitrary code in the address space of a separate live process". Running in another process may give access to its memory, system and network resources and possibly elevated privileges, and execution "may also evade detection from security products since the execution is masked under a legitimate process". Many implementations abuse legitimate operating system features, and sophisticated samples split modules across several processes and talk over named pipes or other inter-process communication.
| Family | Sub-techniques (v20) | Defender view | Strategy |
|---|---|---|---|
| Loading code into a running process | .001 Dynamic-link Library Injection, .002 Portable Executable Injection | Remote memory allocation and write, then a new thread or module in the target | DET0389, DET0106 |
| Redirecting existing threads | .003 Thread Execution Hijacking, .004 Asynchronous Procedure Call, .005 Thread Local Storage | No new thread, but thread context or queue changes in the target | DET0295, DET0100, DET0467 |
| Replacing a process image | .012 Process Hollowing, .013 Process Doppelgänging | Process started suspended, image in memory differs from the file on disk | DET0382, DET0544 |
| Window and message mechanisms | .011 Extra Window Memory Injection, .015 ListPlanting | Code placed in window-related memory of another process | DET0217, DET0331 |
| Linux debugging and memory interfaces | .008 Ptrace System Calls, .009 Proc Memory, .014 VDSO Hijacking | ptrace attach, writes to /proc/[pid]/mem, unexpected mappings | DET0203, DET0541, DET0448 |
Related techniques are T1620 Reflective Code Loading (code loaded into the attacker's own process memory) and T1574 Hijack Execution Flow (making a legitimate process load attacker code at start-up). See the T1574 Hijack Execution Flow Defensive Guide.
Where it shows up
- Commodity malware and loaders: ATT&CK v20 links T1055 to 57 malware families and 15 groups, with process hollowing (.012) recorded for groups such as menuPass, Kimsuky and TA2541.
- Post-exploitation frameworks: beacons and implants that migrate into long-lived processes to survive the initial process exiting. See the Top 10 EDR Evasion Techniques.
- Supply chain implants: ATT&CK records the 3CX supply chain attack injecting a C2 module into a running browser process, so network traffic came from a browser.
- Credential theft: code injected into or reading from LSASS. See the Credential Dumping Guide.
- Linux servers: ptrace and
/procmemory writes on hosts where debugging is not restricted.
Impact
- Hidden execution: process allowlisting and lineage analytics attribute activity to the host process.
- Borrowed trust: firewall rules, proxy policies and EDR exclusions for the host process now apply to the attacker.
- Privilege gain: injecting into a process running as SYSTEM or root, which is why ATT&CK also lists T1055 under Privilege Escalation.
- Fileless persistence in memory: little or nothing on disk to scan, so evidence is lost at reboot unless memory is captured.
Detection
ATT&CK v20 maps DET0508 to the parent technique. Its Windows analytic correlates remote memory allocation and writes, suspicious thread creation and unusual module loads; its Linux analytic watches ptrace, mmap and process_vm_writev system calls and access to /proc/[pid]/mem; its macOS analytic watches task-port access, memory writes and dynamic library insertion.
| Telemetry | Event or source | Analytic idea |
|---|---|---|
| Remote thread creation | Sysmon 8 CreateRemoteThread (source, target, StartAddress, StartModule, StartFunction) | Threads started in another process from an unusual source, or with an empty StartModule (start address outside any loaded module) |
| Cross-process handle access | Sysmon 10 ProcessAccess with GrantedAccess | Write or thread-create access rights into LSASS, browsers or security agents from processes outside an allowlist; Sysmon says to filter this event because it is high volume |
| Image tampering | Sysmon 25 ProcessTampering | Raised when hiding techniques such as hollowing or herpaderping are detected; alert on every occurrence |
| Module loads | Sysmon 7 ImageLoaded | DLLs loaded into sensitive processes from user-writable paths or unsigned |
| Suspended starts | Sysmon 1 plus EDR or ETW kernel process events | Processes created suspended and then modified before resuming (DET0382) |
| IPC between processes | Sysmon 17 and 18 pipe events | Unusual named pipes between a browser or system process and an unrelated parent |
| Linux | auditd rules on ptrace and process_vm_writev syscalls; file watches on /proc/*/mem | ptrace by processes that are not debuggers, writes to another process's memory |
| LSASS protection | CodeIntegrity Operational 3033 and 3063 (blocked), 3065 and 3066 (audit); System WinInit 12 | Blocked plug-in loads into LSASS; confirmation LSASS started as a protected process |
Memory analysis
Endpoint products and memory forensics look for private executable memory regions with no backing file, mismatches between a process's in-memory image and its file, and threads whose start addresses fall outside loaded modules. When an injection alert fires, capture memory before rebooting or killing the process. See the Memory Forensics Guide and the Volatility 3 Guide.
Tuning
- Know legitimate injectors: EDR agents, accessibility tools, debuggers, some DRM and game overlays. Allowlist by signer and path, never by process name alone.
- Prioritise targets: start with LSASS, security agent processes, browsers, Office applications and services running as SYSTEM.
- Correlate: injection plus a new outbound connection from the target is far stronger than either alone. See the Sysmon Guide.
Metrics
- Telemetry coverage: share of Windows endpoints sending Sysmon 8, 10 (filtered) and 25 or equivalent EDR events.
- LSA protection coverage: share of endpoints and servers with WinInit event 12 showing protected LSASS.
- ASR injection rule state: share of devices with "Block Office applications from injecting code into other processes" in Block mode.
- Linux ptrace restriction: share of servers with
ptrace_scopeset to 1 or higher. - Memory capture rate: share of confirmed injection incidents with a memory image taken before remediation.
Prevention and hardening
Windows
- LSA protection: Microsoft states that running LSASS as a protected process prevents non-protected processes "from reading memory and injecting code". Set
RunAsPPLunderHKLM\SYSTEM\CurrentControlSet\Control\Lsato 1 (UEFI lock) or 2 (no lock, Windows 11 22H2 and later). Audit first withAuditLevel= 8 under the LSASS.exe Image File Execution Options key and review events 3065 and 3066. It is on by default only for new, enterprise-joined, HVCI-capable Windows 11 22H2 and later installs. - ASR rules (M1040): "Block Office applications from injecting code into other processes" (
75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84) and "Block credential stealing from the Windows local security authority subsystem" (9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2). Neither supports Warn mode; Microsoft notes the LSASS rule is redundant where LSA protection is on. - Exploit protection (M1050): per-application mitigations such as Arbitrary code guard (no new executable memory), Code integrity guard (Microsoft-signed images only), Block remote images, Block low integrity images and Disable extension points (AppInit DLLs, legacy IMEs, event hooks). Most have audit mode; Disable extension points does not. ACG breaks JIT compilers, so apply it to applications that do not generate code.
- Application control: App Control for Business or allowlisting limits which images and DLLs can load at all. See the Application Allowlisting Guide.
Linux and macOS
- Yama ptrace scope (M1026): ATT&CK recommends restricting ptrace to privileged users. The kernel Yama documentation defines
kernel.yama.ptrace_scopevalues: 1 restricts attach to descendants, 2 requires CAP_SYS_PTRACE, and 3 disables ptrace attach entirely and cannot then be changed. Use 2 on production servers where nobody debugs, 1 as a minimum elsewhere. - Mandatory access control: ATT&CK also points to security modules such as SELinux and AppArmor to restrict process access.
- macOS: keep System Integrity Protection and hardened runtime enabled for in-house applications, and watch for dynamic library insertion in ATT&CK's macOS analytic.
Choosing controls
| Environment | Start with | Watch out for |
|---|---|---|
| Windows workstations | LSA protection, Office injection ASR rule, Sysmon 8, 10 and 25 | Older LSA plug-ins, Office add-ins that inject legitimately |
| Windows servers | LSA protection with UEFI lock on domain controllers, exploit protection on internet-facing services | Backup and monitoring agents that open LSASS |
| Linux fleet | ptrace_scope 2, auditd ptrace rules, SELinux or AppArmor enforcing | Debugging and profiling tools used by developers on shared hosts |
| Small organisation | Built-in EDR with injection protections on, LSA protection, ASR rules | Limited hunting capacity: favour blocking controls |
Phased rollout
- Telemetry: deploy Sysmon or confirm EDR coverage of cross-process events, with filtered event 10.
- Audit: LSA protection audit mode, ASR rules in Audit and exploit protection audit for chosen applications, for two to four weeks.
- Fix compatibility: update or replace plug-ins and add-ins that fail; document any exception with an owner.
- Enforce in rings: pilot, then broad deployment. Rollback is policy removal, except LSA protection with UEFI lock, which needs Microsoft's opt-out tool.
- Linux: set ptrace_scope through configuration management; avoid value 3 until you are sure nothing needs ptrace, because it cannot be lowered without a reboot.
- Validate: run authorised injection emulations in a lab and confirm alerts. See the Purple Teaming Guide.
Common failure patterns
- Unfiltered Sysmon 10: collected from every process, it floods the SIEM and is dropped; filter to sensitive targets and access masks.
- Name-based allowlists: excluding a process by name lets an attacker inject into exactly that process. See the EDR Tuning and Exclusions Management Guide.
- Killing before capturing: terminating the injected process or rebooting removes the in-memory evidence.
- LSA protection never verified: policy set but WinInit event 12 absent because a reboot or a plug-in failure stopped it.
- Developer hosts left open: ptrace_scope 0 on shared Linux jump hosts.
Framework mapping
| Framework | References |
|---|---|
| ATT&CK mitigations | M1040 Behavior Prevention on Endpoint, M1026 Privileged Account Management, M1050 Exploit Protection, M1038 Execution Prevention |
| NIST SP 800-53 Rev. 5 | SI-16 Memory Protection, SI-3 Malicious Code Protection, SI-4 System Monitoring, CM-7 Least Functionality, AC-6 Least Privilege |
| NIST CSF 2.0 | PR.PS-05 (unauthorised software execution prevented), DE.CM-09 (monitoring of software and runtime environments), DE.AE-02 (analysis of adverse events) |
| CIS Controls v8.1 | Control 10 Malware Defenses, Control 4 Secure Configuration |
| MITRE D3FEND | D3-PA Process Analysis, D3-PCSV Process Code Segment Verification, D3-SCA System Call Analysis, D3-EAL Executable Allowlisting |
Where identity fits
Injection is often a route to identity material: tokens, tickets and secrets held in the memory of LSASS, browsers, agents and services running as service accounts. Protect those processes first, keep service accounts out of interactive sessions so their credentials are not in workstation memory, and rotate any credential held by a process found injected. See the Service Account Security Guide.
Practitioner checklist
- Collect Sysmon 8, 25 and filtered 10 (or EDR equivalents) and alert on injection into LSASS, browsers and security agents.
- Enable LSA protection after audit mode, and confirm WinInit event 12 on every host.
- Run the Office injection and LSASS ASR rules in Audit, then Block.
- Apply exploit protection mitigations, starting in audit, to high-risk applications that do not use JIT.
- Set Linux ptrace_scope to 1 or 2 and audit ptrace and process_vm_writev calls.
- Allowlist legitimate injectors by signer and path, and review the list quarterly.
- Capture memory before killing a process flagged for injection.
- Rotate credentials held by any process confirmed as injected.
Standards and references
- MITRE ATT&CK: Process Injection (T1055)
- MITRE ATT&CK: Process Hollowing (T1055.012)
- MITRE ATT&CK: Ptrace System Calls (T1055.008)
- Microsoft Learn: Sysmon
- Microsoft Learn: Configure added LSA protection
- Microsoft Learn: Exploit protection reference
- Microsoft Learn: Attack surface reduction rules reference
- Linux kernel documentation: Yama
Related NHI Mgmt Group resources: Top 10 EDR Evasion Techniques · EDR Evasion and Defence Guide · Memory Forensics Guide · ATT&CK Stealth and Defense Impairment Tactics Guide · Credential Dumping Guide