how to cheat jb detector and detect cheating

17

Upload: hokila-jan

Post on 14-Dec-2014

586 views

Category:

Food


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: How to cheat jb detector and detect cheating
Page 2: How to cheat jb detector and detect cheating
Page 3: How to cheat jb detector and detect cheating

Storehouse

Page 4: How to cheat jb detector and detect cheating

//check cydia NSString *cydiaPath = @"/Applications/Cydia.app"; if ([[NSFileManager defaultManager] fileExistsAtPath:cydiaPath]){ return YES; }

NSURL* url = [NSURL URLWithString:@"cydia://package/com.example.package"]; if ([[UIApplication sharedApplication] canOpenURL:url]) { return YES; }

Page 5: How to cheat jb detector and detect cheating

//check cydia let cydiaPath = "/Applications/Cydia.app" if(NSFileManager.defaultManager().fileExistsAtPath(cydiaPath)){ //device is jail break }

let url = NSURL.URLWithString("cydia://package/com.example.package") let app = UIApplication.sharedApplication() if (app.canOpenURL(url)){ //device is jail break }

Page 7: How to cheat jb detector and detect cheating

#import <sys/stat.h>

struct stat stat_info; if (0 == stat("/Applications/Cydia.app", &stat_info)) { //device is jail break } //check JailBreak generate Data Structure if (0 == stat("/private/var/lib/apt/", &stat_info)) { //device is jail break } if (0 == stat("/User/Applications/", &stat_info)) { //device is jail break }

Page 8: How to cheat jb detector and detect cheating
Page 9: How to cheat jb detector and detect cheating

#import <dlfcn.h>

#if !TARGET_IPHONE_SIMULATOR //check hook stat int ret ; Dl_info dylib_info; int (*func_stat)(const char *, struct stat *) = stat;

if ((ret = dladdr(func_stat, &dylib_info))) { NSLog(@"lib :%s", dylib_info.dli_fname); char* kernal = "/usr/lib/system/libsystem_kernel.dylib"; if (strcmp(dylib_info.dli_fname,kernal)!=0) { //device is jail break //Let it go } } #endif

Page 10: How to cheat jb detector and detect cheating

/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics /System/Library/Frameworks/UIKit.framework/UIKit /System/Library/Frameworks/Foundation.framework/Foundation /usr/lib/libobjc.A.dylib /usr/lib/libSystem.B.dylib /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation /usr/lib/libz.1.dylib /System/Library/Frameworks/Accelerate.framework/Accelerate /usr/lib/libc++.1.dylib …… /usr/lib/system/libsystem_info.dylib /usr/lib/system/libsystem_kernel.dylib /usr/lib/system/libsystem_m.dylib /usr/lib/system/libsystem_malloc.dylib /usr/lib/system/libsystem_network.dylib /usr/lib/system/libsystem_notify.dylib /usr/lib/system/libsystem_platform.dylib /usr/lib/system/libsystem_pthread.dylib

Page 11: How to cheat jb detector and detect cheating

#import <mach-o/dyld.h>

uint32_t count = _dyld_image_count();

for (uint32_t i = 0 ; i < count; ++i) { char* substrate = “Library/MobileSubstrate/MobileSubstrate.dylib";

//NSLog(@“%s",_dyld_get_image_name(i));

if (strcmp(_dyld_get_image_name(i),substrate)==0) { return YES; } }

Page 12: How to cheat jb detector and detect cheating

#import <mach-o/dyld.h>

uint32_t count = _dyld_image_count();

for (uint32_t i = 0 ; i < count; ++i) { char* substrate = “Library/MobileSubstrate/MobileSubstrate.dylib";

//NSLog(@“%s",_dyld_get_image_name(i));

if (strcmp(_dyld_get_image_name(i),substrate)==0) { return YES; } }

If naming is not MobileSubstrate.dylib

Page 13: How to cheat jb detector and detect cheating

#if !TARGET_IPHONE_SIMULATOR char *env = getenv("DYLD_INSERT_LIBRARIES"); if (env) { //device is jailbreak } #endif

Page 14: How to cheat jb detector and detect cheating
Page 15: How to cheat jb detector and detect cheating

- (void)viewDidLoad { [super viewDidLoad];

if ([self isJailBreakCheck]) { self.statusLabel.text = @"You're Jailbreak”; //replace rooViewController.view when found JB } else{ self.statusLabel.text = @"You're not Jailbreak"; } }

Page 16: How to cheat jb detector and detect cheating