deobfuscating-javascript-malware

Deobfuscates malicious JavaScript by reversing encoding layers, eval chains, and control flow obfuscation.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill deobfuscating-javascript-malware
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deobfuscating-javascript-malware
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/malware-analysis/deobfuscating-javascript-malware
Command: npx skills add https://github.com/xalgord/xalgorix --skill deobfuscating-javascript-malware

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jsbeautifier.

What problem does it solve?

Obfuscated JavaScript in phishing pages, web skimmers, and dropper scripts hides malicious logic behind layers of encoding, eval chains, and anti-analysis traps, making it difficult for analysts to identify exfiltration endpoints and extract IOCs.

Core Features & Use Cases

  • Multi-Layer Decoding: Resolves hex, Unicode, Base64, and String.fromCharCode encoding plus string array rotation using Python decoder scripts and tools like de4js and CyberChef.
  • Safe Dynamic Analysis: Executes obfuscated code in a Node.js vm sandbox with hooked eval, document.write, fetch, and XHR sinks to capture runtime-built payloads without detonating malware.
  • Anti-Analysis Neutralization: Strips debugger traps, DevTools detection, and timing checks before stepping through code in Chrome DevTools.
  • Use Case: An analyst investigating a Magecart skimmer injected into a checkout page extracts the script, decodes three obfuscation layers, and identifies the payment-form selectors and exfiltration URL for incident response.

Quick Start

Deobfuscate the obfuscated JavaScript extracted from this phishing page and identify its exfiltration endpoint and IOCs.

Frequently Asked Questions about deobfuscating-javascript-malware

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deobfuscate malicious JavaScript safely?

Extract the script without executing it, beautify it with js-beautify, then decode string layers using Python scripts or CyberChef. For runtime-built payloads, run the code in a Node.js vm sandbox that hooks eval, document.write, and network calls instead of executing them.

What tools are used for JavaScript malware deobfuscation?

Common tools include CyberChef for encoding transformations, de4js and JStillery for automated deobfuscation of obfuscator.io output, Node.js vm module for sandboxed execution, and Chrome DevTools for stepping through code with breakpoints.

Why does static deobfuscation miss parts of the malicious payload?

Static decoders cannot resolve strings assembled at runtime, such as String.fromCharCode loops feeding eval or array rotation computed from page state. Skimmers may also fetch second-stage logic from external URLs, which only appears when network calls are captured in a sandbox.

How do I handle anti-debugging traps in obfuscated scripts?

Neutralize debugger statements, DevTools-size detection, and performance.now timing checks before dynamic analysis. Stub these checks or override the functions so the evasion logic does not terminate execution or redirect the analysis session.

When should I not use malware deobfuscation techniques?

Do not use them on merely minified production code such as webpack or Terser output, which only needs a standard beautifier. Judge legitimacy by revealed behavior and network destinations, since licensed packers like JScrambler also look heavily obfuscated.