Logotipo de Reversing Obfuscated Javascript

Reversing Obfuscated Javascript

Comunidad
trilwu
reversing-obfuscated-javascript

Aplica ingeniería inversa a JavaScript de navegador/Node minificado, empaquetado y ofuscado: desempaqueta los fragmentos de webpack, recupera el código fuente a partir de sourcemaps, deshace la ofuscación de arrays de cadenas y del flujo de control de obfuscator.io con webcrack/synchrony/restringer y localiza rutinas de firma o criptografía en un paquete activo mediante Chrome DevTools. Úsalo cuando una página incluya un paquete minificado enorme, el código esté lleno de identificadores hexadecimales _0x y un array de cadenas rotado, haya un archivo .js.map accesible o necesites encontrar dónde se calcula la firma de una petición o un token.

Add to TypingMind

Descripción general

Editortrilwu
Repositoriosecskills
Nombre de la habilidadreversing-obfuscated-javascript
Estrellas
144
Forks
15
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por trilwu en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Reversing Obfuscated Javascript en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-obfuscated-javascript
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/reversing-obfuscated-javascript .claude/skills/reversing-obfuscated-javascript
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Reversing Obfuscated Javascript en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Reversing Obfuscated Javascript automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Reversing Obfuscated Javascript no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Reversing Obfuscated JavaScript

Client-side JavaScript ships the whole program to the reader — there is no stripped binary here, only code deliberately made unreadable. That changes the job: you are almost never recovering missing information, you are undoing a transformation. Identify the transformation first, reverse it with the tool built for it, and fall back to hand-written AST passes only for the custom layer no off-the-shelf tool knows.

When to Use

  • A page or extension ships a large minified/bundled .js you need to read
  • Code is full of _0x1234 identifiers, a big string array, and a rotation IIFE at the top — the obfuscator.io signature
  • A .js.map sourcemap is reachable, or webpack left //# sourceMappingURL
  • You must locate where a request signature, HMAC, token, or crypto key is computed inside a running bundle
  • Reproducing a client-side algorithm (an anti-bot signal, a licence check, a paywall gate) from the shipped code

When NOT to Use

  • React Native / Hermes mobile bundles (index.android.bundle, main.jsbundle, Hermes magic bytes) — use reversing-react-native-apps.
  • A custom bytecode VM or virtualized-JS obfuscator where control flow is interpreted, not just flattened — that is devirtualization; use unpacking-protected-binaries for the VM-lifting approach.
  • Malicious JS in a compromised site or npm package where the goal is IOCs and behaviour, not readability — use hunting-web-backdoors for planted web payloads and auditing-supply-chain for a malicious package.
  • Testing the web app itself (the endpoints the JS calls, XSS, auth) — use testing-web-applications; come back here only to recover a client-side algorithm it needs.
  • WASM modules loaded by the page — that is analyzing-binaries territory.

Identify the Layer Before Touching a Tool

Running the wrong deobfuscator produces plausible garbage. Read the first few hundred bytes and classify:

What you seeTransformationReverse it with
Short names, no whitespace, readable stringsMinification onlyAn unminifier / prettier + rename
webpackChunk, a module map {123: function(e,t,n){…}}Webpack/Rollup bundlingUnbundle to per-module files
//# sourceMappingURL=… or a reachable .mapNothing — the source is right thereSourcemap recovery
_0x hex names + one big string array + a rotation IIFEobfuscator.io string-arraywebcrack / synchrony / restringer
Nested ternaries, while(true){switch(_0x..)} dispatcherControl-flow flatteningAST pass to relink the switch
debugger in a setInterval, self-defending functionAnti-debug / self-defenseStrip the guard before other passes

Most real bundles are layered: webpack on the outside, obfuscator.io on a few modules, a hand-rolled string cipher on the one function that matters. Peel outermost first.

Sourcemaps: Try This First, Always

A reachable sourcemap ends the job before it starts — it contains the original, pre-transform source. Check for it every time, because a large fraction of "obfuscated" production bundles ship or leak one:

  • The //# sourceMappingURL= comment at the bundle's end, and the sibling .js.map even when the comment was stripped (try <bundle>.map).
  • Webpack dev artifacts and source in webpack:// paths inside the map.
  • Recover files with a sourcemap consumer — unwebpack-sourcemap or a short source-map script walks sourcesContent back to a directory tree.

Treat a leaked production sourcemap as a finding in its own right when you are assessing the app, not just a convenience.

Unbundling and Deobfuscation

webcrack is the first tool for a bundle, because it does three of the layers at once: unminify, unpack webpack/browserify into per-module files, and undo obfuscator.io string-array and control-flow obfuscation. Run it, then read the module tree it produces rather than the single blob.

