First identified in late 2016, 'Trickbot' evolved from being a well-established banking trojan into a malware-as-a-service (MaaS) threat utilized by both cybercriminals and nation-state threat actors for predominantly financially motivated campaigns.
Supporting modular components, Trickbot campaigns will differ based on the requirements of the MaaS 'customer' with many being used to steal personal and financial data as well as deploying ransomware threats, such as 'Conti' and 'Ryuk', to victims.
Seemingly demonstrating that threat actors make use of multiple 'as-a-service' offerings and a variety of malicious tools to achieve their goals, Trickbot payloads have been observed as distributed by 'Emotet', the banking trojan turned malicious delivery botnet, as well as BazarLoader.
As such, Trickbot campaigns typically commence with the delivery of malicious emails containing weaponized Microsoft Office attachments that provide download capabilities to install the main payload. These emails make use of common themes, such as invoices or business-related notifications, and have been observed as utilizing COVID-19 lures throughout 2020.
Traditionally targeting victims in Europe and North America, Trickbot campaigns have targeted individuals and organizations globally, across multiple sectors, and have reportedly infected over one million devices since its discovery.
Given this, Trickbot has been the target of multiple takedown attempts with the most recent being an operation in October 2020 led by Microsoft's Digital Crimes Unit (DCU) alongside industry partners. This activity culminated in the 'elimination' of a reported 94% of Trickbot's infrastructure, as of 18 October 2020, although those behind the threat responded by commissioning new servers.
Whilst the efforts of Microsoft and their partners temporarily disrupted Trickbot during the US-election campaigns, subsequent reports confirm that the botnet has likely returned to full strength and, in addition to undoubtedly creating a 'whack-a-mole' situation for takedown efforts, remains an active threat to organizations worldwide.
In addition to allowing simple updates and new capabilities to be added by those maintaining Trickbot, the modular approach presumably allows each campaign to be tailored to a target victim as well as meeting the needs of each threat actor utilizing this threat.
Demonstrating a broad range of capabilities, the following modules have been observed as used by Trickbot:Data Theft:
- aDll: Steals the Active Directory (AD) database;
- cookiesDll: Steals cookie data from web browsers;
- domainDll: Steals credentials and data from Domain Controllers via LDAP;
- injectDll & loaderDll: Injects credential stealing elements into web browsers viewing banking websites;
- MailClient: Steals data from local and web mail clients for use in other malspam campaigns;
- mailsearcher: Searches for files of a specific type;
- outlookDll: Steals credentials from Microsoft Outlook;
- pwgrab: Steals stored passwords from web browsers;
- squlDll: Gathers email addresses from SQL servers and utilizes 'Mimikatz' to scrape credentials from memory;
- shadnewDll: Custom proxy module from 'IcedID' to intercept and modify web traffic used for web-injects on banking websites;
- mshareDll, shareDll & tshareDll: Allows lateral movement and enumeration through Server Message Block (SMB) shares;
- mwormDll, nwormDll, wormDll & wormwinDll: Lateral movement via SMB using the 'EternalBlue' exploit;
- tabDll: Allows propagation via SMB by exploiting vulnerabilities including 'EternalRomance' and those covered by Microsoft Security Bulletin 'MS17-010';
- PermaDll: Reportedly used to gain low-level persistence through a compromised host's BIOS or UEFI as well as potentially providing remote 'bricking' capabilities by erasing or overwriting the firmware;
- importDll & moduleDll: Gathers data from web browsers including browsing history and cookies;
- networkDll: Gathers system and network topology information;
- psfin: Determines if any Point-of-Sale (POS) software is present;
- Systeminfo: Gathers system information from the compromised host;
- BCClientDll & NewBCtestDll: Reverse SOCKS5 proxy;
- hvnc & vncDll: Provides remote control through the Virtual Network Computing (VNC) protocol;
- mexecDll: Provides the ability to download and execute additional payloads;
- rdpScanDll: Attempts to brute force access to Remote Desktop Protocol (RDP) services;
- vpnDll: Creates a VPN proxy.
Providing an indicator of common campaign traits, weaponized Microsoft Excel spreadsheets were observed as delivering Trickbot to victims in multiple mid-December 2020 campaigns.
Likely attached to an email lure masquerading as a legitimate business communication, the victim is presented (Figure 1) with content that claims the spreadsheet has been encrypted by 'DocuSign' and requests that the security prompts to 'Enable Editing' and 'Enable Content' are clicked to allow 'decryption'.
Figure 1 - Microsoft Excel spreadsheet lure
As is common with lures of this nature, this social engineering attempt serves only to trick a victim into allowing a malicious macro to execute and, in this case, download the main Trickbot payload.
Notably, victims opening this file on a mobile device, or using Microsoft Office's online viewer, are encouraged to open it on their desktop PC due to the macro not executing in these environments.
Using a somewhat straight-forward macro, the
URLDownloadToFile function is used to download the Trickbot payload (Figure 2) from a specified URL.
Figure 2 - Macro downloader
Presumably to avoid casual inspection and detection, the strings for both the download URL and filename are referenced on a hidden sheet named 'Files' that in turn compiles them from multiple cells on a hidden sheet named 'fol' (Figure 3).
Figure 3 - Obfuscated strings from hidden sheets
In this instance, the requested URL ends with the 'png' image file extension, likely a low-sophistication attempt to appear benign to countermeasures that don't inspect file content (Figure 4), and the Trickbot payload is saved to a folder that mimics 'Intel Corporation':
Figure 4 - HTTP GET request for a 'png' with executable content
Having downloaded the Trickbot executable payload, 'rundll32' is executed to load the malicious dynamic-link library (DLL) using the
DllRegisterServer entry point:
The absence of an entry point, such as if executed in an automated analysis environment, would likely result in some benign execution and therefore cause the threat to be ignored.
Having successfully loaded, Trickbot then performs DLL injection into the legitimate Windows Error Reporting executable
wermgr.exe (Figure 5) before terminating the previous process.
Figure 5 - Trickbot execution chain
Command & Control
Once executed Trickbot will attempt to call home to its command and control (C2) infrastructure in order to download additional modules and act on the threat actor's objectives.
With multiple C2 server IP addresses being observed in memory, Trickbot seemingly attempts to request content from multiple servers (Figure 6), potentially for resilience.
Figure 6 - C2 Communication
Notably, in addition to the commonly utilized ports
499, numerous C2 IP addresses were also observed with less common port numbers.
Analysis of GET requests sent to Trickbot C2 infrastructure can lead to the identification of various commands based on the use of a common structure:
<GTAG>: Also referred to as the botnet ID, this identifier is used within configuration files as well as C2 traffic and relates to a specific campaign;
<CLIENT_ID>: Composed of victim username, Windows version and a seemingly random hexadecimal string for uniqueness;
<COMMAND>: Such as the following observed commands in conjunction with appropriate
0: Initial call home with details of the victim operating system and IP address;
1: Keep alive;
5: Download a specified module;
14: Sends victim device information including username and network status;
23: Sends the current version to obtain the latest configuration;
25: Requests the latest Trickbot executable binary;
Furthermore, specific modules utilize the same C2 communication method and therefore other command values may indicate module status updates and data exfiltration.
In a somewhat unusual observation, communications with C2 servers have been observed as utilizing a user-agent string typically associated with the command line 'curl' utility. As such, unexpected communications featuring the user-agent
curl/7.71.0 may be indicative of potential Trickbot activity.
- Employee security awareness training, taking into account topical themes used by threat actors, can help them identify and handle suspicious content such as email attachments.
- Reinforce the message that files encouraging users to 'Enable Editing', 'Enable Content' or disable any other security setting are almost certainly malicious.
- Use Group Policy to disable macros from running in Microsoft Office applications (legitimate macros should be digitally signed to allow for an exception to the disable rule).
- Disable administrative tools and script interpreters, such as PowerShell, to prevent their misuse by malicious payloads.
- Limit user permissions according to the principal of least privilege (POLP).
- Enhance network security by employing latest intrusion detection and prevention systems (IDS/IPS), including the denial of access to known malicious domains, hosts and IP addresses.
Indicators of Compromise
The following indicators of compromise (IOC) are associated with a recent Trickbot campaigns observed during December 2020.
Microsoft Excel Lure
Command & Control
Notably, communications with the following command and control (C2) IP addresses were observed as using the user-agent string
|T1064 - Scripting||Defense Evasion, Execution|
|T1497 - Virtualization/Sandbox Evasion||Defense Evasion, Discovery|
|T1124 - System Time Discovery||Discovery|
|T1105 - Remote File Copy||Command & Control, Lateral Movement|
|T1071 - Standard Application Layer Protocol||Command & Control|
|T1032 - Standard Cryptographic Protocol||Command & Control|
|T1566.001 - Phishing: Spear phishing Attachment||Initial Access|
|T1055.012 - Process Injection: Process Hollowing||Defense Evasion, Privilege Escalation|