T1055.013

Process Doppelganging

Adversaries may inject malicious code into process via process doppelganging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelganging abuses Windows Transactional NTFS (TxF) to perform a fileless variation of process injection. The technique involves four steps: Transact (create a TxF transaction and overwrite a legitimate executable with malicious code), Load (create a shared section from the modified file), Rollback (undo the file changes, removing malicious code from disk), and Animate (create a process from the tainted memory section). This evades detection because the malicious code never exists on disk in its final form and the technique avoids highly-monitored API functions like NtUnmapViewOfSection.

Microsoft Sentinel / Defender
kusto
// Detect Process Doppelganging via NTFS Transaction API usage
// Key APIs: CreateFileTransacted, NtCreateSection, RollbackTransaction, NtCreateProcessEx
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("CreateFileTransacted", "NtCreateSection", "RollbackTransaction", "NtCreateProcessEx")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName
| sort by Timestamp desc
| union (
    // Detect suspicious process creation where the image file doesn't match expected
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName in~ ("svchost.exe", "explorer.exe", "notepad.exe", "cmd.exe")
    | where InitiatingProcessFileName !in~ ("services.exe", "svchost.exe", "explorer.exe", "winlogon.exe", "userinit.exe", "System")
    | where ProcessVersionInfoProductName == "" or isempty(ProcessVersionInfoProductName)
    | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, ProcessVersionInfoProductName
)
| sort by Timestamp desc
critical severity medium confidence

Data Sources

Process: Process Creation Process: OS API Execution File: File Metadata Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate applications using NTFS Transactions for atomic file operations (rare in modern software)
  • Windows Update and installer processes using transactional file operations
  • Database applications using TxF for data integrity
  • Enterprise backup software using NTFS transactions for consistent snapshots

Unlock Pro Content

Get the full detection package for T1055.013 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections