hunting-for-anomalous-powershell-execution
यह क्या करती है
यह टूल आपके Windows event logs में PowerShell की संदिग्ध गतिविधि खोजता है। यह चलाई गई scripts का विश्लेषण करता है ताकि कमांड्स को छिपाने, सुरक्षा (AMSI) को बायपास करने, संदिग्ध code डाउनलोड करने या credentials चुराने की कोशिशें पकड़ी जा सकें।
कब इस्तेमाल करें
- ✓किसी PowerShell से जुड़ी security घटना की जांच करते समय।
- ✓PowerShell की संदिग्ध गतिविधि पहचानने के लिए rules बनाते समय।
- ✓यह जांचने के लिए कि आपका monitoring system आम PowerShell हमलों को पकड़ पाता है या नहीं।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-anomalous-powershell-execution/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे event logs में PowerShell की संदिग्ध गतिविधि खोजो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल Windows event log files (.evtx) पढ़ता है, जिनमें यह जानकारी होती है कि PowerShell ने क्या चलाया। यह ज्ञात हमलों के patterns खोजता है, जैसे encoded commands या सुरक्षा को बायपास करने की कोशिश।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Hunting for Anomalous PowerShell Execution
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
}
अक्सर पूछे जाने वाले सवाल
'Script Block Logging' क्या है?
ये विस्तृत logs हैं जो दिखाते हैं कि PowerShell ने कौन सी commands और scripts ठीक-ठीक चलाईं, भले ही हमलावर ने उन्हें छिपाने की कोशिश की हो।
AMSI क्या है?
AMSI (Antimalware Scan Interface) Windows की एक सुरक्षा परत है जो खतरनाक software पहचानने और रोकने में मदद करती है। यह टूल AMSI को बंद करने या उसे धोखा देने की कोशिशों को खोजता है।
'download cradles' क्या हैं?
ये code के छोटे टुकड़े होते हैं जिनसे इंटरनेट से दूसरे खतरनाक programs डाउनलोड और चलाए जाते हैं, और इसके लिए disk पर file सेव नहीं करनी पड़ती।
जानकारी
लेखक का मूल विवरण
Hunt for malicious PowerShell activity by analyzing Script Block Logging (Event 4104), Module Logging (Event 4103), and process creation events. The analyst parses Windows Event Log EVTX files to detect obfuscated commands, AMSI bypass attempts, encoded payloads, credential dumping keywords, and suspicious download cradles. Activates for requests involving PowerShell threat hunting, script block a
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7948
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।