Skip to content

Commit a77d3ba

Browse files
nasbenchphantinuss
andauthored
Merge PR #5708 from @nasbench - Multiple updates and issue fixes
fix: Turla Group Commands May 2020 - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Potential Dtrack RAT Activity - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Potential Data Exfiltration Activity Via CommandLine Tools - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Suspicious Network Command - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Suspicious SYSTEM User Process Creation - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Potential Snatch Ransomware Activity - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Potential Devil Bait Malware Reconnaissance - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Mint Sandstorm - AsperaFaspex Suspicious Process Execution - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. fix: Mint Sandstorm - ManageEngine Suspicious Process Execution - Change the commandline to regex to account for additional spaces when ingesting non XML version of logs from the eventlog. update: Powershell Token Obfuscation - Powershell - Move to the TH folder in order to set the right FP expectations. fix: Kerberoasting Activity - Initial Query - Fix issue with filter names and logic chore: add sorting to the rule archiver script --------- Thanks: KingKDot Thanks: zambomarcell Thanks: Koifman Co-authored-by: phantinuss <[email protected]>
1 parent 02f7843 commit a77d3ba

12 files changed

+81
-57
lines changed

rules-emerging-threats/2014/TA/Turla/proc_creation_win_apt_turla_comrat_may20.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://www.welivesecurity.com/wp-content/uploads/2020/05/ESET_Turla_ComRAT.pdf
77
author: Florian Roth (Nextron Systems)
88
date: 2020-05-26
9-
modified: 2021-11-27
9+
modified: 2025-10-19
1010
tags:
1111
- attack.privilege-escalation
1212
- attack.persistence
@@ -27,9 +27,8 @@ detection:
2727
- '.WSqmCons))|iex;'
2828
- 'Fr`omBa`se6`4Str`ing'
2929
selection_cli_2:
30-
CommandLine|contains|all:
31-
- 'net use https://docs.live.net'
32-
- '@aol.co.uk'
30+
CommandLine|re: 'net\s+use\s+https://docs.live.net'
31+
CommandLine|contains: '@aol.co.uk'
3332
condition: 1 of selection_*
3433
falsepositives:
3534
- Unknown

rules-emerging-threats/2019/Malware/Dtrack-RAT/proc_creation_win_malware_dtrack.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ references:
1010
- https://app.any.run/tasks/ce4deab5-3263-494f-93e3-afb2b9d79f14/
1111
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
1212
date: 2019-10-30
13-
modified: 2023-02-03
13+
modified: 2025-10-19
1414
tags:
1515
- attack.impact
1616
- attack.t1490
@@ -20,21 +20,17 @@ logsource:
2020
product: windows
2121
detection:
2222
selection_ping:
23-
CommandLine|contains|all:
24-
- 'ping -n '
25-
- ' echo EEEE > '
23+
CommandLine|re:
24+
- 'ping\s+-n '
25+
- ' echo EEEE\s?>\s?'
2626
selection_ipconfig:
27-
CommandLine|contains|all:
28-
- 'ipconfig /all'
29-
- '\temp\res.ip'
27+
CommandLine|re: 'ipconfig\s+/all'
28+
CommandLine|contains: '\temp\res.ip'
3029
selection_netsh:
3130
CommandLine|contains|all:
3231
- 'interface ip show config'
3332
- '\temp\netsh.res'
3433
condition: 1 of selection_*
35-
fields:
36-
- CommandLine
37-
- ParentCommandLine
3834
falsepositives:
3935
- Unlikely
4036
level: critical

rules-emerging-threats/2019/Malware/Snatch/proc_creation_win_malware_snatch_ransomware.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://news.sophos.com/en-us/2019/12/09/snatch-ransomware-reboots-pcs-into-safe-mode-to-bypass-protection/
77
author: Florian Roth (Nextron Systems)
88
date: 2020-08-26
9-
modified: 2023-02-13
9+
modified: 2025-10-19
1010
tags:
1111
- attack.execution
1212
- attack.t1204
@@ -16,14 +16,9 @@ logsource:
1616
product: windows
1717
detection:
1818
selection:
19-
CommandLine|contains:
20-
- 'shutdown /r /f /t 00' # Shutdown in safe mode immediately
21-
- 'net stop SuperBackupMan'
19+
- CommandLine|re: 'shutdown\s+/r /f /t 00' # Shutdown in safe mode immediately
20+
- CommandLine|re: 'net\s+stop SuperBackupMan'
2221
condition: selection
23-
fields:
24-
- ComputerName
25-
- User
26-
- Image
2722
falsepositives:
2823
- Scripts that shutdown the system immediately and reboot them in safe mode are unlikely
2924
level: high

