Netskope named a Leader in the 2024 Gartner® Magic Quadrant™ for Security Service Edge. Get the report

閉める
閉める
  • Netskopeが選ばれる理由 シェブロン

    ネットワークとセキュリティの連携方法を変える。

  • 導入企業 シェブロン

    Netskope は世界中で 3,000 を超える顧客にサービスを提供しており、その中にはフォーチュン 100 企業の 25 以上が含まれます

  • パートナー シェブロン

    私たちはセキュリティリーダーと提携して、クラウドへの旅を保護します。

Still Highest in Execution.
Still Furthest in Vision.

Learn why 2024 Gartner® Magic Quadrant™ named Netskope a Leader for Security Service Edge the third consecutive year.

レポートを読む
Netskope Named a Leader in the 2024 Gartner® Magic Quadrant™ for Security Service Edge graphic for menu
私たちは、お客様が何にでも備えることができるように支援します

お客様について
窓の外を見て微笑むメガネをかけた女性
Netskopeのパートナー中心の市場開拓戦略により、パートナーは企業のセキュリティを変革しながら、成長と収益性を最大化できます。

Netskope パートナーについて学ぶ
色々な若い専門家が集う笑顔のグループ
明日に向けたネットワーク

サポートするアプリケーションとユーザー向けに設計された、より高速で、より安全で、回復力のあるネットワークへの道を計画します。

ホワイトペーパーはこちら
明日に向けたネットワーク
Netskope One プラットフォームの紹介

Netskope One は、SASE とゼロトラスト変革を可能にする統合型セキュリティおよびネットワーキング サービスを提供するクラウドネイティブ プラットフォームです。

Netskope One について学ぶ
青い照明の抽象画
セキュアアクセスサービスエッジ(SASE)アーキテクチャの採用

Netskope NewEdgeは、世界最大かつ最高のパフォーマンスのセキュリティプライベートクラウドであり、比類のないサービスカバレッジ、パフォーマンス、および回復力を顧客に提供します。

NewEdgeの詳細
NewEdge
Netskope Cloud Exchange

Netskope Cloud Exchange (CE) は、セキュリティポスチャに対する投資を活用するための強力な統合ツールを提供します。

Cloud Exchangeについて学ぶ
Netskopeの動画
  • セキュリティサービスエッジ製品 シェブロン

    高度なクラウド対応の脅威から保護し、あらゆるベクトルにわたってデータを保護

  • Borderless SD-WAN シェブロン

    すべてのリモートユーザー、デバイス、サイト、クラウドへ安全で高性能なアクセスを提供

  • Secure Access Service Edge シェブロン

    Netskope One SASE は、クラウドネイティブで完全に統合された単一ベンダーの SASE ソリューションを提供します。

未来のプラットフォームはNetskopeです

インテリジェントセキュリティサービスエッジ(SSE)、クラウドアクセスセキュリティブローカー(CASB)、クラウドファイアウォール、セキュアウェブゲートウェイ(SWG)、およびZTNAのプライベートアクセスは、単一のソリューションにネイティブに組み込まれており、セキュアアクセスサービスエッジ(SASE)アーキテクチャへの道のりですべてのビジネスを支援します。

製品概要はこちら
Netskopeの動画
Next Gen SASE Branch はハイブリッドである:接続、保護、自動化

Netskope Next Gen SASE Branchは、コンテキストアウェアSASEファブリック、ゼロトラストハイブリッドセキュリティ、 SkopeAI-Powered Cloud Orchestrator を統合クラウド製品に統合し、ボーダレスエンタープライズ向けに完全に最新化されたブランチエクスペリエンスを実現します。

Next Gen SASE Branchの詳細はこちら
オープンスペースオフィスの様子
SASEアーキテクチャの設計 For Dummies

SASE設計について網羅した電子書籍を無償でダウンロード

電子書籍を入手する
最小の遅延と高い信頼性を備えた、市場をリードするクラウドセキュリティサービスに移行します。

NewEdgeの詳細
山腹のスイッチバックを通るライトアップされた高速道路
アプリケーションのアクセス制御、リアルタイムのユーザーコーチング、クラス最高のデータ保護により、生成型AIアプリケーションを安全に使用できるようにします。

生成AIの使用を保護する方法を学ぶ
ChatGPTと生成AIを安全に有効にする
SSEおよびSASE展開のためのゼロトラストソリューション

