BazarBackdoor is a Windows backdoor developed by the TrickBot cybercrime group, also tracked as ITG23 and Wizard Spider, and first identified alongside BazarLoader in April 2020. It provides remote access to compromised enterprise systems and has been used in intrusion chains leading to Ryuk and Conti ransomware. BazarLoader is a distinct delivery component whose common payload is BazarBackdoor, although the names have sometimes been used interchangeably. Victims have included corporate and government organizations, including healthcare organizations.
Distribution campaigns use phishing emails with customer-complaint, payroll, termination, and payment-remittance lures. Infection chains include links through Google Docs to landing pages offering executables disguised as documents, macro-enabled Office documents delivered in password-protected archives, and CSV files that abuse Excel Dynamic Data Exchange after users approve security prompts.
Observed execution chains download the backdoor and inject its payload into a legitimate Windows process using process hollowing and process doppelgänging, allowing in-memory execution. Scheduled tasks that relaunch the loader at user logon provide persistence and enable retrieval of updated payloads. Command-and-control mechanisms include HTTPS and Emercoin-based decentralized DNS. Attackers use the resulting access to support lateral movement and deliver additional tooling, including Cobalt Strike, before potential ransomware deployment.
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Recently, the Conti group has exhibited notable ambition with technical impact enhancements by way of Trickbot, as well as plans to use the “BazarBackdoor” malware to improve access points, and persistence.
B aza (BazarLoader & BazarBackdoor) has been attributed to the organized cybercrime group behind Trickbot by multiple security vendors over the past year.
The TrickBot Gang is most known for its namesake, the TrickBot banking trojan, but is also behind the development of the BazarBackdoor and Anchor backdoors.
In October 2021, the IBM X-Force reported that the threat group ITG23 ... had partnered with Shathak ... to distribute the TrickBot and the BazarBackdoor (also referred to as BazarLoader) malware.
43 distinct techniques documented for this family, organized by ATT&CK tactic.
It also included coders developing malware crypters, front- and back-end environments, TrickBot web-injects and various other modules.
Conti’s backbone was the development team, with subdivisions responsible for building malware, testing its functionality, and recruiting and onboarding new employees.
Initially appearing around April of 2020, the malware was spread in email campaigns utilizing infrastructure previously used to distribute Trickbot.
Shathak stores malicious documents in password-protected archive files and attaches the archive files to phishing emails.
The social engineering attacks that were used to spread the backdoor leverage topics such as customer complaints, Covid-19-themed payroll reports, and employee termination lists for the emails they send out. The messages have links to Google Docs files.
This =WmiC| command is a DDE function that causes Microsoft Excel, if given permission, to launch WMIC.exe and execute the provided PowerShell command to input data into the open workbook.
This sets a scheduled task that launches the loader every time the user logs into Windows, which makes way for new versions of the backdoor to be downloaded and injected into svchost.exe.
In this particular case, the DDE will use WMIC to create a new PowerShell process that opens a remote URL containing another PowerShell command that is then executed.
When the .doc file was opened, a macro wrote an .hta file to disk
The shortcut file has to be run by the victim to begin the chain of infection.
Microsoft Excel supports a feature called Dynamic Data Exchange (DDE), which can be used to execute commands whose output is inputted into the open spreadsheet, including CSV files. Unfortunately, threat actors can also abuse this feature to execute commands that download and install malware on unsuspecting victims.
This sets a scheduled task that launches the loader every time the user logs into Windows, which makes way for new versions of the backdoor to be downloaded and injected into svchost.exe.
registers the final payload as a Windows service using a long command line with some strange permission settings... these are used to make the service hidden and unremovable
“Bazar activity can be identified by searching the system startup folders and Userinit values under… Winlogon registry key: %APPDATA%\…\Startup\adobe.lnk” / (Ryuk table) “Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder… create a Registry entry…\Run to establish persistence.”
When we mount the malicious ISO file, we see that a drive is mounted on the system that contains a shortcut file named “Attachments.lnk” and a hidden file named “documents.log” .
This sets a scheduled task that launches the loader every time the user logs into Windows, which makes way for new versions of the backdoor to be downloaded and injected into svchost.exe.
The payload will then be injected filelessly into C:\Windows\system32\svchost.exe through process hollowing and process doppelgänging techniques.
The payload will then be injected filelessly into C:\Windows\system32\svchost.exe through process hollowing and process doppelgänging techniques.
registers the final payload as a Windows service using a long command line with some strange permission settings... these are used to make the service hidden and unremovable
“Bazar activity can be identified by searching the system startup folders and Userinit values under… Winlogon registry key: %APPDATA%\…\Startup\adobe.lnk” / (Ryuk table) “Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder… create a Registry entry…\Run to establish persistence.”
When we mount the malicious ISO file, we see that a drive is mounted on the system that contains a shortcut file named “Attachments.lnk” and a hidden file named “documents.log” .
One of those methods is string obfuscation, where the malware uses encoded stack strings to hide them from static analysis.
At this point, we can safely guess that sub_1800045D6 is an API resolving function, and the parameter it takes is the hash of the API’s name.
Clicking on the link downloads an executable that masquerades through icons and names associated with the mentioned file types. For instance, the supposed customer complaint document will be downloaded as Preview.PDF.exe, which uses the PDF icon. Since the file extension is hidden by default, the file will convincingly appear as a PDF file.
The payload will then be injected filelessly into C:\Windows\system32\svchost.exe through process hollowing and process doppelgänging techniques.
The payload will then be injected filelessly into C:\Windows\system32\svchost.exe through process hollowing and process doppelgänging techniques.
a typical encoded string is pushed on the stack and decoded dynamically using some multiplication, subtraction, and modulus operations.
The macro drops a Microsoft Hypertext Markup Language (HTML) Applications (HTA) file on the file system and then executes the file using the mshta.exe Windows utility.
downloads a file and writes it to disk as a .jpg file and registers it as a service using regsrv32.exe.
C:\Windows\System32\rundll32.exe documents.log,vspa
And this very long PowerShell command chooses one or more of these URLs, at random, and uses it to identify the public-facing IP address of the network where the system is located.
Then, it just executes qmemcpy to copy the data in the second variable to the returned virtual base address. This tells us two things. First, our guess that the v19 variable will contain the address to executable code is correct. Second, we know that the executable code is shellcode since the data is mapped and executed directly at offset 0 from where it is written.
FIN12 has frequently leveraged code-signed payloads in their operations.
“attackers… leveraging tools such as… Mimikatz… Privileges have been escalated using Mimikatz, Rubeus…”
net view /all /domain Enumerates all shared computers and resources on the system and all domains in the network.
These three queries profiled the hard drive, processor information, and RAM on the system.
net localgroup administrator Enumerates users that are members of the administrator local group. net group "domain admins" /domain Enumerates users that are members of the domain admins group
The malware, running in the context of the headless Edge process, also ran other commands like net view /all to learn more about servers on the network where it’s installed.
nltest /domain_trusts /all_trusts Enumerates trust relationships in a Windows Active Directory (AD) environment.
And this very long PowerShell command chooses one or more of these URLs, at random, and uses it to identify the public-facing IP address of the network where the system is located.
“deploy Ryuk (for example via PsExec)… move laterally using RDP… spread… on every reachable machine on which Windows RPC accesses are possible.”
“Privileges have been escalated… by exploiting a Zerologon vulnerability (CVE-2020-1472).”
After launching the file, the loader sleeps for some time, then connects to command and control (C&C) servers to check-in and download the payload.
retrieving BazarBackdoor using HTTPS traffic from 104.248.174[.]225 over TCP port 443. Then BazarBackdoor generated C2 activity using HTTPS traffic
Then the BazarLoader will download and install the BazarBackdoor.
the malware uses “cookies” in the HTTPS GET or POST headers to transmit information to the server, and receives commands from the C2 in the form of one or more “Set-Cookie” response headers.
The TrickBot’s core team of developers had already created a stealthier piece of malware dubbed BazarBackdoor, used to achieve remote access into corporate networks and use it to deploy the ransomware.
We identified these with memory analysis rules and by the use of a DGA with the .bazar TLD as being Bazarbackdoor.
README.md ... Domain Generation Algorithms (DGAs) of Malware reimplemented in Python.
“Reconnaissance data… is exfiltrated via FTP.”
The TrickBot’s core team of developers had already created a stealthier piece of malware dubbed BazarBackdoor, used to achieve remote access into corporate networks and use it to deploy the ransomware.
45 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
34 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.