Skip to content

meltedinhex/analyst-ai-pack / skills/analyzing-malicious-vbscript-and-wsf

analyzing-malicious-vbscript-and-wsf

Verified

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 Script Host dropper.

FileKindSize
LICENSEother340 B
SKILL.mdskill md3.0 KB
references/api-reference.mdmarkdown1.3 KB
scripts/analyst.pyscript2.6 KB

references/api-reference.md

View on GitHub
# API Reference: Analyzing Malicious VBScript and WSF

## Overview

`scripts/analyst.py` extracts `<script>` bodies from WSF/HTA containers, detects and isolates
Microsoft Script Encoder (`#@~^`) blocks, and flags suspicious WScript/ActiveX dropper APIs. It
parses text only and never invokes Windows Script Host. Full Script Encoder decoding is delegated
to a dedicated decoder; the script isolates encoded blocks and confirms their presence.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | regex, JSON, file IO |

## Core functions

### `analyze(text)`
Returns script-block counts, encoded-block presence, suspicious API hits, and defanged URLs.

### `_isolate_script_encoder(encoded)`
Strips the `#@~^`/`^#~@` markers and framing to isolate the encoded body for follow-on decoding.

## Usage

```bash
python scripts/analyst.py analyze sample.wsf
```

## Sources

- Microsoft Windows Script Host documentation —
  https://learn.microsoft.com/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/
- VBScript.Encode / Script Encoder format (`#@~^` marker) analysis —
  https://gist.github.com/bcse/1834878
- WScript.Shell / ADODB.Stream / MSXML2.XMLHTTP dropper patterns, established script-analysis
  practice
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall