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

Case study two – automating test cases to find security issues

During an audit, we noticed that all mobile applications developed by a specific team used a list of common secrets and hardcoded values in the code. As it was also a black box penetration test, we did not have any source code but had a list of 10+ Android applications to test. We wanted to find out how many of these applications have the same secrets and hardcoded accounts inside the application code. One way of doing this could have been by manually extracting strings from each of these application binaries and then searching for them. But we automated this part a little bit by following these steps:

  1. Extracting all dex files from the APKs, using the unzip utility
  2. Running strings on all dex files and saving the result in different text files
  3. Grepping through all the text files containing strings to search for our specific strings

A simple script to automate this would look like this:

...