Researchers from IBM spotted a new version of the BrazKing Android banking trojan that pull fake overlay screens from the command and control (C2) server in real-time.
In the previous version, BrazKing abused the accessibility service to detect which app the user was opening and pull the associated overlay screen from a hardcoded URL and present it on top of the legitimate app.
“Now, it automates a call to the attacker’s server, requesting those matches on the fly. The detection of which app is being opened, is now done server side, and the malware regularly sends on-screen content to the C2. Credential grabbing is then activated from the C2 server, and not by an automatic command from the malware.” states the analysis published by IBM.
Implementing this approach the attacker can change its behavior depending on multiple factors, such as the victim’s IP (Brazilian/other) and the detection of a virtualized environment like an emulator.
Unlike classic overlay malware on Android devices leverages the permission ‘android.permission.SYSTEM_ALERT_WINDOW’ to display overlays, the latest version of BrazKing doesn’t use it to be more elusive.
BrazKing displays its overlay screen by loading the fake screen’s URL from the C2 to a webview in a window. The Trojan uses the TYPE_ACCESSIBILITY_OVERLAY as the type of window when adding the webview from within the accessibility service.
While displaying the overlay screen to the user, BrazKing can intercept the views in the background, tap buttons and even enter text in Android textviews.
The malicious application is not distributed through official store, the initial infection vector is a phishing message containing a URL that leads to a website claiming the device has been blocked due to security issue. The landing page instructs the visitor to ‘update’ the operating system by tapping a button it includes. The researchers noticed that threat actors uses HTTPS on the landing page to avoid raising suspicion.
Upon tapping the button, the user launches the download of BrazKing via the browser, however he/she does have to approve the download of apps from “unknown sources.” The malware attempts to trick the user into granting permissions under the guise of a Google requirement.
The malware requests access to the ‘Accessibility Service’ to capture screenshots and keystrokes without requesting any additional permissions that would reveal its malicious activity.
The low the activities done abusing the accessibility service:
Starting on Android 11, Google has categorized the list of installed apps as sensitive information, so any malware that attempts to fetch it is flagged by Play Protect as malicious.
This is a new problem for all banking overlaying trojans that need to determine which bank apps are installed on the infected device to serve matching login screens.
Researchers pointed out that Android version 11 (SKD 30) Google, banking malware cannot request the list of installed apps, in order to access this info they would have to declare android.permission.QUERY_ALL_PACKAGES or ‘Query’ element in the manifest.
BrazKing avoids asking these permissions, by relying on the screen dissection feature to view what apps the user might be looking at.
IBM researchers noticed that BrazKing uses string obfuscation to protect its internal resources. It applies a XOR using a hardcoded key and encodes resources with Base64. Anyway the use of a constant key make it easy for malware researchers to reverse the malicious code.
The malware prevent user from uninstalling the malicious app by taping on the ‘Back’ or ‘Home’ buttons, it does the same if the user tries to open an antivirus app, hoping to scan and remove the malware within the security tool.
The report published by IBM contains additional info about the threat, including Indicators of Compromise (IoCs).
Follow me on Twitter: @securityaffairs and Facebook
|[adrotate banner=”9″]||[adrotate banner=”12″]|
(SecurityAffairs – hacking, Android)