Junte-se a nós no SASE Summit da Netskope, chegando a uma cidade perto de você! Registre-se agora.

  • Produtos de Serviço de Segurança Edge

    Proteger-se contra ameaças avançadas e com nuvens e salvaguardar os dados em todos os vetores.

  • Borderless SD-WAN

    Confidentemente, proporcionar acesso seguro e de alto desempenho a cada usuário remoto, dispositivo, site, e nuvem.

  • Plataforma

    Visibilidade incomparável e proteção de dados e contra ameaças em tempo real na maior nuvem privada de segurança do mundo.

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
Borderless SD-WAN: Desbravando na Nova Era da Empresa Sem Fronteiras

Netskope Borderless SD-WAN oferece uma arquitetura que converge princípios de confiança zero e desempenho de aplicativo garantido para fornecer conectividade segura e de alto desempenho sem precedentes para cada site, nuvem, usuário remoto e dispositivo IoT.

Read the article
Borderless SD-WAN
A Netskope oferece uma pilha de segurança na nuvem moderna, com capacidade unificada para proteção de dados e ameaças, além de acesso privado seguro.

Explore a nossa plataforma
Birds eye view metropolitan city
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
Safely Enable ChatGPT and Generative AI
Soluções de zero trust para a implementação de SSE e SASE

Learn about Zero Trust
Boat driving through open sea
A Netskope permite uma jornada segura, inteligente e rápida para a adoção de serviços em nuvem, aplicações e infraestrutura de nuvem pública.

Learn about Industry Solutions
Wind turbines along cliffside
  • Nossos clientes

    Netskope atende a mais de 2.000 clientes em todo o mundo, incluindo mais de 25 dos 100 da Fortune.

  • Customer Solutions

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

  • Treinamento e certificação

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

Ajudamos nossos clientes a estarem prontos para tudo

Ver nossos clientes
Woman smiling with glasses looking out window
A talentosa e experiente equipe de Serviços Profissionais da Netskope fornece uma abordagem prescritiva para sua implementação bem sucedida.

Learn about Professional Services
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.

Learn about Training and Certifications
Group of young professionals working
  • Recursos

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

  • Blog

    Saiba como a Netskope viabiliza a segurança e a transformação de redes através do security service edge (SSE).

  • Eventos e workshops

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

  • Security Defined

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

Podcast Security Visionaries

Bônus Episódio 2: O Quadrante Mágico para SSE e como acertar o SASE
Mike e Steve discutem o Gartner® Magic Quadrant™ para Security Service Edge (SSE), o posicionamento da Netskope e como o clima econômico atual afetará a jornada do SASE.

Reproduzir o podcast
Bônus Episódio 2: O Quadrante Mágico para SSE e como acertar o SASE
Últimos blogs

Como a Netskope pode habilitar a jornada Zero Trust e SASE por meio dos recursos de borda de serviço de segurança (SSE).

Leia o Blog
Sunrise and cloudy sky
Netskope AWS Immersion Day World Tour 2023

A Netskope desenvolveu uma variedade de laboratórios práticos, workshops, webinars detalhados e demonstrações para educar e auxiliar os clientes da AWS no uso e implantação dos produtos Netskope.

Learn about AWS Immersion Day
Parceiro da AWS
O que é o Security Service Edge?

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

Learn about Security Service Edge
Four-way roundabout
  • Empresa

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

  • Por que Netskope

    A transformação da nuvem e o trabalho em qualquer lugar mudaram a forma como a segurança precisa funcionar.

  • Liderança

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

  • Parceiros

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

A Netskope possibilita o futuro do trabalho.

Saiba mais
Curvy road through wooded area
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.
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 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.

Learn about Netskope Partners
Group of diverse young professionals smiling

Malicious Office Documents: Multiple Ways to Deliver Payloads

Nov 19 2021

Co-authored by Gustavo Palazolo and Ghanashyam Satpathy

Sumário

Several malware families are distributed via Microsoft Office documents infected with malicious VBA code, such as Emotet, IceID, Dridex, and BazarLoader. We have also seen many techniques employed by attackers when it comes to infected documents, such as the usage of PowerShell and WMI to evade signature-based threat detection. In this blog post, we will show three additional techniques attackers use to craft malicious Office documents.

Technique 01: VBA Code Executing Shellcode via Process Injection

The first technique involves a malicious VBA script that is used to execute a shellcode, which eventually leads to the deployment of other malware.

