Skip to content

Instantly share code, notes, and snippets.

@wjdwndud0114
Last active August 5, 2024 17:14
Show Gist options
  • Save wjdwndud0114/572a5c6edeec2fbf4f1803997ca206e6 to your computer and use it in GitHub Desktop.
Save wjdwndud0114/572a5c6edeec2fbf4f1803997ca206e6 to your computer and use it in GitHub Desktop.
so debugging on ida pro
Nexus 5 4.4.4
1. setup:
a. need to downgrade to 4.4.4, root
b. luckypactcher, GG, xposed
c. put libhook.so and android_server and libsubstrate.so in /data/local/tmp/ and install aadbg
d. patch with luckypatcher the middle 2
2. adb shell su -> android_server
3. adb forward tcp:23946 tcp: 23946
4. adb forward tcp:8700 jdwp:PID_OF_GAME
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700
to debug libstub, need to load a copy of libstub to /data/data/net/net.supercat.stone/files/libstub.so
move android_server to memu
1. open memu
2. open cmd and adb kill-server and then adb start-server
3. adb connect 127.0.0.1:21503
4. adb devices to check connection
5. adb shell and run android_server
6. adb forward tcp:23946 tcp:23946
6. load up 2 instances of ida - classes.dex and so file
7. set up break points
8. classes.dex - change port
9. so file - localhost 23946
using jdwp:
adb forward tcp:8700 jdwp:PID_OF_GAME
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700
run on the IDA that is attached to game and loaded with so.
(test???)
open memu and game
adb start-server
adb connct 127.0.0.1:21503
adb shell, run android_server
adb forward tcp:23946 tcp:23946
inject anti-anti-debug
adb push libs/armeabi-v7a/libhook.so
adb push libs/armeabi-v7a/injector
/data/injector PROCESSNAME /data/libhook.so
load up jdb debugger
load up ida with so and attach
Using xposed to inject
http://www.memuplay.com/blog/2016/06/27/xposed/
http://opensourceforgeeks.blogspot.in/2017/03/creating-new-xposed-module-in-android.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment