1. Courses
  2. Cybersecurity
  3. Security Foundations
  4. Stop 1

35 minBeginner

Thinking like an attacker

Before you can defend anything, you need to know what is worth protecting, who might come for it and how they would get in. This lesson teaches the basic language of security (assets, threats, vulnerabilities, risk and controls) by looking at Mangrove Market the way an attacker would, and turns what you find into a risk register you can act on.

By the end you can

  • Explain confidentiality, integrity and availability with a real example for each
  • Tell a threat, a vulnerability and a risk apart, and name the threat actors a company like Mangrove really faces
  • Score risks as likelihood × impact on a 1 to 5 scale and keep them in a risk register
  • Map an attack surface and ask the three questions every attacker asks
  • Choose preventive, detective and corrective controls and layer them

The everyday picture

Picture a burglar walking down a quiet street one afternoon, checking each house for three things. Which house has something worth taking: a new motorbike by the gate, a parcel on the step? Which one is easiest to get into: a window left open, a side gate with no lock, a key under the mat? And which one is least likely to be noticed: no neighbours at home, no lights, no dog?

Now walk down the same street and look at your own home with the burglar's eyes. You would spot the open window at once, notice the laptop visible from the road, and realise that nobody would know about a break-in until you came back from your trip. So you close the window, move the laptop and ask a neighbour to keep an eye out. That is the whole of this lesson. Security people protect things by first looking at them the way an attacker does: what is worth taking, what is the cheapest way in, and who would notice.

What Mangrove has to protect

An is anything of value that could be harmed. At Mangrove Market that means about 2 million customer accounts, the payment flows (cards, cash on delivery, mobile wallets), about 400 checkout tills (the POS), the Partner app where 1,800 corner shops pay invoices, and the accounts of about 1,920 store staff, which are keys to many of the others.

Security teams describe harm to an asset with three words, often called the :

  • Confidentiality: only the right people can read it. A copied customer list breaks it.
  • Integrity: it is correct, and changes only through the right people and steps. A price quietly edited on the tills breaks it.
  • Availability: it works when people need it. Tills that freeze on a festival evening break it.
Mangrove assetProperty most at riskWhat the harm looks like
Customer dataConfidentialityAddresses and phone numbers copied and sold, followed by scam calls to customers
Partner app invoicesIntegrityThe bank account on an invoice is changed, and shops pay a criminal
POS tillsAvailabilityTills stop during a festival rush and stores cannot sell
Payment flowsAll threeCard data stolen, refunds created for fake orders, wallet payments down
Staff accountsAll three, indirectlyOne stolen password opens every system above that the person can reach

Ask all three questions about every asset, because the obvious one is not always the costly one. sounds like a data problem, but at a grocery chain it is mostly an availability problem: the stock and price data is still there, encrypted, and the stores cannot use it. Many groups also copy the data first, which adds a confidentiality problem. And describe harm in the business's language: "every store could stop taking card payments for a day" gets a budget; "server 14 is exposed" does not.

Quick check

Someone using a sales rep's stolen account changes the bank account printed on 200 Partner app invoices. Which property is hurt first?

Threats, vulnerabilities and risk

  • A is something that could cause harm. Often it is a person or group, a . It can also be an event, such as a flood or a power cut.
  • A is a weakness a threat could use: a reused password, a server nobody patches, a process with no second check.
  • A is the chance that a threat uses a vulnerability to harm an asset, combined with how bad the harm would be.

Risk needs all the pieces at once: a weakness no threat can reach is a small risk, and so is an attacker with no weakness to use. That is why a good risk statement names every link in one sentence: "Because staff can change bank details on Partner invoices without a second approval (vulnerability), a fraudster who takes over a sales rep's account (threat) could redirect partner payments (impact on the invoices)." If you cannot fill in every part, you do not understand the risk yet.

