A heavily obfuscated PowerShell script was found running on an endpoint. Decode it, understand the attack chain, extract IOCs, and build detections that would catch it next time.
This advanced DFIR lab gives you a real obfuscated PowerShell sample (safely defanged) recovered from a compromised endpoint. You'll use static and dynamic analysis techniques to decode the payload, map the attack to MITRE ATT&CK, extract network IOCs, and create both Splunk detection rules and YARA signatures.
The sample uses multiple layers of obfuscation including Base64 encoding, string concatenation, and reflection โ techniques commonly used by commodity malware and APT actors.
The following is the obfuscated PowerShell command recovered from endpoint memory:
Your first task: decode this and identify what it's doing before running any further analysis.
Step 1 โ Initial Triage: The command-line flags are already telling: -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass. This is a classic malware invocation pattern (MITRE T1059.001).
Step 2 โ Decode Base64: Extract the -Enc value and decode in CyberChef using "From Base64" then "Decode text" (UTF-16LE). You'll get a WebClient download cradle.
Step 3 โ Extract IOCs: The decoded script downloads a second stage from a C2 URL. Extract: domain, URI path, User-Agent string. Submit domain to VirusTotal (in the lab you get a pre-canned VT report).
Step 4 โ Splunk Detection Rule:
Step 5 โ MITRE Mapping: T1059.001 (PowerShell), T1027 (Obfuscated Files), T1105 (Ingress Tool Transfer), T1071.001 (Web Protocols for C2).