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 15 min to read

Play it as a journeyTutor comes with a plan

When memory betrays you: overflows, ROP and mitigations

Application Hardening
Application Hardening · Open board

The places in an app where a habit keeps it safe. This lesson adds one more place: the memory the program itself runs in.

Before you start. Application Hardening ended on one bug family that no checklist item names: memory-safety bugs, which the Chromium project counts as about 70% of its high-severity bugs. How Code Becomes Execution (compilers, stack & heap) showed the stack: one entry per unfinished call, each holding the return address, which is the place to resume when the call ends. The Security Mindset gave the rule that anything arriving from outside can be hostile. Here those three meet.

Lesson 15 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

  • 8 November 1996: a famous article about 16 bytes
  • A buffer overflow: the spill onto the return address
  • The old attack: send your own code, then jump to it
  • The stack canary: a value that must still be there
  • ASLR: the addresses move every run
  • Return-oriented programming: reuse the program’s own code
  • Use-after-free: a token for a locker that now holds something else
  • Why memory-safe languages exist: remove the class
  • The overflow and the canary
  • Defeating the layers, and the cost of each guess
  • Gadgets
  • Use-after-free, the model

Terms it explains: buffer overflow, stack canary, ASLR, gadget, return-oriented programming, use-after-free, memory safety, Common mistakes, allowlist vs denylist, canonicalize, CVE, fail securely, hardening, input validation, lockfile, masked variable, OIDC-to-cloud, output encoding, SAST/DAST, SBOM, secret scanning, security headers, security misconfiguration, SLSA/sigstore, supply chain.

Review Security