Threat actor a fraudster exploits Vulnerability bank edits unchecked to reach Asset Partner invoices causing Impact shops pay a criminal Risk = likelihood × impact Controls break a link Preventive 2nd approval Detective alert on edits Corrective recall payment
A risk is a chain: a threat actor exploits a vulnerability to reach an asset and cause an impact. Each control breaks a different link: a second approval stops the change, an alert spots it, and a payment recall limits the damage.

Who are the threat actors for a grocery chain? Mostly people who want money.

Threat actorWhat they wantHow they would come at Mangrove
Organised criminal groupsMoney at scale: ransom, card data, accounts to resellPhishing staff, stolen passwords, unpatched servers, then ransomware
OpportunistsWhatever is easyAutomated tools that try every exposed system for weak passwords and known flaws
InsidersMoney or revenge, or nothing at all (a mistake)Fake refunds at a till, copying customer lists, a file shared with "anyone with the link"
FraudstersMoney, through the business's own processesPromo abuse with fake accounts, false refund claims, changed bank details on invoices

Notice what is missing: spies and movie villains. A grocery chain is far more likely to meet a criminal group phishing its 1,920 store staff than a government agency, so spend your effort on the actors who would actually come. Most attacks on a company Mangrove's size are run like a business: the attacker picks the cheapest route to a payout. Insiders are uncomfortable to list, but leaving them out leaves a blind spot, and most insider incidents are honest mistakes. The difference from a fraudster is access: the insider already has a legitimate account; the fraudster abuses a process anyone can use.

Quick check

The Partner app's sign-in page lets anyone try passwords as fast as they like, with no limit. In risk language, that is…

Scoring risk: likelihood × impact

You will always find more risks than you can fix this quarter, so you need a way to order them. The simplest method rates each risk on two 1-to-5 scales and multiplies them. Likelihood is how likely it is to happen in the next year. Impact is how bad it would be if it did. The score runs from 1 to 25.

The scales only work if everyone means the same thing by each number, so write anchors down before anyone scores. These are example anchors for Mangrove; set your own with leadership.

LevelLikelihood in the next yearImpact at Mangrove
1Rare: hard to imagine this yearUnder $1,000, no customer data, nobody outside notices
2Unlikely: has happened to similar companiesUnder $10,000, or a few stores affected for an hour
3Possible: about once in a few yearsUnder $100,000, one system down for hours, or a few hundred customers' data
4Likely: about once a yearUnder $1 million, card payments down in all stores for hours, or thousands of customers' data
5Almost certain: several times a yearOver $1 million, many stores closed for a day, or millions of customer records

Then group scores into bands so people can talk about them quickly: 15 to 25 critical, 10 to 14 high, 5 to 9 medium, 1 to 4 low. The exact cut-offs matter less than writing them down and using them every time.

Likelihood 5 4 3 2 1 1 2 3 4 5 Impact R1 R2 R3 R4 R5 15+ critical 10-14 high 5-9 medium 1-4 low
Five Mangrove risks on a likelihood × impact grid. R3 ransomware through a phished staff account (3 × 5 = 15, critical). R1 credential stuffing on customer accounts (4 × 3 = 12) and R2 changed bank details on Partner invoices (3 × 4 = 12) are high. R4 till network reachable from guest Wi-Fi (2 × 5 = 10) is high too. R5 a defaced promo page (2 × 2 = 4) is low.

The scores live in a : one row per risk with its statement, the asset, likelihood, impact, score, an owner (a named person, not a team), the treatment and a review date. There are four treatments. Reduce it with controls. Accept it, in writing, by someone with the authority to accept that loss. Transfer it, with insurance or a contract. Avoid it by stopping the risky activity: Mangrove avoids most card-data risk by letting its payment provider store card numbers instead of keeping them. What is left after the controls is the , and someone has to accept that too.

Two warnings. First, 5 × 2 and 2 × 5 both make 10, but a frequent small loss needs a process fix while a rare disaster needs a recovery plan, so always read the two numbers. Second, the numbers are labels, not measurements: a 12 is not "twice as bad" as a 6. Use the score to sort the conversation, then use judgement. You will come back to registers and frameworks such as NIST CSF in Risk, compliance and the first hour of an incident.

Quick check

A risk has likelihood 3 and impact 4. Using the bands above, what are its score and rating?

Mangrove's attack surface and the three questions

The is every place where an attacker could try to get in or get data out. At Mangrove it is much wider than the website:

  • The Mangrove app and its APIs: about 2 million customer accounts.
  • The Partner app: 1,800 shops ordering stock and paying invoices. It is built and run by an outside agency, Lagoon Digital, so their people and laptops are part of Mangrove's surface too.
  • The POS: about 400 tills that handle card payments.
  • Store Wi-Fi: a guest network for customers next to the network the tills and about 1,000 handheld scanners use.
  • Staff accounts: about 1,920 store staff plus head office, each of whom can be phished or reuse a password.
  • The back office and the build pipeline: dashboards, email, GitHub and the pipeline that ships code.
Customer app 2M accounts Partner app 1,800 shops Staff accounts 1,920 people API calls orders logins APIs and data orders, payments sales sync network code, access POS tills 400 in stores Store Wi-Fi guest and staff Lagoon Digital outside agency
Six doors into the same APIs and data. The highlighted two, staff accounts and the outside agency, are the cheapest ways in: they need a stolen password, not a technical break-in, and they reach the most.

With the surface in front of you, ask the three questions the burglar asked:

  • What would I want? Money (payments, refunds, invoices, a ransom), data to sell, or leverage (stopping the stores until someone pays). The answer tells you which assets to look at first.
  • What is the cheapest way in? Attackers prefer logging in to breaking in. A password reused from another site's breach, a staff member who clicks a convincing email, an old test server nobody patches. Clever new techniques are rare; cheap old ones are everywhere.
  • How would anyone notice? Which log records it, which alert fires, who reads the alert, and how fast. If the honest answer is "when a customer complains", you have found a gap.

Each answer becomes a defender's job: protect the thing worth taking, close or watch the cheap doors, and make noise where things are quiet. The next lesson, How breaches really happen, follows how real attacks chain these steps together, and Identity: passwords, MFA and passkeys deals with the cheapest door of all.

Think first: of Mangrove's six doors, which two would you watch most closely, and why?

Staff accounts and the outside agency. Both are entered with a password rather than a technical exploit, both are spread across people and laptops Mangrove does not fully control, and both reach a lot once inside. Each customer account, by contrast, reaches only one customer's data.

Controls and defence in depth

A is anything that reduces a risk. It can be technical (multi-factor sign-in), a process (a second approval) or physical (a locked network cabinet). The most useful way to sort controls is by when they act:

  • Preventive controls stop it happening: MFA on staff accounts, a second approval for bank-detail changes, a till network kept apart from guest Wi-Fi.
  • Detective controls notice when it happens anyway: an alert on hundreds of failed sign-ins, a nightly comparison of till totals with bank deposits, a log of who changed which bank details.
  • Corrective controls limit the damage and restore normal service: restoring from tested backups, forcing password resets, recalling a payment, patching the weakness that was used.

No control is perfect, so you layer them. means an attacker has to beat several independent controls. Follow a stolen staff password at Mangrove. MFA blocks most attempts to use it (preventive). If one gets through, the account can reach only what that job needs, a rule called (preventive again, limiting the reach). A sign-in from a new country at 3 am raises an alert (detective). The team locks the account and reverses any changes (corrective).

The commonest gap in a young risk register is a column full of preventive controls and no detective ones. Prevention fails eventually, and without detection you learn about it from a customer or the news. Every high or critical risk needs at least one control that would tell you it is happening.

Quick check

Mangrove adds a nightly job that compares each store's till totals with its bank deposits and flags any store more than $50 apart. What type of control is it?

Build it

