Reverse engineering workflow for non-native cross-platform mobile engines: Unity IL2CPP (libil2cpp.so + global-metadata.dat), React Native Hermes bytecode (.hbc), and Hybrid/Mini-Program bundles (wxapkg / UniApp) during authorized security audits. Use when Java/ObjC layers contain only thin bridge stubs and business logic resides in compiled game/JS/WASM engines.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Il2cpp Hermes Miniapp?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/muyang520-il2cpp-hermes-miniapp)
---
name: il2cpp-hermes-miniapp
description: >-
Reverse engineering workflow for non-native cross-platform mobile engines: Unity IL2CPP (libil2cpp.so + global-metadata.dat),
React Native Hermes bytecode (.hbc), and Hybrid/Mini-Program bundles (wxapkg / UniApp) during authorized security audits.
Use when Java/ObjC layers contain only thin bridge stubs and business logic resides in compiled game/JS/WASM engines.
---
# Cross-Platform Mobile Engine Reverse Engineering SOP (IL2CPP · Hermes · MiniApp)
Modern mobile apps frequently keep zero business/crypto logic in Java or Objective-C. Run `apk_packer_detector.py` or `macho_ipa_triage.py` first; when any of the engines below appear, switch immediately to its dedicated toolchain.
---
## Track 1: Unity IL2CPP (`libil2cpp.so` / `UnityFramework` + `global-metadata.dat`)
Unity IL2CPP compiles C# assemblies into native ARM64 C++ (`libil2cpp.so` on Android, `UnityFramework` on iOS) while storing all class, method, field, and string literals inside `global-metadata.dat`.
### 1. Metadata Integrity & Encryption Gate (Check First!)
Inspect the first 8 bytes of `assets/bin/Data/Managed/Metadata/global-metadata.dat` (or `Data/Managed/Metadata/global-metadata.dat` on iOS):
- **Standard Unencrypted Magic**: `AF 1B B1 FA` (`0xFAB11BAF` little-endian) followed by version integer (`24`–`31`).
- -> Run **`Il2CppDumper`** (`Il2CppDumper libil2cpp.so global-metadata.dat out/`) to generate `dump.cs`, `script.json` (load into IDA/Ghidra to restore all C# function names!), and `Il2CppDummyDll/` (load into **`ZeraTS/dnSpy-MCP`** or **`Borealin/ilspy-mcp-server`**!).
- **Modified / Encrypted Magic (`!= AF 1B B1 FA`)**:
- **STOP running static `Il2CppDumper`**—the metadata file is XOR/AES/XXTEA encrypted or loaded dynamically!
- **Runtime Dump**: Hook `il2cpp::vm::MetadataLoader::LoadMetadataFile` inside `libil2cpp.so` via Frida, dump the decrypted `global-metadata.dat` buffer from memory (`ptr.readByteArray(size)`), or attach **`frida-il2cpp-bridge`** (`npx frida-compile` with `frida-il2cpp-bridge`) to dump classes live from the IL2CPP runtime API (`il2cpp_domain_get_assemblies`) without needing static `global-metadata.dat`!
### 2. Frida IL2CPP Runtime Tracing Idiom
Instead of reading stripped ARM64 C++ in IDA first, use `frida-il2cpp-bridge` (`Il2Cpp.perform(() => { Il2Cpp.trace(true).assemblies(...).and().attach(); })`) to capture exact C# class/method call graphs and parameter values at runtime, then jump to the RVA offset in `ida-pro-mcp` / `GhidraMCP`.
---
## Track 2: React Native Hermes Bytecode (`assets/index.android.bundle` / `main.jsbundle`)
Modern React Native apps precompile JavaScript into **Hermes Bytecode (`.hbc`)** rather than shipping plain minified JS.
1. **Check Bundle Header Magic (First 8 Bytes)**:
- `C6 1F BC 03 C1 03 19 1F` -> **Hermes Bytecode (`.hbc`)**! Check uint32 at offset `+8` for the exact **HBC Version** (e.g., `84`–`96`).
- Printable ASCII (`var `, `!function`, `__d(`) -> Plain Metro JS bundle (beautify with `webcrack` / `prettier` and search `fetch` / `axios` / `NativeModules`).
- High-entropy non-HBC header -> Custom encrypted JS bundle (hook `facebook::react::JSBigFileString` or `hermes::vm::Runtime::runBytecode` in `libhermes.so` / `libreactnativejni.so` to dump at load time).
2. **Decompile `.hbc` Safely**:
- Match the HBC version (`offset +8`) with **`hermes-dec`** (`hbc-decompiler`) or **`hbctool`** (`hbc-disassembler`) to recover pseudo-JS and function string tables.
- Check **`NativeModules` Bridge**: Whenever JS calls `NativeModules.CryptoModule.sign(payload)`, pivot to Java (`@ReactMethod` in `jadx-ai-mcp`) or iOS (`RCT_EXPORT_METHOD` in `ios-macho-re`)!
---
## Track 3: Mini-Programs (`wxapkg`) & UniApp / Hybrid Apps
1. **UniApp / DCloud (`io.dcloud.*`)**:
- Check `assets/apps/<appid>/www/`:
- `app-service.js` (Vue/JS business logic; if compiled to `.nvue` / V8 bytecode or encrypted via DCloud cloud-encryption, hook `libweexcore.so` / V8 `ScriptCompiler::Compile` in memory).
2. **WeChat Mini-Programs (`.wxapkg` Authorized Audit)**:
- On PC WeChat, `.wxapkg` packages carry a `V1MMWX` (`56 31 4D 4D 57 58`) header encrypted via PBKDF2-AES-CBC + XOR using the Mini-Program `wxid`; decrypt header first to obtain standard `0xBE ... 0xED` (`wxapkg` magic), then unpack sub-packages (`app-service.js`) with `veil/unveilr` or `wxappUnpacker` successors.