présentation gnireenigne

31
CocoaHeads.fr

Upload: cocoaheadsfr

Post on 20-Aug-2015

732 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Présentation   gnireenigne

CocoaHeads.fr

Page 2: Présentation   gnireenigne

gnireenigneLes outils du mal

Page 3: Présentation   gnireenigne

Enahpéts ErdusZorglhomme

Page 4: Présentation   gnireenigne

“Alors, c’est l’histoire d’un crash…”

2011-01-17 11:32:53.186 packagemaker[7547:903] -[PMCLIFakeDocument alertDispatcher]: unrecognized selector sent to instance 0x2096402011-01-17 11:32:53.187 packagemaker[7547:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PMCLIFakeDocument alertDispatcher]: unrecognized selector sent to instance 0x209640'*** Call stack at first throw:( 0 CoreFoundation 0x9579b6ba __raiseError + 410 1 libobjc.A.dylib 0x96940509 objc_exception_throw + 56 2 CoreFoundation 0x957e890b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x95741c36 ___forwarding___ + 950 4 CoreFoundation 0x95741802 _CF_forwarding_prep_0 + 50 5 packagemaker 0x0009c076 0x0 + 639094 6 Foundation 0x91b06ab1 __NSFireDelayedPerform + 537 7 CoreFoundation 0x95705adb __CFRunLoopRun + 8059 8 CoreFoundation 0x95703464 CFRunLoopRunSpecific + 452 9 CoreFoundation 0x95703291 CFRunLoopRunInMode + 97 10 Foundation 0x91b7f8d1 -[NSConcreteTask waitUntilExit] + 273 11 packagemaker 0x000714e2 0x0 + 464098 12 packagemaker 0x00046cd3 0x0 + 290003 13 packagemaker 0x0001c546 0x0 + 116038 14 packagemaker 0x0001c5dd 0x0 + 116189 15 packagemaker 0x0001c5dd 0x0 + 116189 16 packagemaker 0x0001c5dd 0x0 + 116189 17 packagemaker 0x0001c5dd 0x0 + 116189 18 packagemaker 0x0001c5dd 0x0 + 116189 19 packagemaker 0x000469f9 0x0 + 289273 20 packagemaker 0x0003213f 0x0 + 205119 21 packagemaker 0x00032a0b 0x0 + 207371 22 packagemaker 0x00033362 0x0 + 209762 23 packagemaker 0x000316f3 0x0 + 202483 24 packagemaker 0x0003efc2 0x0 + 257986 25 packagemaker 0x000304cf 0x0 + 197839 26 packagemaker 0x0006a7d9 0x0 + 436185 27 packagemaker 0x00069e07 0x0 + 433671 28 packagemaker 0x00002bca 0x0 + 11210 29 packagemaker 0x00002ba9 0x0 + 11177

Page 5: Présentation   gnireenigne

class-dump

Page 6: Présentation   gnireenigne

class-dump

“Si vous avez des classes qui ne doivent être connues de personne, peut-être ne devriez vous pas les coder.”

Page 7: Présentation   gnireenigne

class-dump

typedef struct { struct _NSModalSession *_field1; char _field2; id _field3;} CDAnonymousStruct14;

…@protocol NSCoding- (void)encodeWithCoder:(id)fp8;- (id)initWithCoder:(id)fp8;@end

…@interface NSAppleMenuItemRepresentedObject : NSObject{ NSString *_title; NSImage *_image; NSString *_domainName; NSString *_key; NSArray *_submenuRepresentedObjects; NSDictionary *_dictionary;}

@interface NSApplication (NSAppleMenuPrivate)- (void)_updateAppleMenu:(id)fp8;@end

Structures

Protocoles

Classes

Catégories

Page 8: Présentation   gnireenigne

Démo

Page 9: Présentation   gnireenigne

class-dump

http://www.codethecode.com/projects/class-dump/

Ressources

Éxécutable + code source ( non utilisable dans les parkings souterrains )

Support

Binaires Mac OS X et iOS

Binaires 32-bits et 64-bits

Page 10: Présentation   gnireenigne

otool

Page 11: Présentation   gnireenigne

otool

“Permet d’afficher la matrice et un peu plus si affinité”

Page 12: Présentation   gnireenigne

Démo

Page 13: Présentation   gnireenigne

Éxécutable + code source ( APSL + GPL? )

Ressources

/usr/bin/otool

Support

Binaires Mac OS X et iOS

Binaires 32-bits et 64-bits

otool

http://opensource.apple.com/source/cctools/cctools-750/

Page 14: Présentation   gnireenigne

otx

Page 15: Présentation   gnireenigne

otx

“otool pour ceux qui ne lisent pas la matrice.”otool’s bastard son

Page 16: Présentation   gnireenigne

Démo

Page 17: Présentation   gnireenigne

otx

Ressources

Éxécutable + code source ( domaine public )

Support

Binaires Mac OS X

Binaires 32-bits (PowerPC et Intel)

http://otx.osxninja.com/

Page 18: Présentation   gnireenigne

etc.

Page 19: Présentation   gnireenigne

etc.

IDA Pro

http://www.hex-rays.com/idapro/

strings

/usr/bin/strings

http://ideveloper.tv/freevideo

Ressources

Spelunking OS X

Page 20: Présentation   gnireenigne

cocotron & GNUstep

Page 21: Présentation   gnireenigne

cocotron & GNUstep

Ressources

http://www.cocotron.org/ ( MIT License )

http://savannah.gnu.org/projects/gnustep ( GPL )

Page 22: Présentation   gnireenigne

Obfuscation“Je vous demande de vous arrêter.”

Page 23: Présentation   gnireenigne

#define PWLicenseCenterDelegate seNYECN0G0i

#define setIsLicensed setRcjyzqqe2Atvjiitq

Renommage des classes, méthodes, données membres

#include <stdio.h>

int main (int argc, const char * argv[]){

char tString[16]; tString[0]='H';tString[1]='e';tString[2]='l';tString[3]='l';tString[4]='o';tString[5]=',';tString[6]=' ';tString[7]='W';tString[8]='o';tString[9]='r';tString[10]='d';tString[11]='!';tString[12]='\n';tString[13]=0; printf("%s",tString); printf("Hello, Excel!\n"); return 0;}

Exemple stupide pour masquer des chaînes à strings

Obfuscation

Page 24: Présentation   gnireenigne

CocoaHeads.fr

Page 25: Présentation   gnireenigne

One more thing

Page 26: Présentation   gnireenigne

Cong

Page 27: Présentation   gnireenigne
Page 28: Présentation   gnireenigne
Page 29: Présentation   gnireenigne

Démo

Page 30: Présentation   gnireenigne

Cong

Ressources

Éxécutable + un peu du code source ( BSD )

Support

Mac OS X bundles

Mac OS X v10.5 ou ultérieur

http://s.sudre.free.fr/Software/Cong/about.html

Page 31: Présentation   gnireenigne

CocoaHeads.fr