Logo di Reversing Obfuscated Javascript

Reversing Obfuscated Javascript

Community
trilwu
reversing-obfuscated-javascript

Esegui reverse engineering di JavaScript per browser/Node minificato, raggruppato e offuscato: estrai i chunk webpack, recupera il sorgente dalle sourcemap, annulla l’offuscamento di string-array e flusso di controllo di obfuscator.io con webcrack/synchrony/restringer e individua una routine di firma o crittografia in un bundle attivo tramite Chrome DevTools. Usala quando una pagina distribuisce un bundle minificato enorme, il codice è pieno di identificatori esadecimali _0x e di un array di stringhe ruotato, è disponibile un file .js.map oppure devi trovare dove viene calcolata la firma o il token di una richiesta.

Add to TypingMind

Panoramica

Pubblicato datrilwu
Repositorysecskills
Nome della skillreversing-obfuscated-javascript
Stelle
144
Fork
15
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da trilwu su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Reversing Obfuscated Javascript in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-obfuscated-javascript
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Reversing Obfuscated Javascript in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Reversing Obfuscated Javascript non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Reversing Obfuscated Javascript non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello 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

Domande frequenti

Cosa fa la skill IA Reversing Obfuscated Javascript?

Esegui reverse engineering di JavaScript per browser/Node minificato, raggruppato e offuscato: estrai i chunk webpack, recupera il sorgente dalle sourcemap, annulla l’offuscamento di string-array e flusso di controllo di obfuscator.io con webcrack/synchrony/restringer e individua una routine di firma o crittografia in un bundle attivo tramite Chrome DevTools. Usala quando una pagina distribuisce un bundle minificato enorme, il codice è pieno di identificatori esadecimali _0x e di un array di stringhe ruotato, è disponibile un file .js.map oppure devi trovare dove viene calcolata la firma o...

Perché usare Reversing Obfuscated Javascript su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Reversing Obfuscated Javascript è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Reversing Obfuscated Javascript in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-obfuscated-javascript. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Reversing Obfuscated Javascript?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Reversing Obfuscated Javascript?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Reversing Obfuscated Javascript: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Reversing Obfuscated Javascript è gratuita?

Sì. È pubblicata su GitHub da trilwu con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