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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-42533 — CVE-2026-42533을 재현하는 Docker 랩으로, two-pass capture clobbering을 통한 pre-auth nginx 힙 오버플로 및 정보 유출 취약점이며, PoC 스크립트와 패치된 버전 비교를 포함합니다. | Kitploit
도구/GitHubGitHub/ivanesk315/cve-2026-42533
Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityFuzzingPapers & ResearchLearning & EducationLabs & Practice
GitHubivanesk315/cve-2026-42533

CVE-2026-42533

CVE-2026-42533을 재현하는 Docker 랩으로, two-pass capture clobbering을 통한 pre-auth nginx 힙 오버플로 및 정보 유출 취약점이며, PoC 스크립트와 패치된 버전 비교를 포함합니다.

0일 전아직 검토되지 않음
저장소 보기

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2026-42533 Lab — NGINX Two-Pass Capture Clobbering RCE

CVSS 9.2 (Critical) — nginx의 인증 전 힙 버퍼 오버플로 + 정보 유출 영향받는 버전: nginx 0.9.6 – 1.30.3 / 1.31.2 | 패치됨: 1.30.4 / 1.31.3

아키텍처

root@kitploit:~
                    ┌─────────────────────────────────────┐
                    │           호스트 머신                 │
                    │                                      │
  PoC 스크립트 ──────┤  :8080 ──► nginx-vuln  (1.26.x)     │
                    │              │          취약함        │
                    │              ▼                        │
                    │           backend (Python echo)       │
                    │              ▲                        │
                    │              │                        │
                    │  :8081 ──► nginx-patched (1.30.4)     │
                    │                          안전함        │
                    └─────────────────────────────────────┘

빠른 시작

root@kitploit:~
# Build and start
docker compose up --build -d

# Verify
curl http://localhost:8080/health
curl http://localhost:8081/health

# Run PoC
python3 poc_overflow.py          # Heap overflow (crash worker)
python3 poc_infoleak.py          # Info leak (heap residue)
bash poc_curl.sh                 # Quick curl-based tests

# Compare with patched
python3 poc_overflow.py localhost 8081
python3 poc_infoleak.py localhost 8081

# Check for crashes
docker logs nginx-vuln 2>&1 | grep -iE 'signal|segfault|abort'

# Cleanup
docker compose down

취약점 메커니즘

근본 원인

nginx는 지시문 값(proxy_set_header, return, add_header 등)을 공유 가변 배열 r->captures를 사용하여 두 번의 패스로 평가합니다:

패스목적r->captures 읽기
LEN필요한 버퍼 크기 측정예 — $1 길이를 얻기 위해
(regex map이 여기서 평가되어 r->captures를 덮어씀)
VALUE할당된 버퍼에 데이터 쓰기예 — 하지만 이제 $1은 다른 곳을 가리킴

취약한 설정 패턴

root@kitploit:~
map $http_user_agent $is_bot {
    ~*(bot|crawl|spider)  1;         # ← regex map = clobber trigger
    default               0;
}

location ~ "^/api/v1/(.+)$" {       # ← regex capture source
    proxy_set_header X-Route "$1 — $is_bot";   # ← two-pass sink
    #                         ^^    ^^^^^^^
    #                  capture ref + map var in same buffer = BUG
}

공격 방향

방향URI 크기Map 입력 크기결과
오버플로짧음 (3 B)김 (4096 B)LEN은 작게 할당, VALUE는 크게 씀 → 힙 오버플로
정보 유출김 (8000 B)짧음 (5 B)LEN은 크게 할당, VALUE는 작게 씀 → 응답에 힙 잔여물

랩 시나리오

엔드포인트싱크Map 트리거데모
/api/v1/{path}proxy_set_header$is_bot (User-Agent)오버플로
/leak/{path}return + add_header$ref_domain (Referer)정보 유출
/rce/{path}set + return$is_bot (User-Agent)오버플로
/safe/{path}return (map 없음)없음대조군 (안전)

파일

파일목적
docker-compose.yml랩 오케스트레이션
Dockerfile.nginx-vuln취약한 nginx 1.26.x
Dockerfile.nginx-patched패치된 nginx 1.30.4
nginx-vuln.conf주석이 달린 패턴이 포함된 취약한 설정
backend.py프록시된 헤더를 검사하는 에코 서버
poc_overflow.py힙 오버플로 PoC (점진적으로 증가하는 페이로드 크기)
poc_infoleak.py정보 유출 PoC (힙 잔여물 탐지)
poc_curl.sh빠른 curl 기반 테스트

탐지

config scanner를 사용하세요:

root@kitploit:~
python3 nginx_capture_clobber_scan.py /etc/nginx/nginx.conf

완화 (패치 없이)

  1. regex 캡처와 regex map 변수를 분리하여 서로 다른 지시문/위치에 배치
  2. 명명된 캡처를 사용하고 regex 매치를 보유한 블록 내부에서만 참조
  3. 캡처가 다른 곳에서 사용될 때 map에서 ~ / ~* regex 패턴을 피하세요

참고 자료

  • 연구자 글 (cyberstan.co.uk)
  • NVD 항목
  • Config scanner
  • nginx 보안 권고

교육 및 승인된 보안 테스트 목적으로만 사용하세요.

도구 다운로드