跳到正文
Skillpedia
分析与电子表格35k · #7948

hunting-for-anomalous-powershell-execution

它能做什么

这个工具可以在你的 Windows 事件日志中搜索恶意的 PowerShell 活动。它会分析被执行的脚本,找出试图伪装命令、绕过安全防护(AMSI)、下载可疑代码或窃取凭据的行为。

适用场景

  • ✓调查一起与 PowerShell 有关的安全事件时。
  • ✓编写用于检测可疑 PowerShell 活动的规则时。
  • ✓检查你的监控系统能否发现常见的 PowerShell 攻击时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-anomalous-powershell-execution/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-anomalous-powershell-execution/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在我的事件日志中搜索可疑的 PowerShell 活动。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会读取 Windows 事件日志文件(.evtx),这些文件记录了 PowerShell 执行过的内容。它会查找已知的攻击模式,比如经过编码的命令,或者试图绕过安全防护的操作。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Hunting for Anomalous PowerShell Execution

Overview

PowerShell Script Block Logging (Event ID 4104) records the full deobfuscated script text executed on a Windows endpoint, making it the primary data source for hunting malicious PowerShell. Combined with Module Logging (4103) and process creation events, analysts can detect encoded commands, AMSI bypass patterns, download cradles, credential theft tools, and fileless attack techniques even when the attacker uses obfuscation layers.

When to Use

  • When investigating security incidents that require hunting for anomalous powershell execution
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Windows Event Log exports (.evtx) from Microsoft-Windows-PowerShell/Operational
  • Python 3.8+ with python-evtx and lxml libraries
  • Script Block Logging enabled via Group Policy
  • Understanding of common PowerShell attack techniques

Steps

  1. Parse EVTX files extracting Event 4104 script block text and metadata
  2. Reassemble multi-part script blocks using ScriptBlock ID correlation
  3. Scan script text for AMSI bypass indicators and obfuscation patterns
  4. Detect encoded command execution and base64 payloads
  5. Identify download cradles, credential dumping, and lateral movement commands
  6. Score and prioritize findings by threat severity

Expected Output

{
  "total_events": 1247,
  "suspicious_events": 23,
  "amsi_bypass_attempts": 2,
  "encoded_commands": 8,
  "download_cradles": 5,
  "credential_access": 3
}
常见问题

什么是“脚本块日志记录”(Script Block Logging)?

这是一种详细的日志,能准确显示 PowerShell 执行了哪些命令和脚本,即使攻击者试图隐藏它们。

什么是 AMSI?

AMSI(Antimalware Scan Interface)是 Windows 的一个安全层,用来帮助检测和拦截恶意软件。该工具会查找试图禁用或欺骗 AMSI 的行为。

什么是“下载 cradle”(download cradles)?

这是一些代码片段,用于直接从互联网下载并执行其他恶意程序,而不需要把文件保存到磁盘上。

详情

作者的原始描述

Hunt for malicious PowerShell activity by analyzing Script Block Logging (Event 4104), Module Logging (Event 4103), and process creation events. The analyst parses Windows Event Log EVTX files to detect obfuscated commands, AMSI bypass attempts, encoded payloads, credential dumping keywords, and suspicious download cradles. Activates for requests involving PowerShell threat hunting, script block a

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7948
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能