Giter Site home page Giter Site logo

crackercat / il2cppparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tacesrever/il2cppparser

0.0 0.0 0.0 681 KB

libil2cpp symbol parser for ida

License: MIT License

CMake 0.01% C++ 45.93% C 22.02% Objective-C 31.62% Python 0.36% JavaScript 0.05%

il2cppparser's Introduction

Il2CppParser

libil2cpp runtime symbol parser for ida,
do not need global-metadata.dat.

example

Useage

prepare

find libil2cpp

firstly you should find target's internal libil2cpp headerfile version,
by analsys libil2cpp.so or try every finded version by github or etc.
you can run scripts/find_il2cpp_addrs.py without libil2cpp to determine internal structs and it's size,
which will be helpful for find right libil2cpp version.
once you find it, replace libil2cpp.
if your finded version use class-internals.h and object-internals.h
instead of il2cpp-class-internals.h and il2cpp-object-internals.h,
you can just replace them in src/parser.cpp.

fix libil2cpp for ida

copy libil2cpp to another path for ida load only;
add __ANDROID__=1;__arm__=1; to Options->Compiler... Predefined macros;
add {your_ndk_toolchain_path}/sysroot/usr/include to Options->Compiler... include;
add libil2cpp for ida to Options->Compiler... include;
remove all include <...> from il2cpp-class-internals.h and il2cpp-object-internals.h,
try File->Load file->Parse C header file... to load il2cpp-class-internals.h and il2cpp-object-internals.h,
if error happend, just locate and fix or remove it.
il2cpp_fix_diff is a example diff for fix.

install sark

see https://github.com/tmr232/Sark

make

edit CMakeLists.txt, setup ndk toolchain path;
run mkdir build; cd build; cmake ..;make;
push build/libparser.so on your device;

use

open libil2cpp.so(arm) with ida;
Click View->Open subviews->Strings to generate strings's xref info;
wait for ida's thinking is done(sometimes it take a while)
as find_il2cpp_addrs.py will use xref info of some function/global_addr;
Click File->Script file... or press Alt+F7, run scripts/find_il2cpp_addrs.py,
find_il2cpp_addrs.py will generate il2cpp_addrs.json at same path with libil2cpp.so;
push il2cpp_addrs.json on your device;

open app, let it load libparser.so, and run these after unity has started:

libparser.init(il2cpp_addrs.json);  
libparser.dumpAll(jsonoutpath, headeroutpath);  

for frida, you can use scripts/frida_il2cpp.js at this step.
if app crashed at this step, the libil2cpp's version may be wrong, try another.

pull headerfile from headeroutpath, put it in libil2cpp for ida,
Click File->Load file->Parse C header file... or press Ctrl+F9, load headerfile.

pull jsonfile from jsonoutpath, put it at same path with libil2cpp.so,rename it to output.json;
run scripts/load_symbols.py, it may take a long time.

as ida's function and strings search may be very slow after loaded lot's of symbols,
you can copy scripts/symbols_search.py to same path with output.json, open python shell there,
run from symbols_search import *, then
use sf("kword1 kword2 ...") to search function or class's name,
use ss("kword1 kword2 ...") to search in strings.

then enjoy your reversing with full structs and symbols info.

il2cppparser's People

Contributors

tacesrever avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.