Skip to content

Commit f0395b8

Browse files
nasbenchphantinuss
andauthored
Merge PR #4774 from @nasbench - Fix and update multiple rules
fix: EVTX Created In Uncommon Location - Reduce level and remove filters fix: Files With System Process Name In Unsuspected Locations - Add additional paths fix: New RUN Key Pointing to Suspicious Folder new: CVE-2024-1212 Exploitation - Progress Kemp LoadMaster Unauthenticated Command Injection new: MaxMpxCt Registry Value Changed update: Potentially Suspicious CMD Shell Output Redirect - Enhance logic update: Suspicious Command Patterns In Scheduled Task Creation - Enhance logic --------- Co-authored-by: phantinuss <[email protected]>
1 parent 0d63f52 commit f0395b8

10 files changed

+129
-72
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: CVE-2024-1212 Exploitation - Progress Kemp LoadMaster Unauthenticated Command Injection
2+
id: eafb8bd5-7605-4bfe-a9ec-0442bc151f15
3+
status: experimental
4+
description: |
5+
Detects potential exploitation of CVE-2024-1709 an unauthenticated command injection in Progress Kemp LoadMaster.
6+
It looks for GET requests to '/access/set' API with the parameters 'param=enableapi' and 'value=1' as well as an "Authorization" header with a base64 encoded value with an uncommon character.
7+
references:
8+
- https://github.com/RhinoSecurityLabs/CVEs/blob/15cf4d86c83daa57b59eaa2542a0ed47ad3dc32d/CVE-2024-1212/CVE-2024-1212.py
9+
- https://rhinosecuritylabs.com/research/cve-2024-1212unauthenticated-command-injection-in-progress-kemp-loadmaster/
10+
author: Nasreddine Bencherchali (Nextron Systems)
11+
date: 2024/03/20
12+
tags:
13+
- attack.initial_access
14+
- cve.2024.1212
15+
logsource:
16+
category: webserver
17+
detection:
18+
selection_path:
19+
cs-method: 'GET'
20+
cs-uri-stem|contains|all:
21+
- '/access/set'
22+
- 'param=enableapi'
23+
- 'value=1'
24+
selection_keywords:
25+
- 'Basic Jz'
26+
- 'Basic c7'
27+
- 'Basic nO'
28+
- "Basic ';"
29+
condition: all of selection_*
30+
falsepositives:
31+
- Unlikely
32+
level: high

Diff for: rules/windows/process_creation/proc_creation_win_cmd_redirect.yml renamed to rules-threat-hunting/windows/process_creation/proc_creation_win_cmd_redirect.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ related:
44
- id: 8e0bb260-d4b2-4fff-bb8d-3f82118e6892
55
type: similar
66
status: test
7-
description: Detects the use of the redirection character ">" to redicrect information in commandline
7+
description: |
8+
Detects the use of the redirection character ">" to redirect information on the command line.
9+
This technique is sometimes used by malicious actors in order to redirect the output of reconnaissance commands such as "hostname" and "dir" to files for future exfiltration.
810
references:
911
- https://ss64.com/nt/syntax-redirection.html
1012
author: frack113
1113
date: 2022/01/22
12-
modified: 2023/03/07
14+
modified: 2024/03/19
1315
tags:
1416
- attack.discovery
1517
- attack.t1082
18+
- detection.threat_hunting
1619
logsource:
1720
category: process_creation
1821
product: windows
@@ -22,12 +25,12 @@ detection:
2225
- Image|endswith: '\cmd.exe'
2326
selection_cli:
2427
CommandLine|contains: '>'
25-
filter_idm_extension:
28+
filter_optional_idm_extension:
2629
CommandLine|contains:
2730
- 'C:\Program Files (x86)\Internet Download Manager\IDMMsgHost.exe'
2831
- 'chrome-extension://'
2932
- '\\.\pipe\chrome.nativeMessaging'
30-
condition: all of selection_* and not 1 of filter_*
33+
condition: all of selection_* and not 1 of filter_optional_*
3134
falsepositives:
3235
- Internet Download Manager extensions use named pipes and redirection via CLI. Filter it out if you use it in your environment
3336
level: low
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
title: EVTX Created In Uncommon Location
22
id: 65236ec7-ace0-4f0c-82fd-737b04fd4dcb
33
status: experimental
4-
description: Detects the creation of new files with the ".evtx" extension in non-common locations. Which could indicate tampering with default evtx locations in order to evade security controls
4+
description: |
5+
Detects the creation of new files with the ".evtx" extension in non-common or non-standard location.
6+
This could indicate tampering with default EVTX locations in order to evade security controls or simply exfiltration of event log to search for sensitive information within.
7+
Note that backup software and legitimate administrator might perform similar actions during troubleshooting.
58
references:
69
- https://learn.microsoft.com/en-us/windows/win32/eventlog/eventlog-key
710
author: D3F7A5105
811
date: 2023/01/02
9-
modified: 2023/07/13
12+
modified: 2024/03/26
1013
tags:
1114
- attack.defense_evasion
1215
- attack.t1562.002
@@ -18,15 +21,12 @@ detection:
1821
selection:
1922
TargetFilename|endswith: '.evtx'
2023
filter_main_path:
21-
TargetFilename|contains: ':\Windows\System32\winevt\Logs\'
24+
TargetFilename|startswith: 'C:\Windows\System32\winevt\Logs\'
2225
filter_main_baseimage:
23-
TargetFilename|contains: ':\ProgramData\Microsoft\Windows\Containers\BaseImages\'
26+
TargetFilename|startswith: 'C:\ProgramData\Microsoft\Windows\Containers\BaseImages\'
2427
TargetFilename|endswith: '\Windows\System32\winevt\Logs\'
25-
filter_main_generic_img:
26-
Image|endswith:
27-
- ':\Windows\explorer.exe'
28-
- ':\Windows\system32\dllhost.exe'
2928
condition: selection and not 1 of filter_main_*
3029
falsepositives:
3130
- Administrator or backup activity
32-
level: high
31+
- An unknown bug seems to trigger the Windows "svchost" process to drop EVTX files in the "C:\Windows\Temp" directory in the form "<log_name">_<uuid>.evtx". See https://superuser.com/questions/1371229/low-disk-space-after-filling-up-c-windows-temp-with-evtx-and-txt-files
32+
level: medium

