Brad Freeman

21/11/2023

BunnyLoader: Down the Rabbit Hole

This blog was written by Lachlan Godding, SenseOn Security Analyst.

SenseOn has recently obtained and analysed several samples of an emerging malware-as-a-service threat named “BunnyLoader”, which is rapidly becoming attractive to low-level threat actors since its inception on September 4th 2023, due to a combination of its low price, rapid development and well-equipped, user-friendly command and control (C2) panel (see Appendix). 

Figure 1. Hacker forum post advertising BunnyLoader
Figure 1. Hacker forum post advertising BunnyLoader

The novel malware, which is accompanied by several anti-analysis methods, boasts a large range of features including stealing and modifying victim clipboards, keylogging capabilities, downloading and executing payloads, executing remote commands and stealing sensitive data – including passwords and cryptocurrency wallets.

While the malware made its first appearance in forums on September 4th, further investigation indicates that threat actor activity such as development, support and establishing a community has been ongoing since at least July 30th. The developers have been consistently pushing updates to BunnyLoader every few days which include new features, bug fixes and additional evasion techniques. 

Figure 2. BunnyLoader Telegram channel showing creation date and first post
Figure 2. BunnyLoader Telegram channel showing creation date and first post

One of the recent versions of the malware, BunnyLoader v2.8, added RDP credential stealing functionality, in addition to improved anti-virus evasion and keylogging capabilities.

Figure 3. Recent activity in the BunnyLoader Telegram channel showing frequent updates
Figure 3. Recent activity in the BunnyLoader Telegram channel showing frequent updates

This rapid addition of new features, the low lifetime price of $250, in addition to the advertised ability to evade detection by anti-virus and sandbox/virtual machine environments makes BunnyLoader a very attractive new tool in the arsenal of threat actors. SenseOn believes this will continue to become increasingly popular among low-level threat actors in particular, who may not have access to the resources or funds required for more expensive frameworks, or the technical sophistication usually observed in more advanced threats.

Figure 4. Advertised scan output showing BunnyLoader anti-virus evasion 

BunnyLoader

While the specific delivery mechanism of the BunnyLoader will vary depending upon the threat actor behind an attack, likely initial access methods can be determined through cross-examination with other similar malware. These commonly include phishing, watering hole attacks or delivering the malware hidden in cracked software. 

In this case, the suspicious executable, labelled ‘2nd.exe’, is found on the victims desktop. The small file size of 612KB indicates that the file may be packed in some form. Despite the advertised anti-virus evasion capabilities, loading the sample onto a device monitored by the SenseOn Universal Sensor results in the generation of a high priority case due to detection of the malicious binary by the SenseOn anti-malware component.

Figure 5. SenseOn anti-malware triggering in response to BunnyLoader presence on the endpoint
Figure 5. SenseOn anti-malware triggering in response to BunnyLoader presence on the endpoint

Disabling this feature for the purposes of further analysis, and loading the binary into Detect It Easy (DIE), the file is flagged as having been packed with the UPX packer. In addition to this, the file is flagged as being compiled by Microsoft Visual studio in C/C++. 

Figure 6. Detect It Easy (DIE) showing the malware is packed with UPX
Figure 6. Detect It Easy (DIE) showing the malware is packed with UPX

Fortunately, the file can easily be unpacked by utilising the same UPX tool used to originally pack the file. 

Figure 7. Successfully unpacking the malware 
Figure 7. Successfully unpacking the malware 

The first two bytes, “4D 5A”, of the suspect file correspond to the “MZ” header, indicating that the file is indeed a Portable Executable (PE) file.

Figure 8. Raw file data showing the ‘MZ’ PE file header

By further analysing the file in PEStudio, several suspicious imports become apparent:

Figure 9. Breakdown of BunnyLoader PE file showing potentially malicious imports 
Figure 9. Breakdown of BunnyLoader PE file showing potentially malicious imports 

Similarly, several suspicious strings are present in the BunnyLoader executable:

Figure 10. Strings analysis showing several SQL queries for enumerating financial and system information
Figure 10. Strings analysis showing several SQL queries for enumerating financial and system information

