SQL Injection: Login Bypass & Data Extraction
Attack the most damaging web vulnerability there is. Bypass a login with no password, then use UNION injection to pull secrets straight out of the database and map its schema — against a deliberately vulnerable app on your private network.
- Intermediate
- 45 min
- Security
- SQL injection
- Web
- OWASP
Overview
SQL injection happens when user input is glued straight into a database query — and it remains one of the most damaging web vulnerabilities decades after it was first documented. The only way to really understand it is to do it, on a target you're allowed to break.
The app at http://localhost:5000 (VulnShop) runs only inside your isolated lab. You'll bypass its login without knowing the password by commenting out the password check, then escalate to UNION-based injection to read data from tables the page was never meant to expose, and finish by enumerating the database schema itself. Each successful exploit returns a FLAG{...} you capture as proof.
What you will learn
- Recognise an unparameterised, string-built SQL query
- Bypass authentication with a SQL injection payload
- Use
UNION SELECTto extract data from another table - Enumerate the database schema via
sqlite_master - Understand why parameterised queries are the fix
Before you start
- Basic SQL (
SELECT,WHERE) — the Databases track helps - Comfortable with
curlon the command line - Only ever do this against systems you're authorised to test — here, your private lab
Tasks
- 01Bypass the login
- 02Extract secrets with UNION
- 03Map the schema