DLL side-loading and search-order hijacking are the most common way modern intrusions execute malicious code while wearing the identity of a legitimate, digitally signed program. The attacker drops a benign signed executable next to a malicious DLL that the executable is known to import by name. When the signed EXE runs, the Windows loader resolves that import from the current directory before it ever reaches System32, so the attacker's code runs inside a trusted process — inheriting its signature, its reputation, and frequently its application-allowlisting pass. This is the backbone of loaders used by ransomware affiliates, commodity info-stealers and nation-state operators alike.
Key data sources: DeviceImageLoadEvents (a trusted EXE loading an unsigned / hash-anomalous DLL from a user-writable path), DeviceFileEvents (a legitimate signed EXE co-dropped with its hijack DLL into %APPDATA% / %TEMP% / %PUBLIC%), and DeviceProcessEvents (a trusted binary launched from a non-standard path, often renamed). Treat a confirmed load of an unsigned DLL by a signed binary from a user-writable directory as a SEV2 execution event that escalates to SEV1 the moment that process spawns a shell or beacons out.
☰ Table of Contents
01 — BACKGROUND
TECHNIQUE OVERVIEWWhen a Windows program imports a DLL by name without specifying a fully-qualified path, the loader searches a defined ordered list of directories. With default Safe DLL Search Mode, the directory the application was launched from is searched before the System directories. An attacker who can write a DLL into that application directory — or who controls where the signed EXE is launched — gets their code loaded into the trusted process. Three closely-related variants share this SOP:
| Variant | Mechanism | MITRE |
|---|---|---|
| DLL Side-Loading | Attacker ships a legitimate signed EXE together with a malicious DLL of the exact name the EXE imports; the planted DLL loads instead of the real one. | T1574.002 |
| Search-Order Hijacking | Attacker plants a DLL earlier in the loader search path than the real one (application dir shadows System32) for a DLL the process loads at runtime. | T1574.001 |
| Phantom DLL Hijacking | Process attempts to load a DLL that does not exist on disk; attacker supplies that missing DLL in a writable path the loader checks. | T1574.001 |
| Masquerading | Trusted EXE renamed and relocated to a user-writable folder to blend in and to control its working directory. | T1036.005 |
The payoff for the attacker is identity theft at the process level: EDR sees a-trusted-vendor.exe running with a valid signature, the child DLL executes in-process so there is no new suspicious image name, and many application-control policies that allowlist by publisher wave the whole thing through.
Common real-world chains that produce this alert:
- AArchive delivery: phishing ZIP/ISO/container contains a renamed signed vendor binary plus the hijack DLL in the same folder; the user double-clicks the EXE and the DLL side-loads the loader stage.
- BInstaller / updater abuse: attacker drops their DLL beside a legitimate installer or auto-updater that imports it by name, so the next update run executes attacker code with the vendor's trust.
- CPost-exploitation persistence: after initial access, the actor stages a signed LOLBin + DLL pair in
%APPDATA%and creates a Run key / scheduled task pointing at the signed EXE — persistence that survives AV because the launcher is trusted. - DWritable System directory: a misconfigured application folder under
Program Filesis writable by standard users, letting an attacker plant a hijack DLL that loads with the service's privileges.
| Field | Value |
|---|---|
| MITRE Technique | T1574.002 (Side-Loading), T1574.001 (Search-Order / Phantom), T1036.005 (Masquerading) |
| Kill-chain Phase | Execution / Defense Evasion / Persistence / Privilege Escalation |
| Primary Log Source | DeviceImageLoadEvents (module loads), DeviceFileEvents (drop), DeviceProcessEvents (launch) |
| Secondary Log Sources | Sysmon Event ID 7 (ImageLoaded), Event ID 1 (Process Create), DeviceNetworkEvents (post-load C2) |
| Common Writable Paths | %APPDATA%, %LOCALAPPDATA%, %TEMP%, %PUBLIC%, %PROGRAMDATA%, user Downloads, mounted ISO/VHD drive letters |
| Default Severity | SEV2 on unsigned-DLL load by signed EXE from writable path; SEV1 once the host process spawns a shell, injects, or beacons |
| Detection Window | Query last 1 hour for live triage; extend to 7–14 days for retro-hunting a known bad pair |
Signature on the parent process means nothing here. The EXE is genuinely signed by its real vendor — the malicious code lives in the DLL it loads. Never close this alert on "parent is signed by a trusted publisher" alone.
02 — IDENTIFICATION
5 INDICATORS- 1Is the DLL being loaded from a user-writable path (
%APPDATA%,%TEMP%,%PUBLIC%, Downloads, a mounted ISO) rather thanC:\Windows\System32or the real install directory? - 2Is the DLL unsigned, or signed by a publisher that does not match the parent EXE's publisher?
- 3Is the parent EXE a known side-loading target (a vendor utility, updater, or LOLBin) that has been renamed or relocated out of its normal install path?
- 4Was the DLL written to disk minutes before the load, by a browser, archive tool, script host, or
explorer.exefrom a download? - 5Did the host process do anything after the load — spawn a shell, make an outbound connection, or open a handle into another process?
Three or more "yes" answers = treat as a confirmed hijack and go straight to containment. A single "yes" on Q1 alone with a signed, vendor-matched DLL is usually a portable app — baseline it before you burn an isolation.
This is the core signal. A legitimately-signed executable loading an unsigned module out of a user-writable directory is the defining fingerprint of side-loading — legitimate software ships its DLLs signed and in its own protected install folder, not in %TEMP% or %APPDATA%.
- 1Open Hunting → Advanced Hunting and paste the KQL below. Set Time range to Last 1 hour (extend to 24h for hunting).
- 2For each hit, note InitiatingProcessFolderPath (where the signed EXE ran from) and FolderPath of the DLL — both in a writable location is the strongest signal.
- 3Click the DeviceName and open Timeline to see the full load/launch/network chain around the event.
- 4Record the SHA256 of both the EXE and the DLL for the IOC package and for detonation.
| Field / Signal | Meaning | Severity |
|---|---|---|
| InitiatingProcessSignatureStatus = Valid + unsigned DLL | Trusted parent loading untrusted module — classic side-load | CRITICAL |
| DLL FolderPath in %APPDATA% / %TEMP% / %PUBLIC% | Module loaded from user-writable dir, not install path | CRITICAL |
| DLL publisher ≠ EXE publisher | Mismatched or absent signer on the loaded module | HIGH |
| EXE path outside its normal install location | Vendor binary relocated to control the search dir | HIGH |
The AdditionalFields.IsSigned parsing in the KQL depends on your tenant's schema version. If the field is absent, pivot on FileName against a known-good baseline of DLLs the parent EXE legitimately loads and triage every unknown module by hand.
Side-loading kits are delivered as a pair: a clean signed binary and the malicious DLL dropped into the same folder within seconds of each other, usually by a browser, archive extractor, or script host. Catching the co-drop lets you detect the staging before the EXE is ever executed.
- 1Run the KQL below to find directories that received both a .exe and a .dll within a short window from the same initiating process.
- 2Inspect InitiatingProcessFileName — a browser (
msedge.exe/chrome.exe),7z/WinRAR,explorer.exefrom a download, or a script host writing a signed EXE is highly suspicious. - 3Confirm the EXE name against known abused side-loading binaries; if it is a renamed vendor utility, treat the pair as staged malware.
- 4Note whether the drop folder is a mounted ISO/VHD drive letter — container delivery (see SOP-116) frequently precedes side-loading.
Attackers relocate a signed vendor binary out of its real install folder so that the writable directory it now sits in becomes first in the loader search order. A trusted EXE running from %APPDATA% or a temp folder — when its legitimate home is under Program Files — is masquerading in service of a hijack.
- 1Run the KQL to list signed processes that executed from user-writable directories.
- 2For each, compare ProcessVersionInfoOriginalFileName against the on-disk FileName — a mismatch means the binary was renamed (e.g. the file is
update.exebut its original name is a known vendor utility). - 3Pivot to DeviceImageLoadEvents for that process ID to confirm which DLLs it loaded from its launch directory.
| Field / Signal | Meaning | Severity |
|---|---|---|
| FileName ≠ ProcessVersionInfoOriginalFileName | Signed binary has been renamed — masquerading | CRITICAL |
| Signed EXE running from %APPDATA% / %TEMP% | Vendor binary relocated to control search order | HIGH |
| ProcessVersionInfoCompanyName set, path user-writable | Legit company metadata, illegitimate location | HIGH |
The name-vs-OriginalFileName mismatch is one of the highest-fidelity masquerading signals you have. A signed binary whose embedded OriginalFileName does not match what it is called on disk is almost never benign outside of a handful of known repackagers — baseline those and alert on everything else.
Rather than ship a renamed vendor EXE, an attacker can plant a DLL that matches the name of a module a process loads at runtime — either shadowing a real System32 DLL (search-order) or supplying one the process looks for but that normally does not exist (phantom). The tell is a well-known system DLL name being loaded from the application directory instead of System32.
- 1Run the KQL to find common system DLL names (e.g.
version.dll,dbghelp.dll,winhttp.dll,wininet.dll,textshaping.dll) loaded from anywhere other than the Windows system directories. - 2For each hit, confirm the loading process and whether the DLL is signed by Microsoft; an unsigned
version.dllbeside an app binary is a hijack, full stop. - 3Check whether the same base name also exists in
System32with a valid Microsoft signature — two copies, one shadowing the other, confirms search-order abuse.
Portable and self-contained apps legitimately ship private copies of runtime DLLs like vcruntime140.dll next to their EXE. Validate the signer and the parent application before escalating these specific names — the high-confidence hits are unsigned version.dll / dbghelp.dll / winhttp.dll beside a renamed binary.
The side-load itself is a delivery mechanism; the damage is in what the hijacked process does next. A trusted binary that suddenly spawns cmd/powershell, opens a handle into lsass.exe, or beacons to an external IP is executing the payload the DLL carried. This is the signal that flips the incident from SEV2 to SEV1.
- 1Take the host EXE name / SHA256 from I1–I3 and run the child-process KQL to see what it spawned.
- 2Run the network query to pull outbound connections from the same process — note any direct-to-IP, rare ASN, or newly-registered domain destinations.
- 3If the process opened a handle into another process (injection), escalate to SEV1 and cross-reference SOP-27 (credential dumping) and SOP-29 (process injection).
Before escalating, capture the full IOC set so containment and hunting can scope the blast radius:
- 1SHA256 of both the signed EXE and the malicious DLL (the DLL hash is your pivot — the EXE is legitimate).
- 2The exact drop folder path and the DLL file name (the import name the EXE resolves).
- 3The initiating/writing process (what delivered the pair) and the account under which it ran.
- 4Any C2 IP / domain and persistence artifact (Run key, scheduled task, service) pointing at the signed EXE.
| True-Positive Signals | False-Positive Signals |
|---|---|
| Unsigned DLL loaded by signed EXE from %APPDATA% / %TEMP% / mounted ISO | Self-contained / portable app shipping its own signed DLLs beside the EXE in a user profile dir |
| Signed EXE renamed (FileName ≠ OriginalFileName) and relocated | Known developer / IT tool run from a repo or build directory with matching publisher |
| EXE + DLL co-dropped seconds apart by a browser, archive tool or script host | Software installer extracting its own files to %TEMP% during a legitimate, ticketed install |
| System DLL name (version.dll, winhttp.dll) loaded outside System32, unsigned | App-local redistributable runtimes (vcruntime140.dll) signed by Microsoft next to their app |
| Hijacked process spawns a shell, injects, or beacons to a public IP | No child process, no network, DLL signer matches the EXE vendor |
If any single true-positive signal from the right-hand behaviour rows (shell / injection / beacon) is present, stop triaging and move to Containment immediately — the payload is already executing inside a trusted process.
03 — CONTAINMENT
STOP ITDo not quarantine or delete the signed EXE from the allowlist — it is a legitimate vendor binary and blocking its hash will break that software estate-wide. Block and hunt on the DLL hash and file name, not the loader.
- 1Before isolation, start a Live Response session (Actions → Initiate Live Response) and capture a memory image and process list — the malicious DLL runs only in memory of the host process and is lost on reboot.
- 2In Live Response, run
getfileon the DLL and the renamed EXE to preserve both artifacts for forensics and detonation. - 3Click Actions (⋮) → Isolate Device and choose Full Isolation.
- 4Link all related alerts into one incident and attach the IOC set from step V.
- 1Add the DLL SHA256 as a File indicator set to Block and remediate. Do not block the signed EXE hash.
- 2Add any confirmed C2 IP / domain as a Network indicator set to Block.
- 3Re-run the I1, I2 and I4 queries tenant-wide (time range 14 days) using the DLL hash and file name to find every other host that received the same pair.
- 4If Conditional Access / AppLocker / WDAC is in use, add a rule blocking execution from the implicated writable paths where feasible.
Because the loader is a legitimate signed binary, publisher-based allowlists will not stop re-infection. The durable control is a path + hash block on the DLL plus denying execute/write on the abused user-writable directories.
04 — ERADICATION
CLEAN UP- 1Via Live Response, terminate the hijacked host process (
pe/remediate) and delete the malicious DLL and the planted EXE from the writable path (remediate <file>). - 2Remove persistence pointing at the signed EXE: check
HKCU\...\RunandHKLM\...\Runkeys, scheduled tasks, and services whose ImagePath references the drop folder (cross-reference SOP-26 and SOP-106). - 3Hunt for second-stage payloads the DLL may have dropped — re-run I5 and review DeviceFileEvents for files written by the host process after the load.
- 4Re-run the I1, I3 and I4 identification queries scoped to this device — expected result: 0 hits. Any remaining load means the pair was re-staged or persistence survived.
- 5Close the entry vector: if delivered by archive/ISO, review mail and web gateway rules (SOP-115 / SOP-116); if a writable
Program Filesfolder enabled it, fix the directory ACL so standard users cannot write there. - 6Reset credentials for any account that ran interactively on the host during the compromise window and review for lateral movement from this device.
- Malicious DLL and planted EXE removed from all hosts; DLL hash blocked tenant-wide
- All persistence referencing the drop path removed and verified absent
- I1 / I3 / I4 queries return 0 hits on the affected device over the last 24h
- Entry vector closed (gateway rule, directory ACL, or policy) and change documented
- Credentials reset for in-scope accounts; no onward lateral movement observed
- Compromise timeline reconstructed from first drop to eradication
05 — ESCALATION
TIERS| Tier | Trigger Condition | Who to Notify | Action |
|---|---|---|---|
| L1 → L2 | Side-load pattern present but TP/FP undecided within 30 min, or more than 5 hosts show the same DLL pair, or a privileged account ran the host EXE | Shift Lead / L2 Analyst | Hand off with IOC package; isolate suspected hosts pending verdict |
| L2 → IR | Confirmed hijack with post-load behaviour — shell spawn, process injection, or outbound C2; persistence established | IR Team / Threat Hunt | Open incident, full scope, begin host forensics and lateral-movement hunt |
| IR → CISO | Credential theft or data staging confirmed, server/privileged system compromised, or the same pair found across many business units (campaign) | CISO / Management | Activate IR plan; assess regulatory / notification obligations |
| External | Confirmed nation-state tradecraft, active ransomware staging, or legal/forensic preservation required | MSSP / Forensics vendor / Law enforcement | Engage retainer, preserve evidence, coordinate disclosure |
Bring to every escalation: incident/alert ID, affected device(s) and account(s), the EXE+DLL names and SHA256, the drop path and delivery vector, containment actions already taken, and the current confidence level (TP confirmed / suspected / unverified).
DLL side-loading is a core loader technique for both ransomware affiliates and espionage actors. If the same EXE+DLL pair appears on multiple hosts near-simultaneously, treat it as an active campaign and escalate straight to IR — do not work the alerts as isolated endpoint events.
Stay Threat-Ready
Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.