O futuro do Zero Trust e do SASE é agora! Assista sob demanda

fechar
fechar
  • Por que Netskope chevron

    Mudando a forma como a rede e a segurança trabalham juntas.

  • Nossos clientes chevron

    A Netskope atende a mais de 3.000 clientes em todo o mundo, incluindo mais de 25 das empresas da Fortune 100

  • Nossos parceiros chevron

    Fazemos parceria com líderes de segurança para ajudá-lo a proteger sua jornada para a nuvem.

O mais alto nível de Execução. A Visão mais avançada.

A Netskope foi reconhecida como Líder no Magic Quadrant™ do Gartner® de 2023 para SSE.

Obtenha o Relatório
A Netskope foi reconhecida como Líder no Magic Quadrant™ do Gartner® de 2023 para SSE.
Ajudamos nossos clientes a estarem prontos para tudo

Veja nossos clientes
Woman smiling with glasses looking out window
A estratégia de comercialização da Netskope, focada em Parcerias, permite que nossos Parceiros maximizem seu crescimento e lucratividade enquanto transformam a segurança corporativa.

Saiba mais sobre os parceiros da Netskope
Group of diverse young professionals smiling
Sua Rede do Amanhã

Planeje seu caminho rumo a uma rede mais rápida, segura e resiliente projetada para os aplicativos e usuários aos quais você oferece suporte.

Receba o whitepaper
Sua Rede do Amanhã
Apresentando a plataforma Netskope One

O Netskope One é uma plataforma nativa da nuvem que oferece serviços convergentes de segurança e rede para permitir sua transformação SASE e zero trust.

Saiba mais sobre o Netskope One
Abstrato com iluminação azul
Adote uma arquitetura Secure Access Service Edge (SASE)

O Netskope NewEdge é a maior nuvem privada de segurança de alto desempenho do mundo e oferece aos clientes cobertura de serviço, desempenho e resiliência inigualáveis.

Conheça a NewEdge
NewEdge
Netskope Cloud Exchange

O Cloud Exchange (CE) da Netskope oferece aos clientes ferramentas de integração poderosas para tirar proveito dos investimentos em estratégias de segurança.

Saiba mais sobre o Cloud Exchange
Vídeo da Netskope
A plataforma do futuro é a Netskope

Intelligent Security Service Edge (SSE), Cloud Access Security Broker (CASB), Cloud Firewall, Next Generation Secure Web Gateway (SWG) e Private Access for ZTNA integrados nativamente em uma única solução para ajudar todas as empresas em sua jornada para o Secure Access Service Arquitetura de borda (SASE).

Vá para a plataforma
Vídeo da Netskope
Next Gen SASE Branch é híbrida — conectada, segura e automatizada

Netskope Next Gen SASE Branch converge o Context-Aware SASE Fabric, Zero-Trust Hybrid Security e SkopeAI-Powered Cloud Orchestrator em uma oferta de nuvem unificada, inaugurando uma experiência de filial totalmente modernizada para empresas sem fronteiras.

Saiba mais sobre Next Gen SASE Branch
Pessoas no escritório de espaço aberto
Desenvolvendo uma Arquitetura SASE para Leigos

Obtenha sua cópia gratuita do único guia de planejamento SASE que você realmente precisará.

Baixe o eBook
Mude para serviços de segurança na nuvem líderes de mercado com latência mínima e alta confiabilidade.

Conheça a NewEdge
Lighted highway through mountainside switchbacks
Permita com segurança o uso de aplicativos generativos de IA com controle de acesso a aplicativos, treinamento de usuários em tempo real e a melhor proteção de dados da categoria.

Saiba como protegemos o uso de IA generativa
Ative com segurança o ChatGPT e a IA generativa
Soluções de zero trust para a implementação de SSE e SASE

Conheça o Zero Trust
Boat driving through open sea
Netskope obtém alta autorização do FedRAMP

Escolha o Netskope GovCloud para acelerar a transformação de sua agência.