Build a starter risk register for one system, the Partner app, that you could hand to an engineering manager tomorrow.

  1. List the assets and give each an owner

    Rate how much each asset needs confidentiality (C), integrity (I) and availability (A). The owner is the person who would be called if it broke.

    Markdown
    # Asset list: Partner app
    | Asset                              | Owner        | C    | I    | A      | Why it matters                      |
    |------------------------------------|--------------|------|------|--------|-------------------------------------|
    | Partner shop accounts (1,800)      | Imran        | High | High | Medium | Orders and invoice payments         |
    | Invoices and bank details          | Finance lead | Med  | High | Medium | Shops pay what the invoice says     |
    | Order and stock data               | Imran        | Low  | High | High   | Wrong data means wrong deliveries   |
    | Agency access to production        | Ken          | High | High | High   | One account can reach everything    |
  2. Ask the three questions and write risk statements

    For each asset: what would an attacker want, what is the cheapest way in, how would we notice? Turn every answer into one sentence in the same format, so nobody can skip a link.

    Markdown
    Format: Because <vulnerability>, <threat actor> could <action>, leading to <impact on asset>.
    
    R2: Because staff can change bank details on invoices without a second approval,
        a fraudster who phishes a sales rep could redirect partner payments,
        leading to shops paying a criminal and Mangrove refunding them.
  3. Agree the scales before you score

    Copy the anchors from this lesson, adjust the dollar amounts with your manager, and score together in one meeting, not alone.

    Output
    Score = likelihood (1-5) x impact (1-5)
    Bands: 15-25 critical | 10-14 high | 5-9 medium | 1-4 low
    Read both numbers: 2 x 5 (rare disaster) and 5 x 2 (frequent nuisance) need different plans.
  4. Keep the register in a table and sort it

    A spreadsheet is fine to start. A table makes the rules explicit: scores must be 1 to 5, every risk has an owner and a review date.

    SQL
    CREATE TABLE risk (
      id         int PRIMARY KEY,
      asset      text NOT NULL,
      statement  text NOT NULL,
      likelihood int  NOT NULL CHECK (likelihood BETWEEN 1 AND 5),
      impact     int  NOT NULL CHECK (impact BETWEEN 1 AND 5),
      owner      text NOT NULL,            -- a named person, not a team
      treatment  text NOT NULL CHECK (treatment IN ('reduce', 'accept', 'transfer', 'avoid')),
      review_on  date NOT NULL
    );
    
    INSERT INTO risk VALUES
      (1, 'Partner accounts', 'Reused passwords let outsiders take over shop accounts', 4, 3, 'Imran', 'reduce', '2027-01-15'),
      (2, 'Invoices', 'Bank details changed from a phished staff account', 3, 4, 'Finance lead', 'reduce', '2026-12-01'),
      (3, 'Agency access', 'Agency developer account used to reach production', 2, 5, 'Ken', 'reduce', '2026-12-01');
    
    -- Highest score first; on a tie, the one due for review sooner
    SELECT id, asset, likelihood * impact AS score, owner, review_on
    FROM risk
    ORDER BY score DESC, review_on;
    Output
     id |      asset       | score |    owner     | review_on
    ----+------------------+-------+--------------+------------
      2 | Invoices         |    12 | Finance lead | 2026-12-01
      1 | Partner accounts |    12 | Imran        | 2027-01-15
      3 | Agency access    |    10 | Ken          | 2026-12-01
  5. Choose controls by type for every high and critical risk

    Give each one at least one preventive and one detective control, and say what you would do to recover. Write who does it and by when.

    Markdown
    | Risk | Preventive                         | Detective                                 | Corrective                          | Owner        | By         |
    |------|------------------------------------|-------------------------------------------|-------------------------------------|--------------|------------|
    | R2   | Second approval for bank changes   | Alert to finance on every bank change     | Call shop on known number; recall   | Finance lead | 2026-12-01 |
    | R3   | Personal agency accounts, MFA,     | Log and review agency sign-ins weekly     | Revoke access in one step; rotate   | Ken          | 2026-12-01 |
    |      | access that expires after 8 hours  |                                           | secrets the account could read      |              |            |

