SOP-29: Fileless Malware / Process Injection Response

·

Fileless malware and process injection techniques execute entirely in memory, leaving no file artefacts on disk for traditional antivirus to scan. Attackers inject shellcode or reflective DLLs into legitimate processes — notepad.exe, svchost.exe, explorer.exe — to inherit their trust and blend into normal system activity. Process hollowing replaces a legitimate process image with malicious code before execution begins. PPID spoofing forges the parent process ID so that a malicious process appears to be spawned from a trusted parent.

Key data sources: DeviceEvents (CreateRemoteThreadApiCall, InjectIntoProcess action types from MDE), DeviceProcessEvents (anomalous parent-child relationships), Sysmon Event 8 (CreateRemoteThread — if Sysmon deployed).

☰ Table of Contents

01 Background 02 Identification 03 Containment 04 Eradication 05 Escalation
🛠

01 — BACKGROUND

TECHNIQUE OVERVIEW
01
Technique Overview — Fileless Execution & Injection
MITRE T1055

Process injection is the foundation of most advanced persistent threat campaigns because it evades file-based detection entirely. The attacker's code runs inside a legitimate, signed, trusted process — the malicious behaviour is attributed to that process, not to any file on disk. MDE detects injection events via kernel-level hooks on Windows APIs (NtCreateThreadEx, VirtualAllocEx, WriteProcessMemory, NtMapViewOfSection) and reports them as DeviceEvents with injection-typed ActionTypes.

FieldValue
MITRE TechniquesT1055 — Process Injection (parent)
T1055.001 — Dynamic-link Library Injection
T1055.012 — Process Hollowing
T1134.004 — Access Token Manipulation: Parent PID Spoofing
Kill-chain PhaseDefense Evasion, Privilege Escalation
Primary Log SourceDeviceEvents (MDE) — injection ActionTypes
Secondary Log SourcesDeviceProcessEvents (parent-child anomalies), Sysmon Event 8 (CreateRemoteThread), SecurityEvent 4656 (handle request on process)
Common Injection Targetssvchost.exe, explorer.exe, notepad.exe, lsass.exe, dllhost.exe, msiexec.exe
Default SeveritySEV1 if injecting into lsass.exe; SEV2 for other targets pending investigation

Injection into lsass.exe is always SEV1 regardless of other context — it indicates credential dumping in progress (cross-reference SOP-27). Do not wait for further evidence before isolating.

🔍

02 — IDENTIFICATION

2 INDICATORS
▶ Investigation Workflow
I1
Remote Thread Injection & Process Hollowing Events
T1055 / T1055.012
WHY CHECK

MDE reports process injection at the kernel API level via DeviceEvents. CreateRemoteThreadApiCall, InjectIntoProcess, and ProcessInjection ActionTypes indicate an attacker's process is writing code into another process's memory space and executing it. This is the primary indicator for Cobalt Strike beacon injection, Meterpreter reflective DLL loading, and process hollowing.

📍 Portal Navigation — MDE Advanced Hunting
security.microsoft.com› Hunting› Advanced Hunting
  • 1Open Advanced Hunting and run the DeviceEvents query below. Set time range to Last 1 hour.
  • 2For each result, note the FileName (injecting process) and ProcessId (target process). Navigate to the Device Timeline and filter on that ProcessId to see all activity of the injected process.
  • 3If the target process is lsass.exe — escalate to SEV1 immediately and cross-reference SOP-27 (credential dumping).
  • 4Check whether the injecting process has a file on disk: query DeviceFileEvents | where FileName == "<injecting process>". Absence of a file on disk with an active process = fileless execution confirmed.
  • 5Navigate to Incidents & alerts → Alerts to check if MDE has already auto-classified this as a process injection alert.
