SIDELOADING
SEARCH ORDER
SYSMON 7
UNSIGNED DLL
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting DLL Sideloading and Search-Order Hijack Persistence

Sideloading borrows trust. A signed, familiar executable loads a malicious DLL that sits next to it, so the process looks clean and only the module gives the game away.

Scroll

DLL sideloading and search-order hijacking abuse the way Windows resolves libraries: an application loads a DLL from its own folder before it checks system locations. An attacker copies a legitimate signed executable into a writable directory, places a malicious DLL with the expected name beside it, and persists by launching that pair from a Run key or scheduled task. The process name and signature are trustworthy, so detection has to focus on the module and its path.

Signals at a Glance

SignalWhereATT&CK
Unsigned or untrusted DLL loaded from the same folder as a signed executableSysmon 7, EDR image-load eventsT1574.002
Signed executable running from AppData, ProgramData, Temp or Users\PublicSysmon 1, process creationT1574.002
DLL with a Windows system name (version.dll, wtsapi32.dll) loaded outside System32Sysmon 7T1574.001
Legitimate binary copied to a new path shortly before first runSysmon 11 + 1T1036.005
Run key or task pointing at a signed vendor binary in a user directorySysmon 13, 4698T1547.001
Phantom DLL loads that fail and later succeed after a file dropSysmon 7, ProcMon baselineT1574.001

Image Loads and Signature Mismatch

The core logic is a signature mismatch between a process and the module it loads from its own directory. Image-load telemetry is voluminous, so scope it: restrict to user-writable paths and join against certificate data to isolate unsigned modules. In Defender Advanced Hunting that looks like this:

// KQL: unsigned DLL loaded by a process running from a user-writable folder
let unsigned = DeviceFileCertificateInfo
    | where IsSigned == 0 or IsTrusted == 0
    | project SHA1;
DeviceImageLoadEvents
| where FolderPath matches regex @"(?i)\\(AppData|ProgramData|Temp|Users\\Public)\\"
| where InitiatingProcessFolderPath matches regex @"(?i)\\(AppData|ProgramData|Temp|Users\\Public)\\"
| extend HostDir = tolower(substring(InitiatingProcessFolderPath, 0, strlen(InitiatingProcessFolderPath) - strlen(InitiatingProcessFileName)))
| where tolower(FolderPath) startswith HostDir
| join kind=inner unsigned on SHA1
| summarize loads=count(), firstSeen=min(Timestamp) by DeviceName, InitiatingProcessFileName,
            InitiatingProcessFolderPath, FileName, SHA1
| order by firstSeen desc
// tune/validate: Electron apps and per-user installers load many local DLLs; allowlist by publisher.

For environments with Sysmon, a Sigma rule on Event 7 catches the most blatant cases, a Windows-named DLL that is not in a Windows directory:

title: System-Named DLL Loaded From Non-System Path
logsource:
  product: windows
  category: image_load
detection:
  selection:
    ImageLoaded|endswith:
      - '\version.dll'
      - '\wtsapi32.dll'
      - '\winhttp.dll'
      - '\cryptbase.dll'
      - '\dbghelp.dll'
  filter_system:
    ImageLoaded|startswith:
      - 'C:\Windows\System32\'
      - 'C:\Windows\SysWOW64\'
      - 'C:\Windows\WinSxS\'
  condition: selection and not filter_system
level: medium
# tune/validate: some applications ship their own copy of dbghelp.dll and similar libraries.

Hunting the Pair

Vetted sources

Use the SigmaHQ image-load and DLL-sideloading rules, Elastic’s DLL side-loading detections, Splunk ESCU content, MITRE CAR analytics, Atomic Red Team T1574 tests and the HijackLibs project for catalogued vulnerable executables. Baseline your own environment first, because many legitimate applications load local DLLs from their folder.

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