SOC Prime Bias:

25 Jun 2026 19:22 UTC

エージェント・テスラ・マルウェア分析:.NET RATのデータ窃盗能力に迫る

Author Photo
SOC Prime Team linkedin icon フォローする
エージェント・テスラ・マルウェア分析:.NET RATのデータ窃盗能力に迫る
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

概要

Agent Teslaは、.NETベースのリモートアクセス型トロイの木馬で、マルウェア・アズ・ア・サービスモデルを通じて提供され、Windowsシステムを対象としています。これは、キーロギングやスクリーンショット撮影などの機能を通じて、認証情報、ブラウザに保存された情報、およびユーザーの通信を盗むように設計されています。このマルウェアは、SMTP、FTP、およびTorネットワークを通じてルーティングされるHTTPトラフィックを含む、いくつかの情報流出チャネルをサポートしています。

調査

この記事は、Agent Teslaが最初のスピアフィッシング配信から持続性の確立、最終的なデータ窃盗にいたるまでどのように動作するかを説明します。 SetWindowsHookEx APIをキーログに使用し、マルウェアがブラウザデータやメールクライアントの保存場所に焦点を当てていることも述べています。この分析では、マルウェアがTorブラウザを利用して情報流出トラフィックを隠す方法も示しています。

緩和策

組織は、.chmファイルやマクロが有効なドキュメントといった悪意のある添付ファイルをブロックするための強力なメールセキュリティ対策を展開するべきです。 .chm ファイルやマクロが有効なドキュメントなどの悪意のある添付ファイルをブロックし、Runキーおよび WinlogonShell 値における無許可のレジストリ変更を監視することも重要です。さらに、既知の情報流出方法をブロックし、異常なTor関連ネットワーク活動を監視することで、侵害の影響を減らすことができます。

対応策

Agent Teslaが検出された場合、さらなる情報流出を防ぐために、影響を受けたWindowsホストを直ちに隔離します。フィッシングメールや武器化された添付ファイルなどの感染源を特定するためにフォレンジック分析を実行してください。持続性メカニズムのためにレジストリの場所とスタートアップフォルダーをレビューし、マルウェアに関連する一時ファイルやアーティファクトを削除します。

<div class="wp-block-socprime-category-attack-flow attack-flow-class" data-title="Attack Flow" data-attack-flow="graph TB %% Class Definitions Section classDef technique fill:#99ccff %% Blue color for MITRE Techniques classDef malware fill:#ff9999 %% Red color for Malware classDef file fill:#cccccc %% Grey color for Files and Artifacts classDef action fill:#ccffcc %% Green color for Actions/Processes %% Initial Access Phase action_phishing["<b>Technique</b> – <b class='technique'>T1566.001 Phishing: Spearphishing Attachment</b><br/><b>Description</b>: Emails containing malicious attachments<br/>such as .gz, .chm, or macro-enabled Word docs."] class action_phishing action file_payloads["<b class='file'>Malicious Attachments</b><br/><b>Types</b>: .gz archives, .chm files, or Word documents<br/>containing macros."] class file_payloads file action_phishing –>|delivers| file_payloads %% Execution and Loading Phase technique_obfuscation["<b class='technique'>T1027.009 Obfuscated Files or Information: Embedded Payloads</b><br/><b>Description</b>: Obfuscated scripts used to download<br/>additional payloads."] class technique_obfuscation technique malware_agent_tesla["<b class='malware'>Malware</b> – <b class='malware'>Agent Tesla</b><br/><b>Description</b>: .NET-based information stealer<br/>loaded directly into system memory."] class malware_agent_tesla malware technique_reflective["<b class='technique'>T1620 Reflective Code Loading</b><br/><b>Description</b>: Loading the final payload<br/>directly into system memory to avoid disk detection."] class technique_reflective technique file_payloads –>|triggers| technique_obfuscation technique_obfuscation –>|loads_via| technique_reflective technique_reflective –>|instantiates| malware_agent_tesla %% Reconnaissance Phase technique_sysinfo["<b class='technique'>T1082 System Information Discovery</b><br/><b>Description</b>: Collecting username, computer name,<br/>and OS version."] class technique_sysinfo technique technique_hostinfo["<b class='technique'>T1592 Gather Victim Host Information</b><br/><b>Description</b>: Collecting specific data regarding<br/>the victim host."] class technique_hostinfo technique malware_agent_tesla –>|performs| technique_sysinfo malware_agent_tesla –>|performs| technique_hostinfo %% Persistence Phase technique_registry["<b class='technique'>T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder</b><br/><b>Description</b>: Modifying Windows Run registry keys,<br/>Winlogon Shell, and dropping binaries in Startup folder."] class technique_registry technique file_startup_bin["<b class='file'>Persistence Binary</b><br/><b>Location</b>: Dropped into the Startup folder."] class file_startup_bin file malware_agent_tesla –>|establishes| technique_registry technique_registry –>|drops| file_startup_bin %% Collection and Credential Access Phase technique_keylogging["<b class='technique'>T1056.001 Input Capture: Keylogging</b><br/><b>Description</b>: Using SetWindowsHookEx API to log keystrokes."] class technique_keylogging technique file_log["<b class='file'>Log File</b><br/><b>Path</b>: %temp%log.tmp"] class file_log file technique_cookies["<b class='technique'>T1539 Steal Web Session Cookie</b><br/><b>Description</b>: Parsing SQLite databases in browsers<br/>(Chrome, Firefox, Edge) to extract cookies."] class technique_cookies technique technique_forge["<b class='technique'>T1606.001 Forge Web Credentials: Web Cookies</b><br/><b>Description</b>: Extracting passwords and session data."] class technique_forge technique technique_account_disc["<b class='technique'>T1087 Account Discovery</b><br/><b>Description</b>: Extracting details from email clients<br/>(Outlook, Thunderbird) and FTP tools (FileZilla)."] class technique_account_disc technique malware_agent_tesla –>|executes| technique_keylogging technique_keylogging –>|writes_to| file_log malware_agent_tesla –>|targets| technique_cookies malware_agent_tesla –>|targets| technique_forge malware_agent_tesla –>|performs| technique_account_disc %% Exfiltration Phase technique_exfil_alt["<b class='technique'>T1048 Exfiltration Over Alternative Protocol</b><br/><b>Description</b>: Sending stolen data via SMTP, FTP, or HTTP."] class technique_exfil_alt technique technique_auto_exfil["<b class='technique'>T1020 Automated Exfiltration</b><br/><b>Description</b>: Using Tor to anonymize network traffic."] class technique_auto_exfil technique file_tor["<b class='file'>Tor Browser</b><br/><b>Location

