Skip to content

Commit 5c8268f

Browse files
author
research bot
committed
updating docs and package bits [ci skip]
1 parent 03680a7 commit 5c8268f

55 files changed

Lines changed: 85267 additions & 81769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎detections/deprecated/detection_of_dns_tunnels.yml‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ author: Bhavin Patel, Splunk
66
type: TTP
77
datamodel:
88
- Network_Resolution
9-
description: This search is used to detect DNS tunneling, by calculating the sum of
10-
the length of DNS queries and DNS answers. The search also filters out potential
9+
description: 'This search is used to detect DNS tunneling, by calculating the sum
10+
of the length of DNS queries and DNS answers. The search also filters out potential
1111
false positives by filtering out queries made to internal systems and the queries
1212
originating from internal DNS, Web, and Email servers. Endpoints using DNS as a
1313
method of transmission for data exfiltration, command and control, or evasion of
1414
security controls can often be detected by noting an unusually large volume of DNS
1515
traffic. \
1616
17-
NOTE:Deprecated because existing detection is doing the same. This detection is
18-
replaced with two other variations, if you are using MLTK then you can use this
19-
search `ESCU - DNS Query Length Outliers - MLTK - Rule` or use the standard
20-
deviation version `ESCU - DNS Query Length With High Standard Deviation - Rule`,
21-
as an alternantive.
22-
17+
NOTE:Deprecated because existing detection is doing the same. This detection is
18+
replaced with two other variations, if you are using MLTK then you can use this
19+
search `ESCU - DNS Query Length Outliers - MLTK - Rule` or use the standard deviation
20+
version `ESCU - DNS Query Length With High Standard Deviation - Rule`, as an alternantive.'
2321
search: '| tstats `security_content_summariesonly` dc("DNS.query") as count from
2422
datamodel=Network_Resolution where nodename=DNS "DNS.message_type"="QUERY" NOT
2523
(`cim_corporate_web_domain_search("DNS.query")`) NOT "DNS.query"="*.in-addr.arpa"

‎detections/endpoint/certutil_download_with_urlcache_and_split_arguments.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ description: Certutil.exe may download a file from a remote destination using `-
1515
remote IP or domain in question.
1616
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
1717
as lastTime from datamodel=Endpoint.Processes where `process_certutil` (Processes.process=*urlcache*
18-
Processes.process=*split*) OR Processes.process=*urlcache* by Processes.dest Processes.user Processes.parent_process
19-
Processes.process_name Processes.process Processes.process_id Processes.original_file_name
20-
Processes.parent_process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`
21-
| `security_content_ctime(lastTime)` | `certutil_download_with_urlcache_and_split_arguments_filter`'
18+
Processes.process=*split*) OR Processes.process=*urlcache* by Processes.dest Processes.user
19+
Processes.parent_process Processes.process_name Processes.process Processes.process_id
20+
Processes.original_file_name Processes.parent_process_id | `drop_dm_object_name(Processes)`
21+
| `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `certutil_download_with_urlcache_and_split_arguments_filter`'
2222
how_to_implement: To successfully implement this search you need to be ingesting information
2323
on process that include the name of the process responsible for the changes from
2424
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,

‎detections/endpoint/certutil_download_with_verifyctl_and_split_arguments.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ description: 'Certutil.exe may download a file from a remote destination using `
1515
written to the current working directory or `%APPDATA%\..\LocalLow\Microsoft\CryptnetUrlCache\Content\<hash>`. '
1616
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
1717
as lastTime from datamodel=Endpoint.Processes where `process_certutil` (Processes.process=*verifyctl*
18-
Processes.process=*split*) OR Processes.process=*verifyctl* by Processes.dest Processes.user Processes.original_file_name
19-
Processes.parent_process Processes.process_name Processes.process Processes.process_id
20-
Processes.parent_process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`
21-
| `security_content_ctime(lastTime)` | `certutil_download_with_verifyctl_and_split_arguments_filter`'
18+
Processes.process=*split*) OR Processes.process=*verifyctl* by Processes.dest Processes.user
19+
Processes.original_file_name Processes.parent_process Processes.process_name Processes.process
20+
Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)`
21+
| `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `certutil_download_with_verifyctl_and_split_arguments_filter`'
2222
how_to_implement: To successfully implement this search you need to be ingesting information
2323
on process that include the name of the process responsible for the changes from
2424
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,

‎detections/endpoint/malicious_powershell_process___encoded_command.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ description: 'The following analytic identifies the use of the EncodedCommand Po
2020
on admin scripts in use. \
2121
2222
Alternatively, may use regex per matching here https://regexr.com/662ov.'
23-
search:
24-
"| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.dest Processes.process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | where match(process,\"(?i)[\\-|\\/|\u2013|\u2014|\u2015]e(nc*o*d*e*d*c*o*m*m*a*n*d*)*\\s+[^-]\") | `malicious_powershell_process___encoded_command_filter`"
23+
search: "| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)\
24+
\ as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user\
25+
\ Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name\
26+
\ Processes.dest Processes.process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`\
27+
\ | `security_content_ctime(lastTime)` | where match(process,\"(?i)[\\-|\\/|\u2013\
28+
|\u2014|\u2015]e(nc*o*d*e*d*c*o*m*m*a*n*d*)*\\s+[^-]\") | `malicious_powershell_process___encoded_command_filter`"
2529
how_to_implement: To successfully implement this search you need to be ingesting information
2630
on process that include the name of the process responsible for the changes from
2731
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,

