learn/phase-3/p3-w11/lesson 01
Milestone 11 · lesson 1

How Web Apps Get Hacked: The OWASP Top 10

The map of web exploitation: the big families of web bugs, in plain English, before you attack any of them.
Lab: Verbose Errors

Trigger a verbose error and read the information the app leaks in it.

What you'll learn

  • Understand what 'Gaining Access' means and why it comes right after recon and enumeration.
  • Name the most common web vulnerability families and the one idea they share: the app trusting input it shouldn't.
  • Recognise the OWASP Top 10 as the industry's shortlist of what to check first.
  • Read one back-end thought, 'where does user input end up?', and see why that question finds bugs.

How Web Apps Get Hacked: The OWASP Top 10

You've spent Phase 2 learning to find things: subdomains, ports, services, hidden pages. That's recon and enumeration. This week is the next stage of the methodology, Gaining Access, where you turn something you found into an actual way in. And for beginners, the friendliest place to start gaining access is the web application, because you can poke at it with nothing more than a browser and curl.

Before you meet any single attack, spend a few minutes on the map.

One idea underneath almost every web bug

Here is the whole secret, and it is small:

A web app gets hacked when it trusts input it shouldn't.

Everything your browser sends, a URL, a form field, a cookie, a header, is just text the app chose to trust. When that text is handled as safe, but it actually reaches a database, an HTML page, a file path, or a security decision, an attacker can slip in something the developer never intended. Almost every vulnerability in this week is a variation on that one theme: data from the user got treated as code, or as trusted, when it wasn't.

So the question you ask of every input is always the same:

Where does this input end up, and is it treated as code or as data?

The OWASP Top 10, the industry shortlist

You can't test for every possible bug, so the security community maintains the OWASP Top 10: a regularly updated list of the ten most critical web application risks. It's the shortlist every tester works through. You don't need to memorise it, but recognise the big families:

FamilyThe app wrongly trusts...You'll learn it as
Injectioninput that reaches a database or shellSQL Injection
Cross-Site Scripting (XSS)input reflected into a pageXSS
Broken Access Controlthat you'll only ask for your own dataAccess Control & IDOR
Security Misconfigurationdefault settings, verbose errors, open directoriesrecon (Phase 2)
Identification & Auth failuresweak passwords, guessable sessionswordlists, auth lessons

The three we attack hands-on this week, injection, XSS, and broken access control, are consistently near the top of that list, and they're the most beginner-friendly to understand and to find.

Why start with the web?

  • The tools are simple. A browser, its dev tools, curl, and later an intercepting proxy (Burp Suite). No exploit code to write yet.
  • The feedback is instant. Change a URL, hit enter, see what happens.
  • It's where the bugs are. Most real-world breaches start at a web-facing application, exactly the thing your recon surfaced.

The mindset shift

Recon asked "what exists?" Enumeration asked "what exactly is running?" Gaining access asks a new question:

"What does this app do with what I give it, and can I make it do something else?"

That's it. For the rest of the week, every lesson takes one input, a URL parameter, a search box, an account number, and shows how an app that trusts it too much hands you data, a session, or control you were never meant to have.

Try it (terminal)

There's no single flag to grab here, this lesson is the map. But warm up the muscle: fetch a target and look at what it does with input.

  1. curl http://10.10.10.20/ , read the page. Where might it take input?
  2. curl "http://10.10.10.20/search?q=hello" , does your input hello come back on the page?
  3. Ask yourself the question: where did my input end up? That instinct is the whole week.

Why this matters

"Hacking" in most people's imagination is this stage, the break-in. In reality it's the shortest stage, and it rests entirely on the recon beneath it and the one habit above: never assume an app is careful with what you send it. Learn to see every input as a question the app is answering, and you'll start finding the answers it didn't mean to give.

Check your understanding

4 questions

Type an answer and press Check. Grading is keyword-based and forgiving, so short answers are fine.

  1. 1

    In the six-stage methodology, which stage does exploiting a web app belong to, and what has to happen first?

  2. 2

    What single mistake sits underneath almost every web vulnerability?

  3. 3

    What is the OWASP Top 10?

  4. 4

    You find a search box that puts your text straight back on the page. Which question tells you whether it might be exploitable?