Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Security · Think Like an Attacker · about 16 min to read

Play it as a journeyTutor comes with a plan

Web Vulnerabilities (the OWASP classics)

Web Vulnerabilities
Web Vulnerabilities · Open board

The handful of places a website reads a stranger’s typed words, and what goes wrong the moment it can’t tell those words apart from an order.

Before you start. The last lesson showed a trusted helper doing something for the wrong person because it never checked who really asked,Authorization & Identity‘s confused deputy. This lesson is a different failure at the same kind of boundary: a computer reading a stranger’s words as an instruction instead of as a name, a comment, or an address.

Samy’s profile text copied itself from visitor to visitor. How many hours until over a million profiles carried it?

102 hours

On 4 October 2005 a nineteen-year-old named Samy Kamkar added a few lines of text to his MySpace profile. Anyone who viewed his page had those same lines quietly copied onto their own profile too, and a friend request to Samy went out with no click from them at all. Each visitor’s browser copied it onward, so the count doubled instead of adding one at a time: within twenty hours, over a million profiles carried it, and MySpace pulled the site offline to stop it. Samy hadn’t broken into anything. He had found a box on the page: the “about me” text: that MySpace’s own code read back out loud to every visitor’s browser, and a browser told to run something, runs it.

Lesson 9 of 39 in Security

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • The habit behind every bug in this lesson
  • SQL injection: a slip the database can’t tell from an order
  • Cross-site scripting: the same trick, run by your own browser
  • CSRF: a door that opens because of a badge you’re already wearing
  • SSRF: making the front desk fetch it, since you can’t
  • The one question that catches all four
  • SQL injection, watched happen
  • XSS, watched happen
  • CSRF and SSRF share a name: ambient authority
  • The OWASP Top 10, mapped

Terms it explains: SQL injection, parameterized query, cross-site scripting, CSRF, SSRF, ambient authority, cloud metadata endpoint, confused deputy, CSP, injection, output encoding, OWASP Top 10, parameterized query / prepared statement, sanitization, the universal cure, XSS.

Review Security