Skip to content

meltedinhex/analyst-ai-pack / skills/hunting-scheduled-task-abuse

hunting-scheduled-task-abuse

Verified

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 Scheduler.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.6 KB
references/api-reference.mdmarkdown1.2 KB
scripts/analyst.pyscript2.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
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall