compiler and obfuscator for frida scripts (v13-17). packs js into ast-obfuscated byte arrays with rc4 encryption and magic signature checks.
git clone https://github.com/krkshs/libscompile.git
cd libscompile
npm installnode realese/cli.js script.jsoutputs script.obf.js and a session key.
if the key is stripped from the build (e.g. main branch), pass it to the frida environment before eval:
import frida
with open("script.obf.js", "r") as f:
code = f.read()
payload = f"var libskey = 'your_key_here';\n" + code
session = frida.attach("target")
session.create_script(payload).load()- AST Obfuscation: Native code transformation (introduced in 0.1.3(2))
javascript-obfuscatorbackend- Variables, strings, and control flow dynamically encrypted
- fridahash: SHA256 of the original script
- byahash: SHA256 derived from the session key
- The obfuscation
seedis cryptographically tied to the session key - magic signature verification (
LIBSMETA_OK) - silent abort on decryption failure
- byte array compilation format
@krkshs