Lion Cipher Lab

Detect scheduled-task persistence in Windows event logs

Why it matters

When an attacker gets a foothold on a Windows machine, the very next thing they want is to survive a reboot, a logoff, and the user closing the laptop lid — they want PERSISTENCE. And the scheduled task is one of the most popular ways to get it, catalogued by MITRE ATT&CK as technique T1053.005, because it is close to perfect cover: the Task Scheduler is a signed, built-in, always-running part of Windows; every real machine already has dozens or hundreds of legitimate tasks from Windows itself and from installed software; and a task can be told to run any command at logon, at boot, on a…

What you'll learn

Steps in this lab

  1. What a scheduled task is, why attackers love it, and what you are about to detect
  2. BEFORE: create a benign-but-suspicious task and watch NO 4698 appear
  3. Turn the telemetry on: auditpol subcategory + the TaskScheduler operational log
  4. AFTER: recreate the task and read 4698 — the command line is right there in the XML
  5. Write the Sigma rule: describe the malicious shape, not the bare event
  6. TEST the rule: it must FIRE on the malicious task and stay SILENT on a benign one
  7. Do it better — tune honestly, know the evasions, and build a program not a tripwire

Open the full interactive lab →