EXPLORE
← Back to Explore
splunk_escuHunting

Randomly Generated Scheduled Task Name

The following analytic detects the creation of a Scheduled Task with a high entropy, randomly generated name, leveraging Event ID 4698. It uses the `ut_shannon` function from the URL ToolBox Splunk application to measure the entropy of the Task Name. This activity is significant as adversaries often use randomly named Scheduled Tasks for lateral movement and remote code execution, employing tools like Impacket or CrackMapExec. If confirmed malicious, this could allow attackers to execute arbitrary code remotely, potentially leading to further compromise and persistence within the network.

MITRE ATT&CK

executionpersistenceprivilege-escalation

Detection Query

`wineventlog_security` EventCode=4698
  | xmlkv Message
  | lookup ut_shannon_lookup word as Task_Name
  | where ut_shannon > 3
  | table  _time, dest, Task_Name, ut_shannon, Command, Author, Enabled, Hidden
  | `randomly_generated_scheduled_task_name_filter`

Author

Mauricio Velazco, Splunk

Created

2026-02-25

Data Sources

Windows Event Log Security 4698

Tags

Active Directory Lateral MovementCISA AA22-257AScheduled Tasks0bj3ctivity Stealer
Raw Content
name: Randomly Generated Scheduled Task Name
id: 9d22a780-5165-11ec-ad4f-3e22fbd008af
version: 9
date: '2026-02-25'
author: Mauricio Velazco, Splunk
status: experimental
type: Hunting
description: The following analytic detects the creation of a Scheduled Task with a high entropy, randomly generated name, leveraging Event ID 4698. It uses the `ut_shannon` function from the URL ToolBox Splunk application to measure the entropy of the Task Name. This activity is significant as adversaries often use randomly named Scheduled Tasks for lateral movement and remote code execution, employing tools like Impacket or CrackMapExec. If confirmed malicious, this could allow attackers to execute arbitrary code remotely, potentially leading to further compromise and persistence within the network.
data_source:
    - Windows Event Log Security 4698
search: |-
    `wineventlog_security` EventCode=4698
      | xmlkv Message
      | lookup ut_shannon_lookup word as Task_Name
      | where ut_shannon > 3
      | table  _time, dest, Task_Name, ut_shannon, Command, Author, Enabled, Hidden
      | `randomly_generated_scheduled_task_name_filter`
how_to_implement: To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA as well as the URL ToolBox application are also required.
known_false_positives: Legitimate applications may use random Scheduled Task names.
references:
    - https://attack.mitre.org/techniques/T1053/005/
    - https://splunkbase.splunk.com/app/2734/
    - https://en.wikipedia.org/wiki/Entropy_(information_theory)
tags:
    analytic_story:
        - Active Directory Lateral Movement
        - CISA AA22-257A
        - Scheduled Tasks
        - 0bj3ctivity Stealer
    asset_type: Endpoint
    mitre_attack_id:
        - T1053.005
    product:
        - Splunk Enterprise
        - Splunk Enterprise Security
        - Splunk Cloud
    security_domain: endpoint