Bring it to your team

Ask these the next time someone reviews a new feature or a supplier.

  • If you were trying to make money from this system, what would you go after first?
  • What is the cheapest way in: whose password, whose laptop, which old server?
  • If someone did this tonight, which alert would fire, and who would read it?
  • Does every high or critical risk have a named owner and a review date?
  • Which outside companies can reach our data, and what happens if one of their accounts is stolen?
  • For the risks we are accepting, who signed off, and do they know what they accepted?

Red flags

  • "Nobody would bother attacking us." Opportunists and automated tools attack everyone.
  • Risks owned by "IT" or "the team" instead of a person.
  • A register with preventive controls only, and no way to tell if one fails.
  • Agency or supplier accounts that are shared, never expire, or are not in any review.
  • Scores changed in a meeting with no new facts, because a senior person disagreed.

Practice

Score and rate Mangrove's risk register

The table risk(id, name, likelihood, impact) holds eight Mangrove risks. Return every risk with its id, name, a score (likelihood × impact) and a rating: critical for 15 or more, high for 10 to 14, medium for 5 to 9 and low below 5. Order by score, highest first, and break ties by id.

SQL exerciseRuns in a real PostgreSQL inside your browser
-- Score and rate every risk, highest score first, ties by id
SELECT id, name, likelihood, impact
FROM risk;
Ctrl + Enter runs
Show a solution
SQL
SELECT id, name,
       likelihood * impact AS score,
       CASE
         WHEN likelihood * impact >= 15 THEN 'critical'
         WHEN likelihood * impact >= 10 THEN 'high'
         WHEN likelihood * impact >= 5  THEN 'medium'
         ELSE 'low'
       END AS rating
FROM risk
ORDER BY score DESC, id;

The CASE checks the highest band first, so a score of 16 stops at critical and never reaches the later branches. Two risks tie at 12; the id tiebreak keeps the order stable. Notice that the till network risk (2 × 5) and a frequent nuisance would both score 10, which is why you read both numbers.

Pass the exercise to finish this task.

Think like an attacker about store Wi-Fi

Every Mangrove store has two Wi-Fi networks: a guest network for customers and a staff network used by the tills and about three handheld scanners per store. In some stores both run on the same router, set up years ago by a local contractor. Answer the three attacker questions for this setup, write two risk statements in the lesson's format with likelihood and impact scores, and propose one preventive, one detective and one corrective control.

  • Your "what would I want" answer names a real asset: card payments on the tills, customer data, or the ability to stop sales
  • Your "cheapest way in" names a weakness in this setup, such as a guest network that can reach the till network, or a shared staff Wi-Fi password that never changes
  • Both risk statements name a vulnerability, a threat actor and an impact, and the scores use the lesson's anchors
  • Your controls include one of each type, and the detective control says who would see the alert
Show a model answer

What would I want? Access to the tills' network, to tamper with sales or to stop stores selling until someone pays. The cheapest way in? Join the guest Wi-Fi, which is open to anyone in the store, and see whether it can reach the till network on the same router; or learn the staff Wi-Fi password, which has not changed since the contractor set it up and is known to every former employee. How would anyone notice? Today, nobody would: the routers send no logs anywhere.

R1: Because the guest and till networks share a router with no separation, an opportunist on the guest Wi-Fi could reach the tills, leading to stopped sales or tampered prices in that store. Likelihood 2, impact 5, score 10 (high). R2: Because the staff Wi-Fi password never changes, a former employee could join the staff network, leading to unauthorised access to scanners and tills. Likelihood 3, impact 3, score 9 (medium).