graph TB %% Class Definitions Section classDef technique fill:#99ccff %% MITREテクニック用ブルー classDef malware fill:#ff9999 %% マルウェア用レッド classDef file fill:#cccccc %% ファイルとアーティファクト用グレー classDef action fill:#ccffcc %% アクション/プロセス用グリーン %% 初期アクセスフェーズ action_phishing[“<b>テクニック</b> – <b class=’technique’>T1566.001 フィッシング: スピアフィッシング添付ファイル</b><br/><b>説明</b>: .gz、.chm、またはマクロが有効なWordドキュメントなどの悪意のある添付ファイルを含むメール。”] class action_phishing action file_payloads[“<b class=’file’>悪意のある添付ファイル</b><br/><b>タイプ</b>: .gzアーカイブ、.chmファイル、またはマクロを含んだWord文書。”] class file_payloads file action_phishing –>|配信する| file_payloads %% 実行とロードフェーズ technique_obfuscation[“<b class=’technique’>T1027.009 隠蔽されたファイルまたは情報: 埋め込まれたペイロード</b><br/><b>説明</b>: 追加のペイロードをダウンロードするために使用される難読化されたスクリプト。”] class technique_obfuscation technique malware_agent_tesla[“<b class=’malware’>マルウェア</b> – <b class=’malware’>Agent Tesla</b><br/><b>説明</b>: システムメモリに直接ロードされる.NETベースの情報窃盗マルウェア。”] class malware_agent_tesla malware technique_reflective[“<b class=’technique’>T1620 反射的コードローディング</b><br/><b>説明</b>: ディスク検出を回避するために最終ペイロードを直接システムメモリにロード。”] class technique_reflective technique file_payloads –>|トリガーする| technique_obfuscation technique_obfuscation –>|経由でロードする| technique_reflective technique_reflective –>|インスタンス化する| malware_agent_tesla %% 偵察フェーズ technique_sysinfo[“<b class=’technique’>T1082 システム情報の発見</b><br/><b>説明</b>: ユーザー名、コンピュータ名、OSバージョンの収集。”] class technique_sysinfo technique technique_hostinfo[“<b class=’technique’>T1592 被害者ホスト情報収集</b><br/><b>説明</b>: 被害者ホストに関する特定のデータを収集。”] class technique_hostinfo technique malware_agent_tesla –>|実行する| technique_sysinfo malware_agent_tesla –>|実行する| technique_hostinfo %% 持続フェーズ technique_registry[“<b class=’technique’>T1547.001 ブートまたはログオン自動開始実行: レジストリRunキー/スタートアップフォルダー</b><br/><b>説明</b>: Windows Runレジストリキーの変更、Winlogon Shell、およびスタートアップフォルダーにバイナリを配置。”] class technique_registry technique file_startup_bin[“<b class=’file’>持続性バイナリ</b><br/><b>場所</b>: スタートアップフォルダーに配置。”] class file_startup_bin file malware_agent_tesla –>|確立する| technique_registry technique_registry –>|ドロップする| file_startup_bin %% 収集と資格情報アクセスフェーズ technique_keylogging[“<b class=’technique’>T1056.001 入力キャプチャ: キーロギング</b><br/><b>説明</b>: SetWindowsHookEx APIを使用してキー入力を記録。”] class technique_keylogging technique file_log[“<b class=’file’>ログファイル</b><br/><b>パス</b>: %temp%log.tmp”] class file_log file technique_cookies[“<b class=’technique’>T1539 ウェブセッションクッキーの盗難</b><br/><b>説明</b>: SQLiteデータベースを解析してクッキーを抽出。(Chrome, Firefox, Edge)”] class technique_cookies technique technique_forge[“<b class=’technique’>T1606.001 ウェブ資格情報の偽造: ウェブクッキー</b><br/><b>説明</b>: パスワードとセッションデータの抽出。”] class technique_forge technique technique_account_disc[“<b class=’technique’>T1087 アカウント発見</b><br/><b>説明</b>: メールクライアント(Outlook, Thunderbird)およびFTPツール(FileZilla)からの詳細の抽出。”] class technique_account_disc technique malware_agent_tesla –>|実行する| technique_keylogging technique_keylogging –>|書き込む| file_log malware_agent_tesla –>|ターゲットにする| technique_cookies malware_agent_tesla –>|ターゲットにする| technique_forge malware_agent_tesla –>|実行する| technique_account_disc %% 情報流出フェーズ technique_exfil_alt[“<b class=’technique’>T1048 代替プロトコルによる情報流出</b><br/><b>説明</b>: SMTP、FTP、またはHTTPを介した盗まれたデータの送信。”] class technique_exfil_alt technique technique_auto_exfil[“<b class=’technique’>T1020 自動情報流出</b><br/><b>説明</b>: Torを使用してネットワークトラフィックを匿名化。”] class technique_auto_exfil technique file_tor[“<b class=’file’>Torブラウザ</b><br/><b>場所</b>: %appdata%tor.zip”] class file_tor file malware_agent_tesla –>|経由で流出| technique_exfil_alt malware_agent_tesla –>|利用する| technique_auto_exfil technique_auto_exfil –>|ダウンロードする| file_tor

