Detection rules › Splunk

Windows Known Abused DLL Loaded Suspiciously

Author
Steven Dick
Source
upstream

The following analytic detects when DLLs with known abuse history are loaded from an unusual location. This activity may represent an attacker performing a DLL search order or sideload hijacking technique. These techniques are used to gain persistence as well as elevate privileges on the target system. This detection relies on Sysmon EID7 and is compatible with all Officla Sysmon TA versions.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1574.001 Hijack Execution Flow: DLL
Privilege EscalationT1574.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 ImageLoaded IN ("*\\Program Files*", "*\\system32\\*", "*\\syswow64\\*", "*\\wbem\\*", "*\\winsxs\\*") EventCode=7

Stage 2: stats

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

Stage 3: rename

rename

Stage 4: eval

eval ... using (process)

Stage 5: lookup

lookup <lookup> comment, desc, islibrary, library, loaded_file

Stage 6: lookup

lookup <lookup> excluded, excludes, islibrary, library, loaded_file, loaded_file_path

Stage 7: search

search excluded=false islibrary=TRUE

Stage 8: stats

stats BY dest, loaded_file, loaded_file_path, process, 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 9: search

search

Stage 10: search

search

Stage 11: search

search `macro`

Exclusions

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

StageFieldKindExcluded values
1ImageLoadedin"*\\Program Files*", "*\\system32\\*", "*\\syswow64\\*", "*\\wbem\\*", "*\\winsxs\\*"

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
EventCodeeq
  • 7 corpus 35 (splunk 35)
excludedeq
  • false
islibraryeq
  • TRUE corpus 2 (splunk 2)

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.