Windows schtasks Delete All Scheduled Tasks via /tn * /delete /f

Flags schtasks.exe commands that forcibly delete all scheduled tasks on the local host using /delete /tn * /f.

FreeUnreviewedSigmahighv1
title: Windows schtasks Delete All Scheduled Tasks via /tn * /delete /f
id: 1af8df3b-bcd8-46af-be0f-8eff6606efc0
status: test
description: This rule identifies executions of schtasks.exe that use the delete operation against all scheduled tasks on the local computer by specifying /tn * along with /delete and /f. Attackers may use this to disrupt persistence and scheduled execution by removing tasks created by other users. It relies on Windows process creation telemetry capturing the executable path and full command-line arguments.
references:
  - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-delete
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_schtasks_delete_all.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-09-09
tags:
  - attack.impact
  - attack.t1489
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith: \schtasks.exe
    CommandLine|contains|all:
      - " /delete "
      - /tn \*
      - " /f"
  condition: selection
falsepositives:
  - Unlikely
level: high
license: DRL-1.1
related:
  - id: 220457c1-1c9f-4c2e-afe6-9598926222c1
    type: derived

What it detects

This rule identifies executions of schtasks.exe that use the delete operation against all scheduled tasks on the local computer by specifying /tn * along with /delete and /f. Attackers may use this to disrupt persistence and scheduled execution by removing tasks created by other users. It relies on Windows process creation telemetry capturing the executable path and full command-line arguments.

Known false positives

  • Unlikely

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.