Skip to content

Commit f6568b7

Browse files
committed
fix(rules): Add exclusions to reduce false positives
1 parent 4c5fd06 commit f6568b7

4 files changed

+40
-13
lines changed

rules/credential_access_potential_sam_hive_dumping.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Potential SAM hive dumping
22
id: 2f326557-0291-4eb1-a87a-7a17b7d941cb
3-
version: 1.0.1
3+
version: 1.0.2
44
description:
55
Identifies access to the Security Account Manager registry hives.
66
labels:
@@ -25,7 +25,15 @@ condition: >
2525
'?:\\Program Files (x86)\\*.exe'
2626
)
2727
or
28-
(ps.exe imatches 'C:\\Windows\\System32\\svchost.exe' and ps.args iin ('-k', 'DcomLaunch'))
28+
(ps.child.exe imatches '?:\\Windows\\System32\\svchost.exe' and ps.child.args intersects ('-k', 'DcomLaunch'))
29+
or
30+
(ps.child.cmdline imatches '?:\\Windows\\System32\\svchost.exe -k defragsvc')
31+
or
32+
(ps.child.cmdline imatches '?:\\Windows\\System32\\svchost.exe -k netsvcs -p -s BITS')
33+
or
34+
(ps.child.cmdline imatches '?:\\Windows\\System32\\svchost.exe -k wusvcs -p -s WaaSMedicSvc')
35+
or
36+
(ps.child.cmdline imatches '?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe ExecuteQueuedItems /LegacyServiceBehavior')
2937
)
3038
| by ps.child.uuid
3139
|open_registry

rules/defense_evasion_dotnet_assembly_loaded_by_unmanaged_process.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: .NET assembly loaded by unmanaged process
22
id: 34be8bd1-1143-4fa8-bed4-ae2566b1394a
3-
version: 1.0.3
3+
version: 1.0.4
44
description: |
55
Identifies the loading of the .NET assembly by an unmanaged process. Adversaries can load the CLR runtime
66
inside unmanaged process and execute the assembly via the ICLRRuntimeHost::ExecuteInDefaultAppDomain method.
@@ -31,7 +31,8 @@ condition: >
3131
not
3232
ps.exe imatches
3333
(
34-
'?:\\Program Files\\WindowsApps\\*\\CrossDeviceService.exe'
34+
'?:\\Program Files\\WindowsApps\\*\\CrossDeviceService.exe',
35+
'?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe'
3536
)
3637
3738
output: >

rules/defense_evasion_process_execution_from_self_deleting_binary.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Process execution from a self-deleting binary
22
id: 0f0da517-b22c-4d14-9adc-36baeb621cf7
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Identifies the execution of the process from a self-deleting binary. The attackers can
66
abuse undocumented API functions to create a process from a file-backed section. The file
@@ -20,13 +20,29 @@ references:
2020
condition: >
2121
sequence
2222
maxspan 1m
23-
|delete_file
23+
|delete_file and file.info.is_disposition_delete_file
24+
and
25+
not
26+
ps.exe imatches
27+
(
28+
'?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe',
29+
'?:\\WINDOWS\\uus\\packages\\preview\\*\\wuaucltcore.exe'
30+
)
2431
and
25-
file.info.is_disposition_delete_file
32+
not
33+
ps.cmdline imatches
34+
(
35+
'?:\\Windows\\system32\\svchost.exe -k wsappx -p -s AppXSvc'
36+
)
2637
and
27-
not file.name imatches '?:\\Windows\\SoftwareDistribution\\Download\\*'
38+
not
39+
file.path imatches
40+
(
41+
'?:\\Windows\\SoftwareDistribution\\Download\\*',
42+
'?:\\Windows\\uus\\packages\\preview\\*'
43+
)
2844
| by file.name
29-
|load_module| by image.name
45+
|load_module and ext(image.path) != '.dll'| by image.name
3046
3147
output: >
3248
Process %2.image.path spawned from self-deleting binary

rules/defense_evasion_unsigned_dll_injection_via_remote_thread.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Unsigned DLL injection via remote thread
22
id: 21bdd944-3bda-464b-9a72-58fd37ba9163
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Identifies unsigned DLL injection via remote thread creation.
66
Adversaries may inject dynamic-link libraries (DLLs) into processes in order to evade process-based defenses
@@ -28,13 +28,15 @@ condition: >
2828
'?:\\Program Files (x86)\\*.exe'
2929
)
3030
or
31-
(ps.exe imatches 'C:\\Windows\\System32\\svchost.exe' and ps.args iin ('-k', 'DcomLaunch'))
31+
(ps.exe imatches 'C:\\Windows\\System32\\svchost.exe' and ps.args intersects ('-k', 'DcomLaunch'))
32+
or
33+
(ps.cmdline imatches '?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe ExecuteQueuedItems /LegacyServiceBehavior')
3234
)
3335
| by thread.pid
3436
|(load_unsigned_or_untrusted_dll)
3537
and
3638
not
37-
image.name imatches
39+
image.path imatches
3840
(
3941
'?:\\Program Files\\Git\\mingw64\\bin\\*.dll',
4042
'?:\\Windows\\assembly\\*\\*.ni.dll',
@@ -43,4 +45,4 @@ condition: >
4345
)
4446
| by ps.pid
4547
46-
min-engine-version: 2.0.0
48+
min-engine-version: 2.4.0

0 commit comments

Comments
 (0)