前提安装homebrew
然后安装dpkg、ldid
在我的[iOS Hacking]logify日志追踪,锁定注入口这篇文章中已经锁定了自动抢红包的hook入口函数,他是BaseMsgContentViewController
类中的这个函数:
addMessageNode: layout: addMoreMsg:
以下是Hopper的下载来源
Hopper下载1
Hopper 带license版
破解版的Hooper
注意这个破解版的有个设置:
2)修改 /etc/hosts,添加:127.0.0.1 flashcode.cryptic-apps.com
这个提一下hosts怎么添加:在Mac上打开终端,输入命令:
cd /etc/
然后:
sudo chmod 777 hosts
打开hosts添加127.0.0.1 flashcode.cryptic-apps.com
:
vi /etc/hosts
选择Edit anyway
,输入:
e
插入127.0.0.1 flashcode.cryptic-apps.com
输入:
i
进入插入模式
在最下面,粘贴127.0.0.1 flashcode.cryptic-apps.com
然后按shift+esc
保存退出:
:wq
debugserver
只要是手机连接过Xcode调试过,在手机的/Developer/usr/bin/目录下就有debugserver,但是不能用于调试其它的app,需要做些处理。
1.将手机的的debugserver拷贝到Mac上:
scp [email protected]:/Developer/usr/bin/debugserver ~/Desktop/debugserver
xx.xx.xx.xx为手机连wifif的ip地址
2.瘦身(这一步加了有可能会导致失败,如果失败了,请省去这一步)
lipo -thin arm64 ~/Desktop/debugserver -output ~/Desktop/debugserver
如果你的手机是armv7s就把arm64改成armv7s
3.重签名
新建一个空文件
cd ~/Desktop
touch ent.xml
open ./ent.xml
然后将一下内容粘贴至ent.xml
中
com.apple.springboard.debugapplications
get-task-allow
task_for_pid-allow
run-unsigned-code
签名:
ldid -Sent.xml debugserver
3.拷贝至手机
scp ~/Desktop/debugserver [email protected]:/usr/bin/
ssh连接手机:
ssh [email protected]
4.挂载进程至debugserver,以钉钉为例
cd /usr/bin
chmod 777 ./debugserver
debugserver *:1234 -a DingTalk
挂载成功后会提示:
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89
for armv7.
Attaching to process DingTalk...
Listening to port 1234 for a connection from *...
如果报错提示:
error: failed to attach to process named:
只要重做一遍,但是不要走第2步瘦身,直接签名然后拷贝至手机就行了。
下一篇文章是lldb连接手机实现远程调试
关于我
- Blog: CGPointZeero
- GitHub: Insfgg99x
- Jianshu: CGPointZero
- Email: [email protected]