ゼロトラストについて学ぶ
大海原を走るボート
NetskopeがFedRAMPの高認証を達成

政府機関の変革を加速するには、Netskope GovCloud を選択してください。

Netskope GovCloud について学ぶ
Netskope GovCloud
  • リソース シェブロン

    クラウドへ安全に移行する上でNetskopeがどのように役立つかについての詳細は、以下をご覧ください。

  • ブログ シェブロン

    Netskope がセキュリティ サービス エッジ (SSE) を通じてセキュリティとネットワークの変革を実現する方法を学びます

  • イベント&ワークショップ シェブロン

    最新のセキュリティトレンドを先取りし、仲間とつながりましょう。

  • 定義されたセキュリティ シェブロン

    サイバーセキュリティ百科事典、知っておくべきすべてのこと

「セキュリティビジョナリー」ポッドキャスト

How to Use a Magic Quadrant and Other Industry Research
このエピソードでは、マックス・ヘイビー、スティーブ・ライリー、モナ・フォークナーが、マジック・クアドラントを作成する複雑なプロセスと、それが単なるチャート以上のものである理由を分析します。

ポッドキャストを再生する
マジック・クアドラントとその他の業界調査の活用方法ポッドキャスト
最新のブログ

Netskope がセキュリティ サービス エッジ (SSE) 機能を通じてゼロ トラストと SASE の導入をどのように実現できるかをご覧ください。

ブログを読む
日の出と曇り空
SASE Week 2023年:SASEの旅が今始まります!

第4回 SASE Weekのリプレイセッション。

セッションの詳細
SASE Week 2023
セキュリティサービスエッジとは

SASEのセキュリティ面、ネットワークとクラウドでの保護の未来を探ります。

セキュリティサービスエッジの詳細
4方向ラウンドアバウト
  • 会社概要 シェブロン

    クラウド、データ、ネットワークセキュリティの課題に対して一歩先を行くサポートを提供

  • リーダーシップ シェブロン

    Netskopeの経営陣はお客様を成功に導くために全力を尽くしています。

  • カスタマーソリューション シェブロン

    お客様の成功のために、Netskopeはあらゆるステップを支援いたします。

  • トレーニングと認定 シェブロン

    Netskopeのトレーニングで、クラウドセキュリティのスキルを学ぶ

データセキュリティによる持続可能性のサポート

Netskope は、持続可能性における民間企業の役割についての認識を高めることを目的としたイニシアチブである「ビジョン2045」に参加できることを誇りに思っています。

詳しくはこちら
データセキュリティによる持続可能性のサポート
思想家、建築家、夢想家、革新者。 一緒に、私たちはお客様がデータと人々を保護するのを助けるために最先端のクラウドセキュリティソリューションを提供します。

当社のチーム紹介
雪山を登るハイカーのグループ
Netskopeの有能で経験豊富なプロフェッショナルサービスチームは、実装を成功させるための規範的なアプローチを提供します。

プロフェッショナルサービスについて学ぶ
Netskopeプロフェッショナルサービス
Netskopeトレーニングで、デジタルトランスフォーメーションの旅を保護し、クラウド、ウェブ、プライベートアプリケーションを最大限に活用してください。

トレーニングと認定資格について学ぶ
働く若い専門家のグループ

AsyncRAT: Using Fully Undetected Downloader

Aug 29 2022

Summary

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.

Conclusions

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.

Protection

Netskope Threat Labs is actively monitoring this campaign and has ensured coverage for all known threat indicators and payloads. 

  • Netskope Threat Protection
    • Generic.AsyncRAT.B.80EDEB92
  • Netskope Advanced Threat Protection provides proactive coverage against this threat.
    • Gen.Malware.Detect.By.StHeur indicates a sample that was detected using static analysis
    • Gen.Malware.Detect.By.Sandbox indicates a sample that was detected by our cloud sandbox

IOCs

All the IOCs related to this campaign and scripts can be found in our GitHub repository.

author image
Gustavo Palazolo
Gustavo Palazolo is an expert in malware analysis, reverse engineering and security research, working many years in projects related to electronic fraud protection. He is currently working on the Netskope Research Team, discovering and analyzing new malware threats.

Stay informed!

Subscribe for the latest from the Netskope Blog