Detection rules › Splunk

Windows Enable Win32 ScheduledJob via Registry

Status
production
Severity
low
Group by
TargetObject, computer_name, details, event_type, process_guid, process_id, registry_hive, registry_path, registry_status, registry_value_name, registry_value_type, user, vendor_product
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic detects the creation of a new DWORD value named "EnableAt" in the registry path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration". This modification enables the use of the at.exe or wmi Win32_ScheduledJob commands to add scheduled tasks on a Windows endpoint. The detection leverages registry event data from the Endpoint datamodel. This activity is significant because it may indicate that an attacker is enabling the ability to schedule tasks, potentially to execute malicious code at specific times or intervals. If confirmed malicious, this could allow persistent code execution on the system.

Known false positives

  • In some cases, an automated script or system may enable this setting continuously, leading to false positives. To avoid such situations, it is recommended to monitor the frequency and context of the registry modification and modify or filter the detection rules as needed. This can help to reduce the number of false positives and ensure that only genuine threats are identified. Additionally, it is important to investigate any detected instances of this modification and analyze them in the broader context of the system and network to determine if further action is necessary.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

name: Windows Enable Win32 ScheduledJob via Registry
id: 12c80db8-ef62-4456-92df-b23e1b3219f6
version: 10
creation_date: '2023-03-27'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: Anomaly
description: The following analytic detects the creation of a new DWORD value named "EnableAt" in the registry path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration". This modification enables the use of the at.exe or wmi Win32_ScheduledJob commands to add scheduled tasks on a Windows endpoint. The detection leverages registry event data from the Endpoint datamodel. This activity is significant because it may indicate that an attacker is enabling the ability to schedule tasks, potentially to execute malicious code at specific times or intervals. If confirmed malicious, this could allow persistent code execution on the system.
data_source:
    - Sysmon EventID 13
search: '| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path="*\\CurrentVersion\\Schedule\\Configuration*" Registry.registry_value_name=EnableAt by Registry.action Registry.dest Registry.process_guid Registry.process_id Registry.registry_hive Registry.registry_path Registry.registry_key_name Registry.registry_value_data Registry.registry_value_name Registry.registry_value_type Registry.status Registry.user Registry.vendor_product | `security_content_ctime(lastTime)` | `security_content_ctime(firstTime)` | `drop_dm_object_name(Registry)` | `windows_enable_win32_scheduledjob_via_registry_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 `Registry` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.
known_false_positives: In some cases, an automated script or system may enable this setting continuously, leading to false positives. To avoid such situations, it is recommended to monitor the frequency and context of the registry modification and modify or filter the detection rules as needed. This can help to reduce the number of false positives and ensure that only genuine threats are identified. Additionally, it is important to investigate any detected instances of this modification and analyze them in the broader context of the system and network to determine if further action is necessary.
references:
    - https://securityonline.info/wmiexec-regout-get-outputdata-response-from-registry/
    - https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-scheduledjob
intermediate_findings:
    entities:
        - field: user
          type: user
          score: 20
          message: A process has modified the schedule task registry value - EnableAt - on endpoint $dest$ by user $user$.
        - field: dest
          type: system
          score: 20
          message: A process has modified the schedule task registry value - EnableAt - on endpoint $dest$ by user $user$.
analytic_story:
    - Active Directory Lateral Movement
    - Scheduled Tasks
asset_type: Endpoint
mitre_attack_id:
    - T1053.005
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path="*\\CurrentVersion\\Schedule\\Configuration*" Registry.registry_value_name=EnableAt by Registry.action Registry.dest Registry.process_guid Registry.process_id Registry.registry_hive Registry.registry_path Registry.registry_key_name Registry.registry_value_data Registry.registry_value_name Registry.registry_value_type Registry.status Registry.user Registry.vendor_product

Stage 2: search

| `security_content_ctime(lastTime)`

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `drop_dm_object_name(Registry)`

Stage 5: search

| `windows_enable_win32_scheduledjob_via_registry_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Registry.registry_patheq
  • "*\\CurrentVersion\\Schedule\\Configuration*"
field:"registry_path" kind:eq
Registry.registry_value_nameeq
  • EnableAt corpus 2 (elastic 1, splunk 1)
field:"registry_value_name" kind:eq value:"EnableAt"