Preventive: separate the guest network from the till network so that guest devices can only reach the internet, and test that from a guest device in each store. Detective: send router logs to the central team and alert the on-call engineer when a device the store does not own appears on the staff network. Corrective: a written procedure to change the staff Wi-Fi password in every store within a day when someone leaves or a leak is suspected, and to check the tills afterwards.

Check yourself

Two risks in Mangrove's register both score 10. Risk A is scanner crashes that lose a few stock counts (likelihood 5, impact 2). Risk B is ransomware on the back office that stops every store (likelihood 2, impact 5). What is the best way to handle them?

A developer says: "Our customer database is encrypted on disk, so customer data is safe." Thinking like an attacker, what is the best reply?

Which change actually shrinks Mangrove's attack surface?

Flashcards

Open my review

Key takeaways

  • Start from assets and describe harm as confidentiality, integrity or availability, in the business's own terms.
  • A risk links a threat, a vulnerability, an asset and an impact. If you cannot write all four in one sentence, you do not understand it yet.
  • Score likelihood × impact with written anchors, keep a register with named owners, and read both numbers, not just the score.
  • Look at the whole attack surface and ask what an attacker would want, the cheapest way in and how anyone would notice.
  • Layer preventive, detective and corrective controls; every serious risk needs at least one way to tell that it is happening.

Sources and further reading

