Detection rules › Splunk

Windows Unsigned MS DLL Side-Loading

Author
Teoderick Contreras, Splunk
Source
upstream

The following analytic identifies potential DLL side-loading instances involving unsigned DLLs mimicking Microsoft signatures. It detects this activity by analyzing Sysmon logs for Event Code 7, where both the Image and ImageLoaded paths do not match system directories like system32, syswow64, and programfiles. This behavior is significant as adversaries often exploit DLL side-loading to execute malicious code via legitimate processes. If confirmed malicious, this activity could allow attackers to execute arbitrary code, potentially leading to privilege escalation, persistence, and unauthorized access to sensitive information.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1547 Boot or Logon Autostart Execution, T1574.001 Hijack Execution Flow: DLL
Privilege EscalationT1547 Boot or Logon Autostart Execution, T1574.001 Hijack Execution Flow: DLL
Defense EvasionT1574.001 Hijack Execution Flow: DLL

Event coverage

ProviderEvent IDTitle
Sysmon7Image loaded

Stages and Predicates

Stage 1: search

search NOT (NOT ImageLoaded IN ("C:\\Program Files \(x86\)\\*", "C:\\Program Files\\*", "C:\\Windows\\SysWow64\\*", "C:\\Windows\\System32\\*") Image IN ("C:\\Program Files \(x86\)\\*", "C:\\Program Files\\*", "C:\\Windows\\SysWow64\\*", "C:\\Windows\\System32\\*")) Company="Microsoft Corporation" EventCode=7 SignatureStatus!="Valid" Signed=false

Stage 2: rex

rex field=Image ...

Stage 3: rex

rex field=ImageLoaded ...

Stage 4: where

where ImageFolderPath=

Stage 5: stats

stats BY Image, ImageLoaded, dest, loaded_file, loaded_file_path, original_file_name, process_exec, process_guid, process_hash, process_id, process_name, process_path, service_dll_signature_exists, service_dll_signature_verified, signature, signature_id, user_id, vendor_product

Stage 6: search

search

Stage 7: search

search

Stage 8: search

search `macro`

Exclusions

Top-level NOT(...) conjuncts — predicates this rule actively suppresses.

StageFieldKindExcluded values
1ImageLoadedin"C:\\Program Files \(x86\)\\*", "C:\\Program Files\\*", "C:\\Windows\\SysWow64\\*", "C:\\Windows\\System32\\*"
2Imagein"C:\\Program Files \(x86\)\\*", "C:\\Program Files\\*", "C:\\Windows\\SysWow64\\*", "C:\\Windows\\System32\\*"

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Companyeq
  • "Microsoft Corporation"
EventCodeeq
  • 7 corpus 35 (splunk 35)
ImageLoadedin
  • "C:\\Program Files \(x86\)\\*"
  • "C:\\Program Files\\*"
  • "C:\\Windows\\SysWow64\\*"
  • "C:\\Windows\\System32\\*"
SignatureStatusne
  • Valid corpus 2 (splunk 2)
Signedeq
  • false corpus 8 (sigma 4, splunk 4)

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.