Skip to content

Commit 264c1ed

Browse files
committed
feat(rules): Add UAC bypass via NTFS junction DLL hijacking rule
Detects potential User Account Control (UAC) bypass activity leveraging NTFS junctions in combination with DLL hijacking to achieve elevated code execution. Attackers can manipulate filesystem redirection features to coerce trusted Windows components into loading malicious libraries.
1 parent 30ac2bf commit 264c1ed

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

rules/macros/macros.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
- macro: create_new_file
2929
expr: evt.name = 'CreateFile' and file.operation = 'CREATE' and file.status = 'Success'
3030

31+
- macro: create_file_supersede
32+
expr: evt.name = 'CreateFile' and file.operation = 'SUPERSEDE'
33+
3134
- macro: rename_file
3235
expr: evt.name = 'RenameFile'
3336

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: UAC bypass via NTFS junction DLL hijacking
2+
id: 9cdfa658-e8d5-4391-a4d8-0b53f8158782
3+
version: 1.0.0
4+
description: |
5+
Detects potential User Account Control (UAC) bypass activity leveraging
6+
NTFS junctions in combination with DLL hijacking to achieve elevated code
7+
execution. Attackers can manipulate filesystem redirection features to
8+
coerce trusted Windows components into loading malicious libraries.
9+
labels:
10+
tactic.id: TA0004
11+
tactic.name: Privilege Escalation
12+
tactic.ref: https://attack.mitre.org/tactics/TA0004/
13+
technique.id: T1548
14+
technique.name: Abuse Elevation Control Mechanism
15+
technique.ref: https://attack.mitre.org/techniques/T1548/
16+
subtechnique.id: T1548.002
17+
subtechnique.name: Bypass User Account Control
18+
subtechnique.ref: https://attack.mitre.org/techniques/T1548/002/
19+
references:
20+
- https://github.com/hfiref0x/UACME
21+
22+
condition: >
23+
sequence
24+
maxspan 2m
25+
|((create_file) or (create_file_supersede)) and
26+
ps.name iin ('wusa.exe', 'dllhost.exe') and
27+
thread.callstack.symbols imatches ('cabinet.dll!FDICopy') and
28+
file.path imatches
29+
(
30+
'?:\\Windows\\System32\\*.dll',
31+
'?:\\Windows\\SysWoW64\\*.dll',
32+
'?:\\Windows\\System32\\*.exe.local\\*.dll',
33+
'?:\\Windows\\SysWoW64\\*.exe.local\\*.dll'
34+
)
35+
|
36+
|spawn_process and
37+
ps.token.integrity_level = 'HIGH' and
38+
ps.exe not imatches
39+
(
40+
'?:\\Windows\\System32\\WerFault.exe',
41+
'?:\\Windows\\SysWOW64\\WerFault.exe',
42+
'?:\\Windows\\System32\\wermgr.exe',
43+
'?:\\Windows\\SysWOW64\\wermgr.exe',
44+
'?:\\Windows\\System32\\conhost.exe',
45+
'?:\\Windows\\SysWOW64\\conhost.exe'
46+
)
47+
|
48+
49+
severity: high
50+
51+
min-engine-version: 3.0.0

0 commit comments

Comments
 (0)