A single obfuscated JavaScript sample unpacks into a matryoshka kill chain that pulls each stage from Ethereum and Binance Smart Chain calldata, with no hardcoded C2 until the final infostealer. This is the full reversal of strain 5-1757-du, step by step, with the methodology that recovered every layer without executing the malware on a host.
One minified blob, a wave marker, and no address to block.
The sample arrived as a single minified JavaScript file. Static review, no execution, was enough to place it. A global.o = '5-1757-du' wave marker, _$jsoPow / _$jsoIter global names, Fisher-Yates permutation string decoders, and Function-constructor staging. That fingerprint is the PolinRider / NullReceiver loader lineage: the DPRK "Contagious Interview" campaign that trojans developer config files (eslint, astro, next, postcss, vite, npm preinstall hooks) and re-writes its payload into the working tree so every commit from a compromised machine carries it.
What makes this strain harder to disrupt than its siblings is what it does not contain. There is no IP address, no domain, no URL anywhere in the loader. The next stage is addressed indirectly, through a transaction on a public blockchain. Blocking the C2 means understanding the pointer scheme, not grepping for a host, and the scheme turned out to encode two payloads in a single 20-byte address.
Eight unpacking layers, each hiding the next.
Every layer is a permutation decoder or an lz-string blob wrapped in a Function constructor. The chain only stops when it reaches a 392-entry string table: the actual infostealer. The sections that follow walk through each layer, how it was decoded, and what it revealed.
Outer packer
Two permutation decoders, console-silencing IIFE, require/module global pollution. Never executed on the analyst host.
5d8e5e5b...Tva: inner loader
Own 75-entry table. Scans ETH mainnet for a sender tx, decodes its to address into a BSC block + tx index, fetches calldata.
Stage-2 (52.9 KB)
Bundles lz-string and four eval() calls. Environment-probes AMD / CJS / AngularJS. Anti-beautify trap.
57033b38...lz-string blob
UTF16-compressed blob -> 52-entry pipe-delimited table. Obfuscated lz-string broke under Node 20; bypassed with a clean 1.5.0 library.
52 entriesRecursive packer
Table entry 0x26 is the same packer again: IBZ decoder, Function-staging. Intercepted before its execution primitive runs.
3d771fe8...Stage-3 fetcher (Ovp)
42-entry table. Reads a second pointer from the same ETH to address: a second BSC dead-drop.
Stage-4 fetch
BSC block 128196593, tx index 54. Calldata XOR-decrypted. 87 KB recovered over read-only RPC.
dc7d92de...The implant
392-entry lz-string table = the NullReceiver C2 beacon, clipboard thief, app injector, and evasion engine. First hardcoded IP.
version 2601016Step 01: Two decoders, a silenced console, and a Function waiting to fire.
Outer packer | static structure
The outer packer is the only layer a victim's runtime ever sees directly. Reading it statically, before any sandbox work, told us exactly what would happen if it ran, and what to intercept to stop it. It decomposes into five parts.
First, a permutation string-table decoder _$_12bc (key 521156) produces a 16-entry table of console method names and the global aliases it is about to create. An IIFE immediately no-ops every console.* method, so the loader runs silent: a small but deliberate anti-analysis touch. Then it re-exposes the CommonJS primitives onto globals: require->global.r, module->global.m, __dirname->global.___dirname, __filename->global.___filename. That matters because the unpacked payload will call require() from a context where the token require never appears literally.
A second permutation decoder vRD (seed 2095711) then does the real work. It resolves vRD('doqsz...').substr(0,11) to the string "constructor", takes vRD.constructor, which is Function, and uses it to stage two encoded blobs:
The two large encoded blobs hold the actual inner loader source. They are decoded by the vRD permutation alone: pure string math, no network. The terminal tzN(8916); return 8939 pattern (a function called with one integer, then a different integer returned) is a family signature: it is the single point where execution happens, and therefore the single point to intercept.
Every layer below follows the same shape: a permutation decoder produces a string, a Function constructor stages it, and a final call executes it. The reversal strategy is the same at every layer too: intercept the constructor or replace the final call so the payload string is printed before anything runs.
Step 02: Intercept the Function constructor, never call tzN.
Sandbox decode | recovering S1 and Tva
To read the two blobs we ran a copy of the packer inside a throwaway container and intercepted the Function constructor so it printed its body argument and exited before any payload executed. The sandbox posture was fixed for every decode step in this analysis:
Two phases recovered both blobs. phase1.js intercepted Tcn to dump vRD(blob1) and exit, yielding S1: a pure string-decompression transformer (js-confuser "SfvString" style: dictionary token-reference expansion plus .<letter>->charcode escapes). It contained no require, no network, no eval, no spawn. Inert, confirmed.
phase2.js then replaced the dangerous tail so the inner payload string printed instead of executing:
This recovered Tva, 6646 bytes, the inner on-chain dead-drop loader. Its SHA-256 is f497c3482281001bb639932cad48efd254c257c7a516bf920e39f96900800b3f. Nothing in the outer packer ever touched the network or the filesystem; the only thing that ran was the vRD permutation and our intercepted Function staging.
Step 03: No IP. The address is a transaction on a public chain.
Tva deobfuscation | the dead-drop algorithm
Tva has its own permutation string table, _$_3fed (seed 984250). To read it safely, table_only.js ran only the decoder statement, pure shuffle and split, and printed all 75 entries. The decoded logic is a two-layer on-chain dead-drop with no hardcoded endpoint anywhere.
The loader embeds only a 32-character fragment of the sender's Ethereum address, 596dcc9fda875309ff85eba09cf5a97d, not the full 40-hex address. This is "pickaxe" evasion: the full address never appears in code, so a static string scan for a wallet turns up nothing. The full address is recovered only by querying the chain for transactions whose from contains that fragment.
| Constant | Value |
|---|---|
| Sender fragment | 596dcc9fda875309ff85eba09cf5a97d (32 of 40 hex) |
| XOR key (stage-2) | 8l%Sljl>J>U61O,n |
| ETH RPC | ethereum-rpc.publicnode.com, eth.drpc.org, eth-mainnet.public.blastapi.io, rpc.mevblocker.io |
| BSC RPC | bsc-dataseed.binance.org, bsc-rpc.publicnode.com |
| Calldata marker | ?.? (payload is the suffix) |
| Block align / offset | 256 / 5 |
| Anti-replay | 30s cooldown via global._p_t |
The retrieval algorithm, deobfuscated:
The block alignment (256, offset 5, exponential step search) is a fingerprinting choice: it lets the attacker publish a fresh pointer at a predictable cadence without the loader scanning every block. The pointer is stashed in global.ix: a detail that becomes critical at step 6, when a deeper layer reads a different slice of that same value.
The RPC endpoints are public, shared, high-volume services: binance, publicnode, drpc, blastapi, mevblocker. You cannot firewall them without breaking legitimate development. The carrier transactions are ordinary value transfers on Ethereum and BSC. The only stable, blockable indicator is the sender wallet itself, once recovered.
Step 04: Recovering the wallet, the pointer, and the 52 KB payload.
Live stage-2 retrieval
To pull what victims currently receive, fetch_stage2.js re-implemented the algorithm from step 3 with eval and spawn removed: only public JSON-RPC reads, hex/utf8 conversion, the ?.? split, the XOR, and console.log. It ran in a networked sandbox with the same read-only, cap-dropped, non-root posture.
Querying ETH mainnet for the sender's latest transaction recovered the full wallet: the 32-char fragment was the address prefix, and the last 8 hex (8c7691bb) completed it. The carrier transaction's to address decoded cleanly to a BSC block and tx index, and the BSC calldata XOR-decrypted to a 52.9 KB payload.
The stage-2 payload is itself a Function("MCWunkg", <body>) invoked with a crafted getter-object argument that probes the host environment before picking a code path:
The body bundles a copy of lz-string and fires four eval() calls on lz-decompressed embedded blobs. It also carries an anti-beautify trap: a new RegExp("\n") tested against the function's own source triggers a while(true) infinite loop if the code has been pretty-printed. That forces an analyst to run the verbatim minified form, which is exactly why the decode strategy runs the real Function on the original text rather than a reformatted copy.
Step 05: When the obfuscated library breaks, bypass it.
Decompressing the lz-string blobs
The four eval() calls all target strings produced from one lz-string-compressed blob. The relevant statements in the stage-2 body are:
The first attempt executed stage-2 verbatim through the real Function with global.eval overridden to capture the decompressed payloads. It failed immediately: TypeError: GhItx5U is not a function, thrown during the obfuscated lz-string library's own initialization. The js-confuser obfuscator had rewritten lz-string using generator functions (function*) combined with with statements and control-flow flattening; under Node 20 that combination breaks the library's self-setup before it ever decompresses anything.
Rather than fight the broken obfuscated lz-string, regenerate the table it would have produced with a clean, known-good lz-string 1.5.0. The blob is just a UTF-16 compressed string; decompressing it is pure math and does not require the malware's own library to run.
decompress_table.js extracted the Ft64Jz7 blob literal and decompressed it with a clean library mounted read-only. The extraction is careful about injection surface: the blob uses only \uXXXX and \xHH escapes with no embedded quotes or operators, so parsing it via new Function('return "' + blobText + '"')() evaluates a single string literal: no code execution.
The blob (23396 chars of escape text, 3977 UTF-16 code units) decompressed to an 8343-character, pipe-delimited, 52-entry string table. It held method and property names, the prefixes that stamp the wave marker and pointer onto a spawned child (global.i='...', ';global.ix='...'), and, critically, two recursive-packer payloads at entries 0x26 (3394 B) and 0x33 (3272 B).
One entry corrected an earlier reading. The table includes spawn, child_process, windowsHide, detached, and "node". Stage-2 does both: eval(payload) in-process and a fire-and-forget child_process.spawn('node', ['-e', script], {windowsHide:true, detached:true}).unref(). This strain is not eval-only; it plants a detached child that survives the parent.
Step 06: The packer wraps a packer, and a second pointer appears.
Recursive packer | decoding stage-3
Entry 0x26 is structurally identical to the outer packer: another permutation decoder (IBZ, seed 2007778) plus Function-constructor staging. The same interception technique applies: replace the final execution call with a print of the decoded payload string.
This recovered Ovp: 2901 bytes, SHA-256 5cf7e1ca5260734360adf3ce7bac7665e5e02026dd28e8d07519817d117d6009. Ovp is another on-chain dead-drop fetcher, with its own 42-entry table _$_8e5a (seed 2007778). Decoding that table revealed the decisive detail of the whole analysis.
| _$_8e5a idx | Value | Meaning |
|---|---|---|
| 0x0 | r | _require = global.r |
| 0x1 / 0x2 / 0x3 | -skipwarn / includes / argv | skip flag for self-launched children |
| 0x4 / 0x5 / 0x6 | _t_h / getTime / Date | anti-replay guard |
| 0x22 / 0x23 | bsc-dataseed.binance.org / bsc-rpc.publicnode.com | BSC RPC |
| 0x1a | ?.? | calldata marker |
| 0x28 | }aY<_o-)LNt([%_ | stage-4 XOR key |
| 0x29 | ix | pointer is global.ix |
The fetcher reads the pointer from global.ix, the value stage-2 stashed in step 4, but at a different slice: global.ix.substring(12,20) for the BSC block and .substring(20,22) for the tx index. Stage-1 read substring(2,10) / (10,12). The same 20-byte to address carries two independent pointers.
One Ethereum transaction, a single 20-byte to address, points at both the stage-2 and stage-4 payloads on BSC. Bytes [1-4]+[5] encode stage-2; bytes [6-9]+[10] encode stage-4. The attacker publishes one tx to readdress the entire chain.
The else-branch entry 0x33 is the platform variant: decoder AyS (seed 2578042), final layer Los (2689 B, SHA-256 6a200d3a0f1f0923ca6ca72e3a08a18892137953a7b742208f9ee760e5f88730). Same dead-drop pattern, different branch.
Step 07: The other half of the address, and an 87 KB payload.
Stage-4 retrieval | the second dead-drop
With the dual-pointer insight, fetch_stage4.js decoded the second half of the carrier to address and fetched the stage-4 payload from BSC over read-only RPC, XOR-decrypting with }aY<_o-)LNt([%_. The pointer math is the mirror of stage-2:
Stage-4 is again a Function("DnGRKq_", <body>) wrapping an lz-string library and a compressed string table: the same wrapper shape as stage-2. But this time the table does not resolve to another recursive packer. It resolves to the implant.
Step 08: Where the hardcoded C2 finally appears.
The implant | the 392-entry table
decompress_generic.js (a parameterized version of the step-5 technique) extracted stage-4's blob nL_bZsa (9927 chars of escape text, 1687 UTF-16 code units) and decompressed it to a 4395-character, pipe-delimited, 392-entry string table. For the first time in the chain, the entries are not method names or another packer. They are the full NullReceiver C2 implant: a socket.io beacon, a clipboard thief, an app injector, and a large evasion engine.
http://154.91.0.20:443 and http://166.0.106.182: constructed as "http://" + ip + ":443". Every prior layer addressed its next stage indirectly through the blockchain. The implant is the only place an address lives in code, and it is the only thing that rotates with a new carrier transaction.
The 392 entries map to a complete remote-access toolkit. The beacon is a socket.io emit("identify", ...) carrying client, clientUuid, clientId, processId, osType, and osInfo. The command queue accepts ss_eval: and ss_eval64: (arbitrary JavaScript, plain or base64), ss_inz: / ss_inzx: (inject / uninject a cli.js loader), ss_upf / ss_upd (upload file / directory to /u/f), ss_cb (clipboard), and ss_exit. Clipboard reads are cross-platform: Get-Clipboard on Windows, pbpaste on macOS, xclip / xsel on Linux.
App injection targets six developer tools (Cursor, VS Code, Antigravity, Discord, GitHub Desktop, and npm) writing a cli.js loader into each local install so the implant re-runs whenever the app starts. The implant self-installs its dependencies with npm install socket.io-client axios -skipwarn and cleans up with npm cache clean --force -skipwarn; the -skipwarn flag matches the loader's own argv check so self-spawned npm children do not re-trigger the chain.
The evasion engine is the largest part of the table. It bails before beaconing if it detects CI/CD and PaaS (Heroku, Cloud Run, Vercel, Lambda, Azure App Service, Fly.io, Render, Railway, Netlify), cloud and VM vendors (EC2, Google, VMware, VirtualBox, Hyper-V, DigitalOcean, OpenStack, Parallels, QEMU, KVM, Xen, bhyve), containers (/.dockerenv, /run/.containerenv, /proc/1/cgroup, docker, containerd, kubepods, lxc), firmware DMI (/sys/class/dmi/id/sys_vendor), macOS sysctl hw.model, and a set of analyst/runner hostnames (github-runner, buildbot, sandbox-pool-, buildkitsandbox, cloudchamber, nijin-lab). The version marker is 2601016; environment markers EV-CHQG3L42MMQ and EV-4A6OE6M0E2D; the bot label jsbot.
One Ethereum address points at two Binance Smart Chain payloads.
The attacker publishes an ETH transaction from a fixed wallet. Its 20-byte to address is the linchpin: the first half encodes the stage-2 pointer, the second half encodes the stage-4 pointer. Both payloads live as BSC transaction calldata, split from a ?.? marker and XOR-decrypted with a per-stage key.
Sender 0x596dcc9fda875309ff85eba09cf5a97d8c7691bb -> 0x0784a79e...3e08100 at block 26225669. The to address is the dual pointer.
to[2:10]=0x0784a79e->126134174, to[10:12]=0x52->idx 82. BSC tx 0x9f8d2c3b.... XOR key 8l%Sljl>J>U61O,n -> 52.9 KB loader.
to[12:20]=0x07a41ff1->128196593, to[20:22]=0x36->idx 54. BSC tx 0x9cbee4f4.... XOR key }aY<_o-)LNt([%_ -> 87 KB implant.
Command & control
First hardcoded endpoints in the strain, inside the final implant only.
HTTP endpoints
socket.io beacon, patch/injection, and file upload.
Clipboard theft
Cross-platform clipboard reads exfiltrated over the socket.
App injection
ss_inz: writes a cli.js loader into local app installs.
Evasion
Bails on CI, cloud, container, and VM fingerprints before beaconing.
Remote commands
Queued C2 to implant instruction set.
From one minified blob to a live infostealer.
global.o='5-1757-du' | vRD permutation + Function-staging (intercepted, never run) | 5d8e5e5b...f497c348... (6646 B)8l%Sljl>J>U61O,n, tx 0x9f8d2c3b... | 57033b38... (52900 B)to bytes [6-9]+[10] | 5cf7e1ca...0x9cbee4f4..., XOR }aY<_o-)LNt([%_ | dc7d92de... (87207 B)154.91.0.20:443 + 166.0.106.182 | version 2601016Reversed without a single execution on the host.
Every unpacking step ran inside a throwaway Docker sandbox: node:20-alpine with --network none --read-only --cap-drop ALL --security-opt no-new-privileges --user 1000:1000 and scripts mounted read-only. The two live retrieves used a networked sandbox, but the retriever scripts contained no eval and no spawn: only public JSON-RPC reads, hex/utf8 conversion, the ?.? split, the XOR, and stdout.
The final infostealer was recovered as plaintext and never evaluated. Its lz-string table was decompressed with a clean library, not the malware's own, which threw GhItx5U is not a function under Node 20 because js-confuser's generator-plus-with flattening breaks the library's own initialization. The anti-beautify trap was sidestepped by running the verbatim minified source through the real Function and intercepting the constructor so the payload string printed before any execution primitive ran.
Three principles held throughout: intercept the constructor or replace the final call, never the payload; run only permutation decoders and clean string math, never the malware's own obfuscated libraries; and treat every recovered string as data to print, never as code to run.
The reversal in figures.
unpacking layers from outer packer to live implant
entries in the final implant's string table
on-chain carrier transactions: one ETH, two BSC
hardcoded C2 endpoints, only in the final layer
developer apps targeted for cli.js injection
malware executions on the analyst host
kilobytes of the final implant, fetched live from BSC
ETH sender wallet funding the whole dead-drop
What to block, watch, and report.
The blockchain indicators are stable and publicly queryable; the C2 IPs are live in the current implant and will rotate with the next carrier transaction.
Where this report goes.
The strain marker 5-1757-du is undocumented in public references as of the reversal date. These are the reporting targets, in priority order.
This is the kind of loader that doesn't break on a blocklist: it routes through public infrastructure that can't be taken down. If you want the full artifact set or a walk-through of the decode harness, it's available on request.
No malware was executed on an analyst host during this analysis. All unpacking ran in isolated, read-only Docker sandboxes; live retrieval used read-only public RPC with eval and spawn stripped from the retriever.
