HERPADERPING
DOPPELGANGING
GHOSTING
IMAGE MISMATCH
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Process Herpaderping, Doppelganging and Ghosting

These techniques all lie about what a process is. The file on disk and the code in memory stop matching, and that gap is the detection.

Scroll

Herpaderping, doppelganging and ghosting abuse the gap between creating an image section and the security callback that inspects the backing file. The attacker maps a payload into a section, then changes, deletes or transacts away the file before scanners read it. The process runs the payload while the file on disk shows something harmless, or nothing at all.

Signals at a Glance

SignalWhereATT&CK
ProcessTampering: image replaced (herpaderping, doppelganging)Sysmon 25T1055.013
ProcessTampering: image locked for access (ghosting)Sysmon 25T1055.013
Process image path no longer exists or cannot be hashed at startSysmon 1, EDRT1055.013
Executable written, section created and the file overwritten within millisecondsSysmon 11, EDR file telemetryT1055
Transacted file (TxF) or delete-pending handle used to back an imageEDR, ETW Threat-IntelligenceT1055.013

Sysmon ProcessTampering

Sysmon Event ID 25 exists for exactly this class of attack. It reports a process whose image has been replaced or is locked for access, with a Type field naming the condition. The event is rare on a healthy host, so collect it in full:

<!-- Sysmon configuration fragment: keep every ProcessTampering event -->
<Sysmon schemaversion="4.90">
  <EventFiltering>
    <RuleGroup name="tamper" groupRelation="or">
      <ProcessTampering onmatch="exclude">
        <!-- tune/validate: add only reviewed, well-understood benign images -->
        <Image condition="is">C:\Windows\System32\wbem\WmiPrvSE.exe</Image>
      </ProcessTampering>
    </RuleGroup>
  </EventFiltering>
</Sysmon>
<!-- With onmatch="exclude" and a short list, everything else is logged. -->

Treat every Image is replaced and Image is locked for access event as a ticket until proven benign. Some packers and installers can trigger the first; very few legitimate programs trigger the second.

Image and Hash Consistency

When Sysmon 25 is not available, compare what the process was started from with what exists on disk. A process whose image file is missing, zero length or hashes differently from a prior sighting is a strong lead:

// Microsoft Defender XDR (KQL) - process started but its image is gone or unreadable
DeviceProcessEvents
| where Timestamp > ago(1d)
| where isempty(SHA256) or isempty(FolderPath)
| where not(FileName in~ ("MemCompression", "Registry", "System"))
| join kind=leftanti (
    DeviceFileEvents
    | where ActionType == "FileCreated"
    | project DeviceId, FolderPath, FileName
  ) on DeviceId, FolderPath, FileName
| project Timestamp, DeviceName, FileName, FolderPath, ProcessCommandLine,
          InitiatingProcessFileName
// tune/validate: protected and system processes legitimately have no hash.
Vetted sources

Use the Sysmon ProcessTampering event and the SigmaHQ rules built on it, Elastic’s process injection detections, MITRE CAR analytics for image mismatch, and the public proof-of-concept projects only in a lab to validate that your sensors fire. Baseline your own environment — some packers and software protectors trigger Event 25 legitimately.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026