Netskope é nomeada líder no Quadrante Mágico do Gartner® de 2024 para Security Service Edge. Obtenha o Relatório

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.

Ainda mais alto em execução.
Ainda mais longe na visão.

Saiba por que o 2024 Gartner® Magic Quadrant™ nomeou a Netskope como líder em Security Service Edge pelo terceiro ano consecutivo.

Obtenha o Relatório
Netskope Named a Leader in the 2024 Gartner® Magic Quadrant™ for Security Service Edge graphic for menu
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

AsyncRAT: Using Fully Undetected Downloader

Aug 29 2022

Sumário

AsyncRAT is an open-source remote administration tool released on GitHub in January 2019. It’s designed to remotely control computers via encrypted connection, providing complete control via functionalities such as:

  • View and record screen
  • Keylogger
  • Upload, download and execute files
  • Chat communication
  • Persistence mechanisms
  • Disable Windows Defender
  • Shutdown / Restart the machine
  • DOS attack

Although the official GitHub repository contains a legal disclaimer, AsyncRAT is popularly used by attackers and even some APT groups. Netskope Threat Labs recently came across a FUD (Fully Undetected) Batch script which is downloading AsyncRAT from an Amazon S3 Bucket. At the time of our analysis, the Batch script wasn’t being detected by any of the antivirus engines on VirusTotal. The attacker used some simple techniques to make the script fly under the radar, as we will describe later in this analysis.

The downloaded file (second stage) is a PowerShell script that creates and uses multiple files to execute AsyncRAT, which is injected into a legitimate process.

AsyncRAT Attack Flow Summary

In this blog post, we will analyze the complete infection flow of AsyncRAT, from the FUD BAT downloader spotted by the MalwareHunterTeam to the last payload.

Stage 01 – FUD Downloader

The first stage is a batch script that contains zero detections on VirusTotal.

Screenshot of FUD AsyncRAT downloader.
FUD AsyncRAT downloader.

Although no AV vendor is detecting the file, it contains many detections via Sigma and IDS rules, as well as by sandboxes used by VirusTotal.

Screenshot of Sigma rules detecting malicious behavior.
Sigma rules detecting malicious behavior.

The file not being detected is likely due to a long string added in the file multiple times (more than 100) by the attacker.

Screenshot of commented strings added to the file.
Commented strings added to the file.

The string is always the same and is in Japanese. Doing a rough translation, this string seems to be nonsense words added by the attacker.

Screenshot of the rough translation from the string found multiple times in the file.
Rough translation from the string found multiple times in the file.

The malicious command is quite simple and it can be found within the nonsense strings. It’s slightly obfuscated, which probably contributes to the absence of detection.

Example of command executed by the batch file.
Command executed by the batch file.

The command downloads and executes the second stage via PowerShell from an Amazon S3 bucket.

Stage 02 – PowerShell

The file downloaded from the Amazon S3 bucket is a PowerShell script. As we demonstrated in the diagram in the summary section, this script creates multiple files to execute the last stage.

First, it creates a folder named “Not” in “C:\ProgramData”.

Example of second stage creating a directory.
Second stage creating a directory.

Then, it creates five files in this directory. The primary goal of this stage is to run another PowerShell script in a chained execution, described below:

  1. File “xx.vbs” is executed by the second stage;
  2. File “xx.vbs” executes file “xx.bat”;
  3. File “xx.bat” executes file “Bin.vbs” via scheduled task;
  4. File “Bin.vbs” executes file “Bin.bat”;
  5. And finally, “Bin.bat” executes “Bin.ps1” via PowerShell.
Example of chained execution to run “Bin.ps1”.
Chained execution to run “Bin.ps1”.

There are two PE files within the last PowerShell script.

Example of two PE files within the last PowerShell script.
Two PE files within the last PowerShell script.

The first file is known as “RunPE” and it’s used to inject AsyncRAT into a legitimate process, which is the second PE file in the script.

Example of PowerShell running RunPE.
PowerShell running RunPE.

The PowerShell script loads RunPE directly into memory, so none of the PE files are written into disk.

Stage 03 – RunPE

This file is responsible for injecting AsyncRAT into another process using Process Hollowing. It’s developed in .NET and protected with Confuser.

