Detection rules › Splunk
Certutil File Download (Sysmon)
There are attack scenarios in which attackers download different tools or scripts in order to take full control over certain machines. For example, an attacker gets a reverse shell on the target but is a low privileged shell. In this situation, the attacker can download different exploits on the target for privilege escalation using tools such as wget
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1027 Obfuscated Files or Information |
| Command & Control | T1105 Ingress Tool Transfer |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
id: '5327.5689'
title: Certutil File Download
description: 'There are attack scenarios in which attackers download different tools
or scripts in order to take full control over certain machines. For example, an
attacker gets a reverse shell on the target but is a low privileged shell. In this
situation, the attacker can download different exploits on the target for privilege
escalation using tools such as wget. -- Threat Actor Association: APT41, DarkSide,
BlackMatter, APT31, Flax Typhoon, Wizard Spider - Software Association: ALPHV/BlackCat,
Babuk, Bazar, Conti -- Atomics T1027 Test #8'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 TERM("certutil")
| where match (process, "(?i)(\w?\wtps?\:(\/\/|\x5c\x5c))|\:\/\/") OR (match(process_name,
"(?i)certutil") AND match(process, "(?i)u.*?r.*?l.*?c.*?a.*?c.*?h.*?e")) | table
_time, host, user, signature_id, process, process_*, parent_process, parent_process_*
| bin span=1s | stats values(*) as * by _time, host, process '
techniques:
- command-and-control:ingress tool transfer
- defense-evasion:obfuscated files or information
technique_id:
- T1105
- T1027
data_category:
- Windows Sysmon
references:
- https://www.ired.team/offensive-security/defense-evasion/downloading-file-with-certutil
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 TERM("certutil")
Stage 2: where
| where match (process, "(?i)(\w?\wtps?\:(\/\/|\x5c\x5c))|\:\/\/") OR (match(process_name, "(?i)certutil") AND match(process, "(?i)u.*?r.*?l.*?c.*?a.*?c.*?h.*?e"))
Stage 3: table
| table _time, host, user, signature_id, process, process_*, parent_process, parent_process_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host, process
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
process | match |
|
process_name | match |
|
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | "certutil" |