Deobfuscation Reference
PowerShell, VBA, and JavaScript malware deobfuscation — safely, without executing. Common patterns, step-by-step decode workflows, and tool references.
💻 PowerShell Deobfuscation
PowerShell is the #1 malware delivery mechanism for Indian organisations. Most phishing-delivered malware uses a PowerShell stager. These are the 7 most common obfuscation patterns and how to decode each.
PowerShell malicious flag reference
| Flag / Cmdlet | Meaning | Severity |
|---|---|---|
| -EncodedCommand / -enc | Base64-encoded command to hide content | High |
| -ExecutionPolicy Bypass | Override execution policy restrictions | High |
| -WindowStyle Hidden / -W Hidden | Run without visible window | High |
| -NonInteractive / -NonI | Suppress user prompts | Medium |
| Invoke-Expression / IEX | Execute string as code — classic stager | High |
| DownloadString / DownloadFile | Fetch payload from remote server | High |
| Net.WebClient / WebRequest | HTTP/HTTPS request to C2 | High |
| [Convert]::FromBase64String | Base64 decode in-memory payload | High |
| Add-Type / [Reflection.Assembly] | Load .NET assembly — potentially malicious DLL | High |
| VirtualAlloc / WriteProcessMemory | Shellcode injection into memory | Critical |
📄 VBA Macro Deobfuscation
VBA macros in .doc/.xls/.xlsm files are the most common malware delivery mechanism in Indian phishing campaigns. Most use simple obfuscation that is easy to decode without executing.
Step 1 — Extract VBA without opening the file
ViperMonkey — automated VBA emulation
🌐 JavaScript / JScript Deobfuscation
Malicious JavaScript arrives as .js files (Windows Script Host), .hta files, or embedded in HTML phishing pages. JScript on Windows executes natively via wscript.exe or cscript.exe.