Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mobile App Reverse Engineering
Mobile App Reverse Engineering

Mobile App Reverse Engineering: Get started with discovering, analyzing, and exploring the internals of Android and iOS apps

eBook
€19.99 €22.99
Paperback
€27.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mobile App Reverse Engineering

Chapter 1: Basics of Reverse Engineering – Understanding the Structure of Mobile Apps

All of us use cell phones in our daily lives now, and their usage has grown to such a crucial level that people frequently name cell phones as one of the three things you can't live without, after food and water. Cell phones handle almost every task, from managing funds in bank accounts and investments to travel bookings, shopping, and health appointments.

To perform these tasks, cell phones have mobile apps. These apps handle a majority of your data and help you perform tasks.

As these modern mobile apps handle sensitive user information, perform critical tasks, and provide access to a huge array of resources on the internet, the security of the data being handled and the operations performed on it also need to be improved.

A mobile application penetration tester tests the security of mobile applications in order to find vulnerabilities. To find the vulnerabilities, the tester is required to understand the internal working and logics of the application. These details can be found in the source code of the application. However, the penetration testers do not always have the source code to hand, as in the case of a black-box penetration test. During a black-box penetration test, all that the penetration tester has is the application package, that is, the Android Application Package (APK) or iOS App Store Package (IPA) file. In such a case, to understand the working of the app, they need to unpack the application package and get the source code.

Reverse engineering is the technique of dismantling an object to study its internal designs, code, logic, and so on. Reverse engineering mobile applications is the process of disassembling/dismantling an app to reveal its code and internal logic, components, and so on.

In this chapter, we're going to cover the following main topics:

  • Reverse engineering fundamentals
  • Android application fundamentals
  • iOS application fundamentals

We will learn about the basics of reverse engineering and how mobile applications are built. These fundamentals are important to understand before we can jump into the actual task of reverse engineering modern apps.

Technical requirements

Android Studio and Xcode are required to complete the relevant hands-on exercises. Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS. Android Studio is the official IDE for Google's Android operating system. An Apple laptop/desktop (Mac) can install and run both Xcode and Android Studio, whereas other laptops/desktops running Windows or Linux will only be able to support Android Studio.

For more information, please refer to the following links:

Reverse engineering fundamentals

Let's first understand the fundamentals of reverse engineering, why it is needed, and what steps are involved.

As mentioned earlier in this chapter, reverse engineering is the technique of dismantling an object to study its internal designs, code, and logic.

When a developer builds a mobile app, they choose a programming language (according to the targeted platform – Android, iOS, or both), write the code for the functionalities they want, and add resources such as images, certificates, and so on. Then the code is compiled to create the application package.

While reverse engineering the same app, the reverse engineer dismantles the application package to the components and code.

Some of the frequently used terms in reverse engineering are the following:

  • Decompilation: This is the process of translating a file from a low-level language to a higher level language. The tool used to perform decompilation is called a decompiler. A decompiler takes a binary program file and changes this program into a higher-level structured language. The following diagram illustrates the decompilation process:
Figure 1.1 – Diagram of the decompilation process

Figure 1.1 – Diagram of the decompilation process

  • Disassembling: This is the process of transforming machine code (in an object code binary file) into a human-readable mnemonic representation called assembly language. The tool used to perform disassembly is called a disassembler as it does the opposite of what an assembler does. The following diagram illustrates the disassembly process:
Figure 1.2 – Diagram of the disassembly process

Figure 1.2 – Diagram of the disassembly process

A simple binary disassembled in a disassembling tool, Hopper, looks as follows:

Figure 1.3 – Disassembled binary in Hopper

Figure 1.3 – Disassembled binary in Hopper

  • Debugging: This is a technique that allows the user to view and modify the state of a program at runtime. The following diagram illustrates the debugging process:
Figure 1.4 – Diagram of the debugging process

Figure 1.4 – Diagram of the debugging process

Understanding the different methodologies and approaches used in reverse engineering is very important. We will be using all these concepts in further chapters of this book.

Now that we have seen the fundamentals of reverse engineering, let's explore how mobile applications, that is, Android and iOS apps, are developed. We will now be looking into the components, structure, and concepts behind the mobile application fundamentals.

Left arrow icon Right arrow icon

Key benefits

  • Learn the skills required to reverse engineer mobile applications
  • Understand the internals of iOS and Android application binaries
  • Explore modern reverse engineering tools such as Ghidra, Radare2, Hopper, and more

Description

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.

Who is this book for?

This book is for cybersecurity professionals, security analysts, mobile application security enthusiasts, and penetration testers interested in understanding the internals of iOS and Android apps through reverse engineering. Basic knowledge of reverse engineering as well as an understanding of mobile operating systems like iOS and Android and how mobile applications work on them are required.

