Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proof of concept for extracting the magic strings needed to generate the mask and aa-boot

install dependencies

npm i

run script

node ani-extract.js PATH_TO_OBFUSCATED.js

find obfuscated js

look in the inspector network tab and search for the bootstrap call, then the file should be the second one in the stacktrace, i.e. the one after the one that calls window.fetch.

20260728_073226

in this case /all/mk/_app/immutable/chunks/DnMm_so9.js


Building standalone binaries

This project uses Node.js Single Executable Applications (SEA) to produce a standalone executable. The resulting binary does not require Node.js, npm, or node_modules to be installed on the target machine.

SEA binaries are platform-specific. Build separately for each target platform.

Requirements

  • Node.js 22.x
  • npm

Install dependencies:

npm install

Verify Node:

node --version

The Node version used to generate the SEA blob must match the Node executable being injected.

Build

First bundle the application:

npm run bundle

This should produce:

ani-extract-bundle.js

Generate the SEA blob:

node --experimental-sea-config sea-config.json

This produces:

sea-prep.blob

Copy the Node executable:

Linux/macOS

cp "$(command -v node)" ani-extract

Windows (PowerShell)

Copy-Item (Get-Command node).Source ani-extract.exe

Inject the blob:

Linux

npx postject ani-extract \
  NODE_SEA_BLOB \
  sea-prep.blob \
  --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2

macOS

npx postject ani-extract \
  NODE_SEA_BLOB \
  sea-prep.blob \
  --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2

Windows

npx postject ani-extract.exe `
  NODE_SEA_BLOB `
  sea-prep.blob `
  --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2

Test

Linux/macOS:

./ani-extract input.js

Windows:

.\ani-extract.exe input.js

The executable should behave the same as:

node ani-extract-bundle.js input.js

Output artifacts

The final executable is:

ani-extract

or:

ani-extract.exe

It can be distributed without:

  • Node.js
  • npm
  • babel
  • package installation
  • source code

About

extract magic strings from obfuscated js for ani-cli

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages