12.07.2015 Views

Devices - Penetration Testing Like a Hacker. - SecNiche Security Labs

Devices - Penetration Testing Like a Hacker. - SecNiche Security Labs

Devices - Penetration Testing Like a Hacker. - SecNiche Security Labs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FOCUSBreaking Downthe i* {<strong>Devices</strong>}<strong>Penetration</strong> <strong>Testing</strong> <strong>Like</strong> a <strong>Hacker</strong>Smartphones have revolutionized the world. The online world isgrappling with severe security and privacy issues. The smartphoneapplications require an aggressive approach of security testingand integrity verification in order to serve the three metrics ofsecurity such as confidentiality, integrity and availability.This paper sheds a light on the behavioral testingand security issues present in Apple’s IOSdevices and applications. Primarily, this paperrevolves around penetration testing of iPhone deviceand its applications. The paper does not discuss theiPhone application source code analysis and reverseengineering.Mach-O Format and IPhone ArchitectureMach-O is the primary file format that is used forrunning applications and programs on Apple devices.This format is stored as an application binaryinterface on the respective MAC OS X operatingsystem. Mach-O provides support for intermediate(debug) and final build (released) of the binaries.This is quite helpful in debugging as MACH-O formatsupports both dynamic and statically linked codefiles. Mach-O format is basically divided into threemain components stated as header structure, loadstructure and data structure. The header structureexplicitly specifies the environment information of thebinary which is required by the kernel to differentiatebetween the code execution on different processorsand architectures. Load structure comprises of thevarious segments which define the byte size andmemory protection attributes. When the code isexecuted dynamically, the segments map the desiredbytes into virtual memory as these segments arealways aligned with the virtual memory pages. Datastructure contains various sections of data which aremapped through the segments defined in the loaderstructure. Usually, there are text and data segments.For example: considering an Objective C, there aresegments defined as __OBJC which are private to theObjective C compiler. The internals of Mach-O formatcan be read here [1]. Figure 1 shows the genericlayout of iPhone architecture.The application binaries (Mach-O) format areencrypted in nature when these are retrieved from theApple store. In order to perform source code analysisthese files are required to be decrypted by the processof reverse engineering.Figure 1. iPhone architecture05/2011 (5) SeptemberPage 8 http://pentestmag.com

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

Saved successfully!

Ooh no, something went wrong!