BazarBackdoor
- Type
- Backdoor
- Capabilities
- Initial accessPersistenceDefense evasionProcess injectionLateral movementPost exploitation
- Delivery
- PhishingLanding pageLure
- Platforms
- Windows
BazarBackdoor is a stealthy Windows backdoor developed by the TrickBot group, also tracked as ITG23 and Wizard Spider, and first identified in April 2020. It provides remote access to compromised enterprise systems and supports follow-on malware deployment and lateral movement. It has been used in intrusion chains leading to Ryuk and Conti ransomware, with corporate and government organizations among observed victims. Conti adopted it as a stealthier alternative to TrickBot for gaining access to enterprise networks.
BazarBackdoor is commonly delivered by BazarLoader, a distinct loader component that retrieves and executes the backdoor. Distribution campaigns use phishing emails with business-themed lures, including customer complaints, payroll reports, termination notices, and payment remittances. Infection chains have included links through Google Docs to deceptive landing pages offering executables disguised as documents, macro-enabled Office documents inside password-protected archives, and malicious CSV files abusing Excel Dynamic Data Exchange to launch commands after users approve security prompts.
Observed execution chains inject the backdoor into a legitimate Windows service-host process using process hollowing and process doppelgänging, allowing its payload to execute in memory. Scheduled tasks relaunch the loader at user logon, maintaining access and enabling updated backdoor payloads to be retrieved. Its command-and-control mechanisms have included domain generation algorithms and Emercoin-based decentralized DNS. BazarBackdoor access has also enabled deployment of Cobalt Strike and subsequent operator-led reconnaissance and ransomware activity.
Associated vulnerabilities
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.
Associated threat actors
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.
“The plans to swap TrickBot with the stealthier BazarBackdoor malware.”
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.
Techniques & procedures
43 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
2 techniques
Resource Development
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.
Initial Access
3 techniques
Initial Access
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.
Execution
6 techniques
Execution
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.
Persistence
4 techniques
Persistence
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” .
Privilege Escalation
6 techniques
Privilege Escalation
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” .
Stealth
11 techniques
Stealth
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.
Defense Impairment
1 technique
Defense Impairment
FIN12 has frequently leveraged code-signed payloads in their operations.
Credential Access
1 technique
Credential Access
“attackers… leveraging tools such as… Mimikatz… Privileges have been escalated using Mimikatz, Rubeus…”
Discovery
6 techniques
Discovery
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.
Lateral Movement
2 techniques
Lateral Movement
“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).”
Command and Control
7 techniques
Command and Control
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.
Exfiltration
1 technique
Exfiltration
“Reconnaissance data… is exfiltrated via FTP.”
Impact
1 technique
Impact
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.
Observables
45 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
35 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.