Room Banner

Mobile Malware Analysis

Learn and practice mobile malware analysis.

easy

60 min

Room progress ( 0% )

To access material, start machines and answer questions login.

Task 1Introduction
It's incredible how often our computers are in the scope of cyber attacks. Antivirus has become an indispensable shield to provide us with a more secure environment, since we are exposed to destructible malware and cyber attacks. Inside our pockets, we have computers so powerful, but much smaller, we must be equally attentive on our phones, because we can suffer equally damaging attacks, sometimes even worse, because they can store relevant information such as private conversations and important accounts.
Answer the questions below
Read the text above.
It is important to look at the past to understand why things are as they are today.
A new technology, due to the lack of exploration, appears to be extremely reliable. 
Every system is reliable, until someone proves otherwise.
You will need to do some research in order to answer the questions in this task.
Answer the questions below
What known as the first malware created to affect mobile devices?

What technology does this worm used to multiply?

What operating system did it infect?

What message did it show on the screen of the infected mobile phone?

The worm was created and sent out by researchers as a PoC (Proof of Concept), they did not believe that the mobile operating system could be easily exploited. Since then, malicious programs have become more popular. 

There is a weird file inside this machine, it looks malicious, but let's not jump into conclusions.

Deploy the machine in this task and wait for the connection to the machine to be made in your browser.


You can also connect to the TryHackMe VPN & use an RDP client of your choice using the following credentials:

Username: mma

Password: Malwareanalysis123!

You can open this view in full-screen by pressing the two diagonal arrows at the bottom right.

Wait for the MobSF application to load (this may take a few minutes, but the process is automatic so please just be patient) and you will find the files you should analyse on the machines Desktop.

This view means that MobSF is ready to be used.

Answer the questions below
Deploy the machine & use MobSF to scan the file named "TWFsd2FyZQ.apk" that is located on the Desktop.

What is the format of the file?

The sample's size is 10,1 bytes, so it seems that it is not a complex application.

Decode the name of the sample.

Which is the target platform?

Let's make a deeper analysis.

VirusTotal is a incredible service, this web site can give us the power of analyze a package with the database of more then seventy Anti-Virus, and the result is fast and accurate.

https://www.virustotal.com/

To analyze the file in VirusTotal, you will need the file hash, you can get it by using the powershell cmdlet "Get-FileHash" or you can analyze the filw with MobSF and it will show the file hash (we will get back to this tool in the next task).
Answer the questions below

What does Avast-Mobile can tell us about this software?

What program was used to create the malware?

The results provided by VirusTotal shows that we have a generic malware. It does not serve for attack purposes because we can see that a good part of the Antiviruses are detecting it, this malware is a good one for searching purposes, but it is also used for post exploitation.

What is the package name?

What is the SHA-1 signature?

By extracting the content, it will create a folder with some files inside, one of which is a XML. It describes some important information about the application for Android build tools, for Android operating system and for Google Play. This file declares items, shows some stuff as the package name and the permissions required to the device. The information that will be needed for the next questions can be found on VirusTotal also.

What is the unique XML file?

How many permissions are there inside?

Which permission allows the application to take pictures with the camera?

What is the message left by the community?

Let's use MobSF(Mobile Security Framework) to make a deeper analysis of this file, MobSF is a software created to make a security focused analysis of Android and IOS files. It can check for misconfigurations, leaked data and much more in a mobile program.

This tool can be used for static and dinamic analysis, in this room we will focus only in the static analysis but you are free to install it in a virtual machine you own to understand more how the application works, you can install it in GitHub - https://github.com/MobSF/Mobile-Security-Framework-MobSF.

The machine is configured to start MobSF when deployed, if you accidentally closed the web page you can visit the MobSF page by visiting the link http://127.0.0.1:8000 inside the deployed machine. Press the "Upload & Analyze" button and select the file we have been working on.

Answer the questions below

What is the programming language used to create the program?

How many signatures does the package has?

Application is signed with v1 signature scheme, what is it vulnerable to on Android <7.0?

MobSF gives all the code decompiled. Just a base of programming make us able to understand a little bit of what is happening.

This malware is used to create a connection with the victim that is called a reverse shell.

What is the App name?

It looks like  there is a function calling for the package manager, so it can see all the installed applications. What function is that?

Returning to the manifest.

The flag "android:allowBackup" allows the user to backup application data via USB debugging. It is recommended that this be set as "False", even if by default it is "True".

What is the severity of this configuration?

I think that now we have the necessary knowledge to analyze bigger stuff.

Our next sample located on the Desktop, the name of the file is sample2.apk, let's start a MobSF analysis on it.

Answer the questions below
What is the SHA-256 hash of the file?

After finding the sample on VirusTotal, what does the "Avast" anti-virus engine recognizes it as?

With what we have, try to find out the name of the sample.

It seems like it is a very dangerous malware and has a big history of destruction.

This became news for spying journalists, what year was that?

It was reported that the malware was developed by a legitimate intention:  The idea behind it was to use the software as a government tool designed to  track and combat terrorism and crime.

This malware has been found infecting people's smartphones and political activists in more than 44 countries.

If we search the name we found of the malware in MITRE ATT&CK (https://attack.mitre.org/), we can find some interesting information. 

What is the ID of the MITRE ATT&CK that is associated with our sample?

What technique has the ability to exploit OS vulnerabilities to escalate privileges?

Now, let's go back to the MobSF analysis.

There is a permission that when accepted, allows the application to access the list of accounts in the Accounts Service. What is the status shown by MobSF regarding this permission. (android.permission.GET.ACCOUNTS)

What org.eclipse.paho.client file refers to properties of Portuguese from Brazil (pt-br)?

This software has several features that make the identification and the processes it performs to explore the target, harder to handle, even when it is being analyzed.

The malware has a special appeal for its safety and its internal components, reducing the risk of compromise. It has a functionality for its cryptographic operations with the feature of a random bit generation service. How can it be identified?

It is normal to think that our mobile phones are harder to be infected, they have characteristics that makes the malware actions limited, as the Sandbox concept, and the fact that we never download things directly from the open internet.

Here I leave some awesome articles and other rooms that may be interesting to get deeper into this subject.

https://github.com/OWASP/owasp-mstg
https://attack.mitre.org/matrices/mobile/android/
https://attack.mitre.org/matrices/mobile/ios/

https://tryhackme.com/room/malmalintroductory
https://tryhackme.com/room/androidhacking101
https://tryhackme.com/room/iosforensics

If you have any feedback, feel free to contact me on discord: farinap5#4535

Answer the questions below

Thank you for your participation!

Room Type

Free Room. Anyone can deploy virtual machines in the room (without being subscribed)!

Users in Room

11,019

Created

1474 days ago

Ready to learn Cyber Security? Create your free account today!

TryHackMe provides free online cyber security training to secure jobs & upskill through a fun, interactive learning environment.

Already have an account? Log in

We use cookies to ensure you get the best user experience. For more information contact us.

Read more