Mac
越狱版iOS
ssh到手机端
手机端安装openSSH
- 无线:
$ssh root@iOSIP
-> 输入密码:alpine - 有限:PP助手,连接到手机
安装进程查看命令,手机端安装dv-cmds
查看微信的进程 $ps aux | grep WeChat
砸壳-Dumpdecrypted
从Git上拉取Dumpdecrypted,进入到dumpdecrypted目录->终端:$ make
->同目录下生成dumpdecrypted.dylib
ssh到手机端,找到WeChat的目录
找到沙盒目录和app目录,由于app沙盒目录加密,可观性不强,所以有两种方式查找:
- 使用ps aux | grep WeChat
- 先卸载微信,再次安装,新安装的就是
文件目录结构如下:
- 沙盒目录:
/var/mobile/Containers/Data/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents
- app目录:
/var/mobile/Containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/WeChat.app/WeChat
将之前生成的dumpdecrypted.dylib文件拷贝到手机中的app的Documents目录下:
$ scp /path/to/dumpdecrypted.dylib root@iOSMobileIP:/var/mobile/Containers/Data/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents
使用刚才拷贝的dumpdecrypted.dylib砸壳
DYLD_INSERT_LIBRARIES=/path/to/dumpdecrypted.dylib /path/to/executable
/path/to/executable是上面查找到的app目录。
当前目录生成了后缀为.decrypted
的文件,这个文件就是砸壳解密后的微信了,将它拷贝到电脑。然后就可以使用otool工具分析这个文件的二进制结构了。
运行时检测-cycript
手机端安装cycript这个工具,然后ssh到手机终端:
查找微信进程ID $ ps aux | grep WeChat
注入:$ cycript -p 微信ID
完成注入,进入到cycript提供的终端,在终端输入:
$ UIApp.keyWindow.recursiveDescription().toString()
打印的是它当前的UI树,随便找一个中间的地址,如:0x13103b480
执行 $ [#0x13103b480 nextResponder]
通过响应者链找寻控制器
断点调试工具——lldb + debugserver
参考
按照网上的资料,碰到两个错误
1.默认的debugserver只能监听自己的应用,如果要监听别人的应用需要使用ldid重新签名
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124 for arm64.
Attaching to process AppStore...
error: failed to attach to process named: "" unable to start the exception thread
Exiting.
2.出现这个问题是因为被监听的程序已经退出,只要让程序运行就好了
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89
for arm64.
Attaching to process AppStore...
error: failed to attach to process named: ""
Exiting.
注意将debugserver从/Deverloper/usr/bin目录下完成签名后拷贝到/usr
网友评论