Skip to content

Commit 8b42b66

Browse files
committed
refactor(rules)!: Transition rules from ps.child.* to ps.* fields
1 parent 149fc92 commit 8b42b66

23 files changed

+255
-248
lines changed

rules/credential_access_credential_access_from_backups_via_rundll32.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Credentials access from backups via Rundll32
22
id: ff43852c-486c-4870-a318-ce976d2231a5
3-
version: 1.0.2
3+
version: 1.0.3
44
description: |
55
Detects an attempt to obtain credentials from credential backups.
66
labels:
@@ -16,7 +16,7 @@ labels:
1616

1717
condition: >
1818
spawn_process and
19-
(ps.child.name ~= 'rundll32.exe' or ps.child.pe.file.name ~= 'rundll32.exe') and
20-
(ps.child.args iin ('keymgr.dll') and ps.child.args iin ('KRShowKeyMgr'))
19+
(ps.name ~= 'rundll32.exe' or pe.file.name ~= 'rundll32.exe') and
20+
(ps.args iin ('keymgr.dll') and ps.args iin ('KRShowKeyMgr'))
2121
2222
min-engine-version: 3.0.0

rules/credential_access_credential_discovery_via_vaultcmd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Credential discovery via VaultCmd tool
22
id: 2ce607d3-5a14-4628-be8a-22bcde97dab5
3-
version: 1.1.2
3+
version: 1.1.3
44
description: |
55
Detects the usage of the VaultCmd tool to list Windows Credentials. VaultCmd creates,
66
displays and deletes stored credentials. An adversary may abuse this to list or dump
@@ -18,8 +18,8 @@ labels:
1818

1919
condition: >
2020
spawn_process and
21-
(ps.child.name ~= 'VaultCmd.exe' or ps.child.pe.file.name ~= 'vaultcmd.exe') and
22-
ps.child.cmdline imatches '*/list*'
21+
(ps.name ~= 'VaultCmd.exe' or pe.file.name ~= 'vaultcmd.exe') and
22+
ps.cmdline imatches '*/list*'
2323
2424
severity: medium
2525

rules/credential_access_lsass_memory_dump_via_wer.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: LSASS memory dump via Windows Error Reporting
22
id: 7b4a74e2-c7a7-4c1f-b2ce-0e0273c3add7
3-
version: 1.0.3
3+
version: 1.0.5
44
description: |
55
Adversaries may abuse Windows Error Reporting service to dump LSASS memory.
66
The ALPC protocol can send a message to report an exception on LSASS and
@@ -21,7 +21,8 @@ references:
2121
condition: >
2222
sequence
2323
maxspan 2m
24-
|spawn_process and ps.child.name iin ('WerFault.exe', 'WerFaultSecure.exe')| by ps.child.uuid
25-
|create_file and file.path icontains 'lsass'| by ps.uuid
24+
by ps.uuid
25+
|spawn_process and ps.name iin ('WerFault.exe', 'WerFaultSecure.exe')|
26+
|create_file and file.path icontains 'lsass'|
2627
2728
min-engine-version: 3.0.0

rules/credential_access_lsass_process_clone_creation_via_reflection.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: LSASS process clone creation via reflection
22
id: cdf3810a-4832-446a-ac9d-d108cf2e313c
3-
version: 1.0.2
3+
version: 1.0.3
44
description: |
55
Identifies the creation of an LSASS clone process via RtlCreateProcessReflection API function.
66
Adversaries can use this technique to dump credentials material from the LSASS fork and evade
@@ -21,7 +21,7 @@ references:
2121

2222
condition: >
2323
spawn_process and
24-
ps.name ~= 'lsass.exe' and ps.child.name ~= 'lsass.exe' and
24+
ps.name ~= 'lsass.exe' and ps.parent.name ~= 'lsass.exe' and
2525
thread.callstack.symbols imatches ('ntdll.dll!RtlCloneUserProcess', 'ntdll.dll!RtlCreateProcessReflection')
2626
action:
2727
- name: kill

rules/credential_access_potential_sam_hive_dumping.yml

Lines changed: 6 additions & 5 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.6
3+
version: 1.0.7
44
description:
55
Identifies access to the Security Account Manager registry hives.
66
labels:
@@ -19,16 +19,17 @@ references:
1919
condition: >
2020
sequence
2121
maxspan 10m
22+
by ps.uuid
2223
|spawn_process and
23-
not (ps.exe imatches
24+
not (ps.parent.exe imatches
2425
(
2526
'?:\\Program Files\\*.exe',
2627
'?:\\Program Files (x86)\\*.exe',
2728
'?:\\Windows\\System32\\svchost.exe'
2829
) or
29-
(ps.child.cmdline imatches '"?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe" ExecuteQueuedItems /LegacyServiceBehavior')
30+
(ps.cmdline imatches '"?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe" ExecuteQueuedItems /LegacyServiceBehavior')
3031
)
31-
| by ps.child.uuid
32+
|
3233
|open_registry and
3334
registry.path imatches 'HKEY_LOCAL_MACHINE\\SAM\\SAM\\Domains\\Account\\*' and
3435
registry.path not imatches
@@ -65,6 +66,6 @@ condition: >
6566
'?:\\Windows\\System32\\wbem\\WMIADAP.exe',
6667
'?:\\Windows\\System32\\cleanmgr.exe'
6768
)
68-
| by ps.uuid
69+
|
6970
7071
min-engine-version: 3.0.0

