All right, so for mobile security testing, we also need to know some basic reverse engineering concepts
in order to understand the operating system, the architecture, as well as the programming language
intricacies of mobile devices.
Now, reverse engineering a mobile app is just basically an overview is the process of analyzing the
compiled app to extract information about its source code to find out how it works.
OK, that's basic, but the goal of reverse engineering is comprehending the code here.
Of course, you can do this by examining the compiled code, which we call static analysis, or observing
the app during runtime, which is called dynamic analysis or a combination of both.
So Android offers reverse engineers big advantages that aren't necessarily available with iOS.
And one of the reasons is because Android is open source.
That means you can study its source code at Android Open Source Project and modify the OS and it's standard
tools any way you want.
Sounds like fun.
So in our setting up our laboratory section, we've built a reverse engineering environment with Android
Debugging Bridge, ETB, apk studio RPK Tool and bytecode viewer.
Now, bytecode viewer is a decompiled to make Java bytecode more, I'd say, readable by human beings.
So we'll download an epic decompiled ADEX file and analyze the source code with bytecode viewer and
the epic tool.
Now, throughout the course will intentionally use vulnerable mobile applications that are created for
security testing, and that's just to learn the insecurities of Android operating system.
So I'll start with the insecure bank application and will reverse engineer it.
Are you ready?
Let's get started.
Opened up the terminal screen.
And here you just change directory to desktop.
So now let's unzip the APJ file to a new folder and see the extracted files.
All right, so open the folder and look here.
We have some folders and files.
I Iron F folder, this contains the manifest information, as well as other metadata about the Java
package.
The Reds directory contains all the resources, such as images, icons, layout, resources, etc..
And here's the Android manifest file.
So classes, not decs file, contains code that's ultimately executed by Android runtime, and it references
any classes or methods that are used within an app as well as resources that ARCC that is compiled binary
form of resources.
Now, let's compile and analyze these files with bytecode viewer.
Open by code viewer.
At the peak of the you were a bank under the file menu.
Open it up.
OK, so it's decompiled the APK now.
And yeah, so here are the class files that are extracted from the decks file.
Says click on one of them.
So what you're looking at here are two panes in the workspace section here.
Now, the left pane shows the code with a Jadi GoED compiler and the right pane shows the code with
the default smally de compiler.
So under the You menu, you can change the paint options and select another decompiled if you want to
use.
So you can also add another Pann.
So let's change the second pane to bytecode over another class file.
And yeah, so see how this campaign changes and shows us the code with a bytecode decompiled.
Under the settings menu, you can change the default settings, of course.
Now, there's also a plug in system that will allow you to interact with a load of class files, for
example, you can write a malicious code searcher or anything else you can think of.
You can either use one of the pre written plug ins or write your own.
Down here in the lower left section, there's a search field to search string methods and acts from.
All classes or the current class.