rev-u3d-dump
Original:🇺🇸 English
Translated
Dump Unity IL2CPP symbols from iOS/Android builds. Extract method names, addresses, and type info from IL2CPP binaries and global-metadata.dat, then generate IDA/Ghidra import scripts.
5installs
Sourcep4nda0s/reverse-skills
Added on
NPX Install
npx skill4agent add p4nda0s/reverse-skills rev-u3d-dumpTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →rev-u3d-dump - Unity IL2CPP Symbol Dumper
Extract C# method names, addresses, and type definitions from Unity IL2CPP builds for IDA/Ghidra analysis.
Overview
Unity IL2CPP compiles C# to native code. The original class/method names are stripped from the binary but preserved in . This skill recovers the mapping between native function addresses and their original C# names.
global-metadata.datKey Files in Unity Build
| File | Location | Purpose |
|---|---|---|
| Native binary | iOS: | Compiled C# code (Mach-O / ELF) |
| Metadata | | All type/method/string info |
Tool Selection
Il2CppDumper (recommended for metadata v39+)
Use the v39 fork for Unity 6+ builds:
- Repo: (branch:
https://github.com/roytu/Il2CppDumper)v39 - Supports metadata v24–v39
- Outputs with function addresses — ready for IDA/Ghidra import
script.json
The original Il2CppDumper () only supports up to v29.
https://github.com/Perfare/Il2CppDumperCpp2IL (alternative)
- Repo:
https://github.com/SamboyCoding/Cpp2IL - Supports metadata v39, but dummy DLLs lack attributes
[Address] - Useful for C# source reconstruction, not ideal for IDA import
Step-by-Step Workflow
Step 1: Locate IL2CPP Files
iOS (IPA):
bash
# Unzip IPA
unzip -o app.ipa -d .
# Binary
BINARY="Payload/<AppName>.app/Frameworks/UnityFramework.framework/UnityFramework"
# Metadata
METADATA="Payload/<AppName>.app/Data/Managed/Metadata/global-metadata.dat"Android (APK):
bash
# Unzip APK
unzip -o app.apk -d .
# Binary (pick target arch)
BINARY="lib/arm64-v8a/libil2cpp.so"
# Metadata
METADATA="assets/bin/Data/Managed/Metadata/global-metadata.dat"Step 2: Check Metadata Version
bash
# First 8 bytes: magic (4) + version (4), little-endian
xxd -l 8 "$METADATA"
# Expected: af1b b1fa 2700 0000 → magic OK, version = 0x27 = 39| Version | Unity | Tool |
|---|---|---|
| ≤ 29 | Unity 2021 and earlier | Original Il2CppDumper |
| 31 | Unity 2022 | Original Il2CppDumper (partial) |
| 39 | Unity 6 (6000.x) | roytu/Il2CppDumper v39 fork |
Step 3: Build & Run Il2CppDumper (v39 fork)
bash
# Clone v39 fork
git clone -b v39 https://github.com/roytu/Il2CppDumper.git
# Build
cd Il2CppDumper
DOTNET_ROLL_FORWARD=LatestMajor dotnet build -c Release
# Run (use net8.0 framework)
DOTNET_ROLL_FORWARD=LatestMajor dotnet run \
--project Il2CppDumper/Il2CppDumper.csproj \
-c Release --framework net8.0 \
-- "$BINARY" "$METADATA" output_dirNotes:
- allows running on .NET 9/10 even though the project targets .NET 6/8
DOTNET_ROLL_FORWARD=LatestMajor - Exit code 134 is normal in non-interactive mode (caused by at the end)
Console.ReadKey() - On macOS, if the binary gets SIGKILL'd, ad-hoc sign it:
codesign -s - <binary>
Step 4: Verify Output
Successful run produces these files in the output directory:
| File | Size (typical) | Purpose |
|---|---|---|
| 50–100 MB | Function addresses + names + signatures (IDA/Ghidra import) |
| 10–30 MB | C# class dump with RVA/VA addresses |
| 50–100 MB | C struct definitions for type import |
| ~2 KB | IDA Python import script |
Check format:
script.jsonjson
{
"ScriptMethod": [
{
"Address": 40865744,
"Name": "ClassName$$MethodName",
"Signature": "ReturnType ClassName__MethodName (args...);",
"TypeSignature": "viii"
}
]
}Check format:
dump.cscsharp
// RVA: 0x1A2B3C4 Offset: 0x1A2B3C4 VA: 0x1A2B3C4
public void MethodName() { }Step 5: Import into IDA
- Open the native binary in IDA (UnityFramework / libil2cpp.so)
- Place and
script.jsonin the same directoryida_py3.py - → select
File → Script file...ida_py3.py - The script reads and renames all functions automatically
script.json - Optional: → select
File → Load file → Parse C header file...for struct typesil2cpp.h
Step 5 (alt): Import into Ghidra
- Open the binary in Ghidra
- Use the or
ghidra.pyscript from Il2CppDumperghidra_with_struct.py - with
Window → Script Manager → Runin the same directoryscript.json
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Using original Il2CppDumper | Switch to roytu/Il2CppDumper v39 fork |
| Exit code 137 (SIGKILL) | macOS unsigned binary | |
| Non-interactive console | Ignore — dump completed successfully |
| .NET version mismatch | Set |
| Empty output | Wrong binary/metadata pair | Verify both files are from the same build |
Output Usage Tips
- is the quickest reference — search for class/method names with RVA addresses
dump.cs - Address values are decimal — convert to hex for IDA:
script.json→hex(40865744)0x26F8FD0 - Field offsets in (e.g.,
dump.cs) are relative to object base, useful for memory inspection with Frida// 0x20