pinwhell / Linux-Process-Library

Toolkit for precise Android/Linux process memory control, enabling reading, writing, module handling, and dynamic code manipulation.
MIT License
86 stars 38 forks source link

Hook Question #4

Closed Ezriral closed 1 year ago

Ezriral commented 2 years ago

Hi mate, btw thanks for the last time.

I have a question, cause im also in a lot of forums but these people are not really helpful at all. Do you know any way of Hooking unity functions? or in general hooking android functions? In my case i would like to hook a function inside of the il2cpp without modifying the original APK. Just run my binary and i hook the function of my need, do you have any knwoledge about it?

would make me happy if you could reach out to me. you can also add me on discord SlingShot#6214

pinwhell commented 2 years ago

hi!, hooking unity functions? in general you could use SubstrateHooking internally, without modifying original app, hook? so you want external hook?, well, this is kind of tricky becouse you are not in the target process address space, notice you can still load a shellcode in a empty codecave of the target process and from there handle the hook, but it will not be traditionally easy to develop that, also you will also need to think a way of passing parameters to the hook itself, like the backup of the hooked function, or a pointer that you want to use on your binary but you want the hook also know its, for communications for example, the subject is huge bro

Ezriral commented 2 years ago

Thanks again for answering, maybe the problem right now is also that i dont explain my problem wish correct. But you said "in general you could use SubstrateHooking internally, without modifying original app, hook?" thats sounds like the method i want.

I would like to inject my shared library into the game, But the only working methods i found so far are modifying the apk with smali editing. Which are then loaded into the game process.

For me i would like to know abit more about the first idea SubstrateHook without modifying the original app. I would be happy to hear from you about it while i m waitiing i will try to find some more infos about it.

pinwhell commented 2 years ago

try using tiny injector to inject the library at runtime, it doesnt need to modify the apk