Potential Initial Access via DLL Search Order Hijacking

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.

Sigma rule (View on GitHub)

 1title: Potential Initial Access via DLL Search Order Hijacking
 2id: dbbd9f66-2ed3-4ca2-98a4-6ea985dd1a1c
 3status: test
 4description: 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.
 5references:
 6    - https://github.com/elastic/protections-artifacts/commit/746086721fd385d9f5c6647cada1788db4aea95f#diff-5d46dd4ac6866b4337ec126be8cee0e115467b3e8703794ba6f6df6432c806bc
 7    - https://posts.specterops.io/automating-dll-hijack-discovery-81c4295904b0
 8author: Tim Rauch (rule), Elastic (idea)
 9date: 2022-10-21
10tags:
11    - attack.privilege-escalation
12    - attack.persistence
13    - attack.t1566
14    - attack.t1566.001
15    - attack.initial-access
16    - attack.t1574
17    - attack.t1574.001
18    - attack.defense-evasion
19logsource:
20    product: windows
21    category: file_event
22detection:
23    selection:
24        Image|endswith:
25            # add more processes when you find them
26            - '\winword.exe'
27            - '\excel.exe'
28            - '\powerpnt.exe'
29            - '\MSACCESS.EXE'
30            - '\MSPUB.EXE'
31            - '\fltldr.exe'
32            - '\cmd.exe'
33            - '\certutil.exe'
34            - '\mshta.exe'
35            - '\cscript.exe'
36            - '\wscript.exe'
37            - '\curl.exe'
38            - '\powershell.exe'
39            - '\pwsh.exe'
40        TargetFilename|endswith: '.dll'
41        TargetFilename|contains|all:
42            - '\Users\'
43            - '\AppData\'
44        TargetFilename|contains:
45            # add more suspicious paths when you find them
46            - '\Microsoft\OneDrive\'
47            - '\Microsoft OneDrive\'
48            - '\Microsoft\Teams\'
49            - '\Local\slack\app-'
50            - '\Local\Programs\Microsoft VS Code\'
51    filter:
52        Image|endswith: '\cmd.exe'
53        TargetFilename|contains|all:
54            - '\Users\'
55            - '\AppData\'
56            - '\Microsoft\OneDrive\'
57            - '\api-ms-win-core-'
58    condition: selection and not filter
59falsepositives:
60    - Unknown
61level: medium

References

Related rules

to-top