Analyzing malicious vbscript and wsf

From meltedinhex/analyst-ai-pack · View interactive version

Analyzing malicious vbscript and wsf is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Analyzes malicious VBScript, WSF, and HTA scripts: parsing WSF/HTA containers, decoding VBScript.Encode (#@~^) and string obfuscation, and identifying WScript.Shell/ActiveX abuse to recover dropper behavior. Activates for requests to analyze VBScript, decode a WSF/HTA, or investigate a Windows Scrip

How to use this skill

Skill file

Analyzing Malicious VBScript and WSF

When to Use

Do not use wscript/cscript/mshta to run the script for analysis — that executes the

dropper. Decode and read it statically.

Prerequisites

Safety & Handling

Workflow

Step 1: Parse the container

For WSF, parse the XML <job>/<script> elements (a WSF can bundle multiple languages). For HTA,

separate the HTML wrapper from the <script> body.

python scripts/analyst.py analyze sample.wsf

Step 2: Decode VBScript.Encode

If you see the #@~^ header, decode the Microsoft Script Encoder stream back to source.

Step 3: Unroll string obfuscation

Resolve Chr()/Asc() builds, string concatenation, and Replace()-based deobfuscators to

reveal commands and URLs.

Step 4: Identify dropper actions and IOCs

Find CreateObject("WScript.Shell"), Run/Exec, ADODB/MSXML download patterns, and PowerShell

hand-offs; recover URLs/paths, defang, and route payloads onward.

Validation

Pitfalls

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.