What We Do
How We Do
Get Started

TRU Positives: Weekly investigation summaries and recommendations from eSentire's Threat Response Unit (TRU)

BatLoader Continues to Abuse Google Search Ads to Deliver Vidar Stealer and Ursnif

BY eSentire Threat Response Unit (TRU)

March 9, 2023 | 7 MINS READ


Threat Intelligence

Threat Response Unit

TRU Positive/Bulletin

Want to learn more on how to achieve Cyber Resilience?


Adversaries don’t work 9-5 and neither do we. At eSentire, our 24/7 SOCs are staffed with Elite Threat Hunters and Cyber Analysts who hunt, investigate, contain and respond to threats within minutes.

We have discovered some of the most dangerous threats and nation state attacks in our space – including the Kaseya MSP breach and the more_eggs malware.

Our Security Operations Centers are supported with Threat Intelligence, Tactical Threat Response and Advanced Threat Analytics driven by our Threat Response Unit – the TRU team.

In TRU Positives, eSentire’s Threat Response Unit (TRU) provides a summary of a recent threat investigation. We outline how we responded to the confirmed threat and what recommendations we have going forward.

Here’s the latest from our TRU Team…

What did we find?

In December, we published a summary of BatLoader activity whereby Google Search Ads were used to impersonate software such as WinRAR to deliver malicious Windows Installer files. The installer files contained custom action commands which used PowerShell to download and execute payloads (Redline Stealer, Ursnif, etc.) hosted on legitimate websites.

Throughout February 2023, TRU has observed a series of newly registered websites impersonating various applications and brands. Included among these are:

In addition to comparable domain registration attributes, these websites tend to follow a similar naming convention where one or more characters are appended to the impersonated brand name (e.g., adobe-l[.]com vs adobe.com). These sites were used to host imposter download pages and all likely stem from malicious advertisements on Google Search Ads. A more complete list can be found at the end of this post.

BatLoader continues to see changes and improvement since it first emerged in 2022. Recent samples analyzed by TRU utilize Windows Installer files masquerading as the above applications to launch embedded Python scripts.

BatLoader's Python Loader

In mid-February 2023, eSentire MDR for Endpoint blocked an attempt to execute Ursnif via code injection on a manufacturing customer’s endpoint. A subsequent investigation traced the infection to a Google search result for Adobe Reader by the victim user.

The user had clicked on a top-of-page ad on the search results page where they were directed via an intermediary website (adolbe[.]website) to adobe-e[.]com, a webpage masquerading as Adobe Acrobat Reader (Figure 1). As a result, the user unknowingly downloaded and executed AdobeSetup.msi(9ebbe0a1b79e6f13bfca014f878ddeec), BatLoader’s Windows Installer file.

Figure 1 adobe-e[.]com, Adobe Acrobat Reader lookalike webpage.

Like previous versions of BatLoader, the MSI file contains Custom Actions to execute commands. In this case, the command executed an embedded batch file (seen here as InstallPython.bat, also observed as PythonFramework.bat) with admin privileges in a hidden window.

A decoy application was written to C:\Program Files (x86)\Chat Mapper along with BatLoader scripts and supporting files (Figure 2).

Figure 2 BatLoader Python scripts and supporting files.

The batch file (figure 3, insert) performs the following actions:

  1. Installs Python 3.9.9 using an included setup binary.
  2. Uses pip to install pywin32 and wmi packages.
  3. Unpacks the compressed OpenSSL library files using PowerShell into multiple locations.
  4. Starts two Python files in sequence after a short timeout.
Figure 3 Batch file execution via Windows Installer custom action.

BatLoader's Python Files

In this case, two Python files (framework.py and frameworkb.py) were included in the package. These were protected using PyArmor and require unpacking with tools such as PyArmor-Unpacker (Figure 4). The files use a script copied from a Stack Overflow question as a template for executing Python code with elevated privileges.

Figure 4 Decoded Python Loader “framework.py”

BatLoader’s instruction set is inserted into the main function of the Stack Overflow Python script. The code retrieves an encrypted payload as control.exe.enc then executes a series of Windows commands. The instructions executed by both Python files were nearly identical except for a change in the payload URL.

The commands shown in Figure 5 are summarized as follows:

  1. Download encrypted payload control.exe.enc from https://shvarcnegerhistory[.]com/ The payload is saved under %appdata% or %userprofile%.
  2. Modify Defender settings to exclude paths, processes, and file extensions.
  3. Decrypt control.exe.enc using the OpenSSL library installed by the previous batch file. The password tor9232jds is used and the file is saved as control.exe.
  4. WorkFolders.exe is called, leveraging a signed execution LOLBAS technique to execute control.exe.
Figure 5 Windows commands from “framework.py” and “frameworkb.py”, summarized