Diff for: rules/windows/file/file_event/file_event_win_creation_system_file.yml

+21-30
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ id: d5866ddf-ce8f-4aea-b28e-d96485a20d3d
33
status: test
44
description: |
55
Detects the creation of an executable with a system process name in folders other than the system ones (System32, SysWOW64, etc.).
6+
It is highly recommended to perform an initial baseline before using this rule in production.
67
references:
78
- Internal Research
89
author: Sander Wiebing, Tim Shelton, Nasreddine Bencherchali (Nextron Systems)
910
date: 2020/05/26
10-
modified: 2023/11/10
11+
modified: 2024/03/18
1112
tags:
1213
- attack.defense_evasion
1314
- attack.t1036.005
@@ -89,48 +90,38 @@ detection:
8990
- '\WSReset.exe'
9091
- '\WUDFHost.exe'
9192
- '\WWAHost.exe'
92-
filter_main_dism_tiworker:
93+
filter_main_generic:
94+
# Note: It is recommended to use a more robust filter instead of this generic one, to avoid false negatives.
9395
TargetFilename|contains:
94-
- ':\Windows\SoftwareDistribution\'
95-
- ':\Windows\System32\'
96-
- ':\Windows\SysWOW64\'
97-
- ':\Windows\WinSxS\'
9896
- '\SystemRoot\System32\'
99-
Image|endswith:
100-
- '\Windows\System32\dism.exe'
101-
- '\TiWorker.exe'
102-
filter_main_setuphost:
103-
TargetFilename|contains: ':\$WINDOWS.~BT\'
104-
Image|endswith: ':\$WINDOWS.~BT\Sources\SetupHost.exe'
105-
filter_main_wbengine:
106-
TargetFilename|endswith: '\RuntimeBroker.exe'
107-
Image|endswith: ':\Windows\system32\wbengine.exe'
97+
- 'C:\$WINDOWS.~BT\'
98+
- 'C:\$WinREAgent\'
99+
- 'C:\Windows\SoftwareDistribution\'
100+
- 'C:\Windows\System32\'
101+
- 'C:\Windows\SysWOW64\'
102+
- 'C:\Windows\WinSxS\'
103+
- 'C:\Windows\uus\'
108104
filter_main_svchost:
109-
Image|endswith: ':\Windows\system32\svchost.exe'
110-
TargetFilename|contains:
111-
- ':\Windows\SoftwareDistribution\Download\'
112-
- ':\Program Files\WindowsApps\'
105+
Image|endswith: 'C:\Windows\system32\svchost.exe'
106+
TargetFilename|contains: 'C:\Program Files\WindowsApps\'
113107
filter_main_wuauclt:
114-
Image|endswith: ':\Windows\System32\wuauclt.exe'
108+
Image|endswith: 'C:\Windows\System32\wuauclt.exe'
115109
filter_main_explorer:
116-
TargetFilename|endswith: ':\Windows\explorer.exe'
110+
TargetFilename|endswith: 'C:\Windows\explorer.exe'
117111
filter_main_msiexec:
118112
# This filter handles system processes who are updated/installed using misexec.
119-
Image|endswith: ':\WINDOWS\system32\msiexec.exe'
113+
Image|endswith: 'C:\WINDOWS\system32\msiexec.exe'
120114
# Add more processes if you find them or simply filter msiexec on its own. If the list grows big
121115
TargetFilename|endswith:
122-
- ':\Program Files\PowerShell\7\pwsh.exe'
123-
- ':\Program Files\PowerShell\7-preview\pwsh.exe'
116+
- 'C:\Program Files\PowerShell\7\pwsh.exe'
117+
- 'C:\Program Files\PowerShell\7-preview\pwsh.exe'
124118
filter_main_healtray:
125-
TargetFilename|contains: ':\Windows\System32\SecurityHealth\'
119+
TargetFilename|contains: 'C:\Windows\System32\SecurityHealth\'
126120
TargetFilename|endswith: '\SecurityHealthSystray.exe'
127121
Image|endswith: '\SecurityHealthSetup.exe'
128-
filter_main_wuaucltcore:
129-
Image|contains: ':\Windows\uus\'
130-
Image|endswith: '\wuaucltcore.exe'
131-
TargetFilename|contains: ':\$WinREAgent\'
132122
condition: selection and not 1 of filter_main_*
133123
falsepositives:
134124
- System processes copied outside their default folders for testing purposes
135125
- Third party software naming their software with the same names as the processes mentioned here
136-
level: high
126+
# Note: Upgrade to high after an initial baseline to your environement.
127+
level: medium

