An architect says: "We need to identify the trust boundaries in this data flow diagram before we continue the STRIDE analysis."
What is a trust boundary in threat modeling?
Trust boundary = a line in a Data Flow Diagram (DFD) where data moves between different trust levels, requiring validation or re-authentication.
Trust boundary crossing example
Threat question to ask
Internet → Web application (DMZ)
Who can impersonate a legitimate user? (Spoofing)
Web application → Internal API (intranet)
Can input data be tampered with in transit? (Tampering)
Application → Database
Is authorisation re-checked at this layer? (Elevation of Privilege)
User browser → CDN → Origin
Can a CDN node disclose sensitive data? (Information Disclosure)
Key vocabulary:
Trust boundary crossing — data moving from a lower-trust to a higher-trust zone (or vice versa)
Validation required — all input crossing a trust boundary must be validated before being processed
Privilege transition — a change in the security context (e.g., anonymous → authenticated)
DFD (Data Flow Diagram) — the diagramming notation used in structured threat modeling to map processes, data stores, external entities, and data flows
2 / 16
A security team is applying the STRIDE threat modeling framework. What does the "T" in STRIDE stand for, and what threat does it model?
STRIDE is a Microsoft-developed threat modeling framework. Each letter maps to a threat category and a violated security property.
Letter
Threat
Security property violated
Example
S
Spoofing
Authentication
Forging a JWT to impersonate another user
T
Tampering
Integrity
Modifying an order amount in transit (MITM)
R
Repudiation
Non-repudiation
Denying that an action was performed (insufficient audit logs)
I
Information Disclosure
Confidentiality
Leaking PII in error messages or logs
D
Denial of Service
Availability
Flooding an API endpoint to make it unavailable
E
Elevation of Privilege
Authorisation
Exploiting a bug to gain admin rights from a regular user account
3 / 16
In a threat modeling session, a security engineer says: "The attack surface is too large — we need to reduce it before we can build a meaningful threat model."
What does "attack surface" mean?
Attack surface = the total set of different points where an attacker could try to enter a system or extract data from it.
Attack surface component
Example
Reduction technique
Network-exposed endpoints
Public API, admin panel, SSH port open to internet
Close unnecessary ports; use VPN for admin access
Input entry points
Web forms, file uploads, querystring parameters
Validate and sanitise all input; disable unused endpoints
Third-party dependencies
npm packages, open-source libraries
Minimise dependency count; audit supply chain
Internal services
Microservices communicating without mutual TLS
Zero-trust internal networking; mTLS between services
Key principle: "Attack surface reduction" = remove, disable, or restrict anything not strictly necessary. Every unused feature, open port, or exposed interface is a potential entry point.
4 / 16
The threat model identifies a Spoofing threat for the user authentication flow. Which control typically mitigates spoofing threats?
Spoofing = impersonating another user or system. The primary mitigation is strong authentication — making identity unforgeable.
STRIDE threat
Primary mitigation
Spoofing
Strong authentication (MFA, signed tokens, certificates), session binding
Tampering
HMAC / message signatures, TLS, access controls on data stores
Repudiation
Tamper-evident audit logging, digital signatures on critical actions
Information Disclosure
Encryption at rest and in transit, role-based access control
Principle of least privilege, input validation, authorisation checks
Why the other options are incomplete: Rate limiting slows brute force but doesn't prevent spoofing with a stolen credential. Input validation prevents injection. Network segmentation limits reach but doesn't authenticate identity.
5 / 16
A threat model report recommends risk responses of "accept, mitigate, transfer, or avoid." The engineering team concludes: "The risk is low and the cost of mitigation is too high — we will accept it."
Which risk response strategy is this?
Risk acceptance = the team has evaluated the risk and consciously decided not to act on it. This is a valid and documented strategy — not inaction through ignorance.
Risk response
Action taken
Example
Accept
Acknowledge and consciously decide not to act; document in risk register
Low-severity theoretical attack vector with no known exploit
Mitigate
Implement controls to reduce likelihood or impact
Add WAF, MFA, input validation to reduce risk to acceptable level
Transfer
Shift risk to a third party (insurance, vendor SLA, contractual liability)
Cyber insurance policy covering breach costs
Avoid
Eliminate the risky activity entirely
Remove the feature that introduces the risk from the product
Risk acceptance requires documentation and sign-off — it must be a deliberate decision by a risk owner, not an oversight. Key vocabulary: "residual risk", "risk appetite", "risk register", "risk owner", "accepted with conditions".
6 / 16
A security analyst is reviewing logs for a web application. They notice numerous failed login attempts originating from a single IP address. What does this scenario primarily indicate about the potential threat landscape?
This scenario suggests a brute-force attack, where an attacker is systematically trying many passwords to gain unauthorized access. The repeated failed login attempts are the key indicator. Brute-force attacks aim to guess credentials through sheer volume, and this aligns with known threat models.
7 / 16
The term lateral movement refers to an attacker's ability to move between compromised systems within a network after initial access is gained. This is often achieved through...
Lateral movement describes an attacker's progression *after* successfully breaching a perimeter. Exploiting vulnerabilities and using stolen credentials are common tactics used to move between systems within the compromised network. Network scanning is often a preliminary step but doesn't inherently represent lateral movement.
8 / 16
// Vulnerable code snippet: Directly concatenating user input into an SQL query
What specific type of vulnerability does this code snippet represent?
This code snippet directly inserts user input into an SQL query without proper sanitization or parameterization. This allows a malicious user to craft input that alters the intended query logic, potentially gaining unauthorized access to the database. SQL injection is a classic and pervasive vulnerability.
9 / 16
During a threat modeling exercise for an e-commerce website, the team identifies a risk associated with payment card data. Which of the following best describes a control that would directly mitigate this specific risk?
Encryption is the most effective control for protecting sensitive data like payment card information. It renders the data unreadable if accessed without the correct decryption key. While rate limiting and other controls are important, they do not directly address the core risk of unauthorized access to payment card details.
10 / 16
Reviewer: "This endpoint doesn't validate the user_id against any known good values. It's a potential injection point. Can you add input sanitization?"
The reviewer's comment highlights a potential injection vulnerability. Input sanitization is the process of removing or modifying potentially harmful characters from user input before it's used in an operation – in this case, validating that the `user_id` is what the application expects. The other options represent distinct threat modeling concepts.
11 / 16
Dev (Liam): "Just ran a quick scan of the API endpoints. Found one that's directly exposing sensitive internal database credentials in the response headers!"
Liam's message describes exposing sensitive information via a response header. Response headers are often used to convey metadata about the response itself, but should never contain confidential data like database credentials. Exfiltration refers to the act of taking data out, and vulnerability scanning is just a tool – this specific action is what's being described.
12 / 16
Sarah (Security Engineer) sends a Slack message to the team: 'I'm seeing a lot of attempts to guess passwords using brute force. We need to model this as a potential threat.' Which aspect of threat modeling is Sarah primarily addressing?
Sarah's message focuses on attempts to guess passwords repeatedly. This directly relates to brute-force attacks, a common threat modeled during access control analysis. Options information disclosure and privilege escalation represent different types of threats and are less relevant in this specific Slack context. Denial of Service is a broader category.
13 / 16
During a sprint planning meeting, Mark (Developer) says: 'We need to document the potential impact if an attacker gains control of our user database. What is this process primarily focused on?'
Mark's statement is about understanding the consequences of a successful attack. This aligns directly with threat modeling's core purpose: identifying and analyzing potential threats and their impact on systems. Risk assessment encompasses this, but Mark specifically asked about *what* process it was.
14 / 16
A PR review comment reads: 'The API endpoint doesn't handle rate limiting. An attacker could potentially overwhelm the server with requests, leading to a denial of service.' What is the primary concern highlighted in this comment?
The comment explicitly mentions 'overwhelm the server with requests,' which is the definition of a denial-of-service (DoS) attack. Rate limiting is a *control* designed to mitigate this specific threat. Injection vulnerabilities and data breaches are different types of attacks.
15 / 16
In a standup meeting, David (Developer) says: 'I'm implementing a new feature that allows users to upload images. I've added basic validation to ensure the file type is an image, but not much else.' What potential security risk does David acknowledge?
David's limited validation demonstrates a lack of consideration for file uploads. File upload vulnerabilities are a common security issue where an attacker can upload malicious files (e.g., executable code) that could compromise the system. Options XSS and SQL injection relate to different attack vectors.
16 / 16
You're reviewing a PR description for a new microservice. The description states: 'This service handles sensitive user data and requires strict access controls.' What is the *most* important element to include in your subsequent threat modeling activities?
The PR description highlights the sensitivity of the data. This immediately necessitates a comprehensive identification of *all* potential attack vectors that could exploit this vulnerability. While impact prioritization and control implementation are important downstream activities, starting with a full attack surface analysis is crucial.
What will I learn from the "Threat Modeling Vocabulary | Security Lab Exercises" exercise?
Practice threat modeling vocabulary: STRIDE, trust boundaries, attack surface, spoofing mitigations, and risk response strategies. 5 advanced exercises for security engineers and architects.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall required.
How many questions are in this exercise?
This set contains 16 multiple-choice questions, each with a detailed explanation shown after you answer.
Do I need to create an account to track my progress?
No account is required. Your progress bar and score reset each time you reload the page, but you can retry the exercise as many times as you like.
Who is this Security Lab exercise for?
This exercise is built for IT professionals and non-native English speakers who need to read, write, and discuss security lab topics confidently at work.
What happens if I answer a question incorrectly?
You will see the correct answer highlighted along with a detailed explanation of why it is correct -- so every wrong answer becomes a learning moment, not just a lost point.
Can I retry this exercise?
Yes -- click "Try again" on the results screen at any time to reset your score and go through all the questions again.
How long does this exercise take to complete?
Most learners finish all 16 questions in under 10 minutes, since each question is answered by clicking a single option.
Where can I find more Security Lab exercises?
See the full Security Lab exercises hub for more vocabulary drills on this topic.
Is this exercise mobile-friendly?
Yes -- the exercise works on any device with a modern browser, including phones and tablets, with no app download required.