BAZARLOADER
- Type
- Loader
- Capabilities
- Initial accessPersistenceDefense evasionReconnaissanceProcess injection
- Delivery
- PhishingSpearphishingVishingLanding pageLure
- Platforms
- Windows
BazarLoader, also known as BazaLoader and associated with the BazarBackdoor name, is a Windows malware family combining payload-loading and backdoor functionality. It provides an initial foothold in enterprise networks, enables remote access, and delivers additional malware. It is associated with the TrickBot and Wizard Spider cybercrime ecosystem and has supported intrusion chains leading to Cobalt Strike deployment and Ryuk ransomware.
Distribution commonly uses phishing emails containing malicious links or attachments, often impersonating business correspondence, customer complaints, payroll reports, or employee notifications. Some campaigns route victims through cloud-hosted documents and landing pages to executables disguised as documents. The BazarCall campaign used fraudulent subscription emails to induce victims to call attacker-controlled support numbers, where operators guided them into downloading malware.
After execution, the loader contacts command-and-control infrastructure and retrieves a backdoor payload. Observed infection chains execute payloads in memory through process injection, including process hollowing and process doppelgänging, and establish persistence using scheduled tasks triggered at user logon. Bazar also performs remote-system discovery using native Windows utilities. Evasion techniques include delayed execution, encrypted strings, dynamic Windows API resolution, and arithmetic code obfuscation. Its command-and-control mechanisms have included domain generation algorithms and Emercoin DNS resolution.
Associated vulnerabilities
5 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
18 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
(Citation: CrowdStrike Wizard Spider October 2020)(Citation: Microsoft Ransomware as a Service)
“The plans to swap TrickBot with the stealthier BazarBackdoor malware.”
This actor has predominantly used BazaLoader since April of 2020, but on February 3rd, 2021 they distributed a new malware we are calling NimzaLoader... there has been some research community analysis suggesting that NimzaLoader is just another variant of BazaLoader, but based on our observations of significant differences, we are tracking this as a distinct malware family.
Members of the Trickbot gang are long time partners of Conti, and they have recently developed BazarLoader which downloads additional malware onto a victim’s computer.
B aza (BazarLoader & BazarBackdoor) has been attributed to the organized cybercrime group behind Trickbot by multiple security vendors over the past year.
+12 more in the app. View in Mallory
Techniques & procedures
102 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
2 techniques
Reconnaissance
MITRE ATT&CK T5190 Gather Victim Network Information
A call center operator then answers and directs victims to a website to unsubscribe from the service. Call center operators offer to personally guide victims through a process designed to infect vulnerable computers with BazarLoader.
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
5 techniques
Initial Access
MITRE ATT&CK T1189 Drive-by Compromise
In an attack scenario, threat actors could craft a malicious attachment and deliver it to victims via either email or a link inside of an email; the attachment would appear as a legitimate application.
threat actors could craft a malicious attachment and deliver it to victims via either email or a link inside of an email; the attachment would appear as a legitimate application. Opening the malicious attachment leads to the deployment of malware.
[Bazar](https://attack.mitre.org/software/S0534) has been spread via emails with embedded malicious links.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)(Citation: CrowdStrike Wizard Spider October 2020)
BazarCall’s routine starts with a spam mail stating that the victim’s free trial period for a service rendered by the fictitious company “Medical Reminder Service” is about to end... the user is directed to call a provided phone number to unsubscribe.
Execution
16 techniques
Execution
[Bazar](https://attack.mitre.org/software/S0534) can execute a WMI query to gather information about the installed antivirus engine.(Citation: Cybereason Bazar July 2020)(Citation: DFIR Ryuk's Return October 2020)
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
[Bazar](https://attack.mitre.org/software/S0534) can create a scheduled task for persistence.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
Command 12, 13: C2 server replies with a script file to Bazar in a command. Bazar then decrypts the script file and saves it to a Windows temporary folder. Finally, Bazar runs it by calling the API CreateProcessA().
[Bazar](https://attack.mitre.org/software/S0534) can execute a PowerShell script received from C2.(Citation: NCC Group Team9 June 2020)(Citation: CrowdStrike Wizard Spider October 2020)
[Bazar](https://attack.mitre.org/software/S0534) can launch cmd.exe to perform reconnaissance commands.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)
The phone operator continues to guide the user into unwittingly enabling macros that will drop a malicious binary... The group used malicious spam that contains a password-protected Word document with malicious macros.
The hta script deobfuscates and executes Javascript. The Javascript then downloads and runs the BazarLoader payload from a hard-coded URL using ActiveX.
The maldoc then leverages Excel 4.0 macros stored in a hidden sheet, which allow an externally-hosted payload to be downloaded, written to disk and executed
[Bazar](https://attack.mitre.org/software/S0534) can use various APIs to allocate memory and facilitate code execution/injection.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) has been downloaded via Windows BITS functionality.(Citation: NCC Group Team9 June 2020)
Opening the malicious attachment leads to the deployment of malware.
[Bazar](https://attack.mitre.org/software/S0534) can gain execution after a user clicks on a malicious link to decoy landing pages hosted on Google Docs.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)(Citation: CrowdStrike Wizard Spider October 2020)
there is an Excel spreadsheet named subscription_1617056233.xlsb . This spreadsheet has malicious macros. | At the video's 10 minute mark, I enable macros on the malicious spreadsheet, but nothing apparently happened. So the call center operator had me re-open the spreadsheet and enable macros again.
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.
Bazar has manually loaded ntdll from disk in order to identity and remove API hooks set by security products. Donut can patch AMSI, WLDP, as well as exit-related Native API functions... Turla has used a AMSI bypass, which patches the in-memory amsi.dll.
Persistence
9 techniques
Persistence
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
[Bazar](https://attack.mitre.org/software/S0534) can create a scheduled task for persistence.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
[Bazar](https://attack.mitre.org/software/S0534) has been downloaded via Windows BITS functionality.(Citation: NCC Group Team9 June 2020)
Command 17: The C2 server replies with a piece of native code... Bazar decrypts the native code... and deploys it on a newly-create thread to execute. To achieve this, it needs to call some APIs, such as VirtualAlloc(), memcpy(), VirtualProtect(), and CreateThread().
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](https://attack.mitre.org/software/S0534) can create or add files to Registry Run Keys to establish persistence.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can use Winlogon Helper DLL to establish persistence.(Citation: Zscaler Bazar September 2020)
[Bazar](https://attack.mitre.org/software/S0534) can establish persistence by writing shortcuts to the Windows Startup folder.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
Privilege Escalation
10 techniques
Privilege Escalation
After execution of the initial access malware, many threat actors deploy persistence mechanisms, such as the creation of scheduled tasks... Scheduled tasks were the most common persistence method observed in our intrusions.
[Bazar](https://attack.mitre.org/software/S0534) can create a scheduled task for persistence.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject code through calling <code>VirtualAllocExNuma</code>.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject into a target process including Svchost, Explorer, and cmd using process hollowing.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject into a target process using process doppelgänging.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
Command 17: The C2 server replies with a piece of native code... Bazar decrypts the native code... and deploys it on a newly-create thread to execute. To achieve this, it needs to call some APIs, such as VirtualAlloc(), memcpy(), VirtualProtect(), and CreateThread().
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](https://attack.mitre.org/software/S0534) can create or add files to Registry Run Keys to establish persistence.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can use Winlogon Helper DLL to establish persistence.(Citation: Zscaler Bazar September 2020)
[Bazar](https://attack.mitre.org/software/S0534) can establish persistence by writing shortcuts to the Windows Startup folder.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
Stealth
26 techniques
Stealth
The second is opaque predicate, a technique used for control flow obfuscation... Malware authors make use of multiple OPs together with unexecuted code blocks to add complexities that static analysis tools have to deal with. | The first technique is API function hashing, a known trick to obfuscate which functions are called... BazarLoader obfuscates its function calls to make analysis more difficult and to evade detection techniques that rely on reading the IAT.
[Bazar](https://attack.mitre.org/software/S0534) has a variant with a packed payload.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)
[Bazar](https://attack.mitre.org/software/S0534) can hash then resolve API calls at runtime.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) has used XOR, RSA2, and RC4 encrypted files.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)(Citation: CrowdStrike Wizard Spider October 2020)
Exploitation allows a threat actor to create a malicious file that appears to be a legitimate application.
[Bazar](https://attack.mitre.org/software/S0534) can create a task named to appear benign.(Citation: Cybereason Bazar July 2020)
The [Bazar](https://attack.mitre.org/software/S0534) loader has named malicious shortcuts "adobe" and mimicked communications software.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)(Citation: CrowdStrike Wizard Spider October 2020)
The [Bazar](https://attack.mitre.org/software/S0534) loader has used dual-extension executable files such as PreviewReport.DOC.exe.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject code through calling <code>VirtualAllocExNuma</code>.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject into a target process including Svchost, Explorer, and cmd using process hollowing.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can inject into a target process using process doppelgänging.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can delete its loader using a batch file in the Windows temporary folder.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534)'s loader can delete scheduled tasks created by a previous instance of the malware.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can decrypt downloaded payloads. [Bazar](https://attack.mitre.org/software/S0534) also resolves strings and other artifacts at runtime.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) has been downloaded via Windows BITS functionality.(Citation: NCC Group Team9 June 2020)
In this post I’ll work through analyzing an AppX package from Magnitude Exploit Kit that drops Magniber... AppX packages have gotten some mileage as droppers lately.
Once macro-enabled, the mshta.exe process executes to download a payload.
The DLL was saved to the victim’s home directory at C:\Users\[username]\tru.dll . It ran using regsvr32.exe .
C:\Windows\System32\rundll32.exe documents.log,vspa
To check for multiple running instances of itself... BAZARLOADER checks if the mutex “{b837ef4f-10ee-4821-ac76-2331eb32a23f}” is currently owned by any other process... After this, the malware resolves the string “{0caa6ebb-cf78-4b01-9b0b-51032c9120ce}” and tries to create a mutex with that name.
[Bazar](https://attack.mitre.org/software/S0534) can attempt to overload sandbox analysis by sending 1550 calls to <code>printf</code>.(Citation: Cybereason Bazar July 2020)
The content includes environment-aware checks such as "Bazar can also check if the Russian language is installed on the infected machine and terminate if it is found," "CaddyWiper can also halt execution if the compromised host is identified as a domain controller," and "OopsIE checks for information on the CPU fan, temperature, mouse, hard disk, and motherboard as part of its anti-VM checks."
[Bazar](https://attack.mitre.org/software/S0534) can use a timer to delay execution of core functionality.(Citation: NCC Group Team9 June 2020)
MITRE ATT&CK T1564 Hide Artifacts
Bazar has manually loaded ntdll from disk in order to identity and remove API hooks set by security products. Donut can patch AMSI, WLDP, as well as exit-related Native API functions... Turla has used a AMSI bypass, which patches the in-memory amsi.dll.
Similar to the majority of Baza campaigns, the tasks that were executed came in the form of cobalt strike stagers. The benefit of using this “fileless” mechanism, is nothing touches disk.
Defense Impairment
3 techniques
Defense Impairment
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
[Bazar](https://attack.mitre.org/software/S0534) has been signed with fake certificates including those appearing to be from VB CORPORATE PTY. LTD.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) has manually loaded ntdll from disk in order to identity and remove API hooks set by security products.(Citation: NCC Group Team9 June 2020)
Credential Access
1 technique
Credential Access
All of these (malicious tools) are used to gain access to corporate networks, steal files and network credentials, and ultimately deploy ransomware on the network.
Discovery
21 techniques
Discovery
[Bazar](https://attack.mitre.org/software/S0534) can query <code>Windows\CurrentVersion\Uninstall</code> for installed applications.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can collect the IP address and NetBIOS name of an infected machine.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can enumerate remote systems using <code> Net View</code>.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can identify the username of the infected user.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can identity the current process on a compromised host.(Citation: Cybereason Bazar July 2020)
Brute Ratel C4 can use LDAP queries, net group "Domain Admins" /domain and net user /domain for discovery. OilRig has run net group "domain admins" /domain and net group "Exchange Trusted Subsystem" /domain to get account listings on a victim. Wizard Spider has identified domain admins through the use of net group "Domain admins" /DOMAIN.
[Bazar](https://attack.mitre.org/software/S0534) can fingerprint architecture, computer name, and OS version on the compromised host. [Bazar](https://attack.mitre.org/software/S0534) can also check if the Russian language is installed on the infected machine and terminate if it is found.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can enumerate the victim's desktop.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
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
[Bazar](https://attack.mitre.org/software/S0534) can identify administrator accounts on an infected host.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) has the ability to identify domain administrator accounts.(Citation: NCC Group Team9 June 2020)(Citation: DFIR Ryuk's Return October 2020)
[Bazar](https://attack.mitre.org/software/S0534) can collect the time on the compromised host.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can enumerate shared drives on the domain.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can use [Nltest](https://attack.mitre.org/software/S0359) tools to obtain information about the domain.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can attempt to overload sandbox analysis by sending 1550 calls to <code>printf</code>.(Citation: Cybereason Bazar July 2020)
The content includes environment-aware checks such as "Bazar can also check if the Russian language is installed on the infected machine and terminate if it is found," "CaddyWiper can also halt execution if the compromised host is identified as a domain controller," and "OopsIE checks for information on the CPU fan, temperature, mouse, hard disk, and motherboard as part of its anti-VM checks."
[Bazar](https://attack.mitre.org/software/S0534) can use a timer to delay execution of core functionality.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can query the Registry for installed applications.(Citation: Cybereason Bazar July 2020)
[Bazar](https://attack.mitre.org/software/S0534) can identify the installed antivirus engine.(Citation: Cybereason Bazar July 2020)
BAZARLOADER manually checks the system’s languages to avoid executing on machines in Russia and nearby countries. It calls GetSystemDefaultLangID to retrieve the system’s default language and GetKeyboardLayoutList to iterate through the system’s keyboard layouts.
[Bazar](https://attack.mitre.org/software/S0534) can perform a check to ensure that the operating system's keyboard and language settings are not set to Russian.(Citation: NCC Group Team9 June 2020)
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).”
Collection
3 techniques
Collection
[Bazar](https://attack.mitre.org/software/S0534) can retrieve information from the infected machine.(Citation: Cybereason Bazar July 2020)
By covering as much ground as possible, attackers can harvest and leak data to their C2 (Command and Control Infrastructure) before deploying ransomware payloads on the network.
The email contains a ZIP attachment which is protected with a password that is provided in the email text.
Command and Control
17 techniques
Command and Control
Many entries describe XOR, XOR/ADD, bitwise NOT and XOR, ROR plus XOR, hexadecimal encoding after encryption, and custom encoding/obfuscation of HTTP traffic or beacons.
To generate Internet activities to hide its communication with C2 servers... The malware then spawns a thread to periodically connect to random URLs and generate noises to hide the main C2 traffic.
[Bazar](https://attack.mitre.org/software/S0534) has the ability to use an alternative C2 server if the primary server fails.(Citation: NCC Group Team9 June 2020)
Cobalt Strike was sent through encrypted HTTPS traffic generated by BazaLoader.
[Bazar](https://attack.mitre.org/software/S0534) can use HTTP and HTTPS over ports 80 and 443 in C2 communications.(Citation: Cybereason Bazar July 2020)(Citation: NCC Group Team9 June 2020)(Citation: DFIR Conti Bazar Nov 2021)
For each of these custom domains, BAZARLOADER calls DnsQuery_A to query a DNS Resource Record from OpenNIC’s servers to resolve the C2 server’s IP address.
Reverse Proxy using Cobalt Strike Beacon A technique that we come across often is a reverse proxy. We see instances where threat actors use their beacon sessions to establish RDP access through a reverse proxy.
[Bazar](https://attack.mitre.org/software/S0534) downloads have been hosted on Google Docs.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)
The [Bazar](https://attack.mitre.org/software/S0534) loader is used to download and execute the [Bazar](https://attack.mitre.org/software/S0534) backdoor.(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)
[Bazar](https://attack.mitre.org/software/S0534) can download and deploy additional payloads, including ransomware and post-exploitation frameworks such as [Cobalt Strike](https://attack.mitre.org/software/S0154).(Citation: Cybereason Bazar July 2020)(Citation: Zscaler Bazar September 2020)(Citation: NCC Group Team9 June 2020)(Citation: CrowdStrike Wizard Spider October 2020)
strings are decrypted by XOR-ing with a key value (this value may not be fixed) or through quite complex computation
When installed, BazarLoader will eventually deploy Cobalt Strike, which allows threat actors to remotely access the victim's computer and use it to compromise the rest of the network.
The article shows that the DGA is part of Bazar Loader, which will try to download Bazar Backdoor.
[Bazar](https://attack.mitre.org/software/S0534) can implement DGA using the current date as a seed variable.(Citation: Cybereason Bazar July 2020)
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
[Bazar](https://attack.mitre.org/software/S0534) can send C2 communications with XOR encryption.(Citation: NCC Group Team9 June 2020)
[Bazar](https://attack.mitre.org/software/S0534) can use TLS in C2 communications.(Citation: Zscaler Bazar September 2020)
Exfiltration
3 techniques
Exfiltration
When this collection is done, it sends all of the gathered information in the 'body' of the 'POST' request to the C2 server... Command 16: Bazar reads a file path from the C2 server’s command and collects the file’s contents. It sends the collected data as the 'body' of a 'POST' request back to the C2 server.
“Reconnaissance data… is exfiltrated via FTP.”
The TrickBot cybercrime group is responsible for a variety of sophisticated malware targeting Windows and Linux devices to gain access to victim's networks, steal data, and deploy other malware, such as ransomware.
Impact
1 technique
Impact
All of these (malicious tools) are used to gain access to corporate networks, steal files and network credentials, and ultimately deploy ransomware on the network.
Observables
523 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
200 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.