Reverse Engineering Tools
📍First, you need to understand why you are reverse engineering
The main purpose of this technique is to understand how applications work, analyze them, find vulnerable implementations, hardcoded data, and so on.
One goal might be to find the hidden API endpoint that the app is using. We can do this by:
Pressing Ctrl + Shift + F
Searching for
"http"
📍Reverse Engineering Tools
📌Dex2jar & jd-gui
How to get the Java source code?

Steps
Unzip the APK file to get the
classes.dexfile:Use the
dex2jartool to convert theclasses.dexfile to a Java file with a.jarextension:Use the
jd-guitool to view the Java code:
📌Jadx & jadx-gui
To run Jadx:
Output: We will get two directories.

We are more interested in the Java code. The structure is organized according to the package name of the Java classes.

To automate this entire process, you can use the
findcommand as shown below:

To automate this whole process, you can use
findwhich is shown in this command below
While
dex2jaroften produces better results with fewer errors,jadxworks with the whole application.
📍jadx-gui
jadx-gui performs the same functions as
jadxbut includes a graphical user interface similar tojd-gui. It provides a clear view of the app and additional features, such as deobfuscation (renaming classes, methods, and fields with names shorter than three characters).To run JADX-GUI:
If you encounter issues with jadx-gui, consider viewing the source code with Eclipse IDE, a popular tool for Java development.
📌Androguard
Androguard is a powerful open-source tool for analyzing Android applications, written in Python.
It has a lot of modules, but we will focus on 3 necessary modules:
📍Analyze Module
The Analyze module performs static analysis of a binary. You can load a binary into the module, which then provides an IPython shell. This shell allows you to browse through the application and inspect its components interactively.

Hands-on it
To analyze an APK:
Output

Androguard automatically creates three objects:
a: Represents the APK file.d: Represents the Dalvik (DEX) format.dx: Provides analysis options and data flow information.
We will focus on the
aanddxobjects.
📍Call Graph Module
It's super amazing for analyzing obfuscated binaries.
Handy for tasks like detecting routing, handling certificate pinning, and analyzing decryption or encryption methods.
📍Flow Graph Module
The key difference between this module and the Call Graph Module is:
Call Graph: Focuses on the sequence of method calls (e.g.,
method1callsmethod2, which callsmethod3, and so on).

Flow Graph: Focuses on the control flow within a single function.

Last updated