SOC Prime Bias: クリティカル

27 11月 2025 19:10

Zscalerの脅威ハンティングがウォーターガマユンAPTキャンペーンを暴露し再構築

Author Photo
Ruslan Mikhalov Chief of Threat Research at SOC Prime linkedin icon Follow
Zscalerの脅威ハンティングがウォーターガマユンAPTキャンペーンを暴露し再構築
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

概要

このレポートは、Water Gamayun APTグループによる多段階の侵入をカバーしており、PowerShellのペイロードをダブルエクステンションのRARアーカイブで配信するためにゼロデイMMC脆弱性(CVE-2025-26633)を悪用しています。

調査

Zscalerはキルチェーンを再構築し、Bingの検索リダイレクトからの侵害されたサイト、.pdf.rarファイルのダウンロード、MSC EvilTwinの悪用、段階的なPowerShellスクリプト、およびItunesC.exeバックドアの実行へと至った。

緩和策

ガイダンスには、ダブルエクステンションアーカイブの監視、リダイレクトの検査、エンコードされたPowerShellコマンドの検出、悪意のあるIPとドメインのブロックが含まれます。

対応策

検出時に、-EncodedCommandを用いるmmc.exeがPowerShellを起動した際のアラートを発し、ファイルを隔離し、103.246.147.17への外部接続をブロックし、インシデント対応手順を発動します。

mermaid graph TB %% Class Definitions classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef malware fill:#ff9999 classDef process fill:#ccccff classDef file fill:#ffff99 classDef c2 fill:#ffccff %% Node Definitions node_initial_access[“<b>アクション</b> – <b>T1659 コンテンツ注入</b><br /><b>説明</b>: 正当なサイトを侵害して悪意のあるリダイレクトを注入”] class node_initial_access action node_malicious_domain[“<b>ファイル</b> – <b>名前</b>: 悪意のある類似ドメイン<br /><b>目的</b>: ダブルエクステンションアーカイブを提供します”] class node_malicious_domain file node_pdf_rar[“<b>ファイル</b> – <b>名前</b>: brochure.pdf.rar<br /><b>タイプ</b>: PDFに偽装されたダブルエクステンションアーカイブ”] class node_pdf_rar file node_user_execution[“<b>アクション</b> – <b>T1204.001 悪意のあるリンク</b><br /><b>説明</b>: 被害者がリンクをクリックしてアーカイブをダウンロード”] class node_user_execution action node_exploit_client[“<b>アクション</b> – <b>T1203 クライアント実行のための悪用</b><br /><b>説明</b>: アーカイブがMSC EvilTwinを介してmmc.exeをハイジャックする.mscをドロップ”] class node_exploit_client action node_cve[“<b>ツール</b> – <b>名前</b>: MSC EvilTwin exploit (CVE‑2025‑26633)<br /><b>ターゲット</b>: mmc.exe”] class node_cve tool node_mmc[“<b>プロセス</b> – <b>名前</b>: mmc.exe”] class node_mmc process node_powershell[“<b>プロセス</b> – <b>名前</b>: powershell.exe”] class node_powershell process node_ps_command[“<b>アクション</b> – <b>T1059.001 PowerShell</b><br /><b>説明</b>: Base64 UTF‑16LEペイロードがエンコードされています”] class node_ps_command action node_obfuscation[“<b>アクション</b> – <b>T1027 難読化</b> および <b>T1140 デコード</b><br /><b>説明</b>: 二重エンコードされたPowerShellコマンド”] class node_obfuscation action node_unrar[“<b>ツール</b> – <b>名前</b>: UnRAR.exe”] class node_unrar tool node_rar_payload[“<b>ファイル</b> – <b>名前</b>: パスワード保護されたRARペイロード”] class node_rar_payload file node_hidden_window[“<b>アクション</b> – <b>T1564.003 隠しウィンドウ</b><br /><b>説明</b>: .NETクラスWinHpXNがコンソールを隠すためにShowWindowを呼び出します”] class node_hidden_window action node_itunesc[“<b>マルウェア</b> – <b>名前</b>: ItunesC.exe<br /><b>機能</b>: ローダーおよびバックドア”] class node_itunesc malware node_c2[“<b>C2</b> – <b>IP</b>: 103.246.147.17<br /><b>プロトコル</b>: HTTPS”] class node_c2 c2 %% Connections node_initial_access u002du002d>|redirects_to| node_malicious_domain node_malicious_domain u002du002d>|serves| node_pdf_rar node_pdf_rar u002du002d>|downloaded_by| node_user_execution node_user_execution u002du002d>|triggers| node_exploit_client node_exploit_client u002du002d>|drops| node_cve node_cve u002du002d>|hijacks| node_mmc node_mmc u002du002d>|loads| node_powershell node_powershell u002du002d>|executes| node_ps_command node_ps_command u002du002d>|uses| node_obfuscation node_ps_command u002du002d>|downloads| node_unrar node_unrar u002du002d>|extracts| node_rar_payload node_rar_payload u002du002d>|leads_to| node_hidden_window node_hidden_window u002du002d>|launches| node_itunesc node_itunesc u002du002d>|communicates_with| node_c2

