Back to results

Windows Scheduled Task XML Built Via Console Echo

The following analytic detects cmd.exe being used to write a Windows Scheduled Task XML definition to disk through the echo command. This analytic focuses on command lines that combine echo with the Task Scheduler…

Description

The following analytic detects cmd.exe being used to write a Windows Scheduled Task XML definition to disk through the echo command. This analytic focuses on command lines that combine echo with the Task Scheduler XML namespace. This is a significant activity because legitimate software rarely assembles a task definition on the fly from the console. Browser hijackers and adware droppers do this to create a scheduled task, through schtasks.exe and the generated XML file, that periodically relaunches a copy of themselves, and then delete the XML file to hinder forensic analysis. If confirmed malicious, this could allow an attacker to establish persistence, repeatedly execute a payload and maintain control over the victim's browser.

Detection logic

Detection requirements

Platform
Windows

The rule states no platform. This is derived from the ATT&CK technique it maps to.

Known benign triggers

  • False positives are not expected as building a scheduled task XML definition through echo on the command line is rare in legitimate software. Some custom installers or administrative scripts that generate task definitions this way may trigger this detection. Filter as needed based on the parent process.

Detections can measure how the public catalogue is used — which detections people look for, and which pages bring them here. It sets a cookie that recognises this browser for 180 days. It is never linked to an account and never follows you to other sites. Privacy notice