rules/credential_access_suspicious_vault_client_dll_load.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Suspicious Vault client DLL load
22
id: 64af2e2e-2309-4079-9c0f-985f1dd930f5
3-
version: 1.0.3
3+
version: 1.0.4
44
description: |
55
Identifies loading of the Vault client DLL by an unusual process. Adversaries can abuse the functions provided
66
by the Credential Vault Client Library to enumerate or harvest saved credentials.
@@ -21,11 +21,12 @@ references:
2121
condition: >
2222
sequence
2323
maxspan 2m
24+
by ps.uuid
2425
|spawn_process and
2526
ps.exe != '' and
2627
not
2728
(
28-
ps.child.exe imatches
29+
ps.exe imatches
2930
(
3031
'?:\\Windows\\System32\\MDMAppInstaller.exe',
3132
'?:\\Windows\\uus\\*\\MoUsoCoreWorker.exe',
@@ -35,17 +36,17 @@ condition: >
3536
'?:\\Program Files (x86)\\*.exe',
3637
'?:\\Windows\\winsxs\\*\\TiWorker.exe'
3738
) or
38-
(ps.child.exe imatches '?:\\WINDOWS\\System32\\taskhostw.exe' and ps.args intersects ('-k', 'netsvcs', '-p', '-s', 'Schedule')) or
39-
(ps.child.exe imatches '?:\\Windows\\System32\\RuntimeBroker.exe') or
39+
(ps.exe imatches '?:\\WINDOWS\\System32\\taskhostw.exe' and ps.parent.args intersects ('-k', 'netsvcs', '-p', '-s', 'Schedule')) or
40+
(ps.exe imatches '?:\\Windows\\System32\\RuntimeBroker.exe') or
4041
(ps.exe imatches ('?:\\Program Files\\WindowsApps\\Microsoft.*.exe', '?:\\Windows\\Microsoft.NET\\Framework*\\NGenTask.exe')) or
41-
(ps.child.exe imatches '?:\\WINDOWS\\system32\\BackgroundTaskHost.exe' and ps.child.args imatches ('-ServerName:*')) or
42-
(ps.child.exe imatches '?:\\Windows\\System32\\SecurityHealth\\*\\SecurityHealthHost.exe') or
43-
(ps.child.exe imatches '?:\\WINDOWS\\uus\\*\\MoUsoCoreWorker.exe') or
44-
(ps.exe imatches '?:\\Windows\\System32\\services.exe') or
45-
(ps.exe imatches '?:\\Program Files\\Microsoft OneDrive\\OneDriveStandaloneUpdater.exe')
42+
(ps.exe imatches '?:\\WINDOWS\\system32\\BackgroundTaskHost.exe' and ps.args imatches ('-ServerName:*')) or
43+
(ps.exe imatches '?:\\Windows\\System32\\SecurityHealth\\*\\SecurityHealthHost.exe') or
44+
(ps.exe imatches '?:\\WINDOWS\\uus\\*\\MoUsoCoreWorker.exe') or
45+
(ps.parent.exe imatches '?:\\Windows\\System32\\services.exe') or
46+
(ps.parent.exe imatches '?:\\Program Files\\Microsoft OneDrive\\OneDriveStandaloneUpdater.exe')
4647
)
47-
| by ps.child.uuid
48-
|load_dll and image.name ~= 'vaultcli.dll'| by ps.uuid
48+
|
49+
|load_dll and image.name ~= 'vaultcli.dll'|
4950
5051
output: >
5152
Suspicious process %2.ps.exe loaded the Credential Vault Client DLL for potential credentials harvesting

rules/defense_evasion_dll_loaded_via_callback_function.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: DLL loaded via a callback function
22
id: c7f46d0a-10b2-421a-b33c-f4df79599f2e
3-
version: 1.0.3
3+
version: 1.0.5
44
description: |
55
Identifies module proxying as a method to conceal suspicious callstacks. Adversaries use module proxying
66
the hide the origin of the LoadLibrary call from the callstack by loading the library from the callback
@@ -19,7 +19,8 @@ tags:
1919
condition: >
2020
sequence
2121
maxspan 2m
22-
|spawn_process| by ps.child.uuid
22+
by ps.uuid
23+
|spawn_process|
2324
|load_dll and image.name iin
2425
(
2526
'winhttp.dll', 'clr.dll', 'bcrypt.dll', 'bcryptprimitives.dll',
@@ -32,7 +33,7 @@ condition: >
3233
'ntdll.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll',
3334
'ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll'
3435
)
35-
| by ps.uuid
36+
|
3637
3738
output: >
3839
%2.image.path loaded from callback function by process %ps.exe