ActionType / IndicatorMeaningSeverity
CreateRemoteThreadApiCallCreateRemoteThread API called — classic DLL injection or shellcode injection mechanismCRITICAL
InjectIntoProcessMDE-classified injection event — code injected into remote process address spaceCRITICAL
ProcessInjectionGeneric injection detection — includes VirtualAllocEx + WriteProcessMemory patternsHIGH
NtMapViewOfSection injectionSection-based injection (Process Doppelganging / transacted hollowing)CRITICAL
Target: lsass.exeInjection into LSASS — credential dumping in progress (also see SOP-27)CRITICAL
Target: svchost.exe / explorer.exeInjection into common host processes for C2 beacon hidingHIGH
No file on disk for injecting processShellcode-only execution — no binary exists, payload lives entirely in memoryCRITICAL
DETECTS: CreateRemoteThread, InjectIntoProcess, and ProcessInjection events from MDE kernel telemetry — all remote code injection methods
KQL — Microsoft Sentinel / Defender XDR Advanced Hunting
DeviceEvents | where Timestamp > ago(1h) | where ActionType in ( "CreateRemoteThreadApiCall", "InjectIntoProcess", "ProcessInjection", "QueueUserApcRemoteApiCall", "SetThreadContextRemoteApiCall") | project Timestamp, DeviceName, AccountName, ActionType, FileName, ProcessId, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessId, InitiatingProcessCommandLine, InitiatingProcessParentFileName | order by Timestamp desc
DETECTS: Same injection event coverage in Splunk via MDE telemetry index
SPL — Splunk
index=mde sourcetype=DeviceEvents ActionType IN ("CreateRemoteThreadApiCall","InjectIntoProcess","ProcessInjection","QueueUserApcRemoteApiCall","SetThreadContextRemoteApiCall") | table _time DeviceName AccountName ActionType FileName ProcessId InitiatingProcessFileName InitiatingProcessCommandLine | sort -_time
I2
Anomalous Parent-Child Process Chains & PPID Spoofing
T1055 / T1134.004
WHY CHECK

Process hollowing creates processes that appear legitimate from the outside but execute malicious code. PPID spoofing creates a process with a spoofed parent — e.g. a malicious process spawning cmd.exe while making it appear to come from explorer.exe. These techniques defeat parent-process-based detection rules. Anomalous parent-child chains (Office spawning PowerShell, notepad spawning cmd) are the most reliable behavioral indicator when direct injection telemetry is unavailable.

📍 Portal Navigation — Device Timeline & Advanced Hunting
security.microsoft.com› Assets› Devices› [Device Name]› Device Timeline
  • 1Open the Device Timeline for the affected host. Filter by Process events. Look for Office applications (winword.exe, excel.exe) spawning cmd.exe, powershell.exe, wscript.exe, or mshta.exe.
  • 2Run the Advanced Hunting KQL query below to find unexpected parent-child relationships across the fleet.
  • 3For PPID spoofing: check whether the InitiatingProcessParentFileName and the actual InitiatingProcessId match a currently running process. A mismatched PID (spoofed parent no longer running at that PID) is a strong PPID spoof indicator.
  • 4Check whether a process with a legitimate name (notepad.exe, calc.exe) is making network connections — this almost always indicates process hollowing where the legitimate image was replaced with C2 shellcode.
  • 5Cross-reference with DeviceNetworkEvents — a svchost.exe instance connecting to a non-Microsoft IP on port 443/4444/8080/8443 immediately after an injection event is a confirmed C2 beacon.
Parent ProcessUnexpected ChildLikely Technique
winword.exe / excel.exe / outlook.execmd.exe, powershell.exe, wscript.exe, mshta.exeMalicious macro / phishing initial access
notepad.exe / calc.exe / mspaint.exeAny network connection outboundProcess hollowing — legitimate image replaced
svchost.exe (non-SYSTEM)cmd.exe / powershell.exe with encoded commandShellcode injection into svchost
explorer.execmd.exe → powershell.exe with -EncodedCommandPPID spoofing from injected explorer
Any processSpawned process PID does not match InitiatingProcessId in recordsPPID spoofing via UpdateProcThreadAttribute
DETECTS: Office applications spawning shell interpreters; process hollowing indicators (legitimate names with network activity); encoded command child processes
KQL — Suspicious Parent-Child Process Chains
DeviceProcessEvents | where Timestamp > ago(1h) | where (InitiatingProcessFileName in~ ("winword.exe","excel.exe","outlook.exe","powerpnt.exe","onenote.exe") and FileName in~ ("cmd.exe","powershell.exe","wscript.exe","cscript.exe","mshta.exe","rundll32.exe")) or (InitiatingProcessFileName in~ ("notepad.exe","calc.exe","mspaint.exe","write.exe") and isnotempty(ProcessCommandLine)) or (FileName in~ ("cmd.exe","powershell.exe") and ProcessCommandLine has_any ("-EncodedCommand","-enc","-e ","IEX","Invoke-Expression") and InitiatingProcessFileName !in~ ("powershell.exe","pwsh.exe","cmd.exe","explorer.exe","conhost.exe")) | project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine, InitiatingProcessParentFileName, SHA256 | order by Timestamp desc
DETECTS: Hollowed processes making network connections — legitimate process names contacting non-standard external IPs
KQL — Hollowed Process Network Activity
DeviceNetworkEvents | where Timestamp > ago(1h) | where InitiatingProcessFileName in~ ("notepad.exe","calc.exe","mspaint.exe","write.exe","wordpad.exe") and not(RemoteIPType == "Private") | project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessId, RemoteIP, RemotePort, RemoteUrl | order by Timestamp desc
SPL — Anomalous Parent-Child
index=mde sourcetype=DeviceProcessEvents (InitiatingProcessFileName IN ("winword.exe","excel.exe","outlook.exe","powerpnt.exe") AND FileName IN ("cmd.exe","powershell.exe","wscript.exe","cscript.exe","mshta.exe")) OR (InitiatingProcessFileName IN ("notepad.exe","calc.exe","mspaint.exe") AND isnotnull(ProcessCommandLine)) | table _time DeviceName AccountName InitiatingProcessFileName FileName ProcessCommandLine | sort -_time