Screenshot of RunPE details.
RunPE details.

The PowerShell script in the second stage loads RunPE in memory and calls a method named “Execute” from “GIT.local”. The method receives the path of the targeted executable (“C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe”) and the AsyncRAT bytes in the arguments.

Example of the method executed by the PowerShell.
Method executed by the PowerShell.

After removing part of the obfuscation, we can confirm that AsyncRAT is being injected via Process Hollowing.

Screenshot of some of the API calls used for Process Hollowing.
Some of the API calls used for Process Hollowing.

Stage 04 – AsyncRAT

As previously mentioned, AsyncRAT is an open-source remote administration tool developed in .NET, and it’s often abused by attackers. The specific sample analyzed in this blog post was likely compiled on July 22, 2022.

Screenshot of AsyncRAT sample delivered by the FUD Batch script.
AsyncRAT sample delivered by the FUD Batch script.

This sample doesn’t contain any obfuscation or protection, so it’s not difficult to understand the code once decompiled. 

Screenshot of decompiled AsyncRAT sample.
Decompiled AsyncRAT sample.

We can summarize AsyncRAT’s main execution flow in six-steps:

  1. Initialize its configuration (decrypts the strings);
  2. Verifies and creates a Mutex (to avoid running duplicated instances);
  3. If enabled in the settings, exits if a virtualized or analysis environment is detected;
  4. If enabled in the settings, establishes persistence;
  5. If enabled in the settings, sets its own process as critical;
  6. Starts the communication with the server.
Example of the AsyncRAT main method.
AsyncRAT main method.

AsyncRAT’s configuration is decrypted within the “InitializeSettings” method.

Screenshot of AsyncRAT method that initializes the configuration.
AsyncRAT method that initializes the configuration.

AsyncRAT uses AES-256 in CBC mode to decrypt the strings.

Example of AsyncRAT method that decrypts data using AES.
AsyncRAT method that decrypts data using AES.

This function reads a base64 encoded string, where the first 32 bytes represents the HMAC, the following 16 bytes the decryption IV, and the remaining bytes are the encrypted data.

Example of AsyncRAT variables storing encrypted data.
AsyncRAT variables storing encrypted data.

We created a Python script that can be used to decrypt AsyncRAT strings using the same algorithm. 

Example of decrypting AsyncRAT configuration.
Decrypting AsyncRAT configuration.

The anti-analysis feature of this sample is disabled, but AsyncRAT provides the option to detect virtualized and analysis environments via simple techniques, such as checking the disk size, checking the OS manufacturer and model, etc.

Example of AsyncRAT anti-analysis method.
AsyncRAT anti-analysis method.

It’s also able to establish persistence via registry or a scheduled task.

Screenshot of AsyncRAT persistence mechanisms.
AsyncRAT persistence mechanisms.

Furthermore, AsyncRAT stores the C2 address and port within its configuration. However, it also provides the option to download this information from Pastebin.

Example of method to download C2 address and port from Pastebin.
Method to download C2 address and port from Pastebin.

After all the steps executed by the main function, which we summarized earlier, AsyncRAT starts an encrypted communication with the C2 server. Once connected, the attacker has full control over the device through GUI, as shown in the example below.

Example of AsyncRAT controller.
Example of AsyncRAT controller.

Conclusões

In this blog post, we analyzed the complete attack flow of AsyncRAT, from the downloader to the last payload. In this scenario, the attacker used simple techniques to make the downloader fly under the radar, being detected by none of the engines on VirusTotal. Furthermore, since AsyncRAT is open-source, one could easily change its code to add or remove functionalities as needed.

Batch scripts like this are commonly used by attackers as an initial foothold. We expect an increase in the use of this file type and others (such as LNK and VBS) after Microsoft released a protection against malicious Microsoft Office macros, which are also popularly abused to deliver malware. Netskope Threat Labs always recommends users avoid opening files of unknown origin, especially those received by email. For organizations, we strongly recommend security training for employees and to use a secure web gateway with advanced threat protection, being able to scan and detect malicious files in real-time.

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
    • Generic.AsyncRAT.B.80EDEB92
  • 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

All the IOCs related to this campaign and scripts 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