A chained-attack security lab that combines two vulnerabilities into a single exploitation path:
| Phase | Vulnerability | Objective |
|---|---|---|
| 1 | JWT "None" Algorithm Bypass | Escalate from guest → admin without knowing the secret key |
| 2 | XML External Entity (XXE) | Exfiltrate the contents of /flag.txt from the server |
After completing this lab, students will be able to:
- Explain how JSON Web Tokens (JWT) work and why accepting the
"none"algorithm is dangerous. - Craft a forged JWT to bypass authentication and escalate privileges.
- Understand how XML parsers process Document Type Definitions (DTDs) and external entities.
- Exploit an XXE vulnerability to read arbitrary files from the server.
- Recognize how vulnerability chaining amplifies overall risk.
id-networkers-combined-02/
├── app/
│ ├── main.py # FastAPI app — routes, JWT guard, vulnerable XML parser
│ ├── auth.py # JWT creation & vulnerable verification logic
│ └── templates/
│ ├── login.html # Authentication portal
│ ├── dashboard.html # Admin panel with XML upload
│ └── result.html # Parsed XML output
├── Dockerfile # Python 3.11-slim, plants /flag.txt
├── docker-compose.yml # Single-service container orchestration
├── requirements.txt # Python dependencies
├── README.md # ← You are here
└── SOLUTION.md # Full walkthrough (SPOILERS!)
- Docker and Docker Compose installed.
cd id-networkers-combined-02
docker compose up --build -dThe lab will be available at http://localhost:8000.
docker compose down- Open http://localhost:8000 in your browser.
- Log in with the guest credentials shown on the login page (
guest/guest123). - Notice that you receive an "Access Denied" message — the dashboard requires admin privileges.
- Inspect the
session_tokencookie in your browser's Developer Tools. - Phase 1: Figure out how to modify the JWT to gain admin access.
- Phase 2: Once inside the Admin Dashboard, use the XML upload feature to read
/flag.txt.
Hint: Pay attention to the "System Status" panel on the dashboard — it tells you something about the parser configuration.
| Component | Technology |
|---|---|
| Backend | FastAPI (Python 3.11) |
| JWT Library | python-jose |
| XML Parser | lxml (libxml2) |
| Templates | Jinja2 |
| Container | Docker |
This lab is designed exclusively for educational purposes in controlled environments. The vulnerabilities are intentional. Never deploy this application on a public network or use these techniques against systems without explicit authorization.
ID-Networkers Security Training Labs — Authorized Use Only