Diff for: rules/windows/process_creation/proc_creation_win_cmd_redirection_susp_folder.yml

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
title: Suspicious CMD Shell Output Redirect
1+
title: Potentially Suspicious CMD Shell Output Redirect
22
id: 8e0bb260-d4b2-4fff-bb8d-3f82118e6892
33
related:
44
- id: aa2efee7-34dd-446e-8a37-40790a66efd7
55
type: derived
66
- id: 4f4eaa9f-5ad4-410c-a4be-bc6132b0175a
77
type: similar
88
status: experimental
9-
description: Detects inline Windows shell commands redirecting output via the ">" symbol to a suspicious location
9+
description: |
10+
Detects inline Windows shell commands redirecting output via the ">" symbol to a suspicious location.
11+
This technique is sometimes used by malicious actors in order to redirect the output of reconnaissance commands such as "hostname" and "dir" to files for future exfiltration.
1012
references:
1113
- https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/
1214
author: Nasreddine Bencherchali (Nextron Systems)
1315
date: 2022/07/12
14-
modified: 2023/05/15
16+
modified: 2024/03/19
1517
tags:
1618
- attack.defense_evasion
1719
- attack.t1218
@@ -24,24 +26,18 @@ detection:
2426
- OriginalFileName: 'Cmd.Exe'
2527
selection_cli_1:
2628
CommandLine|contains:
27-
# Add more suspicious locations as you find them
28-
# The space from the start is missing to cover append operations ">>"
29-
- '> \Users\Public\'
30-
- '> %APPDATA%\'
31-
- '> %TEMP%\'
32-
- '> %TMP%\'
33-
- '> %USERPROFILE%\'
34-
- '> C:\Temp\'
35-
- '> C:\Users\Public\'
36-
- '> C:\Windows\Temp\'
37-
- '>\Users\Public\'
38-
- '>%APPDATA%\'
39-
- '>%TEMP%\'
40-
- '>%TMP%\'
41-
- '>%USERPROFILE%\'
42-
- '>C:\Temp\'
43-
- '>C:\Users\Public\'
44-
- '>C:\Windows\Temp\'
29+
# Note: Add more suspicious locations as you find them
30+
# Note: The space from the start is missing to cover append operations ">>"
31+
# Note: We use the "?" to account for both a single and a double quote
32+
# Note: If you want to account for more spaces which is still a valid bypass option. Use a regex with "\s"
33+
- '>?%APPDATA%\'
34+
- '>?%TEMP%\'
35+
- '>?%TMP%\'
36+
- '>?%USERPROFILE%\'
37+
- '>?C:\ProgramData\'
38+
- '>?C:\Temp\'
39+
- '>?C:\Users\Public\'
40+
- '>?C:\Windows\Temp\'
4541
selection_cli_2:
4642
CommandLine|contains:
4743
- ' >'

