T1574.002 Elastic Security · Elastic

Detect DLL Side-Loading in Elastic Security

Adversaries execute malicious payloads by placing a malicious DLL alongside a legitimate, often digitally-signed, application and then invoking that application. Unlike passive DLL search order hijacking (which waits for a victim to run an application), DLL side-loading is active: the adversary both plants the DLL and triggers the legitimate executable. This allows malicious code to run under the cover of a trusted process signature. Common victim executables include security tools, game clients, and enterprise software (e.g., VMware, Symantec, LogMeIn). Widely used by APT groups including MuddyWater, Mustang Panda/TONESHELL, Cobalt Strike operators, and numerous others.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation Defense Evasion
Canonical reference
https://attack.mitre.org/techniques/T1574/002/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.id with maxspan=5s
  [process where event.type == "start"
   and process.code_signature.exists == true
   and process.code_signature.trusted == true
   and not (process.executable like~ "*\\AppData\\*" or process.executable like~ "*\\Temp\\*" or process.executable like~ "*\\ProgramData\\*")]
  [library where event.type == "start"
   and (dll.code_signature.trusted == false or dll.code_signature.exists == false)
   and (dll.path like~ "*\\AppData\\*" or dll.path like~ "*\\Temp\\*" or dll.path like~ "*\\ProgramData\\*" or dll.path like~ "*\\Users\\Public\\*" or dll.path like~ "*\\Downloads\\*")]
high severity high confidence

Detects DLL side-loading by correlating a trusted, signed process loading an unsigned or untrusted DLL from a suspicious user-writable directory. Uses EQL sequence to link the process start event with the subsequent image load event on the same host within a 5-second window.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonElastic Agent (endpoint integration)

Required Tables

logs-endpoint.events.library-*logs-endpoint.events.process-*winlogbeat-*

False Positives & Tuning

  • Legitimate software installers that extract and temporarily load DLLs from %TEMP% during installation or update processes (e.g., Adobe, Java, Microsoft updates).
  • Security tools or EDR agents that load unsigned helper DLLs from ProgramData as part of normal operations (e.g., CrowdStrike Falcon, Carbon Black).
  • Developer workstations where developers test self-compiled DLLs from local AppData or Temp directories alongside legitimate signed host applications.
Download portable Sigma rule (.yml)

Other platforms for T1574.002


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1DLL Side-Loading via Renamed Legitimate Binary

    Expected signal: Sysmon Event ID 11 (FileCreate): Both csc.exe and clrjit.dll created in same TEMP subdirectory within short timeframe. Sysmon Event ID 7 (ImageLoad): if csc.exe is executed, clrjit.dll would be loaded from the local directory first. DeviceFileEvents shows EXE+DLL creation in same writable path.

  2. Test 2Abusing VMware Binary for Side-Loading (Simulation)

    Expected signal: Sysmon Event ID 11 (FileCreate): DLL created in user-writable TEMP location. DeviceFileEvents captures file creation event with SHA256 hash of the dummy DLL.

  3. Test 3PowerShell Verification of DLL Search Order

    Expected signal: Sysmon Event ID 1 (Process Create): powershell.exe spawned with command enumerating PATH environment variable. PowerShell ScriptBlock Logging Event ID 4104 records the full script. No DLL loading events generated.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections