Skip to content

Commit 5f69687

Browse files
authored
Merge pull request #2809 from splunk/ssa_escalation_Aug16
SSA Regex Bugfixes
2 parents e17ab01 + 45c6fda commit 5f69687

11 files changed

+25
-21
lines changed

bin/contentctl_project/contentctl_infrastructure/builder/backend_splunk_ba.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SplunkBABackend(TextQueryBackend):
3434
add_escaped : ClassVar[str] = "\\"
3535

3636
re_expression : ClassVar[str] = "match_regex({field}, /(?i){regex}/)=true"
37-
re_escape_char : ClassVar[str] = "\\"
37+
re_escape_char : ClassVar[str] = ""
3838
re_escape : ClassVar[Tuple[str]] = ('"',)
3939

4040
cidr_expression : ClassVar[str] = "{value}"

dev_ssa/endpoint/ssa___attempted_credential_dump_from_registry_via_reg_exe.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Attempted Credential Dump From Registry via Reg exe
22
id: 14038953-e5f2-4daf-acff-5452062baf03
3-
version: 2
3+
version: 3
44
date: '2021-11-29'
55
author: Jose Hernandez, Splunk
66
status: production
@@ -17,12 +17,12 @@ search:
1717
- cmd.exe
1818
selection2:
1919
process.cmd_line|re:
20-
- HKEY_LOCAL_MACHINE\System
21-
- HKEY_LOCAL_MACHINE\SAM
22-
- HKEY_LOCAL_MACHINE\Security
23-
- HKLM\System
24-
- HKLM\SAM
25-
- HKLM\Security
20+
- HKEY_LOCAL_MACHINE\\System
21+
- HKEY_LOCAL_MACHINE\\SAM
22+
- HKEY_LOCAL_MACHINE\\Security
23+
- HKLM\\System
24+
- HKLM\\SAM
25+
- HKLM\\Security
2626
selection3:
2727
process.cmd_line|re: save
2828
condition: selection1 and (selection2) and selection3

dev_ssa/endpoint/ssa___windows_powershell_connect_to_internet_with_hidden_window.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Windows Powershell Connect to Internet With Hidden Window
22
id: 477e068e-8b6d-11ec-b6c1-81af21670352
3-
version: 1
3+
version: 2
44
date: '2022-02-11'
55
author: Jose Hernandez, David Dorsey, Michael Haag Splunk
66
status: production
@@ -24,9 +24,8 @@ search:
2424
- sqltoolsps.exe
2525
- sqlps.exe
2626
- pwsh.exe
27-
- pwsh.exe
2827
selection2:
29-
process.cmd_line|re: (?i)[\-|\/]w(in*d*o*w*s*t*y*l*e*)*\s+[^-]
28+
process.cmd_line|re: '[\-|\/]w(in*d*o*w*s*t*y*l*e*)*\s+h(i*d*d*e*n*)\s+'
3029
condition: selection1 and selection2
3130
how_to_implement: You must be ingesting data that records process activity from your
3231
hosts to populate the Endpoint data model in the Processes node. You must also be

dist/ssa/srs/ssa___attempted_credential_dump_from_registry_via_reg_exe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Attempted Credential Dump From Registry via Reg exe
22
id: 14038953-e5f2-4daf-acff-5452062baf03
3-
version: 2
3+
version: 3
44
description: The following analytic identifies the use of `reg.exe` attempting to
55
export Windows registry keys that contain hashed credentials. Adversaries will utilize
66
this technique to capture and perform offline password cracking.

dist/ssa/srs/ssa___windows_os_credential_dumping_with_ntdsutil_export_ntds.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ references:
6969
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc753343(v=ws.11)
7070
- https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf
7171
- https://strontic.github.io/xcyclopedia/library/vss_ps.dll-97B15BDAE9777F454C9A6BA25E938DB3.html
72+
- https://www.microsoft.com/en-us/security/blog/2023/05/24/volt-typhoon-targets-us-critical-infrastructure-with-living-off-the-land-techniques/
7273
tags:
7374
required_fields:
7475
- process.pid
@@ -109,6 +110,7 @@ tags:
109110
- Credential Dumping
110111
- HAFNIUM Group
111112
- Living Off The Land
113+
- Volt Typhoon
112114
cis20:
113115
- CIS 10
114116
kill_chain_phases:

dist/ssa/srs/ssa___windows_powershell_connect_to_internet_with_hidden_window.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Windows Powershell Connect to Internet With Hidden Window
22
id: 477e068e-8b6d-11ec-b6c1-81af21670352
3-
version: 1
3+
version: 2
44
description: The following hunting analytic identifies PowerShell commands utilizing
55
the WindowStyle parameter to hide the window on the compromised endpoint. This combination
66
of command-line options is suspicious because it is overriding the default PowerShell
@@ -28,8 +28,8 @@ search: ' | from read_ba_enriched_events() | eval timestamp = ucast(map_get(inpu
2828
"string", null) | eval device=ucast(map_get(input_event,"device"), "map<string,
2929
any>", null) | eval device_hostname=ucast(map_get(device,"hostname"), "string",
3030
null) | where (process_file_name="powershell_ise.exe" OR process_file_name="powershell.exe"
31-
OR process_file_name="sqltoolsps.exe" OR process_file_name="sqlps.exe" OR process_file_name="pwsh.exe"
32-
OR process_file_name="pwsh.exe") AND match_regex(process_cmd_line, /(?i)(?i)[\\-|\\/]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]/)=true
31+
OR process_file_name="sqltoolsps.exe" OR process_file_name="sqlps.exe" OR process_file_name="pwsh.exe")
32+
AND match_regex(process_cmd_line, /(?i)[\-|\/]w(in*d*o*w*s*t*y*l*e*)*\s+h(i*d*d*e*n*)\s+/)=true
3333
3434
| eval body=create_map(
3535
"devices", [

ssa_detections/endpoint/ssa___attempted_credential_dump_from_registry_via_reg_exe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Attempted Credential Dump From Registry via Reg exe
22
id: 14038953-e5f2-4daf-acff-5452062baf03
3-
version: 2
3+
version: 3
44
date: '2021-11-29'
55
author: Jose Hernandez, Splunk
66
type: TTP

ssa_detections/endpoint/ssa___windows_os_credential_dumping_with_ntdsutil_export_ntds.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ references:
4848
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc753343(v=ws.11)
4949
- https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf
5050
- https://strontic.github.io/xcyclopedia/library/vss_ps.dll-97B15BDAE9777F454C9A6BA25E938DB3.html
51+
- https://www.microsoft.com/en-us/security/blog/2023/05/24/volt-typhoon-targets-us-critical-infrastructure-with-living-off-the-land-techniques/
5152
tags:
5253
analytic_story:
5354
- Credential Dumping
5455
- HAFNIUM Group
5556
- Living Off The Land
57+
- Volt Typhoon
5658
asset_type: Endpoint
5759
confidence: 50
5860
impact: 100

ssa_detections/endpoint/ssa___windows_powershell_connect_to_internet_with_hidden_window.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Windows Powershell Connect to Internet With Hidden Window
22
id: 477e068e-8b6d-11ec-b6c1-81af21670352
3-
version: 1
3+
version: 2
44
date: '2022-02-11'
55
author: Jose Hernandez, David Dorsey, Michael Haag Splunk
66
type: Anomaly
@@ -34,8 +34,8 @@ search: ' | from read_ba_enriched_events() | eval timestamp = ucast(map_get(inpu
3434
"string", null) | eval device=ucast(map_get(input_event,"device"), "map<string,
3535
any>", null) | eval device_hostname=ucast(map_get(device,"hostname"), "string",
3636
null) | where (process_file_name="powershell_ise.exe" OR process_file_name="powershell.exe"
37-
OR process_file_name="sqltoolsps.exe" OR process_file_name="sqlps.exe" OR process_file_name="pwsh.exe"
38-
OR process_file_name="pwsh.exe") AND match_regex(process_cmd_line, /(?i)(?i)[\\-|\\/]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]/)=true
37+
OR process_file_name="sqltoolsps.exe" OR process_file_name="sqlps.exe" OR process_file_name="pwsh.exe")
38+
AND match_regex(process_cmd_line, /(?i)[\-|\/]w(in*d*o*w*s*t*y*l*e*)*\s+h(i*d*d*e*n*)\s+/)=true
3939
--finding_report--'
4040
how_to_implement: You must be ingesting data that records process activity from your
4141
hosts to populate the Endpoint data model in the Processes node. You must also be

ssa_detections/endpoint/ssa___windows_remote_create_service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ search: ' | from read_ba_enriched_events() | eval timestamp = ucast(map_get(inpu
2929
"string", null) | eval device=ucast(map_get(input_event,"device"), "map<string,
3030
any>", null) | eval device_hostname=ucast(map_get(device,"hostname"), "string",
3131
null) | where (match_regex(process_cmd_line, /(?i)create/)=true OR match_regex(process_cmd_line,
32-
/(?i)\\\\/)=true) AND process_file_name="sc.exe" --finding_report--'
32+
/(?i)\\/)=true) AND process_file_name="sc.exe" --finding_report--'
3333
how_to_implement: To successfully implement this search you need to be ingesting information
3434
on process that include the name of the process responsible for the changes from
3535
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,

0 commit comments

Comments
 (0)