Figure 11. Raw file data showing the ‘MZ’ PE file header
Figure 11. Raw file data showing the ‘MZ’ PE file header

Executing the suspicious binary on the infected machine, we are presented with an unusual error dialogue box indicating the file version is incompatible with the current version of Windows. 

Figure 12. Error message displayed upon initial execution of BunnyLoader
Figure 12. Error message displayed upon initial execution of BunnyLoader

Taking into consideration the prior static analysis and the fact that this was executed on a virtual machine monitored by the SenseOn agent, there is a possibility that this is the actions of anti-analysis techniques employed by the malware author, warranting further investigation. Also worth noting in this execution is the lack of any error-reporting processes spawned as a result of running this binary, which increases the likelihood that the returned error is not genuine.

Figure 13. SenseOn telemetry showing execution did not progress 
Figure 13. SenseOn telemetry showing execution did not progress 

Disassembling the executable in Ghidra and searching for a reference to the suspect error message, we can find the execution block returning the dialogue box.

Figure 14. Decompiled error message in Ghidra
Figure 14. Decompiled error message in Ghidra

After tracing this to the code block invoking this dialogue box, there is a conditional check that splits the program execution path based on the results of a function call. This is the suspected check for a virtual environment.

Figure 15. Conditional VM check leading to the error dialogue box
Figure 15. Conditional VM check leading to the error dialogue box

To bypass this attempt to evade analysis, the jz (jump if zero) check can simply be altered to a jnz (jump if not zero) check, effectively forcing the application to follow the opposite execution path that was originally intended by the author. To do this, we must find the hexadecimal value of the jz instruction before altering it in a hex editor. 

In this case, this is a change of the ‘74 34’ value to ‘75 34’

Figure 16. Editing the raw hex to bypass the VM check 
Figure 16. Editing the raw hex to bypass the VM check 

Executing the patched binary, the error dialogue box is no longer presented. The telemetry captured by the SenseOn agent additionally shows some child processes created by the malware, leveraging an instance of cmd.exe to enumerate the victim operating system and anti-virus.

Figure 17. SenseOn telemetry showing BunnyLoader execution progressing 
Figure 17. SenseOn telemetry showing BunnyLoader execution progressing 

This basic enumeration activity is detected by SenseOn, generating a security observation as a result.

Figure 18. SenseOn observation generated in response to enumeration commands by BunnyLoader
Figure 18. SenseOn observation generated in response to enumeration commands by BunnyLoader

The process also initiates HTTP connections to ‘ip-api[.]com’ and ‘api.ipify[.]org’, exposing the infected device’s IP address and location. Interestingly, these requests utilise the suspicious ‘BunnyRequester’ user agent.

Figure 19. SenseOn telemetry displaying BunnyLoader HTTP request to determine victim IP information
Figure 19. SenseOn telemetry displaying BunnyLoader HTTP request to determine victim IP information

These unusual requests by the malware are also detected by SenseOn, correlating with the observed enumeration commands to construct a profile of related suspicious behaviours.

Figure 20. SenseOn observation generated by the malware making a suspicious external connection
Figure 20. SenseOn observation generated by the malware making a suspicious external connection

BunnyLoader subsequently establishes persistence by adding a ‘Spyware_Blocker’ startup item, corresponding to the malicious executable, into the registry runkey of the infected device. 

Figure 21. BunnyLoader establishing persistence by adding registering itself as a startup item
Figure 21. BunnyLoader establishing persistence by adding registering itself as a startup item

A single, seemingly unsuccessful connection to the suspected C2 IP address ‘37[.]139[.]129[.]145’ is also detected. This may indicate additional anti-analysis checks employed by the malware based on the network and hardware checks performed upon initial execution.

Figure 22. BunnyLoader attempting to establish a connection to C2 server in addition to performing the previous IP checks
Figure 22. BunnyLoader attempting to establish a connection to C2 server in addition to performing the previous IP checks

To verify this, we disabled and removed any anti-virus software on the device, before installing and using a VPN to obscure the IP information of the virtual machine. Seeing as ProtonVPN was referenced multiple times during static analysis, we used this VPN to also observe any interactions with the malware.

