怎么解决iPhone的frida-server启动不了
现象1
objection 启动不了 <objection是啥: github.com/sensepost/o…
现象2
frida.get_device 获取设备失败
以上两种现象都是frida-server在手机上没有启动成功导致的,解决问题的思路就是让frida-server启动成功
解决方式1
找到谁占用了
frida-server的27042的接口了
- 登陆iPhone输入下图指令
ps:如果找不到lsof指令,就去Cyida中搜索安装即可
找到占用端口的PID值,执行下图指令杀死。
kill -9 22940
之后重启frida-server即可
解决方式2
使用新的本地地址替换默认的
127.0.0.1.27042
手机端执行:
iPhone6sPlus:~ root# /usr/sbin/frida-server -l 192.168.1.4 // 这个是你电脑的ip地址
iOS15Rootless
iPhone6sPlus:~ mobile# /var/jb/usr/sbin/frida-server -l 192.168.1.4 // 这个是你电脑的ip地址
电脑端执行:
frida-ps -H 192.168.1.4
解决方式3
- 执行下面指令停止进程
launchctl unload -w /Library/LaunchDaemons/re.frida.server.plist
iOS15Rootless
launchctl unload -w /var/jb/Library/LaunchDaemons/re.frida.server.plist
- 修改iPhone上
/Library/LaunchDaemons/re.frida.server.plist这个路径下的文件 之前:
<key>Program</key>
<string>/usr/sbin/frida-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/frida-server</string>
</array>
修改为:
<key>Program</key>
<string>/usr/sbin/frida-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/frida-server</string>
<string>-l</string>
<string>0.0.0.0</string>
</array>
也可以加端口:
<key>Program</key>
<string>/usr/sbin/frida-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/frida-server</string>
<string>-l</string>
<string>0.0.0.0:5555</string>
</array>
连接的时候需要也指定端口
iOS15Rootless
<key>Program</key>
<string>/usr/sbin/frida-server</string>
<key>ProgramArguments</key>
<array>
<string>/var/jb/usr/sbin/frida-server</string>
<string>-l</string>
<string>0.0.0.0</string>
</array>
- 然后重启服务
launchctl load -w /Library/LaunchDaemons/re.frida.server.plist
iOS15Rootless
launchctl load -w /var/jb/Library/LaunchDaemons/re.frida.server.plist
objection使用
- 先登录手机
ssh mobile@localhost -p 2222 - 启动
frida-server
frida-server -l 192.168.12.24
- 开始连接
objection -N --gadget xxx -h 192.168.12.24 explore
如果frida-server 加了自定义端口
objection -N --gadget xxx -h 192.168.12.24:5555 explore