MammothFraud, an eastern SMS stealer
The malware, dubbed MammothFraud from one of the logging strings МАМОНТИЗАЦИЯ! checks for the android.permission.CALL_PHONE permission and also that the SDK is greater than 26. If positive, it will attempt to introduce an USSD code to obtain the mobile phone number. For example, *111*0887# for the MTS RU provider. When the permissions are not granted by the user, it will prompt the user with a message to allow the requested permissions. In the list there are other telecom providers from Uzbekistan, Ukraine and Russia with USSD codes present.
A list of the permissions requested:
In case there are active SIM cards in the device, the sample registers broadcast receivers for handling specific SMS-related events and for shutdown events. It also verifies whether the following applications are installed in the system:
All the information is logged and sent to the following Telegram account: https://api.telegram.org/bot/bS243k2ivMi4lw2WHYEeXHEgPSQfr2/5ujbXer+5Cr+xmVU7Y7lwUTW94Rklavzu/getUpdates?offset=-1&timeout=60.
It has some available commands for sending SMS, send USSD requests, getting sent SMS, showing toasts or banning. If it receives the ban command, it will exit the application as seen on the screenshot. The screenshot also lists all the commands that can be received: sendsms|sendussd|getsms|ban|showtoast|getsentsms
The sample also downloads a raw file from pastebin and at the time of the visit it showed the following content:
If it fails to fetch the URL, it will wait until it is back online or the device has internet access.
The sample shows a function that focuses on detecting whether the APK is running in an emulated environment or not. Before doing any more thorough checks it verifies that the sample isn’t running under QEMU by checking libc_malloc_debug_qemu.so:
If any of the following strings are found, it will return false:
google_sdk, emulator, Android SDK built for x86, Genymotion, unknown
Brands: generic, Xiaomi
There are also checks against Build.MANUFACTURER, Build.FINGERPRINT and Build.Product. If it detects the Google in Build.BRAND, it checks for specific fingerprints:
So far, I have noticed 4 samples contacting the same telegram bot. It is safe to say that all of them are likely to be from the same authors.