Hunting scheduled task abuse

From meltedinhex/analyst-ai-pack · View interactive version

Hunting scheduled task abuse is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Hunts for malicious scheduled task persistence by analyzing task registration events (4698) and schtasks process creation for suspicious actions, triggers, and hidden tasks. Activates for requests to hunt scheduled task abuse, detect malicious schtasks usage, or find persistence via the Task Schedul

How to use this skill

Skill file

Hunting Scheduled Task Abuse

When to Use

want to detect persistence via malicious scheduled tasks.

Do not use this to alert on all task creation — administration creates tasks routinely. Hunt on

the action (script hosts, encoded commands, temp paths) and trigger context.

Prerequisites

Workflow

Step 1: Hunt suspicious task actions

python scripts/analyst.py hunt events.csv

Flags tasks whose action runs powershell -enc, mshta, wscript/cscript, cmd /c, or

binaries from %TEMP%/%APPDATA%/Public, and schtasks /create command lines with the same.

Step 2: Assess triggers and hiding

Note logon/onstart triggers, very frequent intervals, and tasks hidden via Hidden flag or SD

manipulation.

Step 3: Confirm

Distinguish legitimate software tasks from intrusion by author, path, and action content.

Step 4: Operationalize

Write a Sigma rule for task actions invoking script hosts or encoded commands.

Validation

Pitfalls

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.