Ocelot
Ocelot

Reputation: 1753

Foolproof jailbreak detection?

I went through various posts which talks about jailbreak detection mechanisms. Whatever I came across is either something that apple would reject during the vetting process or something that could be bypassed. I also came to know that apple removed the jailbreak API..

So, is there any foolproof mechanism with which i can check whether a device is jailbroken?

Upvotes: 3

Views: 6296

Answers (3)

Jacker
Jacker

Reputation: 19

Use this app for Detecting Jailbroken Devices.

AntiPiracyDemo.ipa

Two ways to bypass Jailbreak Detection

  1. Runtime Modification using GDB
  2. Method Swizzling using Cycript

Have a look at this Blog Interesting stuff out there for Bypass Jailbreak Checks.

Upvotes: 1

rmaddy
rmaddy

Reputation: 318884

I can't claim this is foolproof but I know it works, at least in some cases (if not all). I have had this code in one of my App Store apps for 6 months and 4 updates so Apple appears to be OK with this.

if ([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"] ||
    [[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"] ||
    [[NSFileManager defaultManager] fileExistsAtPath:@"/private/var/lib/apt"]) {
    // Device is jailbroken
}

Any good hacker could probably find a way to no-op this code. Making this more hacker proof is an exercise left to the reader.

Upvotes: 5

borrrden
borrrden

Reputation: 33421

No, there is no foolproof way.

Upvotes: 11

Related Questions