il2cpp
What it does
This guide covers analysis of Unity games compiled with IL2CPP, which hides game logic in native code. It is for game developers who want to test their own license and purchase checks.
When to use it
- βWhen a game developer wants to check whether its in-app purchase checks can be bypassed.
- βWhen a Unity game's logic is protected and the team wants to test its client-side checks.
- βWhen a license check runs only on the device and needs review.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/mobile/android/il2cpp/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βOur Unity game uses IL2CPP. Can you check whether its purchase checks can be bypassed on the device?β
5 new skills a week. 1 minute to read.
How it works
The agent recovers readable symbols from the game's metadata, reviews the purchase and license logic, and reports client-side checks that should move to the server.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Unity IL2CPP Game Reversing Playbook
Unity IL2CPP compiles C# to C++ then to native
libil2cpp.so. The managed bytecode is stripped βjadxandapktoolexpose only the thin Java bootstrap and reveal nothing of game logic. This playbook recovers readable symbols and hooks runtime methods for license/IAP bypass and vulnerability assessment.
Prerequisites
- APK obtained (see
mobile/android/SKILL.mdfor pull methods). - Il2CppDumper (Windows .NET or mono CLI): https://github.com/Perfare/Il2CppDumper
- Il2CppInspector (alternative with plugin support): https://github.com/djkaty/Il2CppInspector
- Ghidra (via MCP
ghidraserver) or IDA (host-side). - Frida + Objection for runtime hooking (see
mobile/android/SKILL.mdFrida setup section). - zygisk-il2cpp-dumper for runtime metadata on protected apps: https://github.com/Perfare/Zygisk-Il2CppDumper
Step 1: Identify Unity IL2CPP App
unzip -o base.apk -d /tmp/apk-out/
# Confirm IL2CPP backend
ls /tmp/apk-out/lib/arm64-v8a/
# Must contain: libil2cpp.so
ls /tmp/apk-out/assets/bin/Data/Managed/Metadata/
# Must contain: global-metadata.dat
# If only libmono.so present β Mono backend (smali/jadx works; this skill N/A)
# If libil2cpp.so present but no global-metadata.dat β encrypted/obfuscated (go to Step 5)
file /tmp/apk-out/lib/arm64-v8a/libil2cpp.so
# output: ELF 64-bit LSB shared object, ARM aarch64
Step 2: Recover Symbols with Il2CppDumper
# Extract libs from APK
cp /tmp/apk-out/lib/arm64-v8a/libil2cpp.so /tmp/
cp /tmp/apk-out/assets/bin/Data/Managed/Metadata/global-metadata.dat /tmp/
# Run Il2CppDumper (mono CLI on Linux/macOS)
mono Il2CppDumper.exe /tmp/libil2cpp.so /tmp/global-metadata.dat /tmp/dump-output/
# Windows .NET:
# Il2CppDumper.exe <libil2cpp.so> <global-metadata.dat> <output-dir>
Output files:
| File | Content |
|---|---|
dump.cs |
All C# class/method/field definitions with offsets |
script.json |
Machine-readable symbol map (used by IDA/Ghidra scripts) |
il2cpp.h |
C-style struct definitions for IL2CPP internals |
stringliteral.json |
All managed string literals with addresses |
# Quick scan of dump.cs for interesting classes
grep -i "licen\|premium\|iap\|purchase\|unlock\|cheat\|anti\|integrity" /tmp/dump-output/dump.cs | head -30
# Find method offsets for hooks
grep -A2 "IsPremium\|CheckLicense\|VerifyReceipt\|IsSubscribed" /tmp/dump-output/dump.cs
# Output: // RVA: 0x<offset> β this is the function RVA in libil2cpp.so
Step 3: Apply Symbols in Ghidra / IDA
Ghidra (via MCP ghidra server β batch mode)
# 1. Import libil2cpp.so into Ghidra project
# 2. Run auto-analysis (aarch64)
# 3. Execute the Il2CppDumper Ghidra script:
# Script: ghidra_with_struct.py (from Il2CppDumper/tools/)
# Input: script.json + il2cpp.h
# 4. All methods now have their managed C# names
# Command-line Ghidra headless analysis + script
"$GHIDRA_HOME/support/analyzeHeadless" /tmp/ghidra-project IL2CPP \
-import /tmp/libil2cpp.so \
-postScript ghidra_with_struct.py /tmp/dump-output/script.json \
-processor AARCH64:LE:64:v8A \
-noanalysis
IDA (host-side)
# In IDA scripting console (Python):
# Run ida_with_struct_py3.py from Il2CppDumper/tools/
# File β Script File β ida_with_struct_py3.py
# Provide path to script.json when prompted
# IDA applies all function names + struct types
After symbol restore, navigate to IsPremiumUser, CheckLicense,
VerifyIAP, IsCheatDetected, etc. by name.
Step 4: Frida Runtime Hooking
Hook via RVA from dump.cs
// Read RVA from dump.cs comment line: // RVA: 0x<hex>
// Base address of libil2cpp.so changes per run; use Module.findBaseAddress
var il2cpp_base = Module.findBaseAddress("libil2cpp.so");
// Example: hook IsPremiumUser at RVA 0x1A4F80
var RVA = 0x1A4F80;
var isPremium = il2cpp_base.add(RVA);
Interceptor.attach(isPremium, {
onEnter: function(args) {
console.log("[+] IsPremiumUser called");
},
onLeave: function(retval) {
console.log("[+] Original return:", retval.toInt32());
retval.replace(ptr(1)); // return true
console.log("[+] Replaced with: 1");
}
});
# Load hook script
frida -U -f com.unity.targetgame -l hook-il2cpp.js --no-pause
Static libil2cpp.so patch (persistent, no Frida needed)
# Patch return value of IsPremiumUser at computed file offset
python3 - <<'EOF'
i
FAQ
What is IL2CPP?
It is Unity's way of compiling C# code to native code, which makes the game logic harder to read.
Why are client-side checks a concern?
The guide implies that checks that run only on the device can be altered, so they should be confirmed on a server.
Who is it for?
Game developers testing their own titles.
Details
Original description by the author
Unity IL2CPP game reversing β Il2CppDumper metadata recovery, global-metadata.dat decryption, IDA/Ghidra symbol restore via generated scripts, Frida method hooking, IAP/license bypass, and zygisk-il2cpp-dumper for obfuscated metadata.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14108
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
android-clean-architecture
280kMakes your agent organize Android projects efficiently. It structures the code to make maintenance and new feature development easier.
compose-multiplatform-patterns
280kHelps your agent use Compose Multiplatform and Jetpack Compose patterns in KMP projects, covering state, navigation, theming, and performance.
dart-flutter-patterns
280kMakes your agent write code for Dart and Flutter apps. It uses modern patterns to create robust and manageable apps.