The VBA code is automatically executed with the “AutoOpen” feature, and from extracted macro code, we can see references to Windows APIs that are often used for process injection.

Screenshot of Windows APIs used by the VBA code.
Windows APIs used by the VBA code.

Going further, we can find a large array with integers, which are all the bytes of the shellcode.

Example of shellcode bytes within an array.
Shellcode bytes within an array.

And finally, we have the code that is responsible for executing the shellcode.

In this case, the code will be injected into “rundll32.exe” through a popular technique:

  1. A “rundll32.exe” process is created with CreateProcessA, named “RunStuff”;
  2. The code allocates a memory space in the process with VirtualAllocEx, named “AllocStuff”;
  3. The shellcode is written into the newly allocated space with WriteProcessMemory, named “WriteStuff”.
  4. Lastly, the shellcode is executed through CreateRemoteThread, named “CreateStuff”.

Once the shellcode is running, it contacts a malicious server to download the next stage, which can be any additional malware the attacker desires.

Screenshot of Shellcode executed through the infected document.
Shellcode executed through the infected document.

Technique 02: VBA Code Abusing Certutil

This one is a bit more interesting than the first one, as the malicious VBA code is using a Living-off-the-Land technique to carry out the attack.

After extracting the macro, we can see that the malware uses the “AutoOpen” feature to execute two functions, respectively “DropThyself” and “EstablishThyself”.

Screenshot of Functions executed once the document is opened.
Functions executed once the document is opened.

The first called function creates a file named “GoogleUpdater.crt” and writes a large base64 content in the certificate format.

Screenshot of Function dropping the fake certificate in the disk.
Function dropping the fake certificate in the disk.

The file is a base64 encoded executable, which is the second stage of the malware. The content is decoded through a Living-off-the-Land technique using the “certutil.exe” binary.

This is the same technique that was used by the REvil ransomware in the Kaseya attack, where the attacker claimed to have infected more than one million devices around the world.

Screenshot of Payload being decoded through “certutil.exe”
Payload being decoded through “certutil.exe”

After the second stage is decoded, the VBA function “EstablishThyself” creates a simple persistence through Windows registry.

Screenshot of Second-stage executed through simple persistence technique
Second-stage executed through simple persistence technique

In this case, the payload is an agent from a .NET Command & Control framework named Covenant. The file is packed and once running, the entry point executes a shellcode through VirtualAlloc, VirtualProtect, and CreateThread APIs.

Screenshot of Shellcode allocated and executed.
Shellcode allocated and executed.

The shellcode then unpacks the final stage.

Example of Payload being unpacked.
Payload being unpacked.

Since Covenant is developed in .NET, we can decompile the binary to extract additional information about the agent.

Screenshot of Final payload decompiled.
Final payload decompiled.

Technique 03: VBA Code Executing Shellcode via PowerShell

This technique is similar to the first one, however, the shellcode is executed through obfuscated PowerShell.

And again we see the “AutoOpen” feature of VBA Macro being used. At the beginning of the code, we see a large string being concatenated, likely to evade detection.

Screenshot of PowerShell script executed by the macro.
PowerShell script executed by the macro.

Later, the script is executed through a shell object, where the VBA code also uses concatenation in its strings:

Screenshot of PowerShell being executed by the code.
PowerShell being executed by the code.

After running the script, the macro shows a fake error message to deceive the victim.

Screenshot of VBA code displaying a fake message and exiting.
VBA code displaying a fake message and exiting.

The main PowerShell script is encoded with base64, and once we decode it, it’s possible to see APIs related to process injection and a large array of bytes, similar to the first technique.

Screenshot of PowerShell script to inject shellcode.
PowerShell script to inject shellcode.

The shellcode is also very similar to the one found in the first technique.

Screenshot of shellcode execution
Shellcode execution.

Conclusion

We have reviewed three different techniques that are being used by attackers to deliver malware through Microsoft Office documents containing malicious VBA code. It’s interesting to note that despite the differences between them, they are all abusing the “AutoOpen” function within the VBA macros to execute the malware once the document is opened and the user has enabled macros.

The above techniques demonstrate the importance of a strong security solution, as well as security training since these attack vectors can be avoided by not opening unknown attachments, or not enabling macro execution from unknown documents. Moreover, Microsoft has recommended blocking the macro execution through group policy settings by the enterprise administrator in Office 2016 onwards.

Proteção

Netskope Threat Labs is actively monitoring infected documents and ensuring coverage for these types of threats.

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.