Saiba mais sobre o Netskope GovCloud
Netskope GovCloud
  • Recursos chevron

    Saiba mais sobre como a Netskope pode ajudá-lo a proteger sua jornada para a nuvem.

  • Blog chevron

    Saiba como a Netskope permite a transformação da segurança e da rede por meio do SSE (Security Service Edge)

  • Eventos e workshops chevron

    Esteja atualizado sobre as últimas tendências de segurança e conecte-se com seus pares.

  • Security Defined chevron

    Tudo o que você precisa saber em nossa enciclopédia de segurança cibernética.

Podcast Security Visionaries

How to Use a Magic Quadrant and Other Industry Research
Neste episódio, Max Havey, Steve Riley e Mona Faulkner analisam o intrincado processo de criação de um Magic Quadrant e por que ele é muito mais do que apenas um gráfico.

Reproduzir o podcast
Como usar um Quadrante Mágico e outros podcasts de pesquisa do setor
Últimos blogs

Leia como a Netskope pode viabilizar a jornada Zero Trust e SASE por meio de recursos de borda de serviço de segurança (SSE).

Leia o Blog
Sunrise and cloudy sky
SASE Week 2023: Sua jornada SASE começa agora!

Replay das sessões da quarta SASE Week anual.

Explorar sessões
SASE Week 2023
O que é o Security Service Edge?

Explore o lado de segurança de SASE, o futuro da rede e proteção na nuvem.

Saiba mais sobre o Security Service Edge
Four-way roundabout
  • Empresa chevron

    Ajudamos você a antecipar os desafios da nuvem, dos dados e da segurança da rede.

  • Liderança chevron

    Nossa equipe de liderança está fortemente comprometida em fazer tudo o que for preciso para tornar nossos clientes bem-sucedidos.

  • Customer Solutions chevron

    Estamos aqui junto com você a cada passo da sua trajetória, assegurando seu sucesso com a Netskope.

  • Treinamento e certificação chevron

    Os treinamentos da Netskope vão ajudar você a ser um especialista em segurança na nuvem.

Apoiando a sustentabilidade por meio da segurança de dados

A Netskope tem o orgulho de participar da Visão 2045: uma iniciativa destinada a aumentar a conscientização sobre o papel da indústria privada na sustentabilidade.

Saiba mais
Apoiando a sustentabilidade por meio da segurança de dados
Pensadores, construtores, sonhadores, inovadores. Juntos, fornecemos soluções de segurança na nuvem de última geração para ajudar nossos clientes a proteger seus dados e seu pessoal.

Conheça nossa equipe
Group of hikers scaling a snowy mountain
A talentosa e experiente equipe de Serviços Profissionais da Netskope fornece uma abordagem prescritiva para sua implementação bem sucedida.

Conheça os Serviços Profissionais
Netskope Professional Services
Proteja sua jornada de transformação digital e aproveite ao máximo seus aplicativos de nuvem, web e privados com o treinamento da Netskope.

Saiba mais sobre Treinamentos e Certificações
Group of young professionals working

SquirrelWaffle: New Malware Loader Delivering Cobalt Strike and QakBot

Oct 07 2021

Co-authored by Gustavo Palazolo and Ghanashyam Satpathy

Sumário

In September of 2021, a new malware family named SquirrelWaffle joined the threat landscape. It spread through malicious Microsoft Office documents attached in spam emails

The infection flow starts with a ZIP file that contains the malicious Office document. When the file is opened by the victim, the malicious VBA macros download SquirrelWaffle DLL, which eventually leads to deploying another threat, such as CobaltStrike or QakBot.

In this blog post, we will analyze two variants of the malicious Office documents that deliver SquirrelWaffle. We will also analyze the final SquirrelWaffle payload and how the last stage URLs are being protected inside the binary.

SquirrelWaffle Office Documents

We have identified two variants used to deliver SquirrelWaffle, a Microsoft Word document and a Microsoft Excel spreadsheet. 

Screenshot of SquirrelWaffle infected documents
SquirrelWaffle malicious documents

Malicious Word Document

The first variant is a malicious Microsoft Word file that mimics a DocuSign document, asking the victim to click “Enable Editing” and “Enable Content” to view the content. 

Example of a SquirrelWaffle infected Word document
SquirrelWaffle malicious Word document

The file contains several VBA macros, including junk code. The main routine lies in a function named “eFile”, which is executed by the “AutoOpen” functionality.

Window showing Malicious VBA function
Malicious VBA function

