deobfuscating-malicious-javascript
Deobfuscates malicious JavaScript from droppers, web pages, and HTA/scriptlets:
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/deobfuscating-malicious-javascriptWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Packageb4d84a07…493a49f7
b4d84a078c8f…e98e493a49f74 files · 3.4 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/deobfuscating-malicious-javascript@da7600a
On this page
When to Use
- You have obfuscated JS (from a phishing page, HTA,
.jsdropper, or scriptlet) and need its real behavior. - You must recover hidden URLs, dropped commands, or a next-stage payload.
- You want to statically unroll common obfuscation rather than run untrusted code.
Do not use a real browser or node to execute the script for analysis — that runs the
malware. Use a sandboxed interpreter (box-js) or static transformation only.
Prerequisites
- A safe analysis approach: static decoding, or a JS malware sandbox (box-js) in the lab.
- Familiarity with common obfuscation: string arrays,
String.fromCharCode, hex/unicode escapes,eval/Functionchains, packers.
Safety & Handling
- Treat the script as live code; never execute it outside an isolated sandbox.
- Defang recovered URLs and store dropped payloads password-protected.
Workflow
Step 1: Normalize and de-pack
Pretty-print the source and identify the obfuscation style (array-shuffle, eval-packer, charcode). Decode static encodings first: hex/unicode escapes and base64 literals.
python scripts/analyst.py decode dropper.jsStep 2: Unroll string arrays and char-code builds
Reconstruct strings built from arrays/fromCharCode/concatenation to reveal API names, URLs, and
commands.
Step 3: Resolve eval/Function indirection — safely
Replace eval/new Function with logging (or a sandbox) so the constructed code is captured as
data, not executed, then recurse on the recovered layer.
Step 4: Extract behavior and IOCs
Identify the dropper actions (WScript.Shell, ActiveX, fetch/XHR), recover URLs and dropped paths, defang, and route payloads onward.
Validation
- Static encodings (hex/unicode/base64) are fully decoded.
- String-array/charcode constructions are unrolled to readable strings.
eval/Functionlayers are captured as data and recursed, with no untrusted execution.
Pitfalls
- Running the script to "see what it does" and infecting the analysis host.
- Stopping at one layer when the dropper nests several.
- Missing environment-keyed branches (only acts on certain dates/locales) during static review.
References
- See
references/api-reference.mdfor the static JS decoder. - ECMAScript spec and box-js (linked in frontmatter).
Files in this version
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.8 KB
- analyst.py2.8 KB
- LICENSE340 B
- SKILL.md3.2 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 | b4d84a07 | 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 Web and bug bounty
See the categoryAsk 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