Skip to content
PROJECT / 03OPEN SOURCE

jsunveil.

jsunveil targets string-array obfuscation by structure rather than by sample. It extracts only the table and decoder, evaluates them inside a sealed Node.js sandbox, then uses Babel to inline recovered values and strip common decoys.

Node.jsBabelASTvm sandboxStatic analysisJavaScript

Architecture

Small boundaries. Explicit behavior.

01

Structural matching identifies stable obfuscation shapes.

02

A restricted evaluator reconstructs the plaintext string map.

03

Babel traversals replace literal decoder calls deterministically.

04

A final cleanup pass emits readable, formatted JavaScript.

Implementation

The important path, in code.

A representative excerpt showing the project's approach. The complete implementation and history remain available in the public repository.

src/deobfuscate.jsjavascript
const sandbox = {};vm.createContext(sandbox);vm.runInContext(decoderSource, sandbox, { timeout: 1000 });const strings = new Map();for (let i = 0; i < sandbox.__arr.length; i += 1) {  strings.set(i, sandbox.__decode(i));}return inlineDecoderCalls(ast, strings);

Capabilities

01

Locates randomized string tables and decoder functions

02

Executes only the minimum code inside an isolated VM

03

Inlines decoder calls through an AST transformation

04

Removes dead branches and common self-defending wrappers