Windows Hidden Schedule Task Settings

Original Source: [splunk source]
Name:Windows Hidden Schedule Task Settings
id:0b730470-5fe8-4b13-93a7-fe0ad014d0cc
version:4
date:2024-11-28
author:Teoderick Contreras, Splunk
status:production
type:TTP
Description:The following analytic detects the creation of hidden scheduled tasks on Windows systems, which are not visible in the UI. It leverages Windows Security EventCode 4698 to identify tasks where the 'Hidden' setting is enabled. This behavior is significant as it may indicate malware activity, such as Industroyer2, or the use of living-off-the-land binaries (LOLBINs) to download additional payloads. If confirmed malicious, this activity could allow attackers to execute code stealthily, maintain persistence, or further compromise the system by downloading additional malicious payloads.
Data_source:
  • -Windows Event Log Security 4698
search:`wineventlog_security` EventCode=4698
| xmlkv Message
| search Hidden = true
| stats count min(_time) as firstTime max(_time) as lastTime by Task_Name, Command, Author, Hidden, dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_hidden_schedule_task_settings_filter`


how_to_implement:To successfully implement this search, you need to be ingesting logs with the task schedule (Exa. Security Log EventCode 4698) endpoints. Tune and filter known instances of Task schedule used in your environment.
known_false_positives:unknown
References:
  -https://www.welivesecurity.com/2022/04/12/industroyer2-industroyer-reloaded/
  -https://cert.gov.ua/article/39518
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:
    - 'CISA AA22-257A'
    - 'Industroyer2'
    - 'Data Destruction'
    - 'Scheduled Tasks'
    - 'Compromised Windows Host'
    - 'Active Directory Discovery'
  asset_type:Endpoint
  confidence:80
  impact:80
  message:A schedule task with hidden setting enable in host $dest$
  mitre_attack_id:
    - 'T1053'
  observable:
    name:'dest'
    type:'Hostname'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'dest'
    - 'Task_Name'
    - 'Command'
    - 'Author'
    - 'Enabled'
    - 'Hidden'
    - 'Arguments'
  risk_score:64
  security_domain:endpoint

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053/hidden_schedule_task/security.log
  source: WinEventLog:Security
  sourcetype: WinEventLog
manual_test:None