12.07.2015 Views

Hacking iOS Applications - Reverse Engineering Mac OS X

Hacking iOS Applications - Reverse Engineering Mac OS X

Hacking iOS Applications - Reverse Engineering Mac OS X

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Jailbreak detection classicchecking for shell [The good]# Checking for shell+ (BOOL)doShell {if (system(0)) {return YES;}return NO;}# Bypassing the checkstatic int (*old_system)(char *) = NULL;int st_system(char * cmd){if (!cmd){return nil;}return old_system(cmd);}__attribute__((constructor)) static void initialize() {NSLog(@"StealthJBInitialize!");MSHookFunction(system, st_system, &old_system);}37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!