analyzing-malicious-vbscript-and-wsf
Analyzes malicious VBScript, WSF, and HTA scripts: parsing WSF/HTA containers,
v1.0.03 installs+3 in 7 days24 StarsApache-2.0synced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/analyzing-malicious-vbscript-and-wsfWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Package97e1674a…20d1921a
97e1674ab322…4b1120d1921a4 files · 3.2 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-malicious-vbscript-and-wsf@da7600a
On this page
When to Use
- You have a
.vbs,.wsf, or.htadelivered via phishing and need its real behavior. - You must decode
VBScript.Encode-obfuscated script (the#@~^marker) or string obfuscation. - You are identifying WScript.Shell/ActiveX-based dropper actions and IOCs.
Do not use wscript/cscript/mshta to run the script for analysis — that executes the
dropper. Decode and read it statically.
Prerequisites
- A static decoder (Python) or a script sandbox; the sample handled inertly in the lab.
Safety & Handling
- Never run the script with Windows Script Host (
wscript/cscript/mshta). - Defang recovered URLs; store dropped payloads password-protected.
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.wsfStep 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
- WSF/HTA containers are decomposed into their script bodies (all jobs/languages).
VBScript.Encodestreams are decoded to readable source.- Dropper actions and IOCs are recovered without executing the script.
Pitfalls
- Executing with
wscript/mshtato "see" behavior, infecting the host. - Missing one
<script>block in a multi-job WSF. - Overlooking the
#@~^encoded section and analyzing only the cleartext stub.
References
- See
references/api-reference.mdfor the WSF/VBScript decoder. - Windows Script Host docs and the Script Encoder format (linked in frontmatter).
Files in this version
references/11.3 KB
- api-reference.md1.3 KB
scripts/12.6 KB
- analyst.py2.6 KB
- LICENSE340 B
- SKILL.md3.0 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- MediumFile · Executable script shipped with the skillscripts/analyst.py
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v1.0.0 | Nov 13, 2026 | da7600a | 97e1674a | Signed | – |
More from meltedinhex
All from this publisher- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
More in Linux, cloud and containers
See the category- detecting-aws-credential-exposure-with-trufflehogmukul975/detecting-aws-credential-exposure-with-trufflehog5
- cloud-gcpnoorqureshi/cloud-gcp4
- container-image-hardeningsecurityskills/container-image-hardening3
- performing-cloud-incident-containment-proceduresmukul975/performing-cloud-incident-containment-procedures3
- implementing-taxii-server-with-opentaxiimukul975/implementing-taxii-server-with-opentaxii3
- detecting-cryptomining-in-cloudmukul975/detecting-cryptomining-in-cloud3
Ask anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login