Skip to content
1d438e1c3f08d43e41b25bb77aa3f0eb

1d438e1c3f08d43e41b25bb77aa3f0eb

gist.github.com • November 26, 2026

Part of the incident index:

Part of the incident index:

Analysis of an obfuscated payload that was force-pushed into two pull requests on asyncapi/generator , then force-pushed away 30-40 minutes later.

Full write-up: asyncapi/generator#2278 ( )

Hashes, CI data, branch_structure.json : asyncapi/generator#2278 ( )

Everything here was decoded statically. No JavaScript from the payload was executed.

Both commits reuse the author date and message of a clean, signed commit from the same PR. They are unsigned and use a different committer name.

api.js : one line of obfuscated JavaScript, preceded by hundreds of tab characters so it looks empty in a diff view.

Root package.json : "build": "node api.js && turbo build" and "dev": "node api.js && turbo dev" .

14 jest.config.js files: a lighter-obfuscated copy of the same payload, appended after }; on the same line, again behind tabs. It runs whenever Jest loads the config.

Get the raw files from the malicious commit, for example through the GitHub contents API, and keep them as .txt so nothing executes them. Then:

Both paths produce the same 16,674-byte loader. The only difference is a variant tag in an outer global ( 8-&& for api.js , 8-8113 for apps/generator/jest.config.js ).

Layer 1: obfuscator plus shuffle

api.js uses an obfuscator.io-style string table: 23 hex strings, each byte XORed with 0x46 , with the array rotated until a checksum matches. The decoder skips the checksum and picks the rotation where known method names land on their indexes.

A custom function y7(s, t, b, c, d, e, f) shuffles the characters of a string with a deterministic swap sequence. The decoder reimplements it.

The outer layer sets global.r = require , global.m = module and a variant tag in global['!'] . It then reaches the Function constructor through s8['constructor'] , builds the layer 2 unpacker with it, and runs the result.

The jest.config.js variant uses \u escapes and XOR-folded number literals instead of the string table, but the same y7 and the same packed payload.

Layer 2: dictionary string packer

The packed text is split on spaces. Two-character or three-character tokens index back into the word list, and a final pass maps .a to .z onto specific characters. 2_unpack_stage2.py reimplements this.

It queries public Ethereum RPC endpoints ( 1rpc.io/eth , eth.drpc.org , ethereum-rpc.publicnode.com , eth-mainnet.public.blastapi.io , plus $ETH_RPC_URL if set), with eth.blockscout.com/api as a fallback. It looks for the most recent transaction sent from 0x1eef0849eda15d87f64e51c73c8442cf3c8bcef3 .

It reads the first 8 bytes of that transaction's to field as two IPv4 addresses, which are the server addresses. The attacker can move servers by sending a new transaction ("EtherHiding").

It fetches http:// :443/0x/cls , which is plain HTTP on port 443. It XOR-decrypts the response with q4FZkxX{!h,Sr3=@ , or falls back to the X-Payload-B64 response header.

It runs that code with eval in the current process, and also as a detached node -e process ( detached: true , stdio: 'ignore' , windowsHide: true ) that outlives the build or test run.

It fetches http:// :443/0x/ls (key y-p_>d$0B&@^1aQk ) and runs it as a detached process only.

All requests send a Chrome 131 on Windows User-Agent and a Sec-V: A header.

What the downloaded stages do is unknown. They are served at runtime and the servers were not contacted.

Indicators of compromise

Ethereum address: 0x1eef0849eda15d87f64e51c73c8442cf3c8bcef3

HTTP paths: /0x/cls , /0x/ls on TCP 443, plain HTTP

XOR keys: q4FZkxX{!h,Sr3=@ , y-p_>d$0B&@^1aQk

HTTP headers: Sec-V: A8-&& , Sec-V: A8-8113 , X-Payload-B64

Runtime globals: global['!'] , global['_V'] , global['_H'] , global['_H2'] , global['_t_s'] , global['_t_u'] , global.r , global.m

Process: node -e "global['_V']=...;global['r']=require;..."

api.js SHA-256: b02a81974810532fff8f76903e09b20431857bfaff00f2473421f4a4fb8162b5 (identical in both commits)

Malicious package.json SHA-256: 8d463b9511a97b3f73f00acdc2b5ea7ffea64546c93c6898fb70e97f4737b391

Identifiers that survive in obfuscated code: function names y7 , s8 , rv$mIJCKYxZ

branch_structure.json

Both malicious commits also add this file at the repo root. It is not part of the payload. It records local branches and their parents, and lists origin as a branch. That looks like a state file left by a tool that walks local branches and rewrites them. This fits the theory that malware on the contributor's machine injected and pushed these commits, rather than the contributor writing them by hand. If you find this file in a repo you didn't add it to, check the same commit for the payload.

Run these in a clone of the affected repo. They only read and change nothing:

No output means you're not affected. A running process means the machine is compromised: note the PID and command line, then rotate npm, GitHub, SSH and cloud credentials from a clean machine.

To look for the same payload in other repos, for an api.js with the hash above, node api.js && in package.json scripts, jest.config.js files with a very long first line, or a root branch_structure.json .