Skip to content

Commit 46dd560

Browse files
committed
refactor(rules): Improve Activity from unhooked NTDLL module rule
Define exceptions and remove potential out of order events.
1 parent dfddc6a commit 46dd560

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

rules/defense_evasion_activity_from_unhooked_ntdll_module.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Activity from unhooked NTDLL module
22
id: 24f48f6c-9d97-498d-badc-65e179d19599
3-
version: 1.0.0
3+
version: 1.1.0
44
description: |
55
Detects suspicious activity originating from an unhooked or manually mapped copy of NTDLL loaded
66
into a process. This behavior is commonly associated with defense evasion frameworks that bypass
@@ -21,6 +21,7 @@ condition: >
2121
maxspan 2m
2222
by ps.uuid
2323
|load_dll and
24+
ps.token.integrity_level != 'SYSTEM' and
2425
dll.name ~= 'ntdll.dll' and foreach(thread._callstack, $frame,
2526
$frame.symbol imatches
2627
(
@@ -35,6 +36,22 @@ condition: >
3536
'?:\\Windows\\System32\\sxwmon64.dll',
3637
'?:\\ProgramData\\Symantec\\Symantec Endpoint Protection\\*\\sysfer.dll'
3738
) and
39+
ps.exe not imatches
40+
(
41+
'?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe',
42+
'?:\\Windows\\Microsoft.NET\\Framework64\\*\\ngen.exe',
43+
'?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe',
44+
'?:\\Windows\\Microsoft.NET\\Framework64\\*\\mscorsvw.exe',
45+
'?:\\Windows\\servicing\\TrustedInstaller.exe',
46+
'?:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe',
47+
'?:\\Program Files\\Microsoft Visual Studio\\Installer\\vswhere.exe',
48+
'?:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe',
49+
'?:\\Program Files\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe',
50+
'?:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\RDCNotificationClient\\FullTrustNotifier.exe',
51+
'?:\\Program Files (x86)\\Adobe\\Acrobat DC\\Acrobat\\RDCNotificationClient\\FullTrustNotifier.exe',
52+
'?:\\Program Files (x86)\\Common Files\\Adobe\\ARM\\*\\AdobeARM.exe',
53+
'?:\\Program Files\\Common Files\\Adobe\\ARM\\*\\AdobeARM.exe'
54+
) and
3855
count(ps.modules, '?:\\*ntdll.dll') >= 2 and
3956
not foreach(thread._callstack, $frame, $frame.module imatches ('?:\\Windows\\Sys*\\ntdll.dll') and $frame.allocation_size > 0)
4057
|
@@ -43,8 +60,6 @@ condition: >
4360
(create_file) or
4461
(set_thread_context) or
4562
(create_remote_thread) or
46-
(open_process) or
47-
(open_thread) or
4863
(set_value) or
4964
(rename_file) or
5065
(delete_file)) and

0 commit comments

Comments
 (0)