DC detecting-malicious-scheduled-tasks-with-sysmon
Detect malicious scheduled task creation and modification using Sysmon Event IDs 1 (Process Create for schtasks.exe), 11 (File Create for task XML), and Windows Security Event 4698/4702. The analyst correlates task creation with suspicious parent processes, public directory paths, and encoded command arguments to identify persistence and lateral movement via scheduled tasks. Activates for requests involving scheduled task detection, Sysmon persistence hunting, or T1053.005 Scheduled Task/Job analysis.
Detect malicious scheduled task creation and modification using Sysmon Event IDs 1 (Process Create for schtasks.exe), 11 (File Create for task XML), and…
As a process C 53/100 · Has gaps — weak spots: result and completion, when it triggers, failures and branches
What is at stake
The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 7
-
high Dangerous commands
cmd-encoded-execSKILL.md:81Executes a base64/encoded payload (documentation of a security skill)Command: powershell.exe -enc SQBuAHYAbwBrAGUALQBXAGUAYgBSAGU...
security skill
Medium and low: 6
-
low Risky intent
intent-offensive-securityreferences/api-reference.md:19Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)| `/s <host>` | Remote system target | Lateral movement indicator |
detector -
low Risky intent
intent-offensive-securityreferences/api-reference.md:20Offensive-security / dual-use content (legitimate for authorised testing; review intended use)| `/ru SYSTEM` | Run as SYSTEM | Privilege escalation |
-
low Risky intent
intent-offensive-securityreferences/api-reference.md:58Offensive-security / dual-use content (legitimate for authorised testing; review intended use)| Lateral Movement | T1021 | Remote task creation via schtasks /s |
-
low Risky intent
intent-offensive-securitySKILL.md:7Offensive-security / dual-use content (legitimate for authorised testing; review intended use)persistence and lateral movement via scheduled tasks. Activates for requests involving
-
low Risky intent
intent-offensive-securitySKILL.md:47Offensive-security / dual-use content (legitimate for authorised testing; review intended use)and lateral movement. Sysmon Event ID 1 captures schtasks.exe process creation with full
-
low Risky intent
intent-offensive-securitySKILL.md:74Offensive-security / dual-use content (legitimate for authorised testing; review intended use)5. Alert on remote task creation (schtasks /s) for lateral movement detection
Files scanned: 4. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- note
frontmatter-keyunknown frontmatter key "domain" - note
frontmatter-keyunknown frontmatter key "subdomain" - note
frontmatter-keyunknown frontmatter key "d3fend_techniques" - note
frontmatter-keyunknown frontmatter key "nist_csf" - note
frontmatter-keyunknown frontmatter key "mitre_attack"
Process rating: all ten parameters 53/100
- 0Result and completion. Does not say what the result is
- 0Failures and branches. Linear process with no failure handling
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 3 mutating operations with no state check
- 60Tools and files. Uses tools (bash) that frontmatter does not declare
- 70Inputs and preconditions. Inputs and preconditions are listed
- 100Steps. 12 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 480 tokens
- 100Progress reporting. Reports progress
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- -41 reference files, but SKILL.md never points to them: the model will not open them
- -31 of 1 scripts are never mentioned in SKILL.md
- +2Single-language instructions
- +3Description length 506: enough signal without eating the budget
- +4Structure: 6 headings
- +3Step-by-step instructions: 12 items
- +4Has examples (1 code blocks)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 75.