Malware

Android banking Trojan BrazKing is back with significant evasion improvements

The BrazKing Android banking trojan is back with significant improvements and dynamic banking overlays to avoid detection.

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:

  • Dissect the screen programmatically instead of taking screenshots in picture format. This can be done programmatically but on a non-rooted device that would require explicit approval of the user.
  • Keylogger capabilities by reading the views on the screen.
  • RAT capabilities—BrazKing can manipulate the target banking application by tapping buttons or keying text in.
  • Read SMS without the ‘android.permission.READ_SMS’ permission by reading text messages that appear on screen.
  • Read contact lists without ‘android.permission.READ_CONTACTS’ permission by reading the contacts on the “Contacts” screen.

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″]

Pierluigi Paganini

(SecurityAffairs – hacking, Android)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

China-linked UnsolicitedBooker APT used new backdoor MarsSnake in recent attacks

China-linked UnsolicitedBooker used a new backdoor, MarsSnake, to target an international organization in Saudi Arabia.…

5 hours ago

UK’s Legal Aid Agency discloses a data breach following April cyber attack

The UK’s Legal Aid Agency suffered a cyberattack in April and has now confirmed that…

8 hours ago

Sarcoma Ransomware Unveiled: Anatomy of a Double Extortion Gang

Cybersecurity Observatory of the Unipegaso's malware lab published a detailed analysis of the Sarcoma ransomware.…

10 hours ago

Mozilla fixed zero-days recently demonstrated at Pwn2Own Berlin 2025

Mozilla addressed two critical Firefox vulnerabilities that could be potentially exploited to access sensitive data…

23 hours ago

Japan passed a law allowing preemptive offensive cyber actions<gwmw style="display:none;"></gwmw>

Japan passed a law allowing preemptive offensive cyber actions, shifting from its pacifist stance to…

1 day ago