Aside from all the junk added by the developer, we can see two important pieces of data when we open the VBA editor: a PowerShell script and a batch script that executes the PowerShell script. 

These routines are kept inside the text property of Visual Basic Control instead of in a regular VBA module. The purpose is to evade AV detection.

Screenshots of Malicious code inside the Word file
Malicious code inside the Word file

Looking at the “eFile” function, we can see that both PowerShell and the batch script are created in the user’s AppData directory, respectively named “www.ps1” and “www.txt”.

Screenshot showing VBA function creating payloads in disk
VBA function creating payloads in disk

This behavior can be observed with Procmon.

Screenshot of VBA function dropping payloads in disk.
VBA function dropping payloads in disk.

Later, the VBA code executes the batch script, using the Windows “cscript.exe” binary.

Screenshot showing Malicious batch script executed by the infected document.
Malicious batch script executed by the malicious document.

Looking at those files closely, we can see that the PowerShell script is responsible for downloading SquirrelWaffle DLL using five distinct URLs, likely to add more resilience to the process. 

The downloaded DLLs are saved into “C:\ProgramData\” and named “www[N].dll” where [N] is a number from 1 to 5.

Screenshot of PowerShell script that downloads SquirrelWaffle DLL.
PowerShell script that downloads SquirrelWaffle DLL.

And the batch script, which is executed by the malicious document, is responsible for executing the PowerShell script and the SquirrelWaffe payload DLL.

Screenshot of Batch script that is executed by the infected document.
Batch script that is executed by the malicious document.

Once downloaded, the DLL is executed through “rundll32.exe”, which calls an exported function named “ldr”.

Both “cscript.exe” and “rundll32.exe” are legitimate files from Windows, used by this sample to connect to the C&C servers and to download and execute the next stage payloads. This technique is known as Living-off-the-Land (LoL), which consists of using legitimate binaries to perform malicious activities. We have already covered other malware families that employ this technique, such as BazarLoader.

Screenshot of Batch script executing SquirrelWaffle DLL.
Batch script executing SquirrelWaffle DLL.

Malicious Excel Document

The second variant identified by Netskope is a malicious Microsoft Excel file, containing a fake message that also tries to deceive the victim into clicking the “Enable Editing” and “Enable Content” buttons.

Example of Infected Microsoft Excel document, delivering SquirrelWaffle.
Malicious Microsoft Excel document, delivering SquirrelWaffle.

The file uses Excel 4.0 (XML) macros that are obfuscated and spread across many hidden sheets in the document.

Screenshot of Hidden sheets inside the infected Excel file.
Hidden sheets inside the malicious Excel file.

The developer also changed the font color to hide the code, which can be revealed when we change the font property as shown below.

Showing Hidden code inside the hidden sheet.
Hidden code inside the hidden sheet.

When the Macros are executed, the obfuscated code is written into seven different cells, containing many calls to Windows APIs.

Example showing Malicious code inside the infected Excel document.
Malicious code inside the malicious Excel document.

Simply put, this code contacts three different URLs to download SquirrelWaffle DLL, which is saved into “C:\Datop\test[N].test”, where [N] is null or a number (1 and 2). The DLL is then executed through Windows “ShellExecuteA” API.

SquirrelWaffle DLL

Regardless of the variants we described, the goal is to download and execute SquirrelWaffle DLL. In this section, we will analyze a payload identified on September 17, 2021, named “www2.dll”.

The file uses a custom packer to hide the main payload. The unpacking process is not very complex: The first step the code does is load and execute a shellcode.

Example showing SquirrelWaffle packer loading a shellcode in memory.
SquirrelWaffle packer loading a shellcode in memory.

Once running, the shellcode unpacks the payload compressed with aPlib, which is commonly used by malware to compress files or configurations. The data is then decompressed into a new memory location, and the unpacked DLL is eventually executed.

Example of SquirrelWaffle payload DLL being decompressed.
SquirrelWaffle payload DLL being decompressed.

Once unpacked and decompressed, we can dump the bytes into the disk to analyze the file in a disassembler. The payload is a 32-bit DLL likely compiled on September 17, 2021, although this information can’t be 100% reliable.

