BackSwap – The Future of Banking Malware?
Michal Poslušný (ESET), Peter Kálnai (ESET)
Overview
In this insightful talk from OFFZONE, ESET researchers Michal Poslušný and Peter Kálnai delve into BackSwap, an innovative banking Trojan that marked a significant departure from traditional man-in-the-browser (MITB) attack methodologies. The presentation meticulously dissects BackSwap's evolution, its sophisticated technical underpinnings, and the elaborate cybercriminal schemes employed to monetize stolen funds. BackSwap distinguishes itself by eschewing conventional API hooking in favor of manipulating the browser's graphical user interface (GUI) and clipboard, making it a compelling case study for the future direction of banking malware.

Key moments
- 0:00 Introduction to BackSwap and talk outline
- 2:00 BackSwap's evolution from conventional banking Trojan
- 11:00 How BackSwap leverages GUI events for browser compromise
- 14:00 Live demonstration of BackSwap's form grabbing
- 16:00 BackSwap's advantages over conventional MITB attacks
- 26:00 Cybercrime scheme: how attackers use money mules
- 31:00 Weakest link in BackSwap's scheme and mitigation
BackSwap – The Future of Banking Malware?
Speakers: Michal Poslušný (ESET), Peter Kálnai (ESET)
Conference: OFFZONE
YouTube: https://www.youtube.com/watch?v=SNj6mVFzmag
Overview
In this insightful talk from OFFZONE, ESET researchers Michal Poslušný and Peter Kálnai delve into BackSwap, an innovative banking Trojan that marked a significant departure from traditional man-in-the-browser (MITB) attack methodologies. The presentation meticulously dissects BackSwap's evolution, its sophisticated technical underpinnings, and the elaborate cybercriminal schemes employed to monetize stolen funds. BackSwap distinguishes itself by eschewing conventional API hooking in favor of manipulating the browser's graphical user interface (GUI) and clipboard, making it a compelling case study for the future direction of banking malware.
The speakers highlight BackSwap's continuous development by its authors, who demonstrated a high level of proficiency in 32-bit assembly, JavaScript, and Windows internals. This technical prowess allowed them to create a highly adaptable threat capable of bypassing established security measures designed for older MITB techniques. The talk not only exposes the technical intricacies of BackSwap but also sheds light on the modus operandi of the cybercriminals, particularly their reliance on "money mules" – a critical vulnerability in their illicit financial pipeline.
BackSwap's novel approach, which leverages user interface interactions rather than deep system hooks, presents a formidable challenge for defenders and security vendors alike. The ESET researchers argue that this method could be a harbinger of future malware trends, potentially adaptable to other operating systems and browser environments. Understanding BackSwap's mechanisms is therefore crucial for developing next-generation defensive strategies and for anticipating the evolving tactics of financially motivated cybercriminals.
Background
▶ Watch: Introduction to BackSwap and talk outline (0:00)
The journey of BackSwap began in late 2017, evolving from a conventional banking Trojan. Initially, the threat actors behind BackSwap utilized the source code of a well-known conventional banking Trojan called Timba, which employed classic man-in-the-browser (MITB) techniques such as web injects and form grabbing by hooking browser functions. Timba, similar to threats like Carberp, represented the established paradigm of banking malware, relying on deep integration into the browser process to intercept sensitive data before SSL encryption.
However, the BackSwap developers recognized the limitations and increasing detection rates associated with these traditional methods. Conventional MITB attacks require malware modules to be highly specific to browser platforms (e.g., 32-bit vs. 64-bit Chrome, Firefox, Opera), and their attack points (hooked functions) frequently change with browser updates, necessitating continuous maintenance and updates from the attackers. Furthermore, security solutions have a long history of defending against these techniques, which have been known since the days of Zeus in 2007. This increasing difficulty in maintaining effectiveness and evading detection likely motivated the BackSwap authors to innovate.
Their initial foray into new territory involved a generic clipboard replacer. This early iteration focused on identifying and replacing patterns of cryptocurrency wallet addresses or bank account numbers found in the clipboard. This approach offered anonymity and ease of testing, targeting platforms like Advanced Cash and WebMoney, which are popular in the Russian region. This marked a shift towards leveraging user-facing mechanisms rather than solely relying on deep process hooks. By early 2018, this concept had matured into the "real" BackSwap, incorporating full web injects and later form grabbing, and was initially distributed in campaigns targeting Polish banks, before expanding to Spanish and Czech financial institutions. This evolution underscored the attackers' continuous improvement and experimentation with novel concepts to stay ahead of security measures.
Key Findings
▶ Watch: How BackSwap leverages GUI events for browser compromise (11:00)
BackSwap's primary innovation lies in its fundamental shift from traditional API hooking to a Graphical User Interface (GUI) manipulation strategy. Instead of injecting malicious modules directly into browser processes or hooking specific functions that handle HTTP data, BackSwap interacts with the browser as if it were a legitimate user. This allows it to operate effectively regardless of the browser's architecture (32-bit or 64-bit), specific version, or even the browser type itself, as long as it supports JavaScript and the address bar or web development console.
The malware's core technical contribution is its shellcode, which is typically 32-bit assembly embedded within legitimate applications. This shellcode is responsible for orchestrating the GUI-based attack. ESET researchers observed that the shellcode was often hidden through "tricky Trojanization," such as picking specific calls from the C runtime or modifying DLL exports, making it challenging for beginner analysts to identify. A unique aspect of BackSwap's shellcode distribution was its embedding within bitmap data, often featuring culturally relevant images (e.g., Stalin, Zelda, Scarface, South Park's Cartman, Soviet series characters) or even direct messages to antivirus vendors, like "Dear AV vendors, you suck."
The attack unfolds in two main variations: injecting malicious JavaScript via the browser's developer console or through the address bar. Both methods involve the malware hooking relevant GUI events, waiting for a targeted bank URL, then programmatically manipulating the browser window to insert and execute malicious JavaScript. This JavaScript then performs the web injects and form grabbing, mimicking traditional MITB functionality but via a completely different vector. The malicious JavaScript, once injected, even leaves traces in the browser's history, a useful artifact for incident response.
Finally, the talk highlighted the crucial role of money mules in the cybercriminal scheme. The attackers rely on recruiting unwitting individuals through "too good to be true" online advertisements, who then provide their legitimate bank accounts for the illicit transfers. ESET successfully identified over 70 unique mule bank accounts, predominantly in Spain and Poland, directly correlating with the duration and intensity of BackSwap campaigns in those regions. This reliance on human intermediaries represents the "weakest link" in the attackers' otherwise technically sophisticated operation.
Technical Deep Dive
▶ Watch: Live demonstration of BackSwap's form grabbing (14:00)
BackSwap's technical prowess is evident in its meticulously crafted shellcode and its innovative approach to browser exploitation. The malware is not distributed as a complete binary but rather as a shellcode embedded within a legitimate application, such as a debugger or WinRAR. This shellcode itself has a unique structure, combining 32-bit assembly code with a bitmap. The developers' high proficiency in 32-bit assembly, JavaScript, and Windows internals is crucial for this complex operation.
The Trojanization process involves several sophisticated techniques to hide the malicious payload. Attackers modify legitimate applications by picking specific calls from the C runtime or altering DLL exports, ensuring the shellcode is well-concealed and not easily detected by static analysis. Once active, the shellcode's primary objective is to execute its GUI manipulation routines.
BackSwap employs two primary mechanisms to inject malicious JavaScript:
- Developer Console Injection:
- The shellcode first hooks relevant GUI events within the Windows operating system.
- It continuously monitors user activity, specifically waiting for the victim to navigate to a hard-coded banking URL.
- Upon detection of a target URL, the malware identifies the active browser window.
- It then inserts the malicious JavaScript payload into the Windows clipboard.
- To prevent user interference, the browser window is temporarily made transparent.
- The malware then sends a
Ctrl + Shift + Jkey combination to the browser, opening the developer console. - The previously copied JavaScript is pasted into the console.
- An
Enterkeypress is simulated to trigger the execution of the script. - Finally, the malware performs a cleanup operation, closing the console and restoring the window's transparency.
- Address Bar Injection:
- This method shares the initial steps with the console injection: hooking GUI events and waiting for a specific banking URL.
- Instead of the console, the malware targets the browser's address bar.
- It simulates
Ctrl + Lto select the text in the address bar. - The existing URL is then deleted.
- The string
javascript:is typed letter by letter into the address bar, circumventing potential paste restrictions. - The malicious JavaScript, previously placed in the clipboard, is then pasted.
- An
Enterkeypress executes the script. - As with the console method, this leaves a trace of the malicious JavaScript in the browser's history, which can be a valuable artifact for forensic analysis.
Once injected, the malicious JavaScript takes over the active browser tab. It performs standard banking Trojan functionalities such as web injects (modifying the content of legitimate bank pages to trick users) and form grabbing (intercepting credentials entered into login forms). The collected sensitive information, such as login details, is then copied into the clipboard in a specific, characteristic format. The BackSwap shellcode monitors the clipboard for this format, extracts the data, and transmits it to the attackers' Command and Control (C2) server.
This GUI-centric approach offers significant advantages over classical MITB:
- Browser Agnostic: It works across any browser (Chrome, Firefox, Opera, Edge) as long as it supports JavaScript and the address bar/developer console.
- Version Independent: It is not affected by specific browser versions or frequent updates, unlike API-hooking methods.
- Reduced Detection Surface: The malicious activity is primarily JavaScript and GUI manipulation, making it harder to detect with traditional endpoint security solutions that focus on process injection or API hooking.
The primary disadvantage for the attackers is that only the currently active browser tab is compromised, leaving other tabs intact.
The use of bitmap data for shellcode storage is another interesting detail. The ESET team consistently identified various images embedded with the shellcode, ranging from public figures like Stalin (with the quote "Our cause is just, we won") to pop culture references like Zelda and characters from Scarface or South Park (Cartman). In some instances, the attackers even used these bitmaps to embed direct messages, such as "Dear AV vendors, you suck," or warnings to security researchers, showcasing a level of audacity and awareness of their adversaries. A particularly notable campaign in May 2019 in Spain used a bitmap of The Mask character, coinciding with a local TV broadcast of the movie, suggesting a localized, culturally aware distribution strategy.
Demo / Proof of Concept
▶ Watch: Cybercrime scheme: how attackers use money mules (26:00)
During the talk, the ESET researchers provided a clear demonstration of BackSwap's GUI manipulation techniques using an emulator. The setup involved three key elements displayed on screen:
- A web browser, initially showing the Google search engine.
- An ESET-developed emulator of BackSwap, running in a console window. This emulator was loaded with a parameterized, slightly modified version of the malicious JavaScript script observed in real-world BackSwap samples.
- A Notepad window, serving as a live indicator of the clipboard's contents.
The demonstration proceeded as follows:
- The user (simulated) selects the address bar in the browser.
- The BackSwap emulator immediately catches this GUI event, indicating that a browser address has been accessed.
- The user then begins to type the URL of their favorite remote banking interface, in this specific example, a Spanish bank.
- As the user types, the BackSwap emulator continuously monitors and analyzes the keystrokes and the evolving URL in the address bar. It compares this input against a set of patterns or rules hard-coded within the malicious script.
- Once the typed URL matches one of the predefined target patterns, the malicious JavaScript is injected into the browser.
- The browser tab is now compromised. When the simulated user navigates to the internet banking login page and proceeds to fill in their credentials (username, password) into the forms, the injected malicious JavaScript intercepts this information.
- The JavaScript then copies the captured login details into the Windows clipboard. Crucially, it formats this information into a special, characteristic string format, which makes it easily identifiable by the BackSwap shellcode.
- The Notepad window, acting as the clipboard monitor, instantly reflects this activity, displaying the stolen login information in its unique format.
- At this point, the BackSwap shellcode, also monitoring the clipboard, would detect this specific format, extract the sensitive data, and transmit it to the attackers' command and control (C2) server.
This clear, step-by-step demonstration effectively illustrated how BackSwap leverages standard GUI elements and clipboard functionality to achieve its objectives, bypassing the need for complex, browser-specific API hooking, and showcasing its form-grabbing capabilities in real-time.
Defensive Implications
▶ Watch: Weakest link in BackSwap's scheme and mitigation (31:00)
BackSwap's innovative approach necessitates a re-evaluation of defensive strategies, moving beyond traditional API hooking detection. For endpoint security solutions and antivirus vendors, the primary implication is the need to focus on behavioral detection of GUI manipulation. This includes monitoring for unusual browser activity such as:
- Programmatic opening of developer consoles (
Ctrl + Shift + J). - Automated selection and manipulation of the address bar (
Ctrl + L). - Rapid, programmatic pasting of
javascript:prefixes and scripts into the address bar. - Temporary transparency of browser windows.
- Suspicious modifications to the clipboard content, especially specific patterns of sensitive data appearing after browser interaction.
Security vendors should also enhance their capabilities to detect and analyze malicious JavaScript injected into browser contexts. While the JavaScript itself might be "tiny," its execution within a trusted browser environment is the critical attack vector. Furthermore, incident response teams should be aware that BackSwap's address bar injection leaves a clear trace in the browser history, which can be a valuable forensic artifact for identifying compromised machines and understanding the attack timeline.
For financial institutions and banks, proactive monitoring of transactions and enhanced fraud detection systems are paramount. Collaboration with law enforcement and security researchers to track and report identified mule bank accounts is a critical defensive measure. By rapidly identifying and freezing these accounts, banks can disrupt the attackers' financial pipeline, which is identified as the "weakest link" in their modus operandi. Implementing advanced behavioral analytics on user transactions can help flag unusual or high-value transfers that might indicate mule activity.
End-users also play a role in defense, though BackSwap targets technical rather than social vulnerabilities. Basic security hygiene like using strong, unique passwords, enabling multi-factor authentication (MFA) on banking accounts, and being wary of "too good to be true" online job advertisements that solicit bank account details are crucial. While BackSwap's attack is subtle, unusual browser behavior (like a window briefly becoming transparent or the address bar rapidly changing) could be a red flag. Educating users about these potential indicators, however subtle, can contribute to early detection.
Finally, the talk emphasizes the importance of threat intelligence sharing. By openly discussing BackSwap's mechanisms, as ESET has done, the security community can collectively develop better mitigation strategies. This collaborative approach allows different security developers to learn from the threat and implement diverse defenses, making it harder for attackers to maintain their effectiveness. The potential for BackSwap-like mechanisms to be ported to other platforms, such as macOS, means that proactive research and development into GUI-based attack vectors are essential for future-proofing security solutions.
Key Takeaways
- GUI-Centric Innovation: BackSwap fundamentally shifts banking malware tactics from traditional API hooking to manipulating the browser's graphical user interface (GUI), offering a more resilient and adaptable attack vector.
- Bypassing Traditional MITB Defenses: Its GUI-based approach allows BackSwap to evade many established security solutions designed to detect conventional man-in-the-browser (MITB) attacks that rely on process injection and API hooking.
- Sophisticated Shellcode & Obfuscation: The malware utilizes 32-bit assembly shellcode embedded within legitimate applications, often concealed with tricky Trojanization techniques and even hidden within bitmap image data, sometimes containing direct messages to AV vendors.
- Clipboard-Driven Data Exfiltration: BackSwap leverages the Windows clipboard not only to inject malicious JavaScript but also to exfiltrate stolen credentials, which are copied into the clipboard in a specific format for later retrieval by the shellcode.
- Reliance on Money Mules as the Weakest Link: The cybercriminal operation critically depends on "money mules" – unwitting individuals recruited online – whose bank accounts are used to launder stolen funds, representing the most vulnerable point in the attackers' scheme.
- Future Threat Landscape: BackSwap's innovation in GUI manipulation suggests a potential future trend for malware, with the possibility of similar techniques being adapted to other platforms like macOS, requiring security solutions to evolve their behavioral detection capabilities.
About the Speaker(s)
Michal Poslušný is with ESET. His work on BackSwap involved detailed technical analysis, and he is noted for writing a comprehensive blog post explaining the malware's innovative mechanisms. Poslušný's expertise lies in dissecting sophisticated threats and understanding their technical underpinnings, contributing significantly to the security community's knowledge of evolving cybercrime tactics.
Peter Kálnai is also with ESET. He collaborated with Michal Poslušný on the BackSwap research, focusing on understanding the broader cybercriminal scheme and the modus operandi behind the threat. Kálnai's insights into the financial aspects and the use of money mules provided crucial context to the technical analysis, highlighting the complete lifecycle of such attacks from development to monetization. Both speakers demonstrate a deep understanding of Windows internals, assembly, and JavaScript, essential for analyzing advanced malware like BackSwap.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Solid reverse engineering work on a genuinely novel banking trojan technique. The GUI manipulation angle is real, the analysis is thorough, and the mule tracking adds operational intel most malware talks skip. Not paradigm-shifting, but this is exactly the kind of work that advances defender understanding.
Heather Calloway (CISO) — SOLID
Useful technical teardown of a banking trojan that moved away from API hooking toward GUI manipulation. Worth knowing this attack class exists, but the work is dated (2017-2019 campaigns), and the strategic implications for most security programs are modest unless you're specifically running fraud or endpoint detection in EMEA retail banking.