Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5702

iOS11 在SpringBoard中通过system函数运行root进程,进程setuid(0)失败,getuid()为501

$
0
0

@tonyIronMan wrote:

问题背景:有个root权限的后台服务想让它死掉后能重启,于是想到让SpringBoard检查服务的心跳,心跳超时就让SB通过system()执行shell来重启服务,iOS10上是可以的。

遇到的问题:如题,iOS11 上重启后服务就丢失root权限了,

环境:iPhone 6 s ,iOS11.1.1 ,最新的electra进行越狱.
shell脚本daemonX_launch的内容
#!/bin/bash
exec /usr/bin/daemonX “$@”

daemonX和shell脚本文件权限都是:-rwsrwsrwx 1 root wheel

测试结果:ssh root@localhost 到手机然后 /bin/bash /usr/bin/daemonX_launch 是root权限。
SB中system("/bin/bash /usr/bin/daemonX_launch")就为mobile了。

不知道有没有大佬遇类似的问题,愿意分享下经验,多谢!!:grinning::grinning::grinning:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5702

Trending Articles