Mekotio
- Type
- Banking trojan
- Capabilities
- Credential theftKeyloggingExfiltrationPersistenceDefense evasionReconnaissanceDLL sideloadingCrypto theft
- Delivery
- PhishingMalspamLure
- Platforms
- Windows
Mekotio, also known as Melcoz, is a Delphi-based banking trojan targeting Windows systems. Active since at least 2015, it primarily targets online banking users in Brazil, Chile, Mexico, Peru, Spain, and Portugal. It impersonates financial institutions through fake banking pop-up windows to capture credentials and other sensitive information. Mekotio is associated with the Brazilian financial-cybercrime ecosystem and is grouped within the Tetrade cluster of banking trojans.
Mekotio supports screenshot capture, keylogging, window manipulation, simulated mouse and keyboard input, system restarts, restrictions on access to banking websites, and self-updating. It collects host information, including Windows version, administrative privileges, firewall configuration, and installed security and banking-protection products. Some variants steal credentials stored in Google Chrome or replace cryptocurrency wallet addresses in the clipboard. Stolen information is transmitted to attacker-controlled command-and-control infrastructure. Different variants use custom remote-access protocols, SQL-based command and control, and domain-generation algorithms.
Distribution primarily relies on phishing and spam emails containing malicious links or attachments, including tax-receipt and judicial-notification lures. Infection chains have used ZIP archives, MSI installers, and multiple scripting stages involving batch, VBScript, JavaScript, and PowerShell. Campaigns have also employed HTML smuggling to reconstruct downloadable archives in the browser. Execution methods include abuse of legitimate AutoIt or AutoHotkey interpreters and DLL side-loading. Persistence is typically established through Windows Run entries or startup shortcuts.
Evasion measures include layered script obfuscation, in-memory PowerShell execution, geographic and virtualization checks, randomized staging artifacts, and payload protection with Themida or VMProtect. Mekotio shares distribution components and implementation techniques with Casbaneiro and Vadokrist, while remaining a distinct malware family.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
More recently, we have also seen this technique deliver the banking Trojan Mekotio... As previously mentioned, this DLL file is attributed to Mekotio, a malware family of banking Trojans typically deployed on Windows systems that have targeted Latin American industries since the latter half of 2016.
Techniques & procedures
61 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
the attacker had managed to access the resources of the caliskancit.com website... the attacker uploaded the malware intended for their future phishing campaigns.
Initial Access
4 techniques
Initial Access
Once the attackers had access to victim bank accounts, they accessed e-banking portals and sent the funds to accounts under their control.
The infection starts with a phishing email containing a link to a zip archive or a zip file as an attachment. The message lures the victim to download and extract the zip content.
T1566.001 Phishing: Spearphishing Attachment ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Mekotio distribution chains start with a malicious link in an email.
Execution
10 techniques
Execution
T1047 Windows Management Instrumentation ✅ ❌ ❌ ✅ ❌ ❌ ✅ ✅ ✅ ❌ ❌ ❌
Mekotio is most commonly executed by abusing the legitimate AutoIt interpreter.
The PowerShell script then downloads Mekotio from the corrected URL and installs and executes it.
T1059.003 Command and Scripting Interpreter: Windows Command Shell ❌ ✅ ✅ ❌ ✅ ❌ ✅ ✅ ❌ ✅ ✅ ❌
A simple BAT dropper drops a VBScript downloader and executes it using two command line parameters.
T1059.007 Command and Scripting Interpreter: JavaScript/JScript ✅ ✅ ❌ ✅ ❌ ❌ ✅ ✅ ❌ ✅ ✅ ✅
This DLL is renamed as “p3f32dykmjrw5hqkx” and subsequently executed through DllCall, taking the function to load as a parameter, which in this case is “nwy4ud57pn3r047e3”.
T1197 BITS Jobs ❌ ✅ ❌ ✅ ✅ ❌ ✅ ❌ ❌ ❌ ❌ ❌
Potential victims need to follow steps required to install the malware on their machines
When the user clicks on the zip content, the batch script is executed.
Persistence
4 techniques
Persistence
Once the attackers had access to victim bank accounts, they accessed e-banking portals and sent the funds to accounts under their control.
T1197 BITS Jobs ❌ ✅ ❌ ✅ ✅ ❌ ✅ ❌ ❌ ❌ ❌ ❌
Finally, persistence is gained by adding a new value to the following registry key: “HKCU\Software\Microsoft\Windows\CurrentVersion\Run”
After renaming the extracted files, a shortcut to the AutoHotkey is created in the AppData directory. The arguments to the shortcut are the AutoHotkey script and the Mekotio DLL.
Privilege Escalation
3 techniques
Privilege Escalation
Once the attackers had access to victim bank accounts, they accessed e-banking portals and sent the funds to accounts under their control.
Finally, persistence is gained by adding a new value to the following registry key: “HKCU\Software\Microsoft\Windows\CurrentVersion\Run”
After renaming the extracted files, a shortcut to the AutoHotkey is created in the AppData directory. The arguments to the shortcut are the AutoHotkey script and the Mekotio DLL.
Stealth
15 techniques
Stealth
The batch file extracted from the first zip archive has two layers of obfuscation... The first layer of the obfuscation is a simple substitution cipher.
T1027.001 Obfuscated Files or Information: Binary Padding ❌ ✅ ✅ ❌ ❌ ❌ ✅ ❌ ❌ ✅ ❌ ❌
HTML smuggling, a highly evasive malware delivery technique that leverages legitimate HTML5 and JavaScript features, is increasingly used in email campaigns... When a target user opens the HTML in their web browser, the browser decodes the malicious script, which, in turn, assembles the payload on the host device.
encoded strings corresponding to the names of functions and modules were processed. These strings are decoded in memory using the renamed decode_string function... obtain the readable name of a function, which is later executed
included a file with the .msi extension instead of the expected .pdf
Once the attackers had access to victim bank accounts, they accessed e-banking portals and sent the funds to accounts under their control.
they all obfuscate either payloads or configuration data in some way
T1197 BITS Jobs ❌ ✅ ❌ ✅ ✅ ❌ ✅ ❌ ❌ ❌ ❌ ❌
Mekotio is executed by running a legitimate AutoIt interpreter and passing a loader script for it to interpret.
since 2019, the vast majority of these malware families started to utilize Windows Installer (MSI files) as the first stage of the distribution chain
we will now use rundll32 to achieve the same result since we know which is the main function it executes... > rundll32 yonjbw.dll,nwy4ud57pn3r047e3
T1220 XSL Script Processing ✅ ❌ ❌ ✅ ❌ ❌ ✅ ❌ ❌ ❌ ❌ ❌
Next, the script checks if it is running in a virtual machine: it compares the computer model to the strings ‘VMware Virtual Platform’ and ‘Virtual Machine’, and exits if the computer model is one of the above.
T1497.001 Virtualization/Sandbox Evasion: System Checks ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ❌ ❌ ❌ ❌
Once they infect a victim, they stay hidden and wait until users log into e-banking accounts, silently collecting their credentials.
Credential Access
7 techniques
Credential Access
Operators need to react to this situation and manually command the malware to display the fake pop-up window and take control of the victim’s machine
To ease stealing passwords with its keylogging feature, Mekotio disables the “AutoComplete” option in Internet Explorer.
to steal credentials, they tend to use either fake pop-up windows or keyloggers
Once they infect a victim, they stay hidden and wait until users log into e-banking accounts, silently collecting their credentials.
it checks information in InetCache , InetCookies , and History to obtain search history and stored cookies.
The DLL contains the main Mekotio banker functionality for actions such as stealing access credentials for electronic banking portals and a password stealer.
Some variants are also able to ... exfiltrate credentials stored by the Google Chrome browser.
Discovery
10 techniques
Discovery
Mekotio discovers various security tools and banking applications based on window names.
Using Use FormSuggest, FormSuggest Passwords, and FormSuggest PW Ask, it checks form autocomplete... checks information in InetCache, InetCookies, and History
The malware checks if the process is running with system privileges.
T1057 Process Discovery ❌ ✅ ✅ ❌ ✅ ✅ ✅ ✅ ✅ ❌ ✅ ❌
Mekotio collects information about the victim's machine, such as firewall status and Windows version.
Mekotio discovers banking protection software based on file system paths.
Next, the script checks if it is running in a virtual machine: it compares the computer model to the strings ‘VMware Virtual Platform’ and ‘Virtual Machine’, and exits if the computer model is one of the above.
T1497.001 Virtualization/Sandbox Evasion: System Checks ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ❌ ❌ ❌ ❌
Mekotio detects the presence of banking protection products.
The first thing the script does is check the location of the infected system using the ipinfo.io service. If the system is not in one of these countries, (Brazil, Chile, Mexico, Spain and Peru), then the attack is terminated.
Collection
8 techniques
Collection
Operators need to react to this situation and manually command the malware to display the fake pop-up window and take control of the victim’s machine
To ease stealing passwords with its keylogging feature, Mekotio disables the “AutoComplete” option in Internet Explorer.
to steal credentials, they tend to use either fake pop-up windows or keyloggers
Once they infect a victim, they stay hidden and wait until users log into e-banking accounts, silently collecting their credentials.
they devote considerable effort to collect screenshots
T1115 Clipboard Data ✅ ✅ ❌ ❌ ❌ ❌ ✅ ✅ ✅ ❌ ❌ ❌
"...facilitate credential theft by serving fake overlays."
Next, a secondary zip file with a random file name is downloaded to the directory. The downloaded zip archive contains three files: Mekotio payload DLL, AutoHotkey interpreter and AutoHotkey script.
Command and Control
9 techniques
Command and Control
Once the user executes the JavaScript, it initiates a Base64-encoded PowerShell command, which then calls back to the attacker’s servers to download Trickbot... Check the perimeter firewall and proxy to restrict servers from making arbitrary connections to the internet to browse or download files. Such restrictions help inhibit malware downloads and command and control (C2) activity.
after loading the malicious DLL... Request to ipinfo.io to check internet connectivity... It carries out requests to domains with the purpose of downloading hashes
Mekotio’s network protocol in variants not using SQL is based on Remote_Delphi_Access_PC.
The batch script runs a “PowerShell Download Cradles” which downloads and runs a PowerShell script on the memory... Next, a secondary zip file with a random file name is downloaded to the directory.
custom encryption algorithms are favored over established ones
Operators need to react to this situation and manually command the malware to display the fake pop-up window and take control of the victim’s machine
The second approach utilizes a Domain Generation Algorithm (DGA) based on current local time.
Mekotio uses an algorithm to modify the resolved IP address to obtain the actual C&C address.
T1571 Non-Standard Port ✅ ✅ ✅ ❌ ✅ ❌ ✅ ✅ ✅ ❌ ✅ ✅
Exfiltration
3 techniques
Exfiltration
Mekotio sends the data it retrieves to its C&C server.
they do not exfiltrate all harvested data to the C&C server, but use different locations as well
Once the attackers had access to victim bank accounts, they accessed e-banking portals and sent the funds to accounts under their control.
Observables
48 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
21 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.