In the last quarter of 2015, we observed an emerging trend among financial Trojans. An information-stealing Android threat (detected by Symantec as Android.Bankosy) added functionality to its code to enable it to deceive two-factor authorization (2FA) systems that use voice calls.
What does two-factor authorization using voice calls involve? In a typical 2FA system, the second factor—normally a generated one-time passcode (OTP)—is sent to the user’s registered mobile number through SMS. In the past, we have seen several cases where the malware installed on the victim’s device snooped on or intercepted the incoming SMS containing the OTP. To improve the security of OTP delivery, some financial organizations started delivering OTP through voice calls instead of SMS. Of course, malware creators have already devised ways to take advantage of this development.
So how does Android.Bankosy take advantage of voice-based 2FA? Once the malware is installed on the victim’s device, it opens a back door, collects a list of system-specific information, and sends it to the command and control (C&C) server to register the device and then get a unique identifier for the infected device. If the registration is successful, it uses the received unique identifier to further communicate with the C&C server and receive commands.
Figure 1. Android.Bankosy communicates with a C&C server to register the device and then get a unique identifier for the infected device
Most of the commands supported by the malware are common and trivial for typical back door or financial Trojans, such as intercepting incoming SMS, deleting SMS messages, wiping the data, etc. Out of these multiple commands, the most relevant for Android.Bankosy is call_forwarding; when this command is received by the malware from the C&C server, it executes a payload to enable call forwarding.
In the Asia Pacific region, most of the telephone carriers support a special service code to enable or disable call forwarding. To enable unconditional call forwarding, the service code is:
- *21*[DESTINATION NUMBER]#
In this example, dialing *21*1555215554# on a mobile device will set up unconditional call forwarding to the destination number 15555215554. To disable call forwarding, the service code is:
The malware starts a call intent with the destination number obtained from the C&C server to enable unconditional call forwarding on the target device. Figure 2 illustrates the cleaned up code responsible for accomplishing this functionality.
Figure 2. Code responsible for accomplishing call forwarding on the target device
The back door also has support for disabling and enabling silent mode, in addition to locking the device, so that the victim is not alerted during an incoming call.
Once the unconditional call forwarding is set on the victim’s device, the attacker—who has already stolen the victim’s credentials (the first factor in two-factor authentication and authorization)—can then initiate a transaction. As part of the design, when the system demands the victim to enter the second factor (i.e., the authorization token sent through a voice call), the attacker will get the call through call forwarding and enter the second factor as well to complete the transaction.
To protect against this kind of threat on mobile devices, Symantec recommends users observe the following security best practices:
- Keep your software up to date
- Refrain from downloading apps from unfamiliar sites
- Only install apps from trusted sources
- Pay close attention to the permissions requested by an app
- Install a suitable mobile security app, such as Norton, in order to protect your device and data
- Make frequent backups of important data
Symantec and Norton products detect the banking Trojan as Android.Bankosy.