Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-powershell-script-block-loggingnpx skills add killvxk/cybersecurity-skills-zh --skill analyzing-powershell-script-block-logginggit clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zhWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-powershell-script-block-logging)<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-powershell-script-block-logging"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-powershell-script-block-logging.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00111 | $0.00513 |
| Opus 5 | $0.00056 | $0.00257 |
| Sonnet 5 | $0.00022 | $0.00103 |
| Haiku 4.5 | $0.00011 | $0.00051 |
Grade A, and why
analyzing-powershell-script-block-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
使用说明
- 安装依赖:
pip install python-evtx lxml - 收集 PowerShell 操作日志:
Microsoft-Windows-PowerShell%4Operational.evtx - 使用 python-evtx 解析事件 ID 4104 条目,提取 ScriptBlockText、ScriptBlockId 以及 MessageNumber/MessageTotal,用于多块脚本重建。
- 应用检测启发式规则:
- Base64 编码命令(
-EncodedCommand、FromBase64String) - 下载植入器(
DownloadString、DownloadFile、Invoke-WebRequest、Net.WebClient) - AMSI 绕过模式(
AmsiUtils、amsiInitFailed) - 混淆指标(高熵、反引号插入、字符串拼接)
- Base64 编码命令(
- 生成报告,包含重建脚本、风险评分和 MITRE ATT&CK 映射。
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 顺序拼接各块以恢复完整脚本。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 41 lines · 111 tokens per session scan A 2e6a8f30e3ca
analyzing-powershell-script-block-logging is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (44 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 111 tokens to every session and 513 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
analyzing-powershell-script-block-logging
Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression…
analyzing-powershell-script-block-logging
Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression…
analyzing-powershell-script-block-logging
Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression…
analyzing-powershell-script-block-logging
Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression…
Génération de script PowerShell pour popup élégant sans module
Génère des scripts PowerShell pour afficher des notifications popup élégantes et stylisées (style Windows) en utilisant uniquement les bibliothèques natives (Windows Forms), sans installation de modules externes.
golang
Go coding standards and conventions for this project. Apply when writing, reviewing, or refactoring any Go source file.