rules-emerging-threats/2021/Malware/Devil-Bait/proc_creation_win_malware_devil_bait_output_redirect.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ references:
1010
- https://www.virustotal.com/gui/file/fa71eee906a7849ba3f4bab74edb577bd1f1f8397ca428591b4a9872ce1f1e9b/behavior
1111
author: Nasreddine Bencherchali (Nextron Systems), NCSC (Idea)
1212
date: 2023-05-15
13+
modified: 2025-10-19
1314
tags:
1415
- attack.defense-evasion
1516
- attack.t1218
@@ -26,13 +27,13 @@ detection:
2627
- '.xml'
2728
- '.txt'
2829
selection_recon_cmd:
29-
CommandLine|contains:
30-
# Taken from a6f9043627f8be2452153b5dbf6278e9b91763c3b5c2aea537a859e0c8c6b504
31-
# If you find samples using other commands please add them
32-
- 'dir'
33-
- 'ipconfig /all'
34-
- 'systeminfo'
35-
- 'tasklist'
30+
- CommandLine|re: 'ipconfig\s+/all'
31+
- CommandLine|contains:
32+
# Taken from a6f9043627f8be2452153b5dbf6278e9b91763c3b5c2aea537a859e0c8c6b504
33+
# If you find samples using other commands please add them
34+
- 'dir'
35+
- 'systeminfo'
36+
- 'tasklist'
3637
condition: all of selection_*
3738
falsepositives:
3839
- Unlikely

rules-emerging-threats/2023/TA/Mint-Sandstorm/proc_creation_win_apt_mint_sandstorm_aspera_faspex_susp_child_process.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://www.microsoft.com/en-us/security/blog/2023/04/18/nation-state-threat-actor-mint-sandstorm-refines-tradecraft-to-attack-high-value-targets/
77
author: Nasreddine Bencherchali (Nextron Systems), MSTIC (idea)
88
date: 2023-04-20
9-
modified: 2023-04-25
9+
modified: 2025-10-19
1010
tags:
1111
- attack.execution
1212
- detection.emerging-threats
@@ -43,10 +43,7 @@ detection:
4343
- 'Invoke-Expression'
4444
- 'Invoke-WebRequest'
4545
- 'localgroup administrators'
46-
- 'net group'
47-
- 'net user'
4846
- 'o365accountconfiguration'
49-
- 'query session'
5047
- 'samaccountname='
5148
- 'set-MpPreference'
5249
- 'svhost.exe'
@@ -55,7 +52,11 @@ detection:
5552
- 'usoprivate'
5653
- 'usoshared'
5754
- 'whoami'
58-
- CommandLine|re: '[-/–][Ee^]{1,2}[ncodema^]*\s[A-Za-z0-9+/=]{15,}'
55+
- CommandLine|re:
56+
- '[-/–][Ee^]{1,2}[ncodema^]*\s[A-Za-z0-9+/=]{15,}'
57+
- 'net\s+user'
58+
- 'net\s+group'
59+
- 'query\s+session'
5960
selection_special_child_lsass_1:
6061
CommandLine|contains: 'lsass'
6162
selection_special_child_lsass_2:

rules-emerging-threats/2023/TA/Mint-Sandstorm/proc_creation_win_apt_mint_sandstorm_manage_engine_susp_child_process.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://www.microsoft.com/en-us/security/blog/2023/04/18/nation-state-threat-actor-mint-sandstorm-refines-tradecraft-to-attack-high-value-targets/
77
author: Nasreddine Bencherchali (Nextron Systems), MSTIC (idea)
88
date: 2023-04-20
9-
modified: 2023-04-25
9+
modified: 2025-10-19
1010
tags:
1111
- attack.execution
1212
- detection.emerging-threats
@@ -45,10 +45,7 @@ detection:
4545
- 'Invoke-Expression'
4646
- 'Invoke-WebRequest'
4747
- 'localgroup administrators'
48-
- 'net group'
49-
- 'net user'
5048
- 'o365accountconfiguration'
51-
- 'query session'
5249
- 'samaccountname='
5350
- 'set-MpPreference'
5451
- 'svhost.exe'
@@ -58,6 +55,9 @@ detection:
5855
- 'usoshared'
5956
- 'whoami'
6057
- CommandLine|re: '[-/–][Ee^]{1,2}[ncodema^]*\s[A-Za-z0-9+/=]{15,}'
58+
- CommandLine|re: 'net\s+user'
59+
- CommandLine|re: 'net\s+group'
60+
- CommandLine|re: 'query\ssession'
6161
selection_special_child_lsass_1:
6262
CommandLine|contains: 'lsass'
6363
selection_special_child_lsass_2:

