INTERNET1threats = {2 "S login": "MFA",3 "T price": "own price",4 "R deny it": "audit log",5 "I leak": "least access",6 "D flood": "rate limit",7 "E admin": "check role",8}9print(len(threats)) # 6STRIDE · WHAT CAN GO WRONG?STRIDE1SYSTEM2THREATS3RESPOND4REVIEWSTRIDE
Left: the system as a data flow diagram, with its trust boundaryRight: the threat list (Python); front: STRIDE and the four questionsTokens: messages, red threat flags, green fixesOn the left, a small online bakery drawn as a data flow diagram: the customer and the attacker outside a dashed trust boundary, the web app and its database inside. Each STRIDE letter flags a threat on the part it affects, the threat and its fix are written into a Python dict, and in the end every flag gets a fix. In front, the four questions of threat modelling. A real shop has more parts (a payment provider, staff laptops, a hosting company) and more threats than one per letter. The example keeps one threat per letter so each idea is clear.

Four questions, Q1

  1. Threat modelling means thinking through what could go wrong with a system during design, to fix problems before attackers find them. It follows four questions: what are we working on, what can go wrong, what will we do, did we do enough?

Q2: what can go wrong

Q3 and Q4: respond, review

What happens

;; step 1/12 · questions
threat model   a careful look at what could go wrong
               with a system, done while designing it
  Q1  What are we working on?
  Q2  What can go wrong?
  Q3  What are we going to do about it?
  Q4  Did we do a good enough job?

A real shop has more parts (a payment provider, staff laptops, a hosting company) and more threats than one per letter. The example keeps one threat per letter so each idea is clear. This course is about defence. It names a threat only at the level of the mistake and its fix, and never shows how to attack a real system.