攻撃フロー

シミュレーション実行

前提条件: テレメトリとベースラインの事前チェックが合格していること。

理由: このセクションでは、検出ルールを起動するために設計された敵対者技術(TTP)の正確な実行を詳述します。 また、コマンドと記述は、特定されたTTPを直接反映し、検出ロジックで期待される正確なテレメトリを生成することを目指しています。 抽象的または無関係な例は、誤診につながります。

  • 攻撃ナラティブとコマンド:
    攻撃者は、Water Gamayunの手法を利用して、新しいローカル管理者ユーザーを作成し、管理者グループに追加する悪意のあるPowerShellペイロードを準備します。このペイロードを隠すため、攻撃者は以下を行います:

    1. PowerShellスクリプトをクリアテキストで書きます。
    2. それをUTF‑16LE Base64にエンコードします。
    3. エントロピーを増やすために、4文字ごとにアンダースコア (_) を挿入します。
    4. 次のようにチェーンします: |Replace('_','') 操作により、実行時 のPowerShellはデコード前にアンダースコアを削除し、検出シグネチャに一致します。

    最終的な実行コマンドは以下の通りです:

    powershell.exe -EncodedCommand <Base64StringWithUnderscores> | Replace('_','')

    この正確なコマンドラインはSigmaルールの2つの条件 (-EncodedCommand and |Replace('_','')) を満たし、Sysmon EventID 1およびSecurity EventID 4688のエントリを生成し、ルールでフラグされます。

  • 回帰テストスクリプト:
    以下のスクリプトは難読化されたペイロードの作成と実行を自動化します。PowerShell 5.1+がインストールされた任意のWindowsホストで実行できます。

    # Water GamayunスタイルのPowerShell難読化シミュレーション
    # 手順1: 悪意のあるPowerShellペイロードを定義します (ローカル管理者ユーザーを追加します)
    $payload = @'
    $user = "tempAdmin"
    $pwd  = ConvertTo-SecureString "P@ssw0rd!" -AsPlainText -Force
    New-LocalUser -Name $user -Password $pwd -FullName "Temp Admin" -Description "Test admin account"
    Add-LocalGroupMember -Group "Administrators" -Member $user
    '@
    
    # 手順2: UTF-16LEにエンコードし、その後Base64にエンコードします
    $bytes   = [System.Text.Encoding]::Unicode.GetBytes($payload)
    $b64     = [Convert]::ToBase64String($bytes)
    
    # 手順3: グループのパターンをシミュレートして、8文字ごとにアンダースコアを挿入します
    $b64Underscored = ($b64 -split '(.{8})' | Where-Object {$_} | ForEach-Object { $_ + '_' }) -join ''
    
    # 手順4: 必要なReplace('_','')パイプラインで実行します
    powershell.exe -EncodedCommand $b64Underscored | Replace('_','')
  • クリーンアップコマンド:
    以下のコマンドは、テストによって作成されたテストユーザーを削除し、環境を復元します。

    # クリーンアップ:テストで作成された一時的な管理者アカウントを削除
    $user = "tempAdmin"
    if (Get-LocalUser -Name $user -ErrorAction SilentlyContinue) {
        Remove-LocalUser -Name $user
        Write-Host "Deleted test user $user."
    } else {
        Write-Host "Test user $user does not exist."
    }