Episode transcriptWhat a burglar sees in your store · about 13 minutes · tap any line to play from there
  1. NadiaImran, if you wanted to steal money from Mangrove tomorrow, where would you start?
  2. ImranI'd go after the payment system, I suppose. That's where the money is.
  3. NadiaThat's the usual guess, and it's usually wrong. Today we look at Mangrove the way an attacker would, and you'll see why.
  4. NadiaIt starts on a quiet street. Picture a burglar walking past the houses one afternoon, checking each one for three things.
  5. NadiaIs there something worth taking, like a new motorbike by the gate? Is there an easy way in, like an open window or a key under the mat? And would anyone notice, or are the neighbours away and the lights off?
  6. ImranAnd then you do the same walk past your own house.
  7. NadiaExactly. You spot your own open window, the laptop you can see from the road, and the fact that nobody would know about a break-in until you got home. So you close the window, move the laptop and ask a neighbour to keep an eye out.
  8. ImranThree questions, then. What would I want, what's the cheapest way in, and who would notice.
  9. NadiaHold on to those. They're the whole lesson. But first, some words security people use very precisely.
  10. ImranAssets first?
  11. NadiaAssets first. An asset is anything of value that could be harmed. At Mangrove that's about two million customer accounts, the payment flows, about four hundred tills, the Partner app where eighteen hundred corner shops pay invoices, and the accounts of about nineteen hundred and twenty store staff.
  12. ImranStaff accounts are an asset? I'd have thought of them as just logins.
  13. NadiaThey're keys. One stolen staff password opens every system that person can reach. So they matter as much as the things they unlock.
  14. ImranAnd then the CIA triad.
  15. NadiaConfidentiality, integrity and availability. Confidentiality means only the right people can read it. Integrity means it's correct and only changes through the right steps. Availability means it works when people need it.
  16. ImranGive me the Mangrove version of each.
  17. NadiaCustomer addresses sold to scammers is confidentiality. A changed bank account on a Partner app invoice is integrity. Tills freezing on a festival evening is availability.
  18. ImranAnd ransomware? That's a data problem, surely. Confidentiality.
  19. NadiaThat's the common guess. At a grocery chain, ransomware is mostly an availability problem. The stock and price data is still there, just encrypted, and the stores can't use it. Many groups also copy the data first, so you get a confidentiality problem on top.
  20. ImranOkay. Next, the three words everyone mixes up.
  21. NadiaThreat, vulnerability and risk. A threat is something that could cause harm, often a person or group we call a threat actor. A vulnerability is a weakness they could use. And risk is the chance that a threat uses a vulnerability to harm an asset, combined with how bad that would be.
  22. ImranThe first diagram shows it as a chain. If you can see your screen, there are four boxes going down. If not, picture a fraudster at the top, then a weakness, then the Partner invoices, then money paid to a criminal at the bottom.
  23. NadiaThe weakness there is that staff can change bank details on an invoice without a second approval. Down the right side, three controls each break a different link. A second approval stops the change. An alert spots it. A payment recall limits the damage.
  24. ImranSo a risk needs every link. No weakness, small risk. Nobody who'd use it, small risk.
  25. NadiaRight. That's why you write each risk as one sentence. Because of this weakness, this threat actor could do this, leading to this impact. If you can't fill in every part, you don't understand the risk yet.
  26. ImranWho are the threat actors for us, realistically? I'm guessing not spies.
  27. NadiaNot spies. Mostly people who want money. Organised criminal groups who phish staff and then use ransomware. Opportunists running automated tools that try every exposed system for weak passwords.
  28. NadiaInsiders, which usually means honest mistakes, like a file shared with anyone who has the link. And fraudsters, who abuse the business's own processes, like promo codes or refunds.
  29. ImranWhat's the difference between an insider and a fraudster? Insiders commit fraud too.
  30. NadiaAccess. The insider already has a legitimate account. The fraudster comes from outside and abuses something anyone can use.
  31. ImranOkay, so we'll find dozens of risks. How do I decide which ones matter?
  32. NadiaLikelihood times impact, each on a scale of one to five. Multiply them and you get a score from one to twenty-five.
  33. ImranAnd everyone argues about whether something is a three or a four.
  34. NadiaWhich is why you write anchors first. Likelihood four might mean about once a year. Impact four might mean under a million dollars, or card payments down in all stores for hours. Then bands. Fifteen and up is critical, ten to fourteen high, five to nine medium, below five low.
  35. ImranThe second diagram is that grid. Five by five, likelihood going up, impact going across. The top right corner is the bad corner.
  36. NadiaRansomware through a phished staff account sits at three times five, fifteen, critical. Credential stuffing on customer accounts and changed bank details on invoices are both twelve. A defaced promo page is down in the low corner at four.
  37. ImranRemind me what credential stuffing is.
  38. NadiaAttackers take passwords leaked from some other site and try them on ours, because people reuse passwords. It's cheap and it's automated.
  39. ImranHere's my question. Five times two is ten. Two times five is also ten. Same thing?
  40. NadiaVery different. Five times two is a frequent nuisance, like a scanner that crashes and loses a few stock counts. Two times five is a rare disaster, like ransomware stopping every store.
  41. NadiaThe nuisance needs a process fix. The disaster needs a tested recovery plan, even if it never happens. So always read both numbers, not just the score.
  42. ImranAnd the scores go in a register.
  43. NadiaA risk register. One row per risk, with the statement, the scores, a named owner, a treatment and a review date. The treatments are reduce, accept, transfer or avoid.
  44. ImranAvoid sounds like cheating.
  45. NadiaIt's often the smartest move. Mangrove avoids most card data risk by letting its payment provider store card numbers instead of keeping them. You can't lose what you don't hold.
  46. ImranNow the attack surface. That's the part I want for the Partner app.
  47. NadiaThe third diagram shows six doors into the same APIs and data. The customer app, the Partner app and staff accounts across the top. Tills, store Wi-Fi and Lagoon Digital, the agency that builds the Partner app, along the bottom.
  48. ImranTwo of them are highlighted.
  49. NadiaStaff accounts and the agency. Both are entered with a stolen password rather than a technical break-in, and both reach a lot once inside. Attackers prefer logging in to breaking in.
  50. ImranSo back to the three questions.
  51. NadiaWhat would I want? Money, data to sell, or leverage. What's the cheapest way in? A reused password, a convincing email, an old server nobody patches. How would anyone notice? Which log, which alert, who reads it. If the answer is when a customer complains, you've found a gap.
  52. ImranKen actually ran this for the Partner app. One hour with me and the Lagoon Digital team lead, and a whiteboard.
  53. NadiaWhat did you find?
  54. ImranThe attacker wants invoice payments. The cheapest ways in were shop owners reusing passwords, a phished sales rep's account, and agency developer accounts with standing access to production.
  55. ImranAnd how would we notice? Only when a shop owner like Ravi rings up asking why his invoice shows a new bank account.
  56. NadiaThat last answer was the most useful thing in the session.
  57. ImranWe scored four risks. Shop accounts taken over, twelve. Bank details changed, twelve. An agency account reaching production, ten. The Partner app down on a festival evening, nine.
  58. NadiaAnd the bank details risk had no detective control at all.
  59. ImranNone. So we added an alert to finance whenever bank details change, and a call to the shop on its known number before the next payment goes out.
  60. NadiaAnd the agency risk scores only ten, but it could stop every partner order at once. So Ken read both numbers and gave it an owner and a date.
  61. ImranWhich brings us to controls.
  62. NadiaA control is anything that reduces a risk. Sort them by when they act. Preventive controls stop it happening, like MFA or a second approval. Detective controls notice it, like an alert on many failed sign-ins, or a nightly check of till totals against bank deposits.
  63. NadiaCorrective controls limit the damage and restore service, like tested backups or forcing password resets.
  64. ImranAnd defence in depth is stacking them.
  65. NadiaLayering independent controls so one failure isn't the end. Take a stolen staff password. MFA blocks most attempts. If one gets through, least privilege means the account only reaches what that job needs.
  66. ImranAnd if they still get in?
  67. NadiaA sign-in from a new country at three in the morning raises an alert, and the team locks the account and reverses the changes.
  68. ImranMost registers I've seen are all prevention.
  69. NadiaThat's the commonest gap. Prevention fails eventually, and without detection you hear about it from a customer or the news.
  70. ImranSo if I want to do this for my own system?
  71. NadiaBuild a starter register. List the assets, give each an owner, and rate how much each needs confidentiality, integrity and availability. Ask the three questions and write each risk as one sentence.
  72. NadiaAgree the anchors, then score together in one meeting. Keep it in a table with an owner and a review date. Then for every high or critical risk, pick at least one preventive and one detective control.
  73. NadiaThe practice has you score and rate eight Mangrove risks, then think like an attacker about store Wi-Fi.
  74. ImranQuestions I'll ask at the next review. If you wanted to make money from this, what would you go after first? What's the cheapest way in? And if someone did it tonight, which alert would fire, and who would read it?
  75. NadiaAdd one about suppliers. Which outside companies can reach our data, and what happens if one of their accounts is stolen?
  76. NadiaHere's one to think about. A developer says the customer database is encrypted on disk, so customer data is safe. What would you say? Take a second.
  77. ImranEncryption on disk helps if someone steals a disk or a backup. But an attacker who signs in with a stolen staff account sees the data through the app, decrypted. So the account still needs protecting.
  78. NadiaExactly. A control protects against a specific path, never against everything.
  79. ImranMy summary. One, start from the assets and say what the harm looks like, confidentiality, integrity or availability, in money and hours. Two, write each risk as one sentence with every link, score likelihood times impact, and read both numbers.
  80. ImranThree, ask the attacker's three questions about the whole surface, and make sure every serious risk has a way to be noticed.
  81. NadiaGood. I'd add one thing. Give every risk a named person, not a team. A risk owned by IT is owned by nobody.
  82. ImranAnd next time?
  83. NadiaHow breaches really happen. We'll follow a phishing email from the inbox to a stopped store, step by step, and see where each control could have caught it.
Finished reading?Mark it complete to fill in its stop on your course line.

Use it at work

Threat model checklist

STRIDE questions for one feature as data, with tests that every threat has an owner and a mitigation.

Open in the Security Lab
Next stopHow breaches really happen
Was this lesson helpful?
Questions and discussion

Loading the discussion…