Detection rules › Sigma

Potential Initial Access via DLL Search Order Hijacking

Severity
medium
Author
Tim Rauch (rule), Elastic (idea)
Source
upstream

Detects attempts to create a DLL file to a known desktop application dependencies folder such as Slack, Teams or OneDrive and by an unusual process. This may indicate an attempt to load a malicious module via DLL search order hijacking.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1566 Phishing, T1566.001 Phishing: Spearphishing Attachment
PersistenceT1574 Hijack Execution Flow, T1574.001 Hijack Execution Flow: DLL
Privilege EscalationT1574 Hijack Execution Flow, T1574.001 Hijack Execution Flow: DLL
Defense EvasionT1574 Hijack Execution Flow, T1574.001 Hijack Execution Flow: DLL

Event coverage

ProviderEvent IDTitle
Sysmon11FileCreate

Stages and Predicates

Stage 1: selection

or:
Image|endswith: '\MSACCESS.EXE'
Image|endswith: '\MSPUB.EXE'
Image|endswith: '\certutil.exe'
Image|endswith: '\cmd.exe'
Image|endswith: '\cscript.exe'
Image|endswith: '\curl.exe'
Image|endswith: '\excel.exe'
Image|endswith: '\fltldr.exe'
Image|endswith: '\mshta.exe'
Image|endswith: '\powerpnt.exe'
Image|endswith: '\powershell.exe'
Image|endswith: '\pwsh.exe'
Image|endswith: '\winword.exe'
Image|endswith: '\wscript.exe'
or:
TargetFilename|contains: '\Local\Programs\Microsoft VS Code\'
TargetFilename|contains: '\Local\slack\app-'
TargetFilename|contains: '\Microsoft OneDrive\'
TargetFilename|contains: '\Microsoft\OneDrive\'
TargetFilename|contains: '\Microsoft\Teams\'
TargetFilename|endswith: .dll
TargetFilename|contains: '\AppData\'
TargetFilename|contains: '\Users\'

Stage 2: not filter

Image|endswith: '\cmd.exe'
TargetFilename|contains: '\AppData\'
TargetFilename|contains: '\Microsoft\OneDrive\'
TargetFilename|contains: '\Users\'
TargetFilename|contains: '\api-ms-win-core-'

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
Imageends_with
  • \MSACCESS.EXE
  • \MSPUB.EXE corpus 2 (sigma 2)
  • \certutil.exe corpus 34 (sigma 34)
  • \cmd.exe corpus 92 (sigma 92)
  • \cscript.exe corpus 64 (sigma 64)
  • \curl.exe corpus 19 (sigma 19)
  • \excel.exe corpus 16 (sigma 16)
  • \fltldr.exe
  • \mshta.exe corpus 57 (sigma 57)
  • \powerpnt.exe corpus 13 (sigma 13)
  • \powershell.exe corpus 143 (sigma 143)
  • \pwsh.exe corpus 140 (sigma 140)
  • \winword.exe corpus 17 (sigma 17)
  • \wscript.exe corpus 64 (sigma 64)
TargetFilenameends_with
  • .dll corpus 21 (sigma 21)
TargetFilenamematch
  • \AppData\ corpus 3 (sigma 3)
  • \Local\Programs\Microsoft VS Code\
  • \Local\slack\app-
  • \Microsoft OneDrive\
  • \Microsoft\OneDrive\
  • \Microsoft\Teams\
  • \Users\ corpus 2 (sigma 2)
  • \api-ms-win-core-