rules/windows/powershell/powershell_script/posh_ps_token_obfuscation.yml renamed to rules-threat-hunting/windows/powershell/powershell_script/posh_ps_token_obfuscation.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ related:
44
- id: deb9b646-a508-44ee-b7c9-d8965921c6b6
55
type: similar
66
status: test
7-
description: Detects TOKEN OBFUSCATION technique from Invoke-Obfuscation
7+
description: |
8+
Detects TOKEN OBFUSCATION technique from Invoke-Obfuscation in Powershell scripts.
9+
Use this rule as a threat-hunting baseline to find obfuscated scripts in your environment.
10+
Once tested and tuned, consider deploying a production detection rule based on this hunting rule.
811
references:
912
- https://github.com/danielbohannon/Invoke-Obfuscation
1013
author: frack113
1114
date: 2022-12-27
12-
modified: 2023-03-24
15+
modified: 2025-10-19
1316
tags:
1417
- attack.defense-evasion
1518
- attack.t1027.009
19+
- detection.threat-hunting
1620
logsource:
1721
product: windows
1822
category: ps_script
@@ -40,5 +44,5 @@ detection:
4044
ScriptBlockText|contains: '`r`n'
4145
condition: selection and not 1 of filter_*
4246
falsepositives:
43-
- Unknown
44-
level: high
47+
- Edge case might be possible with heavy use of string formatting or obfuscation in legitimate scripts.
48+
level: medium

rules/windows/builtin/security/win_security_kerberoasting_activity.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ references:
1010
- https://adsecurity.org/?p=3513
1111
author: '@kostastsale'
1212
date: 2022-01-21
13+
modified: 2025-10-19
1314
tags:
1415
- attack.credential-access
1516
- attack.t1558.003
@@ -21,10 +22,11 @@ detection:
2122
EventID: 4769
2223
Status: '0x0' # Translated as status from failure code field. Query only for successes
2324
TicketEncryptionType: '0x17' # RC4 ticket encryption type
24-
filter_main_:
25+
filter_main_krbtgt:
2526
ServiceName|endswith:
2627
- 'krbtgt' # Ignore requests for the krbtgt service
2728
- '$' # Ignore requests from service names that end with $ which are associated with genuine kerberos traffic
29+
filter_main_machine_accounts:
2830
TargetUserName|contains: '$@' # Ignore requests from machines
2931
condition: selection and not 1 of filter_main_*
3032
falsepositives:

rules/windows/process_creation/proc_creation_win_susp_data_exfiltration_via_cli.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://www.sentinelone.com/blog/living-off-windows-defender-lockbit-ransomware-sideloads-cobalt-strike-through-microsoft-security-tool/
77
author: Nasreddine Bencherchali (Nextron Systems)
88
date: 2022-08-02
9-
modified: 2025-07-18
9+
modified: 2025-10-19
1010
tags:
1111
- attack.execution
1212
- attack.t1059.001
@@ -45,17 +45,18 @@ detection:
4545
- '--post-data'
4646
- '--post-file'
4747
payloads:
48+
- CommandLine|re:
49+
- 'net\s+view'
50+
- 'sc\s+query'
4851
- CommandLine|contains:
4952
- 'Get-Content'
5053
- 'GetBytes'
5154
- 'hostname'
5255
- 'ifconfig'
5356
- 'ipconfig'
54-
- 'net view'
5557
- 'netstat'
5658
- 'nltest'
5759
- 'qprocess'
58-
- 'sc query'
5960
- 'systeminfo'
6061
- 'tasklist'
6162
- 'ToBase64String'

rules/windows/process_creation/proc_creation_win_susp_network_command.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1016/T1016.md#atomic-test-1---system-network-configuration-discovery-on-windows
77
author: frack113, Christopher Peacock '@securepeacock', SCYTHE '@scythe_io'
88
date: 2021-12-07
9-
modified: 2022-04-11
9+
modified: 2025-10-19
1010
tags:
1111
- attack.discovery
1212
- attack.t1016
@@ -15,13 +15,13 @@ logsource:
1515
product: windows
1616
detection:
1717
selection:
18-
CommandLine|contains:
19-
- 'ipconfig /all'
20-
- 'netsh interface show interface'
21-
- 'arp -a'
22-
- 'nbtstat -n'
23-
- 'net config'
24-
- 'route print'
18+
CommandLine|re:
19+
- 'ipconfig\s+/all'
20+
- 'netsh\s+interface show interface'
21+
- 'arp\s+-a'
22+
- 'nbtstat\s+-n'
23+
- 'net\s+config'
24+
- 'route\s+print'
2525
condition: selection
2626
falsepositives:
2727
- Administrator, hotline ask to user

0 commit comments

Comments
 (0)