攻撃フロー

シミュレーション実行

前提条件: テレメトリとベースラインの事前確認が通過していること。

理由: このセクションは、検出ルールをトリガーするよう設計された敵対者のテクニック (TTP)の正確な実行を詳細に示しています。コマンドとナラティブはTTPに直接関連し、検出ロジックが期待する正確なテレメトリを生成することを目的としています。抽象的または無関係な例は誤診を招く可能性があります。

  • 攻撃の説明とコマンド: 敵対者は初期アクセスを獲得し、被害者のマシンへのアクセスを維持するための持続性を確立しようとしています。Agent Teslaをシミュレートするために、攻撃者は2つの異なるアクションを行います。

    1. 彼らは、以下を変更します HKCUSoftwareMicrosoftWindowsCurrentVersionRun キーを変更し、ユーザーがログインするたびに悪意のあるペイロードを実行するようにします。
    2. 彼らは、標準の WinlogonShell レジストリ値を変更し、標準の explorer.exe を悪意のある実行可能ファイルに置き換えることで、ユーザーシェル環境全体をハイジャックします。これらのアクションは、標準と高影響の両方のレジストリ持続性を検出する能力をテストするために選ばれています。
  • リグレッションテストスクリプト:

    # Agent Tesla持続性TTPsのシミュレーションスクリプト
    
    $maliciousPath = "C:WindowsTempagent_tesla_sim.exe"
    Write-Host "[*] ダミーペイロードを作成しています $maliciousPath"
    New-Item -Path $maliciousPath -ItemType File -Force
    
    Write-Host "[*] T1547.001をシミュレート: Runキーの変更"
    $runKey = "HKCU:SoftwareMicrosoftWindowsCurrentVersionRun"
    New-ItemProperty -Path $runKey -Name "AgentTeslaPersistence" -Value $maliciousPath -PropertyType String -Force
    
    Write-Host "[*] T1547.014をシミュレート: Winlogon Shellの変更"
    $winlogonKey = "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"
    New-ItemProperty -Path $winlogonKey -Name "Shell" -Value "explorer.exe, $maliciousPath" -PropertyType String -Force
    
    Write-Host "[+] シミュレーション完了. SIEMのアラートをチェックしてください。"
  • クリーンアップコマンド:

    # 持続性とダミーファイルを削除するためのクリーンアップスクリプト
    Write-Host "[*] レジストリキーをクリーンアップしています..."
    Remove-ItemProperty -Path "HKCU:SoftwareMicrosoftWindowsCurrentVersionRun" -Name "AgentTeslaPersistence" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWinlogon" -Name "Shell" -ErrorAction SilentlyContinue
    
    Write-Host "[*] ダミーペイロードを削除しています..."
    Remove-Item -Path "C:WindowsTempagent_tesla_sim.exe" -Force -ErrorAction SilentlyContinue
    
    Write-Host "[+] クリーンアップ完了."