Process Doppelgänging
Overview
Doppelgänging exploits a gap between two Windows subsystems. NTFS transactions let a process write file contents that no other reader can see until the transaction commits. Image sections, once created, are independent of the file they came from. Put those together and you can create a process image from bytes that are rolled back before anything else has a chance to read them.
Nothing is unmapped and nothing is written into a remote process, so the entire detection surface of hollowing is absent. What remains is the mismatch between the file the operating system reports for the process and the bytes actually mapped.
Transacted NTFS has been deprecated by Microsoft for years, which cuts both ways: the API still works, and almost no legitimate software calls it. That makes TxF activity against executables a near-zero-false-positive hunt on its own.
The call chain
- 1CreateTransactionOpen an NTFS transaction; everything written inside it is invisible to other readers.
- 2CreateFileTransacted + WriteFileWrite the payload into a transacted file — no other process, including AV, sees these bytes.
- 3NtCreateSection(SEC_IMAGE)Create an image section from the transacted file. The section outlives the transaction.
- 4RollbackTransactionRoll back the write. The file on disk reverts; the image section in memory does not.
- 5NtCreateProcessEx + NtCreateThreadExBuild a process directly from the orphaned section and start it.
Detection
The cheapest durable check is the hash comparison at process creation: read the image path Sysmon reports, hash it, and compare against the hash of what was actually mapped. Doppelgänging and every transacted-hollowing hybrid fail that comparison by construction.