What you will learn

  • Understand how to set up an environment to perform reverse engineering
  • Discover how Android and iOS application packages are built
  • Reverse engineer Android applications and understand their internals
  • Reverse engineer iOS applications built using Objective C and Swift programming
  • Understand real-world case studies of reverse engineering
  • Automate reverse engineering to discover low-hanging vulnerabilities
  • Understand reverse engineering and how its defense techniques are used in mobile applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 27, 2022
Length: 166 pages
Edition : 1st
Language : English
ISBN-13 : 9781801074902
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : May 27, 2022
Length: 166 pages
Edition : 1st
Language : English
ISBN-13 : 9781801074902
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 96.97
iOS Forensics for Investigators
€35.99
Mobile App Reverse Engineering
€27.99
Offensive Shellcode from Scratch
€32.99
Total 96.97 Stars icon

Table of Contents

12 Chapters
Section 1: Basics of Mobile App Reverse Engineering, Common Tools and Techniques, and Setting up the Environment Chevron down icon Chevron up icon
Chapter 1: Basics of Reverse Engineering – Understanding the Structure of Mobile Apps Chevron down icon Chevron up icon
Chapter 2: Setting Up a Mobile App Reverse Engineering Environment Using Modern Tools Chevron down icon Chevron up icon
Section 2: Mobile Application Reverse Engineering Methodology and Approach Chevron down icon Chevron up icon
Chapter 3: Reverse Engineering an Android Application Chevron down icon Chevron up icon
Chapter 4: Reverse Engineering an iOS Application Chevron down icon Chevron up icon
Chapter 5: Reverse Engineering an iOS Application (Developed Using Swift) Chevron down icon Chevron up icon
Section 3: Automating Some Parts of the Reverse Engineering Process Chevron down icon Chevron up icon
Chapter 6: Open Source and Commercial Reverse Engineering Tools Chevron down icon Chevron up icon
Chapter 7: Automating the Reverse Engineering Process Chevron down icon Chevron up icon
Chapter 8: Conclusion Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(6 Ratings)
5 star 83.3%
4 star 0%
3 star 0%
2 star 0%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




Amit Sep 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Informative book. Structured content, and in-sight to mobile apps and reverse engineering process. Highly recommended
Subscriber review Packt
Cassadee Jul 04, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a great starting point for learning how to statically reverse Android and iOS apps. It discusses the various components that make up Android and iOS apps, how apps are developed, the various software tools used to create and reverse mobiles apps, and how to use certain tools to analyze, de-compile, and reverse engineer mobile applications. While it’s not a very long book, it does include detailed walkthroughs for installing and using various open-source tools (with the exception of Hopper, which utilizes the demo version). The sample applications, which the reader is instructed to download from GitHub, are written in Java, Objective C, and Swift. I appreciate that the author provided the source code for these apps and that they all have the same basic functionality, so that the reader may compare and contrast the differences between these languages and gain some experience reversing all three applications. There are case studies scattered throughout the book, which provide a good foundation of what reverse engineers and pen testers would look for in the real world when analyzing mobile applications. The author also discusses common closed-source/paid tools that are used for reversing binaries along with the licensing models for those apps. The book concludes with suggestions for how the reader may continue their studies in the world of reverse engineering mobile applications, and also lists various topics and skills the reader may choose to excel in to become experts in this field.The target audience of this book is people who are just getting into the field of reversing mobile apps and why reversing and pen testing mobile apps is important to information security. The reader should still have some knowledge of how to use virtualization software, Ubuntu Linux, and basic command line / terminal skills. To get the most hands-on experience following along with the walkthroughs in the book, the reader will need a system running MacOS. However, if you don’t have a Mac don’t let that stop you from reading this, because the actual reversing of all of the example apps is performed on a Linux Virtual Machine. Since the author provides downloadable app packages on GitHub, there’s no need to compile those yourself.I enjoyed all of the info the book provides on various tools used for reverse engineering mobile applications; however, I’d like to point out that Binary Ninja cloud is free to use and can provide mach-O support for reverse engineering iOS packages. (Note: I am not affiliated with Vector 35.)In conclusion, I highly recommend this book to anyone interested in learning how to get started with analyzing and reversing mobile applications. The walkthroughs are clear, concise, and easy to follow along with. While the information won’t turn you into an expert reverse engineer, it’s a great foundation for beginners and presents a thorough list of “next steps” for those who want to dig deeper into the field of reversing mobile applications.
Amazon Verified review Amazon
Sunil yadav May 27, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I ordered this book in pre-order state, and read it in early access on Packt website. It covers the basics very well, explaining the internals of mobile app, binary structure etc. I loved the part where real world case studies are discussed.I recommend this book to people who want to start with mobile app rev engg.
Amazon Verified review Amazon
Amit Tomar Jul 10, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very informative book for those, who are in Mobile app development. Must read.The content of thos book is well in order and the explanation has adequate quality.
Amazon Verified review Amazon
Saurabh Shetty Jul 05, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am an Android developer and I find this book very informative and useful in getting to know the Android internal workings. I would recommend this book to anyone trying to get started in Android app reverse engineering.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.