Screenshot of Unpacked SquirrelWaffle DLL
Unpacked SquirrelWaffle DLL.

Looking at the DLL exports, we can see the function (“ldr”) that is called by the batch script we’ve shown earlier in this post.

Screenshot of SquirrelWaffle “ldr” export function.
SquirrelWaffle “ldr” export function.

The main goal of SquirrelWaffle is to download and execute additional malware. The developers included a feature that hides important strings in the binary, like the C2 server list. 

By looking at the PE “.rdata” section, we can find the encrypted information, along with the decryption key.

Screenshot of SquirrelWaffle encrypted data.
SquirrelWaffle encrypted data.

To decrypt the data, the malware uses a simple rolling XOR algorithm.

Screenshot of SquirrelWaffle data decryption block.
SquirrelWaffle data decryption block.

We created a simple Python script that is able to decrypt the data from SquirrelWaffle samples, by implementing the same logic. The script can be found in our Github repository.

There are two major blocks of encrypted data. The first one is a large list of IP addresses, as shown below.

Screenshot of part of decrypted data from the analyzed SquirrelWaffle payload.
Part of decrypted data from the analyzed SquirrelWaffle payload.

This list is used by the malware as a blocklist, likely to avoid the malware from being analyzed by sandboxes. The second list contains the payload URLs, which SquirrelWaffle uses to download additional malware.

Screenshot of SquirrelWaffle payload URLs.
SquirrelWaffle payload URLs.

The SquirrelWaffle sample from this campaign was downloading a CobaltStrike beacon, using “.txt” as an extension.

Screenshot of CobaltStrike beacon downloaded by SquirrelWaffle.
CobaltStrike beacon downloaded by SquirrelWaffle.

Aside from CobaltStrike, SquirrelWaffle was also found delivering QakBot, which is a modular banking trojan and information stealer, active since 2007.

Conclusão

SquirrelWaffle is a new malware loader that is being used to deliver Cobalt Strike and QakBot. The infection vector occurs through spam emails with malicious Office documents that eventually downloads SquirrelWaffle DLL.
Although this malware was spotted delivering Cobalt Strike and QakBot so far, we are continuously monitoring this threat as it can be used by more malware families. Netskope Advanced Threat Protection provides proactive coverage against zero-day samples including APT and other malicious Office documents using both our ML and heuristic-based static analysis engines, as well as our cloud sandbox. The following screenshot shows the detection for fb41f8ce9d34f5ceb42b3d59065f63533d4a93557f9353333cbc861e3aff1f09, indicating it was detected by Netskope Advanced Heuristic Analysis.

Proteção

O Netskope Threat Labs está monitorando ativamente esta campanha e garantiu cobertura para todos os indicadores de ameaças e cargas conhecidas. 

  • Proteção Contra Ameaças Netskope
    • VB:Trojan.Valyria.5292
  • A Netskope Advanced Protection oferece cobertura proativa contra essa ameaça.
    • Gen.Malware.Detect.By.StHeur indica uma amostra que foi detectada usando análise estática
    • Gen.Malware.Detect.By.Sandbox indica uma amostra que foi detectada por nosso sandbox na nuvem

IOCs

SHA256 Hashes

Infected “.doc”fb41f8ce9d34f5ceb42b3d59065f63533d4a93557f9353333cbc861e3aff1f09
Infected “.xls”2f3371880117f0f8ff9b2778cc9ce57c96ce400afa8af8bfabbf09cb138e8a28
SquirrelWaffle DLL00d045c89934c776a70318a36655dcdd77e1fedae0d33c98e301723f323f234c
CobaltStrike Beacon3c280f4b81ca4773f89dc4882c1c1e50ab1255e1975372109b37cf782974e96f

The full list of IOCs, the script that decrypts SquirrelWaffle configuration, and a Yara rule can be found in our Github repository.

author image
Gustavo Palazolo
Gustavo Palazolo é especialista em análise de malware, engenharia reversa e pesquisa de segurança, atuando há muitos anos em projetos relacionados à proteção contra fraudes eletrônicas. Atualmente, ele está trabalhando na Equipe de Pesquisa da Netskope, descobrindo e analisando novas ameaças de malware.

Stay informed!

Subscribe for the latest from the Netskope Blog