skills/analyzing-powershell-script-block-logging/SKILL.md
从 EVTX 文件中解析 Windows PowerShell 脚本块日志(事件 ID 4104),以检测混淆命令、编码载荷和离地攻击技术(living-off-the-land)。使用 python-evtx 提取并重建多块脚本,通过熵分析和模式匹配检测 Base64 编码命令、Invoke-Expression 滥用、下载植入器(download cradles)和 AMSI 绕过尝试。
npx skillsauth add killvxk/cybersecurity-skills-zh analyzing-powershell-script-block-loggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
pip install python-evtx lxmlMicrosoft-Windows-PowerShell%4Operational.evtx-EncodedCommand、FromBase64String)DownloadString、DownloadFile、Invoke-WebRequest、Net.WebClient)AmsiUtils、amsiInitFailed)python scripts/agent.py --evtx-file /path/to/PowerShell-Operational.evtx --output ps_analysis.json
import base64
if "-encodedcommand" in script_text.lower():
encoded = script_text.split()[-1]
decoded = base64.b64decode(encoded).decode("utf-16-le")
拆分在多个 4104 事件中的脚本共享一个 ScriptBlockId。按 MessageNumber 顺序拼接各块以恢复完整脚本。
testing
设计并执行社会工程学渗透测试,包括钓鱼、语音钓鱼、短信钓鱼和物理借口活动,以衡量人员安全韧性并识别培训差距。
testing
主持结构化的事件后审查,以识别根本原因、记录有效和无效的措施,并提出可操作的改进建议以提升未来的事件响应能力。
testing
通过分析举报的邮件、提取指标、评估凭据受攻陷情况、在全组织范围隔离恶意邮件并修复受影响账号来响应网络钓鱼事件。涵盖邮件头分析、URL/附件沙箱检测和邮箱范围清除操作。适用于网络钓鱼响应、邮件事件、凭据钓鱼、鱼叉式网络钓鱼调查或钓鱼修复相关请求。
tools
票据传递(Pass-the-Ticket,PtT)是一种横向移动技术,使用窃取的 Kerberos 票据(TGT 或 TGS)在不知道用户密码的情况下向服务进行认证。通过从已控制的主机内存中提取 Kerberos 票据,攻击者可以将这些票据注入自己的会话以模拟票据所有者。