‎detections/endpoint/powershell___connect_to_internet_with_hidden_window.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ description: The following hunting analytic identifies PowerShell commands utili
1515
For example w, win, windowsty and so forth. In addition, through our research it
1616
was identified that PowerShell will interpret different command switch types beyond
1717
the hyphen. We have added endash, emdash, horizontal bar, and forward slash.
18-
search:
19-
"| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.dest Processes.process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | where match(process,\"(?i)[\\-|\\/|\u2013|\u2014|\u2015]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]\") | `powershell___connect_to_internet_with_hidden_window_filter`"
18+
search: "| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)\
19+
\ as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user\
20+
\ Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name\
21+
\ Processes.dest Processes.process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`\
22+
\ | `security_content_ctime(lastTime)` | where match(process,\"(?i)[\\-|\\/|\u2013\
23+
|\u2014|\u2015]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]\") | `powershell___connect_to_internet_with_hidden_window_filter`"
2024
how_to_implement: You must be ingesting data that records process activity from your
2125
hosts to populate the Endpoint data model in the Processes node. You must also be
2226
ingesting logs with both the process name and command line from your endpoints.

‎detections/endpoint/rundll_loading_dll_by_ordinal.yml‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@ author: Michael Haag, David Dorsey, Splunk
66
type: TTP
77
datamodel:
88
- Endpoint
9-
description: The following analytic identifies rundll32.exe loading an export function by ordinal value. Adversaries may
10-
abuse rundll32.exe to proxy execution of malicious code. Using rundll32.exe, vice
11-
executing directly, may avoid triggering security tools that may not monitor execution
12-
of the rundll32.exe process because of allowlists or false positives from normal
13-
operations. Utilizing ordinal values makes it a bit more complicated for analysts to understand the behavior until the DLL is reviewed.
9+
description: The following analytic identifies rundll32.exe loading an export function
10+
by ordinal value. Adversaries may abuse rundll32.exe to proxy execution of malicious
11+
code. Using rundll32.exe, vice executing directly, may avoid triggering security
12+
tools that may not monitor execution of the rundll32.exe process because of allowlists
13+
or false positives from normal operations. Utilizing ordinal values makes it a bit
14+
more complicated for analysts to understand the behavior until the DLL is reviewed.
1415
search: '| tstats `security_content_summariesonly` values(Processes.process) as process
1516
min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes
16-
where `process_rundll32` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.original_file_name
17-
Processes.process Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)`
18-
| `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | where match(process,"rundll32.+\#\d+") | `rundll_loading_dll_by_ordinal_filter`'
17+
where `process_rundll32` by Processes.dest Processes.user Processes.parent_process_name
18+
Processes.process_name Processes.original_file_name Processes.process Processes.process_id
19+
Processes.parent_process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`
20+
| `security_content_ctime(lastTime)` | where match(process,"rundll32.+\#\d+") |
21+
`rundll_loading_dll_by_ordinal_filter`'
1922
how_to_implement: To successfully implement this search you need to be ingesting information
2023
on process that include the name of the process responsible for the changes from
2124
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,
2225
confirm the latest CIM App 4.20 or higher is installed and the latest TA for the
2326
endpoint product.
24-
known_false_positives: False positives are possible with native utilities and third party applications. Filtering may be needed based on command-line, or add world writeable paths to restrict query.
27+
known_false_positives: False positives are possible with native utilities and third
28+
party applications. Filtering may be needed based on command-line, or add world
29+
writeable paths to restrict query.
2530
references:
26-
- https://thedfirreport.com/2022/02/07/qbot-likes-to-move-it-move-it/
31+
- https://thedfirreport.com/2022/02/07/qbot-likes-to-move-it-move-it/
2732
tags:
2833
analytic_story:
2934
- Unusual Processes