PPID spoofing is confirmed when InitiatingProcessParentFileName says "explorer.exe" but the process tree in Device Timeline shows the true creator was a recently spawned, short-lived cmd.exe. Always verify the actual process tree in MDE Device Timeline — do not rely solely on parent name fields.

🚫

03 — CONTAINMENT

IMMEDIATE ACTION
C1
Verdict & Escalation Decision
DECISION GATE
▶ Triage Verdict — Select One
CONFIRMED CreateRemoteThreadApiCall or InjectIntoProcess event confirmed; lsass.exe target; hollowed process with network activity — SEV1, acquire memory image FIRST, then isolate immediately
PARTIAL Anomalous parent-child chain without confirmed injection event; encoded command from unexpected parent — SEV2, investigate process chain, prepare for isolation
FALSE POSITIVE Known security tool (CrowdStrike, Carbon Black, Sophos) performing self-injection or inter-process monitoring; known legitimate software using COM injection — verify hash, close with justification

Collect a memory image (RAM dump) via MDE Live Response BEFORE network isolation. Process injection leaves no disk artefacts — the injected shellcode exists only in memory. Rebooting or isolating first destroys all forensic evidence.

C2
Memory Acquisition & Endpoint Isolation
FORENSICS FIRST
📍 Portal Navigation — MDE Live Response
security.microsoft.com› Assets› Devices› [Device Name]› Initiate Live Response
  • 1Open the device in Assets → Devices. Click Actions → Initiate Live Response.
  • 2In the Live Response terminal, run processes to capture the full running process list with PIDs before any changes.
  • 3Collect a memory image: upload and run an approved memory acquisition tool (e.g. winpmem). Run run winpmem.exe -o memory.dmp and retrieve the file via getfile memory.dmp.
  • 4After memory acquisition: return to the device page and click Actions → Isolate Device → Full Isolation.
  • 5Pass the memory image to the forensics analyst for Volatility analysis — look for injected PE headers, hollowed process regions, and C2 shellcode stagers in memory.
🗑

04 — ERADICATION

CLEANUP
E1
Eradication & Recovery
ERADICATION
  • 1Analyse the memory image with Volatility3: run vol -f memory.dmp windows.malfind to identify injected code regions (PAGE_EXECUTE_READWRITE with PE headers — strong injection indicator).
  • 2Identify the initial access vector from the parent process chain — phishing document, RDP session, vulnerable web application. Remediate the initial access point before re-connecting the host.
  • 3Search for C2 infrastructure IOCs (IP, domain, certificate SHA1) extracted from the memory image and block them at the firewall and DNS layer fleet-wide.
  • 4Re-image the endpoint from a known-good baseline — fileless malware frequently establishes persistence via registry run keys, scheduled tasks, or WMI subscriptions (cross-reference SOP-26 and SOP-30).
  • 5Audit all credentials that may have been accessed on this host — force password resets for all accounts that authenticated to the affected device.
  • 6Add confirmed C2 IPs/domains as Threat Intelligence Indicators in Sentinel and MDE to auto-block across the fleet.
📢

05 — ESCALATION

ESCALATION PATHS
ES1
Escalation Matrix
ESCALATION
ConditionSeverityActionNotify
Injection into lsass.exe confirmedSEV1Memory dump → isolate → escalate to SOP-27SOC Lead → CISO
C2 beacon confirmed (network connection from injected process)SEV1Memory dump → isolate → block C2 IOCs fleet-wideSOC Lead → CISO → IR Team
Injection into svchost / explorer with lateral movementSEV1Isolate, check all hosts in same subnetSOC Lead → CISO
Anomalous parent-child, no confirmed injectionSEV2Investigate process chain, prepare isolationSOC Lead
Security tool self-injection (CrowdStrike / AV)FPWhitelist process hash, close with documentationL3 Analyst

Stay Threat-Ready

Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.

📺 YouTube 🎤 TikTok 🐦 X / Twitter 📡 Telegram
All SOPs Blog Web App (Free)
They can't exploit you if you are the Exploit.