エッジアプライアンスから企業侵害まで:F5とConfluenceを介した多段階のLinux侵入
Detection stack
- AIDR
- Alert
- ETL
- Query
概要
攻撃者はまず、露出したF5 BIG-IPロードバランサーを介してアクセスし、次に内部のLinuxサーバーにピボットし、その後既知の脆弱性を悪用して内部のAtlassian Confluenceインスタンスを侵害しました。そこから、攻撃者は広範な調査を行い、資格情報を盗み、Windowsドメイン資産に対してKerberosおよびNTLM中継攻撃を開始しました。この操作は、スキャン、横方向移動、データ流出のためにオープンソースツールとカスタムスクリプトの混合に頼っています。
調査
Microsoft Defender Security Researchは、侵害されたBIG-IPアプライアンスから内部Linuxホストへの侵入を追跡しました。そこでは、調査者は悪意のあるIPアドレスからダウンロードされたカスタムスキャンツールを発見しました。分析はまた、攻撃中に使用されたNmap、gowitness、およびResponderなどのユーティリティの使用を記録しました。研究者はさらに、Confluence設定ファイルからの資格情報の盗難と、ドメインコントローラーおよびその他のWindowsリソースを標的とした中継攻撃を明らかにしました。
緩和策
組織は、インターネットに接続されたエッジアプライアンスをTier-0資産として扱い、古いまたはサポートされていないデバイスに対して厳格なパッチ適用とライフサイクル管理を適用し、管理インターフェイスの露出を制限すべきです。内部Webアプリケーションは強化され、既知の脆弱性に対して迅速に更新されるべきです。強力な認証制御、特に可能な場合にはNTLMの無効化やSMB署名の強制などが、リレーに基づく攻撃の影響を軽減するのに役立ちます。
対応
防御者は、予期しないIPアドレスからの異常なSSHログインに警告し、無許可のファイル転送や既知のスキャンユーティリティの実行を監視し、疑わしいELFバイナリをブロックすべきです。セキュリティチームはまた、潜在的に露出された資格情報をローテーションし、サービスアカウントの最小特権を強制し、ConfluenceおよびActive Directoryの設定の整合性を確認すべきです。
“graph TB
%% Class definitions
classDef action fill:#99ccff
classDef technique fill:#c2e0ff
classDef tool fill:#e6e6e6
classDef credential fill:#ffdd99
%% Step 1 – Exploit Public‑Facing Application
step1_exploit[“Technique – T1190 Exploit Public‑Facing Application
Description: Adversary exploits a vulnerability in an Internet‑exposed service to gain initial access.”]
class step1_exploit technique
%% Tool – Vulnerable F5 BIG‑IP
tool_f5[“Tool – Name: F5 BIG‑IP load balancer (vulnerable)
CVE: CVE‑2025‑53521″]
class tool_f5 tool
%% Step 2 – Exploitation of Remote Services
step2_remote[“Technique – T1210 Exploitation of Remote Services
Description: Use the same vulnerability to execute code on the target system and move laterally.”]
class step2_remote technique
%% Step 3 – SSH Remote Services
step3_ssh[“Technique – T1021.004 SSH
Description: Authenticate via SSH with a privileged account to an internal Linux host.”]
class step3_ssh technique
%% Step 4 – Remote Service Session Hijacking
step4_hijack[“Technique – T1563.001 Remote Service Session Hijacking
Description: Maintain a live interactive SSH session for command execution.”]
class step4_hijack technique
%% Step 5 – Active Scanning (IP Blocks)
step5_ipscan[“Technique – T1595.001 Scanning IP Blocks
Description: Run Nmap scripts to discover active hosts and open ports across internal subnets.”]
class step5_ipscan technique
%% Tool – Nmap
tool_nmap[“Tool – Name: Nmap
Purpose: Network discovery and port scanning”]
class tool_nmap tool
%% Step 6 – Active Scanning (Vulnerability)
step6_vulnscan[“Technique – T1595.002 Vulnerability Scanning
Description: Use custom scanner and gowitness to locate vulnerable internal applications such as Confluence.”]
class step6_vulnscan technique
%% Tool – gowitness
tool_gowitness[“Tool – Name: gowitness
Purpose: Capture screenshots of web services for enumeration”]
class tool_gowitness tool
%% Step 7 – System Network Configuration Discovery
step7_netconfig[“Technique – T1016 System Network Configuration Discovery
Description: Collect network configuration details to map the environment.”]
class step7_netconfig technique
%% Step 8 – File and Directory Discovery
step8_filedisc[“Technique – T1083 File and Directory Discovery
Description: Enumerate files on the compromised Linux host and Confluence server (e.g., server.xml, confluence.cfg.xml).”]
class step8_filedisc technique
%% Step 9 – Unsecured Credentials
step9_creds[“Technique – T1552 Unsecured Credentials
Description: Extract service account credentials from configuration files.”]
class step9_creds technique
%% Credential node
cred_service[“Credential – Harvested service account credentials”]
class cred_service credential
%% Step 10 – Valid Accounts
step10_valid[“Technique – T1078 Valid Accounts
Description: Re‑use harvested Confluence credentials to authenticate to Active Directory services.”]
class step10_valid technique
%% Step 11 – Lateral Movement via Remote Services
step11_lateral[“Technique – T1021 Remote Services
Description: Attempt NTLM‑based lateral movement using enumeration and file sharing tools.”]
class step11_lateral technique
%% Tools – enum4linux, netexec, smbclient
tool_enum4linux[“Tool – Name: enum4linux
Purpose: Gather Windows enumeration data”]
class tool_enum4linux tool
tool_netexec[“Tool – Name: netexec
Purpose: Execute commands over SMB”]
class tool_netexec tool
tool_smbclient[“Tool – Name: smbclient
Purpose: Access SMB shares”]
class tool_smbclient tool
%% Step 12 – Pass the Ticket (Kerberos/NTLM Relay)
step12_passticket[“Technique – T1550.003 Pass the Ticket
Description: Perform Kerberos and NTLM relay attacks (e.g., PetitPotam) against domain controllers.”]
class step12_passticket technique
%% Tool – PetitPotam
tool_petitpotam[“Tool – Name: PetitPotam
Purpose: NTLM relay via Microsoft RPC”]
class tool_petitpotam tool
%% Step 13 – Steal or Forge Kerberos Tickets
step13_kerb[“Technique – T1558 Steal or Forge Kerberos Tickets
Description: Obtain privileged Kerberos tickets to further compromise AD.”]
class step13_kerb technique
%% Step 14 – Hijack Execution Flow (File Permissions)
step14_perm[“Technique – T1574.005 Hijack Execution Flow: Executable Installer File Permissions Weakness
Description: Add executable permissions to malicious ELF binaries before execution.”]
class step14_perm technique
%% Step 15 – Deploy Web Shell
step15_webshell[“Technique – T1505.003 Server Software Component: Web Shell
Description: Deploy a web shell on the Confluence server for persistence.”]
class step15_webshell technique
%% Step 16 – Application Layer Protocols (File Transfer & Web)
step16_transfer[“Technique – T1071.002 Application Layer Protocol: File Transfer Protocols & T1071.001 Web Protocols
Description: Transfer tools and payloads via FTP and HTTP.”]
class step16_transfer technique
%% Step 17 – Exfiltration Over Alternative Protocol
step17_exfil[“Technique – T1048 Exfiltration Over Alternative Protocol
Description: Exfiltrate data and tooling using non‑standard application protocols.”]
class step17_exfil technique
%% Connections
step1_exploit –>|exploits| tool_f5
step1_exploit –>|leads_to| step2_remote
step2_remote –>|uses| step3_ssh
step3_ssh –>|maintains| step4_hijack
step4_hijack –>|enables| step5_ipscan
step5_ipscan –>|uses| tool_nmap
step5_ipscan –>|leads_to| step6_vulnscan
step6_vulnscan –>|uses| tool_gowitness
step6_vulnscan –>|leads_to| step7_netconfig
step7_netconfig –>|leads_to| step8_filedisc
step8_filedisc –>|leads_to| step9_creds
step9_creds –>|produces| cred_service
step9_creds –>|leads_to| step10_valid
step10_valid –>|uses| cred_service
step10_valid –>|enables| step11_lateral
step11_lateral –>|uses| tool_enum4linux
step11_lateral –>|uses| tool_netexec
step11_lateral –>|uses| tool_smbclient
step11_lateral –>|leads_to| step12_passticket
step12_passticket –>|uses| tool_petitpotam
step12_passticket –>|leads_to| step13_kerb
step13_kerb –>|leads_to| step14_perm
step14_perm –>|leads_to| step15_webshell
step15_webshell –>|enables| step16_transfer
step16_transfer –>|enables| step17_exfil
%% Class assignments
class step1_exploit,step2_remote,step3_ssh,step4_hijack,step5_ipscan,step6_vulnscan,step7_netconfig,step8_filedisc,step9_creds,step10_valid,step11_lateral,step12_passticket,step13_kerb,step14_perm,step15_webshell,step16_transfer,step17_exfil action
class tool_f5,tool_nmap,tool_gowitness,tool_enum4linux,tool_netexec,tool_smbclient,tool_petitpotam tool
class cred_service credential
“
攻撃フロー
検出
可能性のあるC2通信:プロキシを介した非標準ポートでのHTTPによる直接IPへの通信
表示
可能性のあるBase64エンコードされた文字列の操作(cmdline経由)
表示
バイナリ/スクリプト/フォルダへの危険な権限が設定された(cmdline経由)
表示
標準ツールによるリモートファイルのアップロード/ダウンロード(cmdline経由)
表示
IOC(HashSha256)で検出: F5 と Confluence を介したエンタープライズ障害への多段階Linux侵入
表示
IOC(SourceIP)で検出: F5 と Confluence を介したエンタープライズ障害への多段階Linux侵入
表示
IOC(Files)で検出: F5 と Confluence を介したエンタープライズ障害への多段階Linux侵入
表示
IOC(URL)で検出: F5 と Confluence を介したエンタープライズ障害への多段階Linux侵入
表示
IOC(DestinationIP)で検出: F5 と Confluence を介したエンタープライズ障害への多段階Linux侵入
表示
F5 BIG-IP および Confluence を介した多段階Linux侵入 [Linuxプロセス作成]
表示
シミュレーション実行
前提条件: テレメトリ&ベースライン事前チェックが合格していること。
根拠: このセクションでは、検出ルールをトリガーするために設計された敵技術(TTP)の正確な実行を詳述しています。コマンドと物語はTTPsを直接反映し、検出ロジックによって期待される正確なテレメトリを生成することを目指しています。抽象的または無関係な例は誤診につながるでしょう。
-
攻撃の流れとコマンド:
-
ステージ1 – F5 BIG-IPからの権限のあるSSHアクセス
- 攻撃者は特権アカウントの資格情報を取得しました
特権アカウントF5 BIG-IPアプライアンス上で。 - アプライアンスの管理SSHサービスを使用して、攻撃者はターゲットLinuxホストへのセッションを開き、環境変数を注入します
HOSTNAME=F5_BIG-IP_deviceルールのSourceHostNameマッチを満たします。
- 攻撃者は特権アカウントの資格情報を取得しました
-
ステージ2 – ネットワーク偵察(nmap)
- SSHセッション内で、攻撃者は
nmapを内部サブネットに対して実行し、ライブホストとサービスをマッピングします。
- SSHセッション内で、攻撃者は
-
ステージ3 – Webサービス偵察(gowitness)
- Webサーバーを特定した後、攻撃者は
gowitnessを呼び出して、HTTP/HTTPSエンドポイントのスクリーンショットをキャプチャします。
- Webサーバーを特定した後、攻撃者は
-
回避(ルールに特化)
- Pythonの使用はありません
ftplib; したがってexclusion_ftpの規定は発火しません。
- Pythonの使用はありません
-
-
回帰テストスクリプト:
#!/usr/bin/env bash # # Multi‑Stage Intrusion Simulation – triggers the Sigma rule. # Prerequisite: the executing user must have sudo rights to set HOSTNAME for the session. # set -euo pipefail # ------------------------------------------------- # Stage 1 – Simulate privileged SSH login from F5 # ------------------------------------------------- export HOSTNAME="F5_BIG-IP_device" export LOGNAME="privileged_account" export USER="privileged_account" echo "[*] Simulating privileged SSH session from ${HOSTNAME} as ${USER}" # ------------------------------------------------- # Stage 2 – Run nmap (network discovery) # ------------------------------------------------- echo "[*] Running nmap scan on internal subnet 10.0.0.0/24" nmap -sn 10.0.0.0/24 # ------------------------------------------------- # Stage 3 – Run gowitness (web‑service enumeration) # ------------------------------------------------- echo "[*] Executing gowitness against discovered web hosts" # Assume gowitness is installed and in $PATH gowitness file -f /tmp/discovered_web_hosts.txt echo "[+] Simulation complete – expected alert should be generated." -
クリーンアップコマンド:
#!/usr/bin/env bash # # Cleanup for the multi‑stage intrusion simulation # set -euo pipefail # Remove temporary files created by gowitness rm -f /tmp/discovered_web_hosts.txt # Unset environment variables used for the simulation unset HOSTNAME LOGNAME USER echo "[*] Cleanup complete."