-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mobile App Reverse Engineering
By :
Similar to Android, iOS applications also come in a specific zipped format called IPA, or an iOS App Store Package. iOS application packages can also be renamed by changing the extension to ZIP and then the components can be extracted, though the components of an iOS application package differ from those of an Android one.
iOS apps are mainly built using Objective-C and Swift, both of which can be disassembled using a disassembler such as Hopper or Ghidra. In Objective-C applications, methods are called via dynamic function pointers, which are resolved by name during runtime. These names are stored intact in the binary, making the disassembled code more readable. Unlike Android, in iOS, the application code is compiled to machine code that can be analyzed using a disassembler.
The following are the major components of an iOS application package:
Info.plist: Similar to the Android manifest file in an APK, this information property list file contains key-value pairs that specify essential runtime-configuration information for the application. The iOS operating system relies on the presence of this file to identify relevant information about the application and related files.The following diagram illustrates the iOS architecture overview:
Figure 1.13 – iOS architecture
Let's see how to create a simple hello world application for iOS and then unzip it and look at its components:
Figure 1.14 – Creating an Xcode project
Figure 1.15 – Selecting the project template
Figure 1.16 – Providing project details
Xcode will now create a simple hello world application and you will see the following default code in the Xcode window:
Figure 1.17 – Project details
Figure 1.18 – Selecting a simulator
The app should run on the selected simulator:
Figure 1.19 – App running on the simulator
Figure 1.20 – Exporting the application package
Figure 1.21 – Exporting the application package (cont.)
.zip:
Figure 1.22 – Diagram explaining the application (IPA) extraction process via renaming
# unzip MARE-Chapter-1.zip
The following screenshot shows the results for reference:
Figure 1.23 – Extracting the content of the IPA after renaming it to ZIP
Payload directory and then inside the MobileAppReverseEngg-App-1.app file:# cd Payload # cd MobileAppReverseEngg-App-1.app
Figure 1.24 – Extracted content of the IPA
The following diagram illustrates the process of reverse engineering an iOS application:
Figure 1.25 – Overview of the reverse engineering process of an IPA
Have a look at Figure 1.3 to understand how a disassembled binary looks in Hopper disassembler.
Change the font size
Change margin width
Change background colour