Running the malware another time, and capturing traffic from the VPN interface in Wireshark, more connection attempts to the C2 IP under the URLs derived from strings analysis are made. Several additional suspicious user agents are present in these requests, which appear to have a few main functions:

Figure 23. BunnyLoader heartbeat HTTP request to C2 
Figure 23. BunnyLoader heartbeat HTTP request to C2 
Figure 24. BunnyLoader ‘BunnyShell’ HTTP request reporting victim system information
Figure 24. BunnyLoader ‘BunnyShell’ HTTP request reporting victim system information

Figure 25. BunnyLoader ‘BunnyTasks’ HTTP request
Figure 25. BunnyLoader ‘BunnyTasks’ HTTP request

Despite this, the suspect IP closes the connection with a HTTP reset ‘RST’ flag and the malware ceases execution.

Opening the malware again in Ghidra and setting various breakpoints to follow the execution path, we see the malware terminate after a particular conditional check.

Figure 26. BunnyLoader conditional check expecting ‘Connected’ response 
Figure 26. BunnyLoader conditional check expecting ‘Connected’ response 

This appears to be checking if the previously observed C2 connection attempt returns a ‘Connected’ message. This can be bypassed in a similar fashion to the dialogue box.

Executing the patched binary once again, even more connections to the C2 IP are detected, with multiple requests observed per minute.

Figure 27. BunnyLoader sending frequently beaconing to C2 server over HTTP
Figure 27. BunnyLoader sending frequently beaconing to C2 server over HTTP

These correspond with empty cmd.exe instances, spawned by the malware, which would likely be populated with malicious commands if issued by the attacker from the C2 interface.

Figure 28. BunnyLoader spawning a large number of command shells with no execution argument
Figure 28. BunnyLoader spawning a large number of command shells with no execution argument

Running netstat on the device to search for listening processes, two IPs, corresponding to the BunnyLoader C2 server and an Amazon EC2 instance not associated with malicious activity are observed by the malicious process.

Figure 29. Netstat output showing BunnyLoader listening on multiple interfaces
Figure 29. Netstat output showing BunnyLoader listening on multiple interfaces

Following execution, SenseOn did not observe any specific malicious instructions received by BunnyLoader from the external C2 server. Despite this, based on prior analysis of both the malware and available intelligence, we can conclude that, if fully leveraged by a threat actor, BunnyLoader is capable of:

Indicators of Compromise (IOCs)

Network IOCs: 

MD5 Hash IOCs:

Detections

YARA 

rule BunnyLoader {
meta:
description = "Detects BunnyLoader samples using common strings"
author = "Lachlan Godding"
strings:


$a1 = "BunnyLoader" ascii fullword


$b1 = "Bitcoin" ascii fullword
$b2 = "Sandbox" ascii fullword
$b3 = "Keylogger" ascii fullword
$b4 = "stealer" ascii fullword
$b5 = "Sqlite" ascii fullword
$b6 = "SetClipboardData" ascii fullword
$b7 = "GetClipboardData" ascii fullword
$b8 = "RegSetValueExW" ascii fullword
$b8 = "RegSetValueExW" ascii fullword


condition:
uint16(0) == 0x5a4d #PE
and $a1
and 4 of ($b*)
}

Snort

alert tcp any any -> any any (msg:"HTTP Request with Suspicious User-Agent"; flow:to_server,established; content:"User-Agent|3a|"; nocase; pcre:"/BunnyTasks|BunnyShell|heartbeat_sender|BunnyRequester|BunnyLoader/i"; sid:1000001; rev:1;)

Appendix – C2 Panel 

Figure 30. BunnyLoader C2 panel main menu

Figure 31. BunnyLoader C2 panel quick actions

Figure 32. BunnyLoader C2 infected devices view

Figure 33. BunnyLoader C2 task issuer
Figure 33. BunnyLoader C2 task issuer

Figure 34. BunnyLoader C2 remote command prompt
Figure 34. BunnyLoader C2 remote command prompt