
CVE-2026-76460 인증 우회를 시뮬레이션하는 교육용 Flask 랩으로, 취약 모드, 보안 모드, 엄격 모드와 PoC 익스플로잇 스크립트 및 펜테스트 하네스를 제공합니다.
이 프로젝트는 CVE-2026-76460에서 영감을 받은 모의 인증 우회 시나리오를 보여줍니다. 이 랩은 의도적으로 교육적이고 안전하게 설계되었습니다. 실제 시스템을 대상으로 하지 않고 취약한 동작과 패치된 동작을 시뮬레이션하는 로컬 Flask API입니다.
이 애플리케이션은 권한 있는 관리 API가 인증 제어 없이 노출될 수 있는 방법과, 안전한 구현이 인증되지 않은 접근을 차단하는 방법을 보여줍니다.
flowchart LR
Client[Local client or test harness] --> Entry[app.py]
Entry --> Factory[security_lab.factory]
Factory --> Mode{Lab mode}
Mode -->|vulnerable| Open[Management users endpoint\nallows anonymous access]
Mode -->|secure| Bearer[Bearer token validation]
Mode -->|secure-strict| Admin[Bearer token + admin role]
Bearer --> Result[200 or 401 response]
Admin --> Result2[200, 401, or 403 response]
Open --> Result3[200 response with warning]
Factory --> Audit[Audit logger]
Audit --> Log[audit.log].
├── app.py # entry point for the local lab
├── build.sh # creates the venv, installs dependencies, and runs checks
├── run.sh # starts the vulnerable app locally
├── pyproject.toml # project metadata and tool configuration
├── gunicorn.conf.py # deployment configuration for a production-style server
├── src/
│ └── security_lab/
│ ├── __init__.py
│ ├── config.py # lab settings and valid tokens
│ ├── audit.py # file-based audit logger
│ └── factory.py # Flask routes and auth logic
├── tests/
│ └── test_api.py # regression tests for vulnerable and secure modes
├── exploit.py # proof-of-concept route attack script
├── pentest_harness.py # CLI verification helper
├── BUILD_GUIDE.md # build and OS details
├── WALKTHROUGH.md # step-by-step lab walkthrough
├── SECURITY_REPORT.md # summary of the mock vulnerability and fix
├── CONTRIBUTING.md # contribution workflow
├── LICENSE # MIT license
├── requirements.txt # pinned dependencies
├── .env.example # sample environment configuration
└── .github/workflows/
└── python-tests.yml # CI validation for push and pull requests
chmod +x build.sh run.sh
./build.sh
./run.sh
그런 다음 다음과 같이 테스트합니다:
curl -i http://127.0.0.1:5000/api/management/users
$ curl -i http://127.0.0.1:5000/api/management/users
HTTP/1.1 200 OK
Content-Type: application/json
{
"users": [
{"id": 1, "username": "admin", "role": "super-admin"},
{"id": 2, "username": "operator", "role": "operator"}
],
"warning": "unauthenticated access allowed"
}
source .venv/bin/activate
python exploit.py --host 127.0.0.1 --port 5000
source .venv/bin/activate
python pentest_harness.py --mode vulnerable
python pentest_harness.py --mode secure
python pentest_harness.py --mode secure-strict
/api/management/users에 접근할 수 있습니다.403으로 거부됩니다.make lint
make test
main을 대상으로 하는 모든 푸시와 풀 리퀘스트는 지원되는 Python 버전에서 Ruff와 pytest 스위트를 실행합니다. 이러한 검사가 통과한 후 버전 태그를 푸시하면 릴리스가 생성됩니다:
git tag v0.1.0
git push origin v0.1.0
태그 워크플로는 생성된 릴리스 노트와 함께 GitHub Release를 생성합니다. 릴리스는 교육용 랩 소스와 문서를 위한 것이며, 실제 대상 시스템 익스플로잇 자료를 패키징하지 마십시오.
이것은 테스트, 학습, 방어적 연구만을 위한 통제된 랩 환경입니다. 권한 없이 실제 시스템에 사용해서는 안 됩니다.