securing / IOSSecuritySuite

iOS platform security & anti-tampering Swift library
https://www.securing.biz/
Other
2.27k stars 272 forks source link

advanced method to detect rootless and root jailbreaks #100

Closed ghost closed 3 months ago

ghost commented 10 months ago

include <sys/mount.h>

struct statfs buf; statfs("/", &buf); NSLog(@"%s", buf.f_mntfromname); char* prefix = "com.apple.os.update-"; if(strstr(buf.f_mntfromname, prefix)) { NSLog(@"未越狱, 设备唯一识别码=%s", buf.f_mntfromname+strlen(prefix)); } else { NSLog(@"已越狱, 没有设备唯一识别码"); }

this is a method by the H5GG dev

r3ggi commented 9 months ago

hey! Thanks for your suggestion

r3ggi commented 3 months ago

Hey! I checked that technique on a non-jailbroken iPhone and on Dopamine jailbroken iPhone. Both have ID in the buf.f_mntfromname - so the code you provide seems not to work :(