analyzing-powershell-empire-artifacts skill (Anthropic-Cybersecurity-Skills)
- Install
- SKILL.md (verbatim)
- Overview
- When to Use
- Prerequisites
- Key Detection Patterns
- Output
- Other files in this skill
- references/api-reference.md (verbatim)
- Enable Script Block Logging (GPO)
- Enable Module Logging (GPO)
- Key Event IDs
- Default Empire Launcher Pattern
- Launcher Flags
- Empire Stager IOC Patterns
- Empire Module Signatures
- Default Empire Staging URIs
- Splunk Detection Query
- Elastic KQL Detection
- MITRE ATT&CK Mapping
What it does. Detect PowerShell Empire post-exploitation framework artifacts in Windows Script Block Logging (Event ID 4104) and Module Logging (Event ID 4103), including the default launcher string, Base64-encoded WebClient/FromBase64String payloads, known module invocations (Invoke-Mimikatz, Invoke-Kerberoast), and staging URL patterns. Use when hunting for or confirming Empire C2 activity in Windows event logs. Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).
| Upstream | mukul975/Anthropic-Cybersecurity-Skills |
| Skill file | skills/analyzing-powershell-empire-artifacts/SKILL.md |
| License | Apache-2.0 (skill folder LICENSE) |
| Author | mukul975 |
| Fetched | 2026-09-10 |
Install
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-powershell-empire-artifacts, or copy the skill folder into~/.claude/skills/analyzing-powershell-empire-artifacts/.- Raw file:
curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/analyzing-powershell-empire-artifacts/SKILL.md
SKILL.md (verbatim)
name: analyzing-powershell-empire-artifacts
description: Detect PowerShell Empire post-exploitation framework artifacts in Windows Script Block Logging (Event ID 4104) and Module Logging (Event ID 4103), including the default launcher string, Base64-encoded WebClient/FromBase64String payloads, known module invocations (Invoke-Mimikatz, Invoke-Kerberoast), and staging URL patterns. Use when hunting for or confirming Empire C2 activity in Windows event logs.
domain: cybersecurity
subdomain: threat-hunting
tags:
- PowerShell-Empire
- threat-hunting
- Script-Block-Logging
- base64
- stager
- C2
- MITRE-ATT&CK
- T1059.001
- forensics
version: '1.0'
author: mahipal
license: Apache-2.0
d3fend_techniques:
- Executable Denylisting
- Execution Isolation
- File Metadata Consistency Validation
- Content Format Conversion
- File Content Analysis
nist_ai_rmf:
- GOVERN-1.1
- MEASURE-2.7
- MANAGE-3.1
nist_csf:
- DE.CM-01
- DE.AE-02
- DE.AE-07
- ID.RA-05
mitre_attack:
- T1059.001
- T1071.001
- T1003.001
- T1558.003
- T1027.010
Analyzing PowerShell Empire Artifacts
Overview
PowerShell Empire is a post-exploitation framework consisting of listeners, stagers, and agents. Its artifacts leave detectable traces in Windows event logs, particularly PowerShell Script Block Logging (Event ID 4104) and Module Logging (Event ID 4103). This skill analyzes event logs for Empire's default launcher string (powershell -noP -sta -w 1 -enc), Base64 encoded payloads containing System.Net.WebClient and FromBase64String, known module invocations (Invoke-Mimikatz, Invoke-Kerberoast, Invoke-TokenManipulation), and staging URL patterns.
When to Use
- When investigating security incidents that require analyzing powershell empire artifacts
- 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
- Python 3.9+ with access to Windows Event Log or exported EVTX files
- PowerShell Script Block Logging (Event ID 4104) enabled via Group Policy
- Module Logging (Event ID 4103) enabled for comprehensive coverage
Key Detection Patterns
- Default launcher —
powershell -noP -sta -w 1 -encfollowed by Base64 blob - Stager indicators —
System.Net.WebClient,DownloadData,DownloadString,FromBase64String - Module signatures — Invoke-Mimikatz, Invoke-Kerberoast, Invoke-TokenManipulation, Invoke-PSInject, Invoke-DCOM
- User agent strings — default Empire user agents in HTTP listener configuration
- Staging URLs —
/login/process.php,/admin/get.phpand similar default URI patterns
Output
JSON report with matched IOCs, decoded Base64 payloads, timeline of suspicious events, MITRE ATT&CK technique mappings, and severity scores.
Other files in this skill
references/api-reference.md (verbatim)
PowerShell Empire Artifact Detection Reference
Enable Script Block Logging (GPO)
Computer Configuration > Administrative Templates > Windows Components >
Windows PowerShell > Turn on PowerShell Script Block Logging: Enabled
Registry: HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging
EnableScriptBlockLogging= 1
Enable Module Logging (GPO)
Computer Configuration > Administrative Templates > Windows Components >
Windows PowerShell > Turn on Module Logging: Enabled
Module Names: *
Key Event IDs
| Event ID | Log | Description |
|---|---|---|
| 4104 | Microsoft-Windows-PowerShell/Operational | Script Block Logging — captures executed script text |
| 4103 | Microsoft-Windows-PowerShell/Operational | Module Logging — captures pipeline execution details |
| 4688 | Security | Process Creation — captures command line arguments |
| 800 | Windows PowerShell | Pipeline execution (legacy) |
Default Empire Launcher Pattern
powershell -noP -sta -w 1 -enc <Base64-payload>
Launcher Flags
| Flag | Meaning |
|---|---|
-noP |
No profile — skips PowerShell profile scripts |
-sta |
Single-threaded apartment |
-w 1 |
Window style hidden |
-enc |
Encoded command (Base64 UTF-16LE) |
Empire Stager IOC Patterns
| Pattern | Context |
|---|---|
System.Net.WebClient |
Downloads stager payload from listener |
.DownloadString() |
Fetches PowerShell script from C2 |
.DownloadData() |
Fetches binary data from C2 |
[System.Convert]::FromBase64String |
Decodes embedded payload |
IEX() / Invoke-Expression |
Executes downloaded script |
New-Object System.Net.WebClient |
Creates web client for download |
Empire Module Signatures
| Module | MITRE | Description |
|---|---|---|
Invoke-Mimikatz |
T1003.001 | Credential dumping via Mimikatz |
Invoke-Kerberoast |
T1558.003 | Service ticket requests for offline cracking |
Invoke-TokenManipulation |
T1134 | Access token manipulation |
Invoke-PSInject |
T1055.012 | Process hollowing injection |
Invoke-DCOM |
T1021.003 | Lateral movement via DCOM |
Invoke-SMBExec |
T1021.002 | SMB-based lateral movement |
Invoke-WMIExec |
T1047 | WMI-based execution |
Invoke-RunAs |
T1134.002 | Create process with alternate token |
Invoke-SessionGopher |
T1552.001 | Extract saved session credentials |
Install-SSP |
T1547.005 | Security Support Provider persistence |
New-GPOImmediateTask |
T1484.001 | GPO abuse for execution |
Default Empire Staging URIs
/login/process.php
/admin/get.php
/admin/news.php
/news.php
/login/process.jsp
Splunk Detection Query
index=wineventlog source="WinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=4104
| where match(ScriptBlockText, "(?i)system\.net\.webclient") AND match(ScriptBlockText, "(?i)frombase64string")
| stats count by Computer, UserID, ScriptBlockText
Elastic KQL Detection
event.code: "4104" AND powershell.file.script_block_text: (*System.Net.WebClient* AND *FromBase64String*)
MITRE ATT&CK Mapping
- T1059.001 — Command and Scripting Interpreter: PowerShell
- T1071.001 — Application Layer Protocol: Web Protocols
- T1027 — Obfuscated Files or Information
- T1105 — Ingress Tool Transfer
Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.