Android malware that monitor messages from specific numbers sent to infected devices have been frequently seen in the past. These typically intercept messages from premium numbers in order to prevent affected users from suspecting device infection. The Android malware we recently saw, however, took a different approach, as it monitored certain keywords contained in text messages received via infected devices instead.
The said malware is a Trojanized version of a game called Coin Pirates, which, according to our research, was hosted in a Chinese app market. The Trojanized version has been pulled out of the market when we last checked.
Like most Android malware, this Trojanized application, which we detect as ANDROIDOS_PIRATES.A, asks users to give more permissions than the legitimate version and thus, performs more routines than the original app.
As part of its installation routine, ANDROIDOS_PIRATES.A registers three receivers—BootReceiver, AlarmReceiver, and SMSReceiver. BootReceiver and AlarmReceiver are both responsible for starting the service MonitorService, which enables the malware to communicate with its malicious server. SMSReceiver, on the other hand, executes every time an infected device receives a text message.
Once the receivers are installed, ANDROIDOS_PIRATES.A gets the following information from infected devices, which it then sends to the malicious server:
- Device model
- SDK version
- IMEI number
- IMSI number
We were not able to access the server at the time of testing so we resorted to code analysis instead.
The code suggests that if the server replies to the device with the string “sendsms,” ANDROIDOS_PIRATES.A will send a text message that contains the phone’s IMEI number and device model to any of the following numbers:
Note that the aforementioned numbers are not premium numbers. Searching the Internet also shows that these numbers were possibly used by other older malware.
Furthermore, this malware connects to its server to download data that will populate a database that it installed in the infected device. The database contains a table called “blogconfig,” which has four fields: BlogType, KeyWords, Charging, and IsConfirm.
The KeyWords field is set to contain strings that the malware watches out for every time the infected device receives a text message through SMSReceiver. If the string matches, it is either deleted or uploaded to the server, depending on the value of the IsConfirm field.
This is a new trick. As I mentioned earlier, older SMS-targeting Android malware use the originating number to filter text messages. This malware checks for keywords inside the body of the messages, resulting in a more targeted approach. In addition, the malware author can update the items in the KeyWords field as well.
The other capabilities of this malware include sending of text messages to a certain number as well as adding a bookmark to the device’s browser, the specifics of both the text message and the bookmark URL for which depend on the server’s response.
User can check if they are affected by this malware by going to Settings > Applications > Running Services and checking if MonitorService exists. Affected users can also manually remove the malware from their devices by going to Settings > Applications > Manage Applications then uninstalling the malicious app.
For more information on how users can keep their Android-based mobile devices safe from malicious apps like this, check our report “5 Simple Steps to Secure Your Android-Based Smartphones.”