Book Image

Mobile App Reverse Engineering

By : Abhinav Mishra
5 (1)
Book Image

Mobile App Reverse Engineering

5 (1)
By: Abhinav Mishra

Overview of this book

Mobile App Reverse Engineering is a practical guide focused on helping cybersecurity professionals scale up their mobile security skills. With the IT world’s evolution in mobile operating systems, cybercriminals are increasingly focusing their efforts on mobile devices. This book enables you to keep up by discovering security issues through reverse engineering of mobile apps. This book starts with the basics of reverse engineering and teaches you how to set up an isolated virtual machine environment to perform reverse engineering. You’ll then learn about modern tools such as Ghidra and Radare2 to perform reverse engineering on mobile apps as well as understand how Android and iOS apps are developed. Next, you’ll explore different ways to reverse engineer some sample mobile apps developed for this book. As you advance, you’ll learn how reverse engineering can help in penetration testing of Android and iOS apps with the help of case studies. The concluding chapters will show you how to automate the process of reverse engineering and analyzing binaries to find low-hanging security issues. By the end of this reverse engineering book, you’ll have developed the skills you need to be able to reverse engineer Android and iOS apps and streamline the reverse engineering process with confidence.
Table of Contents (13 chapters)
1
Section 1: Basics of Mobile App Reverse Engineering, Common Tools and Techniques, and Setting up the Environment
4
Section 2: Mobile Application Reverse Engineering Methodology and Approach
8
Section 3: Automating Some Parts of the Reverse Engineering Process

Converting DEX files to smali

Let's try to convert the same APK to smali files, using another tool we used in Chapter 2, Setting Up a Mobile App Reverse Engineering Environment Using Modern Tools.

In order to decompile the APK, run the following command:

# apktool d app-debug.apk

apktool uses smali/baksmali internally, while decompiling an APK file. The following figure shows that apktool is decoding the app-debug.apk file provided:

Figure 3.7 – Using apktool to decompile the application

Figure 3.7 – Using apktool to decompile the application

Once the APK has been decompiled, navigate to the folder created (in this case app-debug), and you will find several subfolders inside it with the name smali*. These folders contain the converted smali files from the .dex files in the APK:

Figure 3.8 – Decompiled content from apktool

Figure 3.8 – Decompiled content from apktool

Opening any of the smali files will show the respective version of the code. Let's look at the content of the smali files for...