Javascript+deobfuscator+and+unpacker+portable Page
Paste this into DevTools to unpack a packer (P.A.C.K.E.R style):
eval("your_packed_string_here"); // Step 1: see if it unpacks
// Or for function(p,a,c,k,e,d) packs:
function unpack(str)
return eval("(" + str.split('\n')[0] + ")");
Better – use a bookmarklet:
javascript:(function()document.body.innerText=eval(prompt("Packed code?")))();
(Only for trusted code)
[Input JS] → [Static Preprocessor] → [Dynamic Unpacker] → [AST Normalizer] → [Clean JS]
↓ ↓ ↓
Pattern Matcher VM Sandbox Identifier Renamer
(string arrays, (isolated eval) (scope-aware)
dead code)
Portable tools do not require administrative privileges or system registry modifications. This allows "Bring Your Own Tool" (BYOT) capabilities in sensitive environments, enabling analysts to run software from USB drives or network shares without installation overhead.
Let’s walk through a real-world scenario. You have a suspicious script:
eval(function(p,a,c,k,e,r)e=String;if(!''.replace(/^/,String));while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p('1 2=\'3\';4.5(2)',6,6,'var|greeting|Hello|console|log'.split('|'),0,{}))
This is a classic packed script (the "Dean Edwards" packer). Here is how you unpack it portably: javascript+deobfuscator+and+unpacker+portable
Method A: Using De4js (Portable HTML)
Method B: Using UnPacker CLI (Standalone EXE)
Method C: Using CyberChef (Portable HTML) – For Nested Obfuscation
// save as unpack.js and run: node unpack.js obf.js
const fs = require('fs');
const vm = require('vm');
let code = fs.readFileSync(process.argv[2], 'utf8');
try {
let unpacked = vm.runInNewContext(code, {});
console.log(unpacked);
} catch(e) console.log(e);
Portable deobfuscators generally fall into three categories: Web-based (self-contained), CLI (Command Line Interface), and GUI (Graphical User Interface). Paste this into DevTools to unpack a packer (P
[1] Xu, W., et al. “You Are What You Obfuscate: Deobfuscating JavaScript via Abstract Interpretation.” ACM CCS, 2020.
[2] Fass, A., et al. “JStillery: Hybrid Static and Dynamic Analysis for JavaScript Malware.” RAID, 2018.
[3] Acorn AST Walker. https://github.com/acornjs/acorn
[4] Obfuscator.io – JavaScript obfuscator patterns. https://github.com/javascript-obfuscator/javascript-obfuscator [Input JS] → [Static Preprocessor] → [Dynamic Unpacker]
[5] VirusTotal JavaScript samples (anonymized subset). 2023.
Corresponding author: [Author Name], Independent Security Research.
While the online version is famous, the CLI version of JSNice is a statistical deobfuscator that renames variables and infers types. The portable build runs entirely from a command line without installation.