Squirrelwaffle
- Type
- Loader
- Capabilities
- Initial accessReconnaissanceDefense evasion
- Delivery
- PhishingSpearphishingMalspamLure
- Platforms
- Windows
Squirrelwaffle is a Windows malware loader first observed in September 2021 that establishes an initial foothold and downloads and executes additional payloads, notably Cobalt Strike and QakBot. Its distribution has been associated with the malicious spam distributor known as TR.
Squirrelwaffle spreads through phishing and malicious spam campaigns, frequently using replies to existing email conversations sent from compromised accounts. Messages commonly link to ZIP archives containing weaponized Microsoft Word or Excel documents. Infection chains rely on users enabling VBA or Excel 4.0 macros; Word-based chains can drop Visual Basic scripts that invoke PowerShell to retrieve DLL payloads. Windows utilities including Rundll32 and Regsvr32 are used for execution. Campaigns have also exploited ProxyLogon and ProxyShell vulnerabilities in on-premises Microsoft Exchange servers to access mailboxes and distribute convincing malicious replies to internal and external recipients. This server compromise supports distribution and is distinct from execution of the loader on recipient endpoints. Such activity has affected organizations in the Middle East and elsewhere.
The loader collects host information, including the computer name, username, domain membership, application-data location, and local network address, and transmits encoded information through HTTP POST requests to command-and-control servers. It supports downloading and launching executables and DLLs, executing operator-supplied commands, and running shellcode through thread-pool callbacks. Its defense-evasion features include XOR and Base64 encoding of configuration and communications, packed stages, junk-code padding, and in-memory unpacking. It also contains address-blacklisting logic intended to avoid analysis environments. Squirrelwaffle enables follow-on compromise, but credential theft, persistence, and lateral movement performed by subsequently delivered malware are not intrinsic loader capabilities.
Associated vulnerabilities
6 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
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
TR has been associated with SquirrelWaffle and Qakbot campaigns but has recently been observed delivering IcedID.
The actors behind that campaign were believed to be 'TR', known to work with a plethora of malware, including Qbot, IcedID, and SquirrelWaffle.
Meanwhile, DEV-0464 distributes the “TR” Qakbot and other malware such as SquirrelWaffle.
Techniques & procedures
47 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
This C2 channel is also used to deliver secondary payloads at the discretion of the attacker.
Initial Access
7 techniques
Initial Access
This allowed the attacker to perform unauthorized actions on behalf of legitimate users.
The IIS logs showed that special crafted server-side request forgery (SSRF) requests were used to exploit CVE-2021-26855, directed at the Exchange Web Services API endpoint.
CVE-2021-26855: the pre-authentication proxy vulnerability This server-side request forgery (SSRF) vulnerability can allow a threat actor access by sending a specially crafted web request to an Exchange Server. | We observed evidence of the exploits on the vulnerabilities CVE-2021-26855, CVE-2021-34473, and CVE-2021-34523 in the IIS Logs on three of the Exchange servers that were compromised in different intrusions.
Link for malicious zip archive from an email pushing Squirrelwaffle loader.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been distributed via malicious Microsoft Office documents within spam emails.(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been distributed through phishing emails containing a malicious URL.(Citation: ZScaler Squirrelwaffle Sep 2021)
The attackers leveraged the vulnerable server to mass distribute Squirrelwaffle to both internal and external recipients by inserting malicious replies into employees’ existing email threads (known as email thread hijacking.)
Execution
13 techniques
Execution
It turns out that the suspicious PowerShell execution is triggered via a scheduled task.
and a scheduled task launching PowerShell which in turn starts regsvr32.exe in the same way.
The obfuscated macros drop a VBS file, which downloads the SQUIRRELWAFFLE loader on the victim’s machine and executes it.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has used PowerShell to execute its payload.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has used `cmd.exe` for execution.(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has used malicious VBA macros in Microsoft Word documents and Excel spreadsheets that execute an `AutoOpen` subroutine.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
These spreadsheets contain malicious Excel4 macros that are responsible for retrieving and executing the SQUIRRELWAFFLE payload.
The call to CreateThreadpoolWait registers the allocated buffer as a callback function to execute when the wait object completes. Finally, the call SetThreadpoolWait sets the wait object for the event, which executes the callback function and launches the shellcode.
SQUIRRELWAFFLE then decodes the command “regsvr32.exe -s ”, appends the executable’s name to it, and calls WinExec to register it as a command component in the registry.
These are links to QBot/QakBot/DanaBot/SquirrelWaffle malware... An infection will most likely end up in a ransomware case.
This step is related to User Execution technique T1204 which is part of the Execution TA0002 tactic.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has relied on victims to click on a malicious link send via phishing campaigns.(Citation: ZScaler Squirrelwaffle Sep 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has relied on users enabling malicious macros within Microsoft Excel and Word attachments.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
Persistence
4 techniques
Persistence
It turns out that the suspicious PowerShell execution is triggered via a scheduled task.
and a scheduled task launching PowerShell which in turn starts regsvr32.exe in the same way.
This allowed the attacker to perform unauthorized actions on behalf of legitimate users.
So far we have identified two ways that the malware made itself persistent. An autorun registry key launching regsvr32.exe to execute a DLL
Privilege Escalation
5 techniques
Privilege Escalation
It turns out that the suspicious PowerShell execution is triggered via a scheduled task.
and a scheduled task launching PowerShell which in turn starts regsvr32.exe in the same way.
it uses the instructions “rep movsb” to copy the entire packer executable from the image base to this newly allocated buffer... Finally, it transfers execution to that virtual address through a “jmp” instruction.
This allowed the attacker to perform unauthorized actions on behalf of legitimate users.
So far we have identified two ways that the malware made itself persistent. An autorun registry key launching regsvr32.exe to execute a DLL
Stealth
12 techniques
Stealth
The threat actors use a different technique to hide malicious code/strings such as URLs, IPs, commands, or even shellcode inside the malicious document.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been packed with a custom packer to hide payloads.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been obfuscated with a XOR-based algorithm.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
The malicious macros v4 is executed and downloaded from a C2 server masquerading as DLL payloads.
it uses the instructions “rep movsb” to copy the entire packer executable from the image base to this newly allocated buffer... Finally, it transfers execution to that virtual address through a “jmp” instruction.
This allowed the attacker to perform unauthorized actions on behalf of legitimate users.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has decrypted files and payloads using a XOR-based algorithm.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been executed using `regsvr32.exe`.(Citation: ZScaler Squirrelwaffle Sep 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has been executed using `rundll32.exe`.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has contained a hardcoded list of IP addresses to block that belong to sandboxes and analysis platforms.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
After getting the machine’s IP address, SQUIRRELWAFFLE checks to see if the decoded data contains the address. If it does, the malware exits immediately. From this, we know that the encoded buffer contains IP addresses to blacklist... This is typically used to check for IP addresses of sandboxes.
the malware extracts its entry point... copies the headers to the current executable’s base... iterates the stage 2 executable’s section table to map the raw section to its virtual address in the current executable’s address space and transfer executions to it.
Defense Impairment
1 technique
Defense Impairment
"IcedID has manipulated Keitaro Traffic Direction System to filter researcher and sandbox traffic." / "Squirrelwaffle has contained a hardcoded list of IP addresses to block that belong to sandboxes and analysis platforms."
Discovery
7 techniques
Discovery
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has collected the victim’s external IP address.(Citation: ZScaler Squirrelwaffle Sep 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) can collect the user name from a compromised host.(Citation: ZScaler Squirrelwaffle Sep 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has gathered victim computer information and configurations.(Citation: ZScaler Squirrelwaffle Sep 2021)
SQUIRRELWAFFLE first generates a random name with a random length between 1 and 11, appends “.txt” to it... SQUIRRELWAFFLE also generates another random name for the executable, appends it after the machine’s TEMP path
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has contained a hardcoded list of IP addresses to block that belong to sandboxes and analysis platforms.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
After getting the machine’s IP address, SQUIRRELWAFFLE checks to see if the decoded data contains the address. If it does, the malware exits immediately. From this, we know that the encoded buffer contains IP addresses to blacklist... This is typically used to check for IP addresses of sandboxes.
The data sent to the C2 includes: %APPDATA% configuration.
Collection
2 techniques
Collection
This exploit gives a threat actor the ability to get users SID and emails. They can even search for and download a target’s emails.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has encrypted collected data using a XOR-based algorithm.(Citation: ZScaler Squirrelwaffle Sep 2021)
Command and Control
5 techniques
Command and Control
Traffic from a Squirrelwaffle loader infection filtered in Wireshark... Traffic filtered in Wireshark showing when Cobalt Strike activity started.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has used HTTP POST requests for C2 communications.(Citation: ZScaler Squirrelwaffle Sep 2021)
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has downloaded and executed additional encoded payloads.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
Since this victim information string is later delivered to C2 servers, SQUIRRELWAFFLE encodes it using the XOR cipher with the key “KJKLO” and Base64 to avoid sending it in plaintext.
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has encoded its communications to C2 servers using Base64.(Citation: ZScaler Squirrelwaffle Sep 2021)
Exfiltration
1 technique
Exfiltration
[Squirrelwaffle](https://attack.mitre.org/software/S1030) has exfiltrated victim data using HTTP POST requests to its C2 servers.(Citation: ZScaler Squirrelwaffle Sep 2021)
Observables
97 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
58 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.