mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
73 lines
3.1 KiB
YAML
73 lines
3.1 KiB
YAML
name: Office Document Creating Schedule Task
|
|
id: cc8b7b74-9d0f-11eb-8342-acde48001122
|
|
version: 7
|
|
date: '2024-05-16'
|
|
author: Teoderick Contreras, Splunk
|
|
status: production
|
|
type: TTP
|
|
description: The following analytic detects an Office document creating a scheduled
|
|
task, either through a macro VBA API or by loading `taskschd.dll`. This detection
|
|
leverages Sysmon EventCode 7 to identify when Office applications load the `taskschd.dll`
|
|
file. This activity is significant as it is a common technique used by malicious
|
|
macro malware to establish persistence or initiate beaconing. If confirmed malicious,
|
|
this could allow an attacker to maintain persistence, execute arbitrary commands,
|
|
or schedule future malicious activities, posing a significant threat to the environment.
|
|
data_source:
|
|
- Sysmon EventID 7
|
|
search: '`sysmon` EventCode=7 process_name IN ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE","onenote.exe","onenotem.exe","onenoteviewer.exe","onenoteim.exe",
|
|
"msaccess.exe") loaded_file_path = "*\\taskschd.dll" | stats min(_time) as firstTime
|
|
max(_time) as lastTime count by user_id, dest, process_name,loaded_file, loaded_file_path,
|
|
original_file_name, process_guid | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
|
|
| `office_document_creating_schedule_task_filter`'
|
|
how_to_implement: To successfully implement this search, you need to be ingesting
|
|
logs with the process name and ImageLoaded (Like sysmon EventCode 7) from your endpoints.
|
|
If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
|
|
Also be sure to include those monitored dll to your own sysmon config.
|
|
known_false_positives: False positives may occur if legitimate office documents are
|
|
creating scheduled tasks. Ensure to investigate the scheduled task and the command
|
|
to be executed. If the task is benign, add the task name to the exclusion list.
|
|
Some applications may legitimately load taskschd.dll.
|
|
references:
|
|
- https://research.checkpoint.com/2021/irans-apt34-returns-with-an-updated-arsenal/
|
|
- https://redcanary.com/threat-detection-report/techniques/scheduled-task-job/
|
|
- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trojanized-onenote-document-leads-to-formbook-malware/
|
|
tags:
|
|
analytic_story:
|
|
- Spearphishing Attachments
|
|
asset_type: Endpoint
|
|
confidence: 70
|
|
impact: 70
|
|
message: An Office document was identified creating a scheduled task on $dest$.
|
|
Investigate further.
|
|
mitre_attack_id:
|
|
- T1566
|
|
- T1566.001
|
|
observable:
|
|
- name: dest
|
|
type: Endpoint
|
|
role:
|
|
- Victim
|
|
product:
|
|
- Splunk Enterprise
|
|
- Splunk Enterprise Security
|
|
- Splunk Cloud
|
|
required_fields:
|
|
- ImageLoaded
|
|
- AllImageLoaded
|
|
- dest
|
|
- EventCode
|
|
- Image
|
|
- process_name
|
|
- ProcessId
|
|
- ProcessGuid
|
|
- _time
|
|
risk_score: 49
|
|
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/datasets/windows-sysmon.log
|
|
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
|
|
sourcetype: xmlwineventlog
|