|
| 1 | +name: Windows File Download Via CertUtil |
| 2 | +id: 7fac8d40-e370-45ea-a4a3-031bbcc18b02 |
| 3 | +version: 1 |
| 4 | +date: '2025-03-03' |
| 5 | +author: Nasreddine Bencherchali, Michael Haag, Splunk |
| 6 | +status: production |
| 7 | +type: TTP |
| 8 | +description: The following analytic detects the use of `certutil.exe` to download files using the `-URL`, `-urlcache` or '-verifyctl' arguments. This behavior is identified by monitoring command-line executions for these specific arguments via Endpoint Detection and Response (EDR) telemetry. This activity is significant because `certutil.exe` is a legitimate tool often abused by attackers to download and execute malicious payloads. If confirmed malicious, this could allow an attacker to download and execute arbitrary files, potentially leading to code execution, data exfiltration, or further compromise of the system. |
| 9 | +data_source: |
| 10 | +- Sysmon EventID 1 |
| 11 | +- Windows Event Log Security 4688 |
| 12 | +- CrowdStrike ProcessRollup2 |
| 13 | +search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) |
| 14 | + as lastTime from datamodel=Endpoint.Processes where `process_certutil` AND ((Processes.process IN ("*-URL *", "*/URL *")) OR (Processes.process IN ("*urlcache*", "*verifyctl*") AND Processes.process IN ("*/f *", "*-f *"))) by Processes.dest Processes.user Processes.parent_process Processes.parent_process_name Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_file_download_via_certutil_filter`' |
| 15 | +how_to_implement: The detection is based on data that originates from Endpoint Detection |
| 16 | + and Response (EDR) agents. These agents are designed to provide security-related |
| 17 | + telemetry from the endpoints where the agent is installed. To implement this search, |
| 18 | + you must ingest logs that contain the process GUID, process name, and parent process. |
| 19 | + Additionally, you must ingest complete command-line executions. These logs must |
| 20 | + be processed using the appropriate Splunk Technology Add-ons that are specific to |
| 21 | + the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` |
| 22 | + data model. Use the Splunk Common Information Model (CIM) to normalize the field |
| 23 | + names and speed up the data modeling process. |
| 24 | +known_false_positives: Limited false positives in most environments, however tune |
| 25 | + as needed based on parent-child relationship or network connection. |
| 26 | +references: |
| 27 | +- https://attack.mitre.org/techniques/T1105/ |
| 28 | +- https://www.hexacorn.com/blog/2020/08/23/certutil-one-more-gui-lolbin/ |
| 29 | +- https://www.avira.com/en/blog/certutil-abused-by-attackers-to-spread-threats |
| 30 | +- https://web.archive.org/web/20210921110637/https://www.fireeye.com/blog/threat-research/2019/10/certutil-qualms-they-came-to-drop-fombs.html |
| 31 | +- https://lolbas-project.github.io/lolbas/Binaries/Certutil/ |
| 32 | +- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732443(v=ws.11)#-verifyctl |
| 33 | +drilldown_searches: |
| 34 | +- name: View the detection results for - "$user$" and "$dest$" |
| 35 | + search: '%original_detection_search% | search user = "$user$" dest = "$dest$"' |
| 36 | + earliest_offset: $info_min_time$ |
| 37 | + latest_offset: $info_max_time$ |
| 38 | +- name: View risk events for the last 7 days for - "$user$" and "$dest$" |
| 39 | + search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", |
| 40 | + "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) |
| 41 | + as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk |
| 42 | + Message" values(analyticstories) as "Analytic Stories" values(annotations._all) |
| 43 | + as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" |
| 44 | + by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' |
| 45 | + earliest_offset: $info_min_time$ |
| 46 | + latest_offset: $info_max_time$ |
| 47 | +rba: |
| 48 | + message: An instance of $parent_process_name$ spawning $process_name$ was identified |
| 49 | + on endpoint $dest$ by user $user$ attempting to download a file. |
| 50 | + risk_objects: |
| 51 | + - field: user |
| 52 | + type: user |
| 53 | + score: 90 |
| 54 | + - field: dest |
| 55 | + type: system |
| 56 | + score: 90 |
| 57 | + threat_objects: |
| 58 | + - field: parent_process_name |
| 59 | + type: parent_process_name |
| 60 | + - field: process_name |
| 61 | + type: process_name |
| 62 | +tags: |
| 63 | + analytic_story: |
| 64 | + - Living Off The Land |
| 65 | + - Ingress Tool Transfer |
| 66 | + - ProxyNotShell |
| 67 | + - DarkSide Ransomware |
| 68 | + - Forest Blizzard |
| 69 | + - Flax Typhoon |
| 70 | + - Compromised Windows Host |
| 71 | + - CISA AA22-277A |
| 72 | + asset_type: Endpoint |
| 73 | + mitre_attack_id: |
| 74 | + - T1105 |
| 75 | + product: |
| 76 | + - Splunk Enterprise |
| 77 | + - Splunk Enterprise Security |
| 78 | + - Splunk Cloud |
| 79 | + security_domain: endpoint |
| 80 | +tests: |
| 81 | +- name: True Positive Test |
| 82 | + attack_data: |
| 83 | + - data: |
| 84 | + https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1105/atomic_red_team/windows-sysmon.log |
| 85 | + source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
| 86 | + sourcetype: XmlWinEventLog |
0 commit comments