Skip to content

Attack Surface Map of the Dating-Safety App

Run the Attack Surface Map of the Dating-Safety App MicroSim Fullscreen

About This MicroSim

The app sits in the middle of the map. Ten arrows point into it, one for each entry point: a single door on the attack surface. At first the doors show only a number. Select one and its name appears.

For each door you answer one question: who controls what comes in here? The four choices are anyone on the internet, a signed-in member, an outside service, or the builder only. The question is about who wrote the contents, not who sends the request. Door 7 is the one to watch. A member uploads the profile text, but a scammer wrote it.

When all ten are answered, the map sorts the doors into rows by who controls them. Five of the ten carry input from anyone on the internet.

Entry points 3 to 8 and 10 come from the book's running example. Entry points 1, 2 and 9 are standard parts of any app with accounts and are illustrative.

How to Use

  1. Click a door, or the arrow that leads from it, to see its name. You can also press Next unanswered door.
  2. Pick one of the four answers. Your first answer is final.
  3. Read the result and the reason. Right answers turn blue with a ✓; the rest turn orange with a ✗.
  4. After the tenth door, the doors regroup by who controls them. Press Show the map again to switch back, or Start over to try again.
  5. Click any answered door to read its reason again.

Iframe Embed Code

You can add this MicroSim to any web page by adding this to your HTML:

<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/attack-surface-map/main.html"
        height="644px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Grade Level

Adult professional (Good Enough Engineering)

Duration

10-15 minutes

Prerequisites

Security, threat, attack surface and entry point, from the section "What Security Means for a Small App" in Chapter 16.

Learning Objective

Distinguish, for each of ten entry points of the dating-safety app, who controls the input that arrives there, and identify which entry points carry input from people outside the app's membership.

Activities

  1. Exploration (5 min): Answer all ten doors without help. Note which ones surprised you.
  2. Guided Practice (5 min): Compare doors 3 and 7. Both arrive through a member's upload. Explain why one is "a signed-in member" and the other is "anyone on the internet".
  3. Assessment (5 min): List the entry points of an app you work on and give each one the same answer. Mark any door nothing uses, and any development-only code that ships to visitors.

Assessment

Mastery is 8 of 10 correct on the first attempt, including door 7. Watch for these mistakes:

  • Trusting input because it comes from a signed-in member.
  • Trusting data because it comes from a paid vendor.
  • Treating text a member uploads as the member's own words.
  • Counting only routes as entry points, and forgetting code shipped to the browser.

References

  1. OWASP Attack Surface Analysis Cheat Sheet - OWASP's short guide to listing and shrinking the ways into an application.
  2. OWASP Top Ten - The most common web application security risks.
  3. Chapter 16: Security as a Habit - The chapter this MicroSim supports.