Query Breaker Lab is a local teaching CTF built with Flask and SQLite. It shows how unsafe SQL string construction can lead to authentication bypass and how parameterized queries prevent this problem.
conda activate comp6441-ctfYou can also recreate the environment by running:
.\scripts\bootstrap.ps1flask --app ctf_app reset-dbpython run.pyOpen http://127.0.0.1:5000 in a browser.
pytest -qThe following script resets the database and runs the tests:
.\scripts\check.ps1- Trigger a database error in vulnerable mode and examine the error message.
- Bypass authentication and retrieve the protected flag.
- Compare vulnerable and secure behavior, then identify the root cause and primary defense.