Lion Cipher Lab
Exploit SQL injection in your OWN lab (auth bypass, UNION, sqlmap)
- Penetration Testing / Red Team
- Intermediate
- ~60 min
- Free · no account required
Why it matters
You can read that SQL injection is dangerous a hundred times and still not feel it. This lab makes you feel it: on a web app running on your own machine you will type a short string into a form and watch it hand you every account in the database, password hashes and all — the exact outcome that turns a SQL-injection bug in the news into a breach of millions of records. Doing the attack once, safely, against your own target is the fastest way to truly understand the flaw, and it is the same muscle a professional penetration tester or bug-bounty hunter uses (with written authorization) to find…
What you'll learn
- standing up DVWA, a deliberately-vulnerable web app, on your own isolated machine
- reading an injectable query and spotting where user input becomes command
- performing an authentication-bypass with the classic ' OR '1'='1 and the administrator'-- comment trick
- counting a query's columns with ORDER BY, then extracting data with a UNION SELECT
- dumping usernames and password hashes from a database you own via UNION-based injection
- running sqlmap for the first time — against your own target only — to automate detection and extraction
- the hard legal line: you attack only systems you own or hold written permission to test
Steps in this lab
- Read this first: the one line you never cross
- What you're about to do (SQL injection in one breath)
- Stand up the target: run DVWA on your own machine
- Set the difficulty to Low and find the injectable page
- Attack 1 — authentication bypass with ' OR '1'='1
- Attack 2, part 1 — count the columns with ORDER BY
- Attack 2, part 2 — extract the password hashes with UNION SELECT
- Attack 3 — a taste of sqlmap (your own target only)
- Now go see the fix — and clean up