rules/defense_evasion_potential_injection_via_dotnet_debugging.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Potential injection via .NET debugging
22
id: 193ebf2f-e365-4f57-a639-275b7cdf0319
3-
version: 1.0.4
3+
version: 1.0.5
44
description: |
55
Identifies creation of a process on behalf of the CLR debugging facility which may
66
be indicative of code injection. The CLR interface utilizes the OpenVirtualProcess
@@ -18,16 +18,16 @@ references:
1818

1919
condition: >
2020
spawn_process and
21-
ps.exe != '' and thread.callstack.symbols imatches ('mscordbi.dll!OpenVirtualProcess') and
22-
ps.child.exe not imatches
23-
(
24-
'?:\\Visual Studio\\Common?\\IDE\\devenv.exe',
25-
'?:\\Program Files\\Microsoft Visual Studio\\*.exe',
26-
'?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe',
27-
'?:\\Program Files\\IIS Express\\iisexpress.exe',
28-
'?:\\Program Files (x86)\\IIS Express\\iisexpress.exe'
29-
) and
30-
ps.exe not imatches '?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe'
21+
ps.parent.exe != '' and thread.callstack.symbols imatches ('mscordbi.dll!OpenVirtualProcess') and
22+
ps.exe not imatches
23+
(
24+
'?:\\Visual Studio\\Common?\\IDE\\devenv.exe',
25+
'?:\\Program Files\\Microsoft Visual Studio\\*.exe',
26+
'?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe',
27+
'?:\\Program Files\\IIS Express\\iisexpress.exe',
28+
'?:\\Program Files (x86)\\IIS Express\\iisexpress.exe'
29+
) and
30+
ps.parent.exe not imatches '?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe'
3131
3232
output: >
3333
Process %ps.exe attached the .NET debugger to process %ps.child.exe for potential code injection

rules/defense_evasion_potential_process_doppelganging_injection.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Potential Process Doppelganging
22
id: eb34cf6e-ccc3-4bce-bbcf-013720640a28
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Adversaries may inject malicious code into process via process doppelganging
66
in order to evade process-based defenses as well as possibly elevate privileges.
@@ -50,9 +50,8 @@ references:
5050
condition: >
5151
sequence
5252
maxspan 2m
53-
by ps.uuid
54-
|create_file and thread.callstack.symbols imatches ('kernel32.dll!CreateFileTransacted*', 'ntdll.dll!RtlSetCurrentTransaction')|
55-
|spawn_process|
53+
|create_file and thread.callstack.symbols imatches ('kernel32.dll!CreateFileTransacted*', 'ntdll.dll!RtlSetCurrentTransaction')| by ps.uuid
54+
|spawn_process| by ps.parent.uuid
5655
action:
5756
- name: kill
5857

rules/defense_evasion_potential_process_hollowing_injection.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Potential Process Hollowing
22
id: 2a3fbae8-5e8c-4b71-b9da-56c3958c0d53
3-
version: 1.1.6
3+
version: 1.1.7
44
description: |
55
Adversaries may inject malicious code into suspended and hollowed processes in order to
66
evade process-based defenses. Process hollowing is a method of executing arbitrary code
@@ -29,19 +29,20 @@ references:
2929
condition: >
3030
sequence
3131
maxspan 2m
32+
by ps.uuid
3233
|spawn_process and
33-
ps.sid not in ('S-1-5-18', 'S-1-5-19', 'S-1-5-20') and
34-
ps.exe not imatches
34+
ps.parent.sid not in ('S-1-5-18', 'S-1-5-19', 'S-1-5-20') and
35+
ps.parent.exe not imatches
3536
(
3637
'?:\\Program Files\\*.exe',
3738
'?:\\Program Files (x86)\\*.exe',
3839
'?:\\Users\\*\\AppData\\Local\\Programs\\Common\\OneDriveCloud\\taskhostw.exe'
3940
)
40-
| by ps.child.uuid
41+
|
4142
|unmap_view_of_section and
4243
file.view.size > 20000 and file.view.protection != 'READONLY' and (length(file.name) = 0 or not ext(file.name) = '.dll')
43-
| by ps.uuid
44-
|load_executable| by ps.uuid
44+
|
45+
|load_executable|
4546
action:
4647
- name: kill
4748

0 commit comments

Comments
 (0)