‎detections/endpoint/ssa___windows_powershell_connect_to_internet_with_hidden_window.yml‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@ description: The following hunting analytic identifies PowerShell commands utili
1515
For example w, win, windowsty and so forth. In addition, through our research it
1616
was identified that PowerShell will interpret different command switch types beyond
1717
the hyphen. We have added endash, emdash, horizontal bar, and forward slash.
18-
search: '| from read_ssa_enriched_events()
19-
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=lower(ucast(map_get(input_event, "process"),
18+
search: '| from read_ssa_enriched_events() | eval timestamp=parse_long(ucast(map_get(input_event,
19+
"_time"), "string", null)), cmd_line=lower(ucast(map_get(input_event, "process"),
2020
"string", null)), process_name=lower(ucast(map_get(input_event, "process_name"),
2121
"string", null)), process_path=ucast(map_get(input_event, "process_path"), "string",
2222
null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string",
23-
null), event_id=ucast(map_get(input_event, "event_id"), "string", null)
24-
| where cmd_line IS NOT NULL AND process_name IS NOT NULL
25-
| where process_name="pwsh.exe" OR process_name="pwsh.exe" OR process_name="sqlps.exe" OR process_name="sqltoolsps.exe" OR process_name="powershell.exe" OR process_name="powershell_ise.exe"
26-
| where match_regex(cmd_line, /(?i)[\\-|\\/|\u2013\|\u2014|\u2015]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]/)=true
27-
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body=create_map(["event_id", event_id, "cmd_line", cmd_line, "process_name", process_name, "parent_process_name", parent_process_name, "process_path", process_path])
28-
| into write_ssa_detected_events();'
23+
null), event_id=ucast(map_get(input_event, "event_id"), "string", null) | where
24+
cmd_line IS NOT NULL AND process_name IS NOT NULL | where process_name="pwsh.exe"
25+
OR process_name="pwsh.exe" OR process_name="sqlps.exe" OR process_name="sqltoolsps.exe"
26+
OR process_name="powershell.exe" OR process_name="powershell_ise.exe" | where match_regex(cmd_line,
27+
/(?i)[\\-|\\/|\u2013\|\u2014|\u2015]w(in*d*o*w*s*t*y*l*e*)*\\s+[^-]/)=true | eval
28+
start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event,
29+
"dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"),
30+
"string", null)), body=create_map(["event_id", event_id, "cmd_line", cmd_line, "process_name",
31+
process_name, "parent_process_name", parent_process_name, "process_path", process_path])
32+
| into write_ssa_detected_events();'
2933
how_to_implement: You must be ingesting data that records process activity from your
3034
hosts to populate the Endpoint data model in the Processes node. You must also be
3135
ingesting logs with both the process name and command line from your endpoints.
@@ -58,7 +62,8 @@ tags:
5862
kill_chain_phases:
5963
- Exfiltration
6064
message: PowerShell processes $process$ started with parameters to modify the execution
61-
policy of the run, run in a hidden window, and connect to the Internet on host $dest$ executed by user $user$.
65+
policy of the run, run in a hidden window, and connect to the Internet on host
66+
$dest$ executed by user $user$.
6267
mitre_attack_id:
6368
- T1020
6469
nist:

‎detections/endpoint/ssa___windows_powershell_downloadfile.yml‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@ description: The following analytic identifies the use of PowerShell downloading
1111
PowerShell frameworks to download files and output to disk. Identify the source
1212
(IP/domain) and destination file and triage appropriately. If AMSI logging or PowerShell
1313
transaction logs are available, review for further details of the implant.
14-
search: '| from read_ssa_enriched_events()
15-
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=lower(ucast(map_get(input_event, "process"),
14+
search: '| from read_ssa_enriched_events() | eval timestamp=parse_long(ucast(map_get(input_event,
15+
"_time"), "string", null)), cmd_line=lower(ucast(map_get(input_event, "process"),
1616
"string", null)), process_name=lower(ucast(map_get(input_event, "process_name"),
1717
"string", null)), process_path=ucast(map_get(input_event, "process_path"), "string",
1818
null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string",
19-
null), event_id=ucast(map_get(input_event, "event_id"), "string", null)
20-
| where cmd_line IS NOT NULL AND process_name IS NOT NULL
21-
| where process_name="pwsh.exe" OR process_name="pwsh.exe" OR process_name="sqlps.exe" OR process_name="sqltoolsps.exe" OR process_name="powershell.exe" OR process_name="powershell_ise.exe"
22-
| where (like (cmd_line, "%downloadfile%"))
23-
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body=create_map(["event_id", event_id, "cmd_line", cmd_line, "process_name", process_name, "parent_process_name", parent_process_name, "process_path", process_path])
24-
| into write_ssa_detected_events();'
19+
null), event_id=ucast(map_get(input_event, "event_id"), "string", null) | where
20+
cmd_line IS NOT NULL AND process_name IS NOT NULL | where process_name="pwsh.exe"
21+
OR process_name="pwsh.exe" OR process_name="sqlps.exe" OR process_name="sqltoolsps.exe"
22+
OR process_name="powershell.exe" OR process_name="powershell_ise.exe" | where (like
23+
(cmd_line, "%downloadfile%")) | eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event,
24+
"dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"),
25+
"string", null)), body=create_map(["event_id", event_id, "cmd_line", cmd_line, "process_name",
26+
process_name, "parent_process_name", parent_process_name, "process_path", process_path])
27+
| into write_ssa_detected_events();'
2528
how_to_implement: To successfully implement this search you need to be ingesting information
2629
on process that include the name of the process responsible for the changes from
2730
your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition,
@@ -50,7 +53,9 @@ tags:
5053
impact: 50
5154
kill_chain_phases:
5255
- Lateral Movement
53-
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$. This behavior identifies the use of DownloadFile within PowerShell.
56+
message: An instance of $parent_process_name$ spawning $process_name$ was identified
57+
on endpoint $dest$ by user $user$. This behavior identifies the use of DownloadFile
58+
within PowerShell.
5459
mitre_attack_id:
5560
- T1020
5661
nist:

0 commit comments

Comments
 (0)