JavaScript obfuscation: From party trick to phishing kit
Talos Intelligence provides a practical taxonomy of JavaScript obfuscation techniques used in phishing kits, malware loaders, and compromised websites, distinguishing between minification (identifier renaming), packing (runtime decompression via eval), and encoding schemes. The post catalogs static hiding techniques—string encoding (hex, Base64, character-code reconstruction), lookup tables with _0x prefixed identifiers, and dynamic property access—along with runtime code generation and anti-analysis tricks designed to evade simple string searches and confuse automated tools. Key defensive insight: beautification alone (via Prettier/Biome) restores readability but not original names or intent; effective deobfuscation requires identifying the unpacking sink (eval), capturing runtime payloads, and iteratively decoding layers. The research emphasizes safe analysis practices—work on copies, use isolated AI snippets for small blocks, and focus on behavioral questions (what does it read/write/connect to) rather than signature-matching.