+ All Categories
Home > Technology > Hooking101 - Deeper on iOS Island

Hooking101 - Deeper on iOS Island

Date post: 13-Apr-2017
Category:
Upload: ackcent
View: 142 times
Download: 0 times
Share this document with a friend
14
Hooking 101 Deeper on iOS Island Alex Soler @as0ler 30/03/2016 Barcelona Cybersecurity
Transcript
Page 1: Hooking101 - Deeper on iOS Island

Hooking 101Deeper on iOS Island

Alex Soler@as0ler

30/03/2016

Barcelona Cybersecurity

Page 2: Hooking101 - Deeper on iOS Island

2

Who I am

Alex Soler (@as0ler)Red Team Officer @ [email protected]

Page 3: Hooking101 - Deeper on iOS Island

3

Mobile Security is….

Page 4: Hooking101 - Deeper on iOS Island

4

Dynamic Analysis is…

Runtime Instrumentation.Runtime Manipulation.Know what is done, when is done.

Page 5: Hooking101 - Deeper on iOS Island

5

iOS Runtime

Page 6: Hooking101 - Deeper on iOS Island

6

iOS RuntimeCurrent Execution point…Person *somePerson = [[Person alloc] init];[somePerson saySomething];…

Person implementation@implementation Person - (void) saySomething {

NSLog(@”Say Hello”);}

@end

Page 7: Hooking101 - Deeper on iOS Island

7

OnEnter: implementation@implementation- (void) onEnter_saySomething

{} @end

iOS RuntimeCurrent Execution point…Person *somePerson = [[Person alloc] init];[somePerson saySomething];…

Person implementation@implementation Person - (void) saySomething {

NSLog(@”Say Hello”);} @end

OnLeave: implementation@implementation- (void) onLeave_saySomething

{} @end

Page 8: Hooking101 - Deeper on iOS Island

8

Frida

What is Frida?- Dynamic instrumentation toolkit- Debug live processes- Scriptable- Execute your own debug scripts inside another process

- Multi-platform- Windows, Mac, Linux, iOS, Android, QNX

- Open Source- More info @ http://www.frida.re

Page 9: Hooking101 - Deeper on iOS Island

9

Frida

Basic Usage- Scripting (Python / Javascript)- Frida-trace- FridaCLI- Frida-ps- Frida-discover

Page 10: Hooking101 - Deeper on iOS Island

10

Keychain

Key-Value store/private/var/Keychains/keychain-2.db

Page 11: Hooking101 - Deeper on iOS Island

11

Keychain

OSStatus SecItemDelete ( CFDictionaryRef query );

OSStatus SecItemUpdate ( CFDictionaryRef query, CFDictionaryRef attributesToUpdate );

OSStatus SecItemAdd ( CFDictionaryRef attributes, CFTypeRef _Nullable *result );

Page 12: Hooking101 - Deeper on iOS Island

12

Files

Files on iOS are protected by Data Protection Classes

- (BOOL)createFileAtPath:(NSString *)path contents:(NSData *)contents attributes:(NSDictionary<NSString *id> *)attributes

Page 13: Hooking101 - Deeper on iOS Island

13

Jailbreak detection

Some apps doesn’t like jailbreak Devices

Page 14: Hooking101 - Deeper on iOS Island

14

Thank you for your attention

Questions?


Recommended