Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Standalone IL2CPP Native Hook

A lightweight, standalone native hook for IL2CPP applications (Android/Linux AArch64). This project allows for intercepting native functions (like __cxa_throw) and logging detailed exception information, including IL2CPP-specific data objects.

Features

  • Standalone: No dependency on heavy hooking frameworks in the guest process.
  • IL2CPP Aware: Can parse Il2CppException objects, including messages, stack traces, and internal trace IPs.
  • Native Logging: Detailed logging via Android's __android_log_print (or equivalent).
  • Easy Injection: Includes a Lua script for use with Cheat Engine or similar tools to inject the hook into a running process.

Project Structure

  • src/: C++ source files for the hook.
    • config.h: Centralized configuration for offsets and constants.
    • hook.cpp: Main hook logic (intercepts __cxa_throw).
    • logger.h: Logging utilities.
  • scripts/: Injection scripts.
    • injector.lua: Lua script for Cheat Engine to inject hook.bin into memory.
  • out/: Build artifacts (generated after running build.sh).

Getting Started

Prerequisites

  • Clang/LLVM: A cross-compiler for AArch64 (e.g., aarch64-linux-gnu).
  • Cheat Engine (or similar): For running the Lua injection script.

Installation

  1. Configure Offsets: Open src/config.h and update the offsets for your target application. You can find these offsets using tools like Ghidra or IDA Pro.
  2. Build: Run the build script to generate the binary files:
    ./build.sh
    This will create out/hook.bin and out/load_pages.bin.

Usage

  1. Copy out/hook.bin and out/load_pages.bin to a location accessible by your Cheat Engine instance (or the target system).
  2. Open Cheat Engine and attach it to the target process.
  3. Load and execute scripts/injector.lua. Ensure the paths to the .bin files in the configuration section of the script are correct.
  4. Check the system logs (e.g., logcat on Android) to see the hook in action.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-party software included in this project is listed in THIRD_PARTY_NOTICES.md.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages