hunting-for-anomalous-powershell-execution
Hunt for malicious PowerShell activity by analyzing Script Block Logging
v1.03 instalações+3 em 7 dias36,3 mil EstrelasApache-2.0sincronizado há 12 horas
Instalar
Ainda não tem a CLI da NotHoly? Instale primeiro.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install mukul975/hunting-for-anomalous-powershell-executionGrava em ~/.notholy/skills depois de conferir a assinatura e o SHA-256.
AssinaturaAssinado, ed25519
Pacotef7b57ee9…9347c8a0
f7b57ee96d70…cb469347c8a04 arquivos · 9.2 KBVarreduraMédio8 achados
- command.pipe_to_shellreferences/api-reference.md:54
- command.pipe_to_shellreferences/api-reference.md:61
- command.base64_execreferences/api-reference.md:62
Fontegithub.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/hunting-for-anomalous-powershell-execution@54a7988
Este item ainda não foi escrito no seu idioma, então aparece em English.
Nesta página
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
- Parse EVTX files extracting Event 4104 script block text and metadata
- Reassemble multi-part script blocks using ScriptBlock ID correlation
- Scan script text for AMSI bypass indicators and obfuscation patterns
- Detect encoded command execution and base64 payloads
- Identify download cradles, credential dumping, and lateral movement commands
- 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
}Arquivos desta versão
references/14.1 KB
- api-reference.md4.1 KB
scripts/18.6 KB
- agent.py8.6 KB
- LICENSE11.0 KB
- SKILL.md2.5 KB
Permissões
| Permissão | Declarada | Encontrada na varredura |
|---|---|---|
| Lê arquivos | Não | Não |
| Grava arquivos | Não | Não |
| Roda comandos no shell | Sim | Sim |
| Usa a rede | Sim | Sim |
| Usa conectores | Não | Não |
| Controla um navegador | Não | Não |
Achados da varredura
Revisado em 13 de nov. de 2026
- MédiaComando · command.pipe_to_shellreferences/api-reference.md:54
- MédiaComando · command.pipe_to_shellreferences/api-reference.md:61
- MédiaComando · command.base64_execreferences/api-reference.md:62
- MédiaArquivo · Script executável junto com a skillscripts/agent.py
- MédiaComando · command.pipe_to_shellscripts/agent.py:47
- MédiaComando · command.pipe_to_shellscripts/agent.py:48
- MédiaComando · command.base64_execscripts/agent.py:49
- InfoLink · Links para domínios externos
Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.
| Versão | Publicada em | Commit | SHA-256 | Assinatura | Mudança de permissão |
|---|---|---|---|---|---|
| v1.0 | 13 de nov. de 2026 | 54a7988 | f7b57ee9 | Assinada | – |
Mais de mukul975
Tudo deste publicador- testing-for-xml-injection-vulnerabilitiesmukul975/testing-for-xml-injection-vulnerabilities5
- testing-for-sensitive-data-exposuremukul975/testing-for-sensitive-data-exposure5
- performing-jwt-none-algorithm-attackmukul975/performing-jwt-none-algorithm-attack5
- detecting-aws-credential-exposure-with-trufflehogmukul975/detecting-aws-credential-exposure-with-trufflehog5
Mais em DFIR e threat hunting
Ver a categoria- hunting-for-command-and-control-beaconingmukul975/hunting-for-command-and-control-beaconing5
- audit-context-buildingtrailofbits/audit-context-building4
- incident-response-forensicssecurityskills/incident-response-forensics3
- extracting-credentials-from-memory-dumpmukul975/extracting-credentials-from-memory-dump3
- analyzing-browser-forensics-with-hindsightmukul975/analyzing-browser-forensics-with-hindsight3
- forensics-ctfaeondave/forensics-ctf3
Pergunte tudo o que o seu escopo permite.
Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.
- 1/3
Crie a conta
Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.
Pessoa físicaEmpresa - 2/3
Adicione créditos
No cartão. Você paga por token, sem assinatura.
$5.00recarga mínima - 3/3
Pergunte
No chat, ou instale o CLI e rode notholy login no terminal.
$ notholy login