Skip to content

Commit 3df8f30

Browse files
committed
chore(rules): Format rule conditions
1 parent de500a8 commit 3df8f30

16 files changed

+35
-95
lines changed

rules/credential_access_credential_discovery_via_vaultcmd.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Credential discovery via VaultCmd.exe
22
id: 2ce607d3-5a14-4628-be8a-22bcde97dab5
3-
version: 1.0.0
3+
version: 1.0.1
44
description: |
55
Detects the usage of the VaultCmd tool to list Windows Credentials.
66
VaultCmd creates, displays and deletes stored credentials.
@@ -16,9 +16,7 @@ labels:
1616
subtechnique.ref: https://attack.mitre.org/techniques/T1555/004/
1717

1818
condition: >
19-
spawn_process
20-
and
21-
ps.child.name ~= 'VaultCmd.exe'
19+
spawn_process and ps.child.name ~= 'VaultCmd.exe'
2220
and
2321
ps.child.args in
2422
(

rules/credential_access_lsass_memory_dump_preparation_via_silent_process_exit.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: LSASS memory dump preparation via SilentProcessExit
22
id: d325e426-f89a-4f7c-b655-3874dad07986
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Adversaries may exploit the SilentProcessExit debugging technique to conduct
66
LSASS memory dump via WerFault.exe (Windows Error Reporting) binary by creating
@@ -25,10 +25,6 @@ references:
2525
- https://www.deepinstinct.com/blog/lsass-memory-dumps-are-stealthier-than-ever-before-part-2
2626

2727
condition: >
28-
modify_registry
29-
and
30-
registry.path
31-
imatches
32-
'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\lsass*'
28+
modify_registry and registry.path imatches 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\lsass*'
3329
3430
min-engine-version: 2.4.0

rules/credential_access_suspicious_security_package_loaded_by_lsass.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Suspicious security package DLL loaded
22
id: 2c74f176-9a95-4344-a1aa-15aa06e16919
3-
version: 1.1.0
3+
version: 1.1.1
44
description: |
55
Attackers can abuse Windows Security Support Provider and Authentication Packages to
66
dynamically inject a Security Package into the Local Security Authority Subsystem Service
@@ -20,9 +20,7 @@ references:
2020
- https://www.ired.team/offensive-security/credential-access-and-credential-dumping/intercepting-logon-credentials-via-custom-security-support-provider-and-authentication-package
2121

2222
condition: >
23-
ps.name ~= 'lsass.exe'
24-
and
25-
thread.callstack.modules imatches ('?:\\Windows\\System32\\sspisrv.dll')
23+
ps.name ~= 'lsass.exe' and thread.callstack.modules imatches ('?:\\Windows\\System32\\sspisrv.dll')
2624
and
2725
(load_unsigned_or_untrusted_module)
2826

rules/credential_access_unusual_access_to_ssh_keys.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Unusual access to SSH keys
22
id: 90f5c1bd-abd6-4d1b-94e0-229f04473d60
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Identifies access by unusual process to saved SSH keys.
66
labels:
@@ -15,9 +15,7 @@ labels:
1515
subtechnique.ref: https://attack.mitre.org/techniques/T1552/001/
1616

1717
condition: >
18-
open_file
19-
and
20-
file.path imatches '?:\\Users\\*\\.ssh\\known_hosts'
18+
open_file and file.path imatches '?:\\Users\\*\\.ssh\\known_hosts'
2119
and
2220
not
2321
ps.exe imatches

rules/credential_access_unusual_access_to_web_browser_credential_stores.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Unusual access to Web Browser Credential stores
22
id: 9d889b2b-ca13-4a04-8919-ff1151f23a71
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Identifies access to Web Browser Credential stores by unusual processes.
66
labels:
@@ -15,9 +15,7 @@ labels:
1515
subtechnique.ref: https://attack.mitre.org/techniques/T1555/003/
1616

1717
condition: >
18-
open_file
19-
and
20-
file.path imatches web_browser_cred_stores
18+
open_file and file.path imatches web_browser_cred_stores
2119
and
2220
ps.name not iin web_browser_binaries
2321
and

rules/credential_access_unusual_access_to_windows_credential_history.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Unusual access to Windows Credential history files
22
id: 9d94062f-2cf3-407c-bd65-4072fe4b167f
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Detects unusual accesses to the Windows Credential history file.
66
The CREDHIST file contains all previous password-linked master key hashes used by
@@ -18,9 +18,7 @@ labels:
1818
subtechnique.ref: https://attack.mitre.org/techniques/T1555/004/
1919

2020
condition: >
21-
open_file
22-
and
23-
file.path imatches '?:\\Users\\*\\AppData\\*\\Microsoft\\Protect\\CREDHIST'
21+
open_file and file.path imatches '?:\\Users\\*\\AppData\\*\\Microsoft\\Protect\\CREDHIST'
2422
and
2523
not
2624
ps.exe imatches

rules/defense_evasion_dll_sideloading_via_copied_binary.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: DLL Side-Loading via a copied binary
22
id: 80798e2c-6c37-472b-936c-1d2d6b95ff3c
3-
version: 1.0.1
3+
version: 1.0.2
44
description: |
55
Identifies when a binary is copied to a directory and shortly followed
66
by the loading of an unsigned DLL from the same directory. Adversaries may
@@ -24,9 +24,7 @@ condition: >
2424
and
2525
thread.callstack.symbols imatches ('*CopyFile*', '*MoveFile*')
2626
| by file.path
27-
|(load_dll) and dir(image.path) ~= dir(ps.exe)
28-
and
29-
pe.cert.subject icontains 'Microsoft' and pe.is_trusted
27+
|(load_dll) and dir(image.path) ~= dir(ps.exe) and pe.cert.subject icontains 'Microsoft' and pe.is_trusted
3028
and
3129
(image.signature.type = 'NONE' or image.signature.level = 'UNCHECKED' or image.signature.level = 'UNSIGNED')
3230
| by ps.exe

rules/defense_evasion_process_spawned_via_remote_thread.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Process spawned via remote thread
22
id: 9a2c7b40-4e5f-4edf-b02e-79cd33c9a137
3-
version: 1.0.0
3+
version: 1.0.1
44
description: |
55
Identifies the creation of a process with the parent call stack not
66
revealing normal API functions for process creation. This may be a
@@ -16,12 +16,7 @@ labels:
1616
condition: >
1717
spawn_process
1818
and
19-
thread.callstack.symbols imatches
20-
(
21-
'ntdll.dll!ZwCreateThreadEx*',
22-
'ntdll.dll!NtCreateThreadEx*',
23-
'ntdll.dll!RtlCreateUserThread'
24-
)
19+
thread.callstack.symbols imatches ('ntdll.dll!ZwCreateThreadEx*', 'ntdll.dll!NtCreateThreadEx*', 'ntdll.dll!RtlCreateUserThread')
2520
and
2621
not
2722
thread.callstack.symbols imatches ('*CreateProcess*', '*CreateUserProcess*')

rules/initial_access_executable_file_creation_from_macro_enabled_microsoft_office_document.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Executable file creation from a macro-enabled Microsoft Office document
22
id: fffcce75-2427-406e-9597-1f49b0c9ad5b
3-
version: 1.0.0
3+
version: 1.0.1
44
description: |
55
Identifies the Microsoft Office process writing an executable file type and
66
the call stack reveals the file creation was originated from the Microsoft
@@ -18,9 +18,7 @@ labels:
1818
subtechnique.ref: https://attack.mitre.org/techniques/T1566/001/
1919

2020
condition: >
21-
create_file
22-
and
23-
ps.name in msoffice_binaries
21+
create_file and ps.name in msoffice_binaries
2422
and
2523
thread.callstack.modules imatches 'vbe?.dll'
2624
and

rules/initial_access_macro_execution_via_script_interpreter.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Macro execution via script interpreter
22
id: 845404de-df6f-472f-bd74-72148a7f5166
3-
version: 1.0.0
3+
version: 1.0.1
44
description: |
55
Identifies the execution of the Windows scripting interpreter spawning
66
a Microsoft Office process to execute suspicious Visual Basic macro.
@@ -21,18 +21,9 @@ condition: >
2121
|spawn_process and ps.parent.name iin script_interpreters and ps.child.name iin msoffice_binaries| by ps.child.uuid
2222
|ps.name iin msoffice_binaries and thread.callstack.modules imatches '*vbe?.dll'
2323
and
24-
(
25-
spawn_process
24+
(spawn_process or (create_remote_thread) or (modify_registry) or (create_file)
2625
or
27-
(create_remote_thread)
28-
or
29-
(modify_registry)
30-
or
31-
(create_file)
32-
or
33-
(
34-
load_module and not image.name imatches ('?:\\Program Files\\*', '?:\\Program Files (x86)\\*')
35-
)
26+
(load_module and not image.name imatches ('?:\\Program Files\\*', '?:\\Program Files (x86)\\*'))
3627
)
3728
| by ps.uuid
3829

0 commit comments

Comments
 (0)