For a bundle that is only obfuscator.io, a dedicated deobfuscator is often cleaner: synchrony or restringer both resolve the string array, reverse the rotation, inline the decoder calls, and flatten the trivial control flow. Compare their output — they fail on different edge cases.

When no tool fully handles the custom layer, write an AST pass with Babel: parse to an AST, @babel/traverse to find the pattern (a specific decoder call, a constant-folded expression, the flattening dispatcher), transform the nodes, and regenerate. This is the durable skill — obfuscators change, but string-array decoding, constant folding, and dead-branch elimination are the same AST operations every time. Prototype the matcher in AST Explorer against the real code before scripting it.

Two failure modes to expect:

  • A deobfuscator that runs the code to "evaluate" the string decoder can execute a payload. For untrusted or malicious bundles, do the string resolution statically or in an isolated sandbox — never eval an unknown bundle on your host to read it.
  • Self-defending / debug-protection re-obfuscates or spins a debugger loop when tampered with. Strip the guard function first (delete the node, or override setInterval) or every downstream pass fights it.

Finding a Routine in a Live Bundle

When static reading is slow — a signing function buried in a megabyte of modules — drive the running page with Chrome DevTools instead:

  • Break on the behaviour, not the code. XHR/fetch breakpoints stop when the signed request fires; the call stack then walks straight back through the signing function. DOM and event-listener breakpoints do the same for UI-triggered logic.
  • Pretty-print in the Sources panel ({}) makes a minified function steppable without any offline work.
  • Hook property access from the console — Object.defineProperty or a Proxy on the object whose method computes the value logs every call and argument with a stack trace, so you see inputs and outputs without reading the math.
  • Override the file with a local, prettified, console.log-instrumented copy (DevTools Local Overrides) to watch the real values flow at runtime.

Runtime observation and static reading are complementary: DevTools tells you which function matters; the AST work tells you what it computes so you can reproduce it offline.

Scope and Authorization

Reading and deobfuscating a bundle you lawfully retrieved is analysis. Two edges need care. Reproducing and replaying a request-signing routine against the origin — the usual reason to reverse an anti-bot signal — acts against that service and needs the same authorization as any other testing; keep it to systems you are permitted to test, and see testing-web-applications. And a sourcemap or bundle pulled from a third-party site is that party's code: recovering it for a security assessment you are engaged to do is fine, lifting a proprietary algorithm for reuse is a different matter.

Rationalizations to Reject

  • "It's obfuscated, so it's slow manual work." Classify first — a reachable sourcemap or a clean webcrack run turns hours into minutes. Hand-reading is the last resort, not the first move.
  • "webcrack's output has a weird spot, so it failed." Layered obfuscation means one tool clears the outer layers and leaves the custom inner one. That residue is the interesting function; switch to an AST pass on it, don't restart.
  • "I'll just eval the string-decoder to get the plaintext." On an untrusted bundle that runs attacker code on your host. Resolve strings statically or sandboxed.
  • "The variable names are gone, so the logic is gone." Minification and obfuscation rename and reshape; they do not delete. Unlike a stripped native binary, the full program is present — you are undoing a transform, not reconstructing lost information.
  • "DevTools is for debugging, not reversing." A fetch breakpoint plus a property hook locates a signing routine faster than reading the bundle, and gives you live inputs and outputs for free.

References

  • reversing-react-native-apps — Hermes/RN mobile JS bundles
  • unpacking-protected-binaries — VM-based / virtualized obfuscation
  • hunting-web-backdoors — malicious planted web JS
  • testing-web-applications — testing the endpoints a recovered algorithm calls
  • reviewing-cryptography — once a client-side crypto/signing routine is recovered

Preguntas frecuentes

¿Qué hace la habilidad de IA Reversing Obfuscated Javascript?

Aplica ingeniería inversa a JavaScript de navegador/Node minificado, empaquetado y ofuscado: desempaqueta los fragmentos de webpack, recupera el código fuente a partir de sourcemaps, deshace la ofuscación de arrays de cadenas y del flujo de control de obfuscator.io con webcrack/synchrony/restringer y localiza rutinas de firma o criptografía en un paquete activo mediante Chrome DevTools. Úsalo cuando una página incluya un paquete minificado enorme, el código esté lleno de identificadores hexadecimales _0x y un array de cadenas rotado, haya un archivo .js.map accesible o necesites encontrar d...

¿Por qué usar Reversing Obfuscated Javascript en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Reversing Obfuscated Javascript está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Reversing Obfuscated Javascript en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-obfuscated-javascript. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Reversing Obfuscated Javascript?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Reversing Obfuscated Javascript?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Reversing Obfuscated Javascript con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Reversing Obfuscated Javascript?

Sí. trilwu la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