detecting-malicious-scheduled-tasks-with-sysmon
使用 Sysmon 事件 ID 1(schtasks.exe 进程创建)、11(任务 XML 文件创建)以及 Windows 安全事件 4698/4702 检测恶意计划任务的创建和修改。分析人员将任务创建与可疑父进程、公共目录路径和编码命令参数相关联, 以识别通过计划任务进行的持久化和横向移动。适用于计划任务检测、Sysmon 持久化狩猎或 T1053.005 计划任务/作业分析。
Best use case
detecting-malicious-scheduled-tasks-with-sysmon is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
使用 Sysmon 事件 ID 1(schtasks.exe 进程创建)、11(任务 XML 文件创建)以及 Windows 安全事件 4698/4702 检测恶意计划任务的创建和修改。分析人员将任务创建与可疑父进程、公共目录路径和编码命令参数相关联, 以识别通过计划任务进行的持久化和横向移动。适用于计划任务检测、Sysmon 持久化狩猎或 T1053.005 计划任务/作业分析。
Teams using detecting-malicious-scheduled-tasks-with-sysmon should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/detecting-malicious-scheduled-tasks-with-sysmon/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How detecting-malicious-scheduled-tasks-with-sysmon Compares
| Feature / Agent | detecting-malicious-scheduled-tasks-with-sysmon | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
使用 Sysmon 事件 ID 1(schtasks.exe 进程创建)、11(任务 XML 文件创建)以及 Windows 安全事件 4698/4702 检测恶意计划任务的创建和修改。分析人员将任务创建与可疑父进程、公共目录路径和编码命令参数相关联, 以识别通过计划任务进行的持久化和横向移动。适用于计划任务检测、Sysmon 持久化狩猎或 T1053.005 计划任务/作业分析。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 使用 Sysmon 检测恶意计划任务 ## 概述 攻击者滥用 Windows 任务计划程序(schtasks.exe、at.exe)进行持久化(T1053.005) 和横向移动。Sysmon 事件 ID 1 捕获 schtasks.exe 进程创建及完整命令行参数, 事件 ID 11 捕获写入 C:\Windows\System32\Tasks\ 的任务 XML 文件。 Windows 安全事件 4698 记录任务注册详情。 本技能涵盖构建关联这些事件的检测规则,以识别从可疑路径创建、带编码 payload 或针对远程系统的恶意计划任务。 ## 前置条件 - 安装了以检测为重点配置的 Sysmon(如 SwiftOnSecurity 或 Olaf Hartong) - Windows 事件日志转发至 SIEM(Splunk、Elastic 或 Sentinel) - 启用 PowerShell ScriptBlock 日志(事件 4104) ## 步骤 1. 配置 Sysmon 以记录带任务相关过滤器的事件 ID 1、11、12、13 2. 为带可疑参数的 schtasks.exe /create 构建检测规则 3. 将事件 4698(任务注册)与 Sysmon 事件 1(进程创建)关联 4. 狩猎从公共目录执行或使用编码命令的任务 5. 对远程任务创建(schtasks /s)发出告警,用于横向移动检测 ## 预期输出 ``` [CRITICAL] 检测到可疑计划任务 Task: \Microsoft\Windows\UpdateCheck Command: powershell.exe -enc SQBuAHYAbwBrAGUALQBXAGUAYgBSAGU... Created By: DOMAIN\compromised_user Parent Process: cmd.exe (PID 4532) Source: \\192.168.1.50(远程创建) MITRE: T1053.005 - 计划任务/作业 ```
Related Skills
hunting-for-scheduled-task-persistence
通过分析任务创建事件、可疑任务操作和异常调度模式,狩猎攻击者通过 Windows 计划任务实现的持久化。
detecting-wmi-persistence
通过分析 Sysmon 事件 ID 19、20 和 21 中的恶意 EventFilter、EventConsumer 和 FilterToConsumerBinding 创建,检测 WMI 事件订阅持久化。
detecting-t1548-abuse-elevation-control-mechanism
通过监控注册表修改、进程提升标志和异常的父子进程关系,检测提升控制机制滥用,包括 UAC 绕过、sudo 利用和 setuid/setgid 操纵。
detecting-t1055-process-injection-with-sysmon
通过分析 Sysmon 事件中的跨进程内存操作、远程线程创建和异常 DLL 加载模式,检测进程注入技术(T1055),包括经典 DLL 注入、进程镂空和 APC 注入。
detecting-t1003-credential-dumping-with-edr
利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
detecting-suspicious-powershell-execution
检测可疑的 PowerShell 执行模式,包括编码命令、下载器(download cradles)、AMSI 绕过尝试以及受限语言模式规避。
detecting-suspicious-oauth-application-consent
使用 Microsoft Graph API、审计日志和权限分析,检测 Azure AD / Microsoft Entra ID 中的高风险 OAuth 应用授权同意,识别非法同意授权攻击。
detecting-supply-chain-attacks-in-ci-cd
扫描 GitHub Actions 工作流和 CI/CD 流水线配置,检测供应链攻击(Supply Chain Attack)向量, 包括未固定的 Action 版本、通过表达式的脚本注入、依赖混淆(Dependency Confusion)和密钥泄露。 使用 PyGithub 和 YAML 解析进行自动化审计。适用于加固 CI/CD 流水线或调查被攻击的构建系统。
detecting-stuxnet-style-attacks
本技能涵盖检测遵循Stuxnet攻击模式的复杂网络物理攻击——在修改PLC逻辑的同时欺骗传感器读数以向操作员隐藏操控行为。内容涉及PLC逻辑完整性监控、基于物理的过程异常检测、工程师工作站入侵指标、USB传播攻击向量,以及从IT到OT横向移动直至过程操控的多阶段攻击链检测。
detecting-sql-injection-via-waf-logs
分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。
detecting-spearphishing-with-email-gateway
鱼叉式网络钓鱼(Spearphishing)使用个性化、经过研究的内容针对特定个人,可绕过通用垃圾邮件过滤器。邮件安全网关(SEG)如 Microsoft Defender for Office 365、Proofpoint、Mimecast 和 Barracuda 提供高级检测能力,包括行为分析、URL 引爆、附件沙箱和冒充检测。本技能涵盖配置这些网关以检测和拦截定向钓鱼攻击。
detecting-shadow-it-cloud-usage
通过使用 Python pandas 分析代理日志、DNS 查询日志和网络流数据,进行流量模式分析和域名分类,检测未授权的 SaaS 和云服务使用(影子 IT)。