Anubis Analysis
Anubis Analysis
Introduction
Anubis is one of the most well-known malware in the
Android Malware family. It's still popular for threat actors
today, given its capabilities and the damage it has done to
andorid users in the past. On the other hand, it offers many
Malware Developers the opportunity to sample their
abilities to create a new malware.
Two Stages Of
Anubis
Threat actors, if they plan to present the Anubis through a
legit application such as Google Play, they use the
application we will call Dropper at this point. Dropper's task
is to download and install the real Anubis malware on the
device from the moment it starts working. On the other
hand, in scenarios where threat actors plan to spread
Anubis through websites, fake campaigns or fake gifts, we
can see that they share the Anubis application directly
without using Dropper.
30
Droppers
As it seems, Droppers try to mislead their targets by
imitating other popular legitimate apps on Google
Play.
Dropper apps should attract as little attention and be
silent as possible to evade Google Play security
services. For this reason, Droppers' abilities are very
limited. It will be more than enough for threat actors to
install Anubis on the target device in the safest way
possible. So how can Dropper applications install
Anubis on the device? Let's take a look at this
together.
REQUEST_INSTALL_PACKAGES, the first red lights
that appear with the sunrise, our hero who first
greeted us when we started our story.
With this permission Android applications can obtain
the ability to install an external application on the
device.
And thus, Anubis malware is successfully installed on the
device. As we mentioned above, Droppers imitate
legitimate apps on Google Play to hide themselves and
gain trust. On the other hand, Anubis do nearly same
things with Droppers. It uses the current pandemic
process and the impact of this process on society in order
to hide itself and gain trust. Application names such as
"Pandemic Support", "COVID-19 Support", "2000 Turkish
Lira Support", "Pandemic Support Application" and
emblems of official ministries are widely used at this
point.
40
Anubis Applications
COVID-19 Support
Pandemic Application
Pandemic Support
Dropper Examples
50
Checksums
9e2ebf224ef23e5d01a88e
MD5 6bd06d6ad0
defb1558ddc36fd10050f
SHA-1 2cd65617dce7274dc01
a0eb4e0e7346422d18d34
SHA-256 21d1f185fcb2b01ac3080a
b3b3bc68d67aab1f4477d
60
Static Analysis
The first thing we need to look at in the static analysis section will
of course be the permissions requested by the application in
"AndroidManifest.xml".
When we examine our loaded dex file and the classes in it,
we are faced with many strings encrypted in the
"parrot.ski.frog.a" class.
01
Static Analysis
Looking at our encrypted strings, we see that they all go to
the "a" function before being defined to any variable. When
we examine this function and code flow, we are faced with
a process that we are familiar with.
RC4+BASE64
cE=com.android.vending:id/toolbar_item_play_protect_settings
cD=com.android.vending:id/play_protect_settings
cF=com.google.android.gms.security.settings.verifyappssettings
activity
Thanks to its accessibility ability, Anubis can infer what the user
is doing on the screen at that moment, and runs the "a" function
directly in any scenario that will harm it. As we can see in our
example code block, if it detects any of the cE / cD / cF string
constants, the escape function "a" will run directly.
32
Dynamic Analysis
In our sample, we come across the
application under the name of "2000 TL
Pandemic State Support for Each Family"
and using the emblem of the Ministry of
Health of the Republic of Turkey.
With Anubis running on the target system, we see that the first
thing it wants from the user is "Accessibility" privileges. Because
many simple but effective abilities ("Clicking Buttos", "Scorlling
Pages", "Reading Windows Context") that the malware
basically possesses are hidden behind these powers. On the
other hand, we see at the beginning of our analysis that Anubis
also uses a way to hide its icon from the app launcher in order to
make it difficult to remove it from the device when it starts
running.
42
Dynamic Analysis
Request
Encryption RC4
Key =
CRViysGgKzt6i
72
Manual Unpacking
At the beginning of our report, we mentioned that the sample
we examined loads a class in runtime. We hooked the
"DexClassLoader" function to find this loaded class. But we
can also do this manually. In this way, we will discover how
packers, which are used extensively in the Android Malware
world, do this job. First, let's look at our
"AndroidManifest.xml" file.
82
Manual Unpacking
As we can see, all activities including MAIN are called under
the "parrot" package, but we don't have the "parrot"
package in sight. How is this possible?
This packer, which is widely used among Android Malwares,
loads all the lost classes by using the class under the application
tag.
pigeon.theme.earth.IU
hUkAkGfQxFbEwMiUt
WuIuBrReSmPjPqEiW
kAcJiSq
92
The function 2 above the attachBaseContext function is the
unpack function used in this common packer :D
GG !!!
43
Conclusion
Anubis is a malware that is worth examining in every aspect and is
really impressive, this application that harms tens of thousands of
android users with thousands of samples around the world, is a
source for future android malware. I hope you liked my report,
thanks for reading. If you have any question, feel free to ask me on
twitter @0x1c3N
References
https://eybisi.run/Mobile-Malware-Analysis-Tricks-used-in-
Anubis/
https://pentest.blog/n-ways-to-unpack-mobile-malware/
https://www.trendmicro.com/en_us/research/19/a/google-
play-apps-drop-anubis-banking-malware-use-motion-based-
evasion-tactics.html
https://securityintelligence.com/anubis-strikes-again-mobile-
malware-continues-to-plague-users-in-official-app-stores/