Chuyển đến nội dung
Skillpedia
Agent35k · #7975

hunting-for-suspicious-scheduled-tasks

Skill này làm gì

Công cụ này tìm các tác vụ ẩn trên Windows mà kẻ tấn công có thể dùng để duy trì quyền truy cập vào máy tính của bạn. Nó kiểm tra các tác vụ mới được tạo gần đây hoặc có vẻ đáng ngờ.

Khi nào nên dùng

  • ✓Để kiểm tra các chương trình độc hại tự khởi động trên Windows.
  • ✓Nếu bạn nghi ngờ máy tính bị xâm nhập và muốn xem những gì đang chạy.
  • ✓Khi Windows cảnh báo rằng có tác vụ mới được tạo mà bạn không biết là gì.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-suspicious-scheduled-tasks/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-suspicious-scheduled-tasks/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tìm các tác vụ đáng ngờ trên máy tính của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ phân tích nhật ký sự kiện Windows ghi lại khi các tác vụ được tạo, và kiểm tra xem các lệnh mà những tác vụ này chạy có bất thường hoặc nguy hiểm không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Hunting for Suspicious Scheduled Tasks

When to Use

  • When proactively hunting for persistence mechanisms in Windows environments
  • After detecting schtasks.exe or at.exe usage in process creation logs
  • When investigating malware that survives reboots and user logoffs
  • During incident response to enumerate all persistence on compromised systems
  • When Windows Security Event ID 4698 (Scheduled Task Created) fires for unusual tasks

Prerequisites

  • Windows Security Event ID 4698/4699/4702 (Task Created/Deleted/Updated)
  • Sysmon Event ID 1 for schtasks.exe process creation with command lines
  • Windows Task Scheduler operational log (Microsoft-Windows-TaskScheduler/Operational)
  • PowerShell logging for Register-ScheduledTask cmdlet usage
  • Access to Task Scheduler XML definitions on endpoints

Workflow

  1. Enumerate All Scheduled Tasks: Collect complete task inventory from target systems using schtasks /query /fo CSV /v or Get-ScheduledTask PowerShell cmdlet.
  2. Monitor Task Creation Events: Track Event ID 4698 for new task creation, correlating with the creating process and user account context.
  3. Analyze Task Actions: Examine what each task executes. Flag tasks running scripts (PowerShell, cmd, wscript), binaries from user-writable paths (TEMP, AppData, Downloads), or encoded/obfuscated commands.
  4. Check Task Triggers: Review trigger conditions. Tasks triggered by system startup, user logon, or short intervals (1-5 minutes) warrant investigation.
  5. Identify Hidden or Disguised Tasks: Hunt for tasks with names mimicking legitimate Windows tasks, tasks with Security Descriptor modifications hiding them from standard enumeration, or tasks stored in non-standard registry locations.
  6. Correlate with Process Execution: Match scheduled task execution events with process creation logs to confirm what actually runs.
  7. Baseline and Diff: Compare current task inventory against known-good baselines to identify new, modified, or unexpected tasks.

Detection Queries

Splunk -- Scheduled Task Creation

index=wineventlog EventCode=4698
| spath output=TaskName path=EventData.TaskName
| spath output=TaskContent path=EventData.TaskContent
| where NOT match(TaskName, "(?i)(\\\\Microsoft\\\\|\\\\Windows\\\\)")
| table _time Computer SubjectUserName TaskName TaskContent

Splunk -- Schtasks.exe Suspicious Usage

index=sysmon EventCode=1 Image="*\\schtasks.exe"
| where match(CommandLine, "(?i)/create")
| where match(CommandLine, "(?i)(powershell|cmd|wscript|cscript|mshta|rundll32|regsvr32|http|https|\\\\temp\\\\|\\\\appdata\\\\)")
| table _time Computer User CommandLine ParentImage

KQL -- Microsoft Sentinel

SecurityEvent
| where EventID == 4698
| extend TaskName = tostring(EventData.TaskName)
| extend TaskContent = tostring(EventData.TaskContent)
| where TaskContent has_any ("powershell", "cmd.exe", "wscript", "http://", "https://", "\\Temp\\", "\\AppData\\")
| project TimeGenerated, Computer, Account, TaskName, TaskContent

Common Scenarios

  1. Cobalt Strike Persistence: Creates scheduled tasks via schtasks.exe to execute PowerShell download cradles at user logon intervals.
  2. Ransomware Staging: Task created to run encryption payload at a future time, often during off-hours for maximum impact.
  3. Hidden Task via SD Modification: Attacker modifies Security Descriptor of scheduled task to hide it from normal enumeration while maintaining execution.
  4. COM Handler Abuse: Task uses COM handler rather than direct executable path, making action inspection more complex.
  5. Lateral Movement via Tasks: Remote scheduled task creation using schtasks /create /s REMOTE_HOST for execution on other systems.

Output Format

Hunt ID: TH-SCHTASK-[DATE]-[SEQ]
Host: [Hostname]
Task Name: [Full task path]
Action: [Command/Script executed]
Trigger: [Startup/Logon/Timer/Event]
Created By: [User account]
Created From: [Local/Remote]
Creation Time: [Timestamp]
Run As: [Execution account]
Risk Level: [Critical/High/Medium/Low]
Câu hỏi thường gặp

“Tác vụ đã lên lịch” là gì?

Đây là các lệnh hoặc chương trình mà Windows có thể được thiết lập để chạy tự động vào thời điểm nhất định hoặc khi có sự việc nào đó xảy ra, như khi bật máy tính.

Vì sao kẻ tấn công dùng tác vụ đã lên lịch?

Họ dùng chúng để đảm bảo chương trình độc hại tiếp tục chạy ngay cả sau khi máy được khởi động lại hoặc người dùng đã đăng xuất.

Tôi có cần là chuyên gia để dùng công cụ này không?

Không cần. Công cụ được thiết kế để dùng ngay cả khi bạn không có kiến thức kỹ thuật nâng cao. Nó giúp đơn giản hóa việc phát hiện mối đe dọa.

Chi tiết

Mô tả gốc của tác giả

Hunts for adversary persistence and execution via Windows scheduled tasks (T1053.005) by analyzing Security Event ID 4698 task-creation events, suspicious task properties, and unusual execution patterns from schtasks.exe/at.exe. Use after detecting schtasks or at.exe in process creation logs, during incident response to enumerate persistence on compromised hosts, or when Event ID 4698 fires for an

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7975
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự