Labs / Web Attacks
Road 24 of 33
Web Attacks
Attacking the web app itself: discover the paths it hides, turn its own inputs into SQL, shell commands and scripts, reach files and objects that are not yours, and take over a known CMS.
Start this roadThe web app's attack surface
Map its hidden paths, then turn inputs into data theft and scripts.
- 01 Content discovery: finding what a site serves but never links Brute-force a box-office server's unlinked paths with gobuster — find a login-free deprecated API and a database dump left at the web root.
- 02 SQL injection for data theft: reading a table through UNION A land register's search is UNION-injectable: read the error, count columns, map the schema, and dump the staff accounts — then let sqlmap finish.
- 03 Stored XSS: stealing a moderator's session A forum strips <script> but renders comments as HTML. An event handler slips the blocklist, and a moderator's browser beacons their session cookie to you.
- 04 CSRF: forging a transfer from a logged-in browser An online bank authorises transfers by session cookie alone, a GET with no token. A page navigating a signed-in customer wires their money to you.
- 05 Path traversal: reading files outside the archive A document archive opens files by name joined onto its folder. Hand it `../` and it reads any file the server can reach, including /etc/passwd.
Running code and breaking access
Turn an upload, an input, or a CMS flaw into control.
- 01 Unrestricted upload: a photo name over a payload body A photo site gates uploads by file-name extension, but its pipeline runs files by content — so a payload named .jpg executes in the server.
- 02 Command injection: a hostname that carries commands An ops portal tests reachability by pasting the host into a command line. A `;` turns your host into a second command the server runs.
- 03 Broken access control: other people's permits, the staff page A parking portal signs residents in, then never checks what they may touch: permit ids are sequential and unguarded, and the staff view answers anyone.
- 04 CMS takeover: fingerprint, enumerate, guess, install A magazine's CMS leaks its version and editors' handles, never locks accounts, and lets admins install plugins — chained, they hand you the site.