meltedinhex/analyst-ai-pack / skills/hunting-scheduled-task-abuse
hunting-scheduled-task-abuse
VerifiedHunts 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 Scheduler.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.6 KB |
| references/api-reference.md | markdown | 1.2 KB |
| scripts/analyst.py | script | 2.7 KB |
references/api-reference.md
View on GitHub# API Reference: Hunting Scheduled Task Abuse
## Overview
`scripts/analyst.py` parses task-registration (Event ID 4698) and `schtasks`/`at` process-creation
telemetry (CSV or JSON-lines) and flags task actions that invoke script hosts, encoded commands,
or binaries from suspicious paths. It parses telemetry only and executes nothing.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | csv, json, file IO |
## Core functions
### `hunt(path)`
Returns suspicious tasks with their name, matched indicators, and truncated action.
## Heuristics
- Suspicious actions: `powershell -enc`, `mshta`, `wscript`/`cscript`, `cmd /c`, `rundll32`,
`certutil`, etc.
- Suspicious paths: `%TEMP%`, `%APPDATA%`, `Public`, `ProgramData`.
## Expected fields
`EventID`, `TaskName`, `TaskContent`/`Action`/`Command`/`CommandLine`.
## Usage
```bash
python scripts/analyst.py hunt events.csv
```
## Sources
- MITRE ATT&CK T1053.005 Scheduled Task — https://attack.mitre.org/techniques/T1053/005/
- Windows Security Event 4698 (task registered) — https://learn.microsoft.com/windows/security/threat-protection/auditing/event-4698
- schtasks abuse action patterns from public persistence-hunting research
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |