Skip to content

Commit 68edf95

Browse files
committed
feat(rules): Add Activity from unhooked NTDLL module rule
Detects suspicious activity originating from an unhooked or manually mapped copy of NTDLL loaded into a process. This behavior is commonly associated with defense evasion frameworks that bypass user-mode API hooks implemented by security products.
1 parent 98da73f commit 68edf95

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Activity from unhooked NTDLL module
2+
id: 24f48f6c-9d97-498d-badc-65e179d19599
3+
version: 1.0.0
4+
description: |
5+
Detects suspicious activity originating from an unhooked or manually mapped copy of NTDLL loaded
6+
into a process. This behavior is commonly associated with defense evasion frameworks that bypass
7+
user-mode API hooks implemented by security products.
8+
labels:
9+
tactic.id: TA0005
10+
tactic.name: Defense Evasion
11+
tactic.ref: https://attack.mitre.org/tactics/TA0005/
12+
technique.id: T1055
13+
technique.name: Process Injection
14+
technique.ref: https://attack.mitre.org/techniques/T1055/
15+
references:
16+
- https://unprotect.it/technique/dll-unhooking/
17+
- https://github.com/SaadAhla/ntdlll-unhooking-collection
18+
19+
condition: >
20+
sequence
21+
maxspan 2m
22+
by ps.uuid
23+
|load_dll and
24+
dll.name ~= 'ntdll.dll' and foreach(thread._callstack, $frame,
25+
$frame.symbol imatches
26+
(
27+
'?:\\Windows\\Sys*\\KernelBase.dll!MapViewOfFile*',
28+
'?:\\Windows\\Sys*\\ntdll.dll!*MapViewOfSection*'
29+
)) and
30+
thread.callstack.modules not imatches
31+
(
32+
'?:\\Program Files*\\AVG\\Antivirus\\aswhook.dll',
33+
'?:\\Program Files\\ESET\\ESET Security\\ebehmoni.dll',
34+
'?:\\Program Files\\ESET\\ESET Endpoint Antivirus\\ebehmoni.dll',
35+
'?:\\Windows\\System32\\sxwmon64.dll',
36+
'?:\\ProgramData\\Symantec\\Symantec Endpoint Protection\\*\\sysfer.dll'
37+
) and
38+
count(ps.modules, '?:\\*ntdll.dll') >= 2 and
39+
not foreach(thread._callstack, $frame, $frame.module imatches ('?:\\Windows\\Sys*\\ntdll.dll') and $frame.allocation_size > 0)
40+
|
41+
|((spawn_process) or
42+
(load_module) or
43+
(create_file) or
44+
(set_thread_context) or
45+
(create_remote_thread) or
46+
(open_process) or
47+
(open_thread) or
48+
(set_value) or
49+
(rename_file) or
50+
(delete_file)) and
51+
foreach(thread._callstack, $frame, $frame.module imatches '?:\\Windows\\Sys*\\ntdll.dll' and $frame.allocation_size > 4000)
52+
|
53+
action:
54+
- name: kill
55+
56+
severity: high
57+
58+
min-engine-version: 3.0.0

0 commit comments

Comments
 (0)