In the above-mentioned case, the payload intercepted by MDR for Endpoint was Ursnif (md5hash 0cb75b1192b23b8e03d955f1156ad19e), specifically isfb_v2.14+ variant configured to connect to the following C2 domains:

Ursnif’s persistence was achieved using a registry run key (VirtualStop) under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. This value executed a shortcut (LineType.lnk) which in turn launches a PowerShell script (CharReturn.ps1), as seen in Figure 6.

Figure 6 CharReturn.ps1

CharReturn.ps1 executed a staged PowerShell loader from registry at HKEY_USERS\Software\AppDataLow\Software\Microsoft\[randomstring]. The loader contained the embedded Ursnif binary which is injected into the Explorer process.

In this incident, MDR for Endpoint identified and blocked PowerShell execution of the Ursnif loader stored in registry.

Other Batloader Observations

Observed URL structures would suggest multiple payloads are available for download:

BatLoader has historically been linked to payloads such as Redline Stealer, SystemBC RAT, Syncro RMM, Vidar Stealer, Ursnif and Cobalt Strike. Analysis of more recent samples in March 2023 has yielded both Vidar Stealer and Ursnif trojans.

TRU has reviewed samples from public malware repositories which exhibited slightly different behavior than what was seen in the February incident described above. This sample from mid-February contained a third Python file named ‘networkframework.py’:

Figure 7 BatLoader's batch file containing a third Python file "networkframework.py"

Like the others, it is obfuscated with PyArmor and contains an identical series of commands to handle payload retrieval, decryption and execution via WorkFolder.exe. In addition, netframework.py contains checks for curating payloads for domain-joined systems with more than 2 IP neighbors in the system’s ARP table.

Figure 8 Snippet of BatLoader Python script showing system profiling.

This behavior has been previously observed whereby BatLoader executed Cobalt Strike in addition to the standard payloads such as Ursnif or Vidar. We assess this is done to prep systems residing in business networks for further infiltration.

As of time of writing, the payload URLs were no longer available for retrieval, but given that this fits into BatLoader’s known historical target selection patterns, we assess that Cobalt Strike is the probable candidate.

How did we find it?

What did we do?

What can you learn from this TRU positive?

Recommendations from our Threat Response Unit (TRU) Team:

Indicators of Compromise

Suspected BatLoader Domains Registered in February 2023:

Domain Creation Date
chatgpt-t[.]com 2023-02-28
zoomvideor[.]com 2023-02-27
adobe-l[.]com 2023-02-22
freecad-l[.]com 2023-02-22
microso-t[.]com 2023-02-22
spotify-uss[.]com 2023-02-21
quickbooks-q[.]com 2023-02-21
freecad-f[.]com2 2023-02-20
java-s[.]com 2023-02-13
adobe-e[.]com 2023-02-13
anydesk-o[.]com 2023-02-13
anydesk-r[.]com 2023-02-09
java-r[.]com 2023-02-09
tableau-r[.]com 2023-02-09
java-a[.]com 2023-02-07
basecamp-a[.]com 2023-02-07
adobe-a[.]com 2023-02-03
visualstudio-t[.]com 2023-02-03
openoffice-a[.]com 2023-02-03
bitwarden-t[.]com 2023-02-01
gimp-t[.]com 2023-02-01
figma-t[.]com6 2023-02-01

Other Indicators of Compromise

Indicator Note
3db1edc5b5550f54abdcb5520cf91d75 Vidar
0cb75b1192b23b8e03d955f1156ad19e Ursnif
85fbc743bb686688ce05cf3289507bf7 Ursnif
11ae3dabdb2d2458da43558f36114acb AdobeSetup.msi (BatLoader)
9ebbe0a1b79e6f13bfca014f878ddeec AdobeSetup.msi (BatLoader)
shvarcnegerhistory[.]com BatLoader C2
Pixelarmada[.]su BatLoader C2
uelcoskdi[.]ru Ursnif C2

eSentire’s Threat Response Unit (TRU) is a world-class team of threat researchers who develop new detections enriched by original threat intelligence and leverage new machine learning models that correlate multi-signal data and automate rapid response to advanced threats.

If you are not currently engaged with an MDR provider, eSentire MDR can help you reclaim the advantage and put your business ahead of disruption.

Learn what it means to have an elite team of Threat Hunters and Researchers that works for you. Connect with an eSentire Security Specialist.

eSentire Unit
eSentire Threat Response Unit (TRU)

The eSentire Threat Response Unit (TRU) is an industry-leading threat research team committed to helping your organization become more resilient. TRU is an elite team of threat hunters and researchers that supports our 24/7 Security Operations Centers (SOCs), builds threat detection models across the eSentire XDR Cloud Platform, and works as an extension of your security team to continuously improve our Managed Detection and Response service. By providing complete visibility across your attack surface and performing global threat sweeps and proactive hypothesis-driven threat hunts augmented by original threat research, we are laser-focused on defending your organization against known and unknown threats.

Read the Latest from eSentire