Diff for: rules/windows/process_creation/proc_creation_win_reg_add_safeboot.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ references:
99
- https://redacted.com/blog/bianlian-ransomware-gang-gives-it-a-go/
1010
author: Nasreddine Bencherchali (Nextron Systems)
1111
date: 2022/09/02
12+
modified: 2024/03/19
1213
tags:
1314
- attack.defense_evasion
1415
- attack.t1562.001
@@ -17,7 +18,7 @@ logsource:
1718
product: windows
1819
detection:
1920
selection_img:
20-
- Image|endswith: 'reg.exe'
21+
- Image|endswith: '\reg.exe'
2122
- OriginalFileName: 'reg.exe'
2223
selection_safeboot:
2324
CommandLine|contains: '\SYSTEM\CurrentControlSet\Control\SafeBoot'

Diff for: rules/windows/process_creation/proc_creation_win_schtasks_susp_pattern.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ references:
88
- https://www.ncsc.gov.uk/static-assets/documents/malware-analysis-reports/devil-bait/NCSC-MAR-Devil-Bait.pdf
99
author: Florian Roth (Nextron Systems)
1010
date: 2022/02/23
11-
modified: 2023/12/21
11+
modified: 2024/03/19
1212
tags:
1313
- attack.execution
1414
- attack.t1053.005
@@ -47,6 +47,10 @@ detection:
4747
- 'mshta.exe http'
4848
selection_anomaly_1:
4949
CommandLine|contains:
50+
- ':\ProgramData\'
51+
- ':\Temp\'
52+
- ':\Tmp\'
53+
- ':\Users\Public\'
5054
- ':\Windows\Temp\'
5155
- '\AppData\'
5256
- '%AppData%'

Diff for: rules/windows/registry/registry_set/registry_set_office_vba_warnings_tamper.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: Office Macros Auto-Enabled
1+
title: Office Macros Warning Disabled
22
id: 91239011-fe3c-4b54-9f24-15c86bb65913
33
related:
44
- id: a166f74e-bf44-409d-b9ba-ea4b2dd8b3cd
@@ -11,7 +11,7 @@ references:
1111
- https://securelist.com/scarcruft-surveilling-north-korean-defectors-and-human-rights-activists/105074/
1212
author: Trent Liffick (@tliffick), Nasreddine Bencherchali (Nextron Systems)
1313
date: 2020/05/22
14-
modified: 2023/08/17
14+
modified: 2024/03/19
1515
tags:
1616
- attack.defense_evasion
1717
- attack.t1112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
title: MaxMpxCt Registry Value Changed
2+
id: 0e6a9e62-627e-496c-aef5-bfa39da29b5e
3+
status: experimental
4+
description: |
5+
Detects changes to the "MaxMpxCt" registry value.
6+
MaxMpxCt specifies the maximum outstanding network requests for the server per client, which is used when negotiating a Server Message Block (SMB) connection with a client. Note if the value is set beyond 125 older Windows 9x clients will fail to negotiate.
7+
Ransomware threat actors and operators (specifically BlackCat) were seen increasing this value in order to handle a higher volume of traffic.
8+
references:
9+
- https://www.huntress.com/blog/blackcat-ransomware-affiliate-ttps
10+
- https://securityscorecard.com/research/deep-dive-into-alphv-blackcat-ransomware
11+
- https://www.intrinsec.com/alphv-ransomware-gang-analysis/?cn-reloaded=1
12+
- https://www.sentinelone.com/labs/blackcat-ransomware-highly-configurable-rust-driven-raas-on-the-prowl-for-victims/
13+
author: Nasreddine Bencherchali (Nextron Systems)
14+
date: 2024/03/19
15+
tags:
16+
- attack.defense_evasion
17+
- attack.t1070.005
18+
logsource:
19+
category: registry_set
20+
product: windows
21+
detection:
22+
selection:
23+
TargetObject|endswith: '\Services\LanmanServer\Parameters\MaxMpxCt'
24+
condition: selection
25+
falsepositives:
26+
- Unknown
27+
level: low

Diff for: rules/windows/registry/registry_set/registry_set_susp_run_key_img_folder.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ references:
66
- https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html
77
author: Florian Roth (Nextron Systems), Markus Neis, Sander Wiebing
88
date: 2018/08/25
9-
modified: 2023/12/11
9+
modified: 2024/03/18
1010
tags:
1111
- attack.persistence
1212
- attack.t1547.001
@@ -33,9 +33,12 @@ detection:
3333
- '%Public%\'
3434
- 'wscript'
3535
- 'cscript'
36-
condition: all of selection_*
37-
fields:
38-
- Image
36+
filter_main_windows_update:
37+
Image|startswith: 'C:\Windows\SoftwareDistribution\Download\'
38+
Details|contains|all:
39+
- 'rundll32.exe C:\WINDOWS\system32\advpack.dll,DelNodeRunDLL32'
40+
- 'C:\Windows\Temp\'
41+
condition: all of selection_* and not 1 of filter_main_*
3942
falsepositives:
4043
- Software using weird folders for updates
4144
level: high

0 commit comments

Comments
 (0)