Office Product Writing cab or inf

Original Source: [splunk source]
Name:Office Product Writing cab or inf
id:f48cd1d4-125a-11ec-a447-acde48001122
version:8
date:2024-11-28
author:Michael Haag, Splunk
status:production
type:TTP
Description:The following analytic detects Office products writing .cab or .inf files, indicative of CVE-2021-40444 exploitation. It leverages the Endpoint.Processes and Endpoint.Filesystem data models to identify Office applications creating these file types. This activity is significant as it may signal an attempt to load malicious ActiveX controls and download remote payloads, a known attack vector. If confirmed malicious, this could lead to remote code execution, allowing attackers to gain control over the affected system and potentially compromise sensitive data.
Data_source:
  • -Sysmon EventID 1
  • -Windows Event Log Security 4688
  • -CrowdStrike ProcessRollup2
  • -Sysmon EventID 11
search:| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name IN ("winword.exe","excel.exe","powerpnt.exe","mspub.exe","visio.exe","wordpad.exe","wordview.exe","onenote.exe","onenotem.exe","onenoteviewer.exe","onenoteim.exe","msaccess.exe") by _time span=1h Processes.process_id Processes.process_name Processes.process Processes.dest Processes.process_guid
| `drop_dm_object_name(Processes)` |rename process_guid as proc_guid
| join proc_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN ("*.inf","*.cab") by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path Filesystem.process_guid
| `drop_dm_object_name(Filesystem)` |rename process_guid as proc_guid
| fields _time dest file_create_time file_name file_path process_name process_path process proc_guid]
| dedup file_create_time
| table dest, process_name, process, file_create_time, file_name, file_path, proc_guid
| `office_product_writing_cab_or_inf_filter`


how_to_implement:To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node and `Filesystem` node.
known_false_positives:The query is structured in a way that `action` (read, create) is not defined. Review the results of this query, filter, and tune as necessary. It may be necessary to generate this query specific to your endpoint product.
References:
  -https://twitter.com/vxunderground/status/1436326057179860992?s=20
  -https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/
  -https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444
  -https://twitter.com/RonnyTNL/status/1436334640617373699?s=20
  -https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trojanized-onenote-document-leads-to-formbook-malware/
drilldown_searches:
name:'View the detection results for - "$dest$"'
search:'%original_detection_search% | search dest = "$dest$"'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
name:'View risk events for the last 7 days for - "$dest$"'
search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
tags:
  analytic_story:
    - 'Spearphishing Attachments'
    - 'Microsoft MSHTML Remote Code Execution CVE-2021-40444'
    - 'Compromised Windows Host'
  asset_type:Endpoint
  confidence:100
  cve:
    - 'CVE-2021-40444'
  impact:80
  message:An instance of $process_name$ was identified on $dest$ writing an inf or cab file to this. This is not typical of $process_name$.
  mitre_attack_id:
    - 'T1566'
    - 'T1566.001'
  observable:
    name:'dest'
    type:'Hostname'
    - role:
      - 'Victim'
    name:'process_name'
    type:'Process'
    - role:
      - 'Attacker'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'dest'
    - 'process_name'
    - 'process'
    - 'file_create_time'
    - 'file_name'
    - 'file_path'
  risk_score:80
  security_domain:endpoint

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_cabinf.log
  source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
  sourcetype: XmlWinEventLog
manual_test:None