Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mukul975 avatar

Analyzing Powershell Script Block Logging

  • 258 installs
  • 27.3k repo stars
  • Updated August 2, 2026
  • mukul975/anthropic-cybersecurity-skills

Guide analysis of Windows PowerShell Script Block Logging events for threat detection and incident review on defender-heavy stacks.

About

analyzing-powershell-script-block-logging is a cybersecurity-oriented agent skill focused on interpreting PowerShell Script Block Logging—Windows Event Tracing for Defender-class pipelines that records de-obfuscated script segments at execution time. Solo builders shipping SaaS on Windows servers or supporting enterprise customers often inherit EDR and SIEM expectations even when their day job is product code; this skill gives agents a named procedure for turning noisy script-block events into reviewable findings instead of ad-hoc grep. It sits in the Ship security lane because you typically enable, tune, and validate logging before you sign off on production posture, though operators may revisit it during incidents. Expect advanced familiarity with Windows logging, event IDs, and defender tooling; it is not a substitute for full purple-team exercises or generic secret scanning in CI.

  • Centers on PowerShell Script Block Logging as a Windows telemetry source
  • Fits anthropic-cybersecurity-skills family for structured defensive analysis
  • Supports audit and compliance workflows on Microsoft-centric environments
  • Targets interpreter-level script visibility rather than static repo scanning alone

Analyzing Powershell Script Block Logging by the numbers

  • 258 all-time installs (skills.sh)
  • +19 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #671 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill analyzing-powershell-script-block-logging

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs258
repo stars27.3k
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositorymukul975/anthropic-cybersecurity-skills

What it does

Guide analysis of Windows PowerShell Script Block Logging events for threat detection and incident review on defender-heavy stacks.

Files

SKILL.mdMarkdownGitHub ↗

Analyzing PowerShell Script Block Logging

When to Use

  • When investigating security incidents that require analyzing powershell script block logging
  • 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

  • Familiarity with security operations concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

1. Install dependencies: pip install python-evtx lxml 2. Collect PowerShell Operational logs: Microsoft-Windows-PowerShell%4Operational.evtx 3. Parse Event ID 4104 entries using python-evtx to extract ScriptBlockText, ScriptBlockId, and MessageNumber/MessageTotal for multi-part script reconstruction. 4. Apply detection heuristics:

  • Base64-encoded commands (-EncodedCommand, FromBase64String)
  • Download cradles (DownloadString, DownloadFile, Invoke-WebRequest, Net.WebClient)
  • AMSI bypass patterns (AmsiUtils, amsiInitFailed)
  • Obfuscation indicators (high entropy, tick-mark insertion, string concatenation)

5. Generate a report with reconstructed scripts, risk scores, and MITRE ATT&CK mappings.

python scripts/agent.py --evtx-file /path/to/PowerShell-Operational.evtx --output ps_analysis.json

Examples

Detect Encoded Command Execution

import base64
if "-encodedcommand" in script_text.lower():
    encoded = script_text.split()[-1]
    decoded = base64.b64decode(encoded).decode("utf-16-le")

Reconstruct Multi-Block Script

Scripts split across multiple 4104 events share a ScriptBlockId. Concatenate blocks ordered by MessageNumber to recover the full script.

Related skills

FAQ

Is Analyzing Powershell Script Block Logging safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Securityauditcompliance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.