Skip to content

Commit 39c82f3

Browse files
committed
fix(rule): Improve Hidden local account creation rule
The condition is modified to consider both, RegCreateKey and RegSetValue events. The registry key path trailing backslashes are removed because in case of RegCreateKey events, the registry key is reported without ending backslashes.
1 parent a83dd8b commit 39c82f3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rules/macros/macros.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
expr: kevt.name = 'RegCreateKey' and registry.status = 'Success'
5151

5252
- macro: modify_registry
53-
expr: (set_value or create_key)
53+
expr: ((set_value) or (create_key))
5454

5555
- macro: send_socket
5656
expr: kevt.name = 'Send'

rules/persistence_hidden_local_account_creation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ labels:
1717
subtechnique.ref: https://attack.mitre.org/techniques/T1136/001/
1818

1919
condition: >
20-
set_value and registry.path imatches
20+
modify_registry and registry.path imatches
2121
(
22-
'HKEY_LOCAL_MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\Names\\*$\\',
23-
'HKEY_LOCAL_MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\*$\\'
22+
'HKEY_LOCAL_MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\Names\\*$',
23+
'HKEY_LOCAL_MACHINE\\SAM\\SAM\\Domains\\Account\\Users\\*$'
2424
)
2525
2626
severity: high

0 commit comments

Comments
 (0)