Giter VIP home page Giter VIP logo

dttjailbreakdetection's Introduction

DTTJailbreakDetection

Version License Platform Carthage compatible

TL;DR

A library to detect if an iOS device is jailbroken or not.

The good

Checking whether a device is jailbroken or not can have many advantages for your application. As we have already seen, an attacker can run tools like Cycript, GDB, Snoop-it etc to perform runtime analysis and steal sensitive data from within your application. If you are really looking to add an extra layer of security for your application, you should not allow your application to be run on a jailbroken device. [Prateek Gianchandani]

The bad

Please note that millions of users jailbreak their devices and hence not allowing an application to be run on a jailbroken device could have a significant impact on your user base. Another thing you can do is instead block some of the features in your application rather than disabing it entirely. [Prateek Gianchandani]

Installation

The easiest way to install DTTJailbreakDetection is to use CocoaPods. Just add the following line to your Podfile:

pod 'DTTJailbreakDetection'

Usage

To start using DTTJailbreakDetection:

#import <DTTJailbreakDetection/DTTJailbreakDetection.h>

Example

iOS 7 or older

if ([DTTJailbreakDetection isJailbroken]) {
    UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"System Requirements"
                                                     message:@"This app is only supported on unmodified versions of iOS."
                                                    delegate:self
                                           cancelButtonTitle:@"OK"
                                           otherButtonTitles:nil];
    [alert show];
    // End your app
}

iOS 8 or newer

if ([DTTJailbreakDetection isJailbroken]) {
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"System Requirements"
                                                                             message:@"This app is only supported on unmodified versions of iOS."
                                                                      preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK"
                                                           style:UIAlertActionStyleDefault
                                                         handler:^(UIAlertAction *action) {
        // End your app
    }];
    [alertController addAction:cancelAction];
    [self presentViewController:alertController animated:YES completion:nil];
}

License

MIT

dttjailbreakdetection's People

Contributors

revolter avatar romanpodymov avatar thii avatar urielvexi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dttjailbreakdetection's Issues

DTTJailbreakDetection.m - Issue logic code

Hi Thi, please review source code below:

NSError *error = nil;
    NSString *string = @".";
    [string writeToFile:@"/private/jailbreak.txt" atomically:YES encoding:NSUTF8StringEncoding error:&error];
    if (!error) {
        return YES;
    } else {
        [fileManager removeItemAtPath:@"/private/jailbreak.txt" error:nil];
    }

If error = nil, it's mean string is written into path, so I think removeItemAtPath function should be write:

if (!error) {
        [fileManager removeItemAtPath:@"/private/jailbreak.txt" error:nil];
        return YES;

Am I right???

App permanent locked after removing jailbreak

I tried jailbreaking my development idevice and this library successfully detects it, so for testing purposes I removed jailbreak from that device but the app still says jailbreak is present

DTTJailbreakDetection isJailbroken returning false-positive results

Recently, the jailbreak detection check started giving us false-positive results, ie, it returns jailbroken true even for genuine devices.
This issue is reported mainly by the users who have recently upgraded the iOS to 15.2 or 15.3 or purchased a new iPhone 13 model.

Is anyone else facing the same issue?

New Tag for SPM support

Hi,

In order to be able to use latest version on SPM, you need to push a Tag (e.g. 0.5.0). Otherwise we have to point to master branch.

Jailbreak Detected on M1 Macs

With the new M1 architecture, users are able to run both iOS Apps on the Mac. However, DTTJailbreakDetection is blocking due to jailbreak detection

Bypassed Liberty Lite

Hi,

I want to ask, can it be bypassed by Liberty Lite?
I want to make sure that DttJailbreakDetection prevents bypass with any tools, including Liberty Lite.

Thank you.

Upgrade minimum deployments version

Just upgrade Xcode to 14.3 version, I have this issue when I try to run my app :

image

I found this issue on CocoaPods project, this post advise to add a script in Podfile to fix the issue manually : bummer.

In order to avoid that, this post suggests to fill an issue, what I did today.

The Minimum Deployments version of DTTJailbreakDetection is 8.0.
The minimum version supported by Xcode 14.3 is iOS 11.0.

LSApplicationQueriesSchemes Requirements?

This is my first time using this library in a native application, I have used similar libraries in different technology stacks. Can you confirm what (if any) app's are being queried by this library.

I checked the source code and looks like its just cydia, this would be useful documentation as another library for root detection in xamarin lists it in the main readme. I am happy to update the readme once I know all of the required app names.

ie:

<key>LSApplicationQueriesSchemes</key>
<array>
	<string>cydia</string>
</array>

Question about package logic

Hello there,

I'm looking for a ios/android jailbreak detection library and got my self here from the safe_device package for flutter (in pub.dev). The library is using this package directly so I've checked what this package does.

Can you please enlighted me on something? This package checks if there is no Cydia installed & Some system files are still there then decides no jailbreak is done. Im a little new about this matters So, Is there any other jailbreaking library/app for ios? What if all of this checks are OK but there is still an other jailbreak running in the phone?

jjolano / shadow

thanks for the framework, is there any way to detect jjolano/shadow ?

Where do I implement the function?

Do I put the alert into a viewDidAppear block?

-(void)viewDidAppear:(BOOL)animated
{
     if ([DTTJailbreakDetection isJailbroken]) 
    {
         // code
    }
}

If I do that, the main view still loads. Can I keep it at the LaunchScreenStoryBoard, so it doesn't even show the app, if i wanted?

Pardon my ignorance on this subject I am learning and seeing how this works.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.