Each software program staff ought to try for excellence in constructing safety into their utility and infrastructure. Inside Thoughtworks, we’ve lengthy sought accessible approaches to menace modeling. At its coronary heart, menace modeling is a risk-based method to designing safe methods by figuring out threats regularly and growing mitigations deliberately. We imagine efficient menace modeling ought to begin easy and develop incrementally, moderately than counting on exhaustive upfront evaluation. To show this in follow, we start with outlining the core insights required for menace modeling. We then dive into sensible menace modeling examples utilizing the STRIDE framework.
Breaking Down the Fundamentals
Begin out of your Dataflows
In the present day’s cyber threats can appear overwhelming. Ransomware, provide chain
assaults, backdoors, social engineering – the place ought to your staff start?
The assaults we examine in breach studies usually chain collectively in
surprising and chaotic methods.
The important thing to slicing by complexity in menace modeling lies in tracing how information strikes by your expertise stack. Begin with following the place the information enters your boundary. Sometimes, it could possibly be by way of consumer interfaces, APIs, message queues, or mannequin endpoints. Dive into getting a deeper understanding of the way it flows between companies, by information shops, and throughout belief boundaries by built-in methods.
This concrete format of the information stream between methods would rework obscure worries, comparable to, “Ought to we fear about hackers?” into particular actionable questions. For instance, “What occurs if this API response is tampered with?” or “What if this mannequin enter is poisoned?”.
The Crux to Figuring out Threats
From there on, figuring out threats can develop into deceptively easy: observe every one of many information flows and ask “What can go flawed?”. You will discover that this straightforward query will result in complicated technical and socio-behavioural evaluation that can problem your unconscious assumptions. It can power you to pivot from considering “how system works” to “how system fails”, which in essence is the crux of menace modeling.
Let’s attempt it. Now we have an API for a messaging service that accepts two inputs: a message and the recipient’s ID, which then delivers the message to all inner workers. Observe by the carousel beneath to see how threats seem even this straightforward information stream.
Like illustrated within the carousel above, even a easy dataflow might warrant potential threats and trigger havoc massively. By layering the query “What can go flawed?”, we’ve been capable of expose this angle that will in any other case stay hidden. The essence of doing this at this small scale results in including applicable protection mechanisms incrementally inside each information stream and due to this fact construct a safe system.
STRIDE as a Sensible Support
Brainstorming threats can develop into open-ended with out structured frameworks to information your considering. As you observe key information flows by your system, use STRIDE to turbocharge your safety considering. STRIDE is an acronym and mnemonic to assist bear in mind six key data safety properties, so you may methodically determine widespread safety vulnerabilities. Mentally test every one off every time you think about a knowledge stream:
- Spoofed identification: Is there Authentication? Ought to there be? – Attackers pretending to be professional customers by stolen credentials, phishing, or social engineering.
- Tampering with enter: What about nasty enter? – Attackers modifying information, code, or reminiscence maliciously to interrupt your system’s belief boundaries.
- Repudiation: Does the system present who’s accountable? – When one thing goes flawed, are you able to show which consumer carried out an motion, or might they plausibly deny accountability because of inadequate audit trails?
- Information disclosure: Is delicate information inappropriately uncovered or unencrypted? – Unauthorized entry to delicate information by poor entry controls, cleartext transmission, or inadequate information safety.
- Denial of service: What if we smash it? – Assaults aiming at making the system unavailable to professional customers by flooding or breaking important parts.
- Elevation of privilege: Can I bypass Authorization? Transfer deeper into the system? – Attackers gaining unauthorized entry ranges, acquiring increased permissions than supposed, or shifting laterally by your system.
We use these STRIDE playing cards internally throughout menace modeling periods both as printed playing cards or have them on display screen. One other good way to assist brainstorm, is to make use of GenAI. You do not want any fancy instrument simply immediate utilizing a standard chat interface. Give some context on the dataflow and inform it to make use of STRIDE- more often than not you may get a very useful checklist of threats to contemplate.
Work ‘Little and Typically’
When you get the hold of figuring out threats, it is tempting to arrange a
full-day workshop to “menace mannequin” each dataflow in your complete syste
without delay. This big-bang method usually overwhelms groups and infrequently sticks as a constant
follow. As a substitute, combine menace modeling usually, like steady integration for safety.
The simplest menace modeling occurs in bite-sized chunks,
carefully tied to what your staff is engaged on proper now. Spending fifteen
minutes inspecting the safety implications of a brand new function can yield
extra sensible worth than hours analyzing hypothetical eventualities for
code that isn’t written but. These small periods match naturally into
your current rhythms – maybe throughout dash planning, design
discussions, and even day by day standups.
This “little and infrequently” method brings a number of advantages. Groups
construct confidence step by step, making the follow much less daunting. You focus
on instant, actionable considerations moderately than getting misplaced in edge
instances. Most significantly, menace modeling turns into a pure a part of how
your staff thinks about and delivers software program, moderately than a separate
safety exercise.
It is a Group Sport!
Efficient menace modeling attracts power from various views.
Whereas a safety specialist would possibly spot technical vulnerabilities, a
product proprietor might determine enterprise dangers, and a developer would possibly see
implementation challenges. Every viewpoint provides depth to your
understanding of potential threats.
This does not imply you want formal workshops with your entire
group. A fast dialog by the staff’s whiteboard could be simply
as worthwhile as a structured session. What issues is bringing totally different
viewpoints collectively – whether or not you are a small staff huddled round a
display screen, or collaborating remotely with safety consultants.
The objective is not simply to search out threats – it is to construct shared
understanding. When a staff menace fashions collectively, they develop a standard
language for discussing safety. Builders be taught to suppose like
attackers, product house owners perceive safety trade-offs, and safety
specialists achieve perception into the system’s interior workings.
You do not want safety experience to begin. Contemporary eyes usually spot
dangers that consultants would possibly miss, and each staff member brings worthwhile
context about how the system is constructed and used. The hot button is creating an
setting the place everybody feels snug contributing concepts, whether or not
they’re seasoned safety professionals or fully new to menace
modeling.
Fast Group Menace Modeling
Strategy and Preparation
A fast whiteboard session throughout the staff offers an accessible
start line for menace modeling. Slightly than making an attempt exhaustive
evaluation, these casual 15-30 minute periods deal with inspecting
instant safety implications of options your staff is presently
growing. Let’s stroll by the steps to conduct one with an instance.
As an instance, a software program staff is engaged on an order
administration system, and is planning an epic, the place retailer assistants can
create and modify buyer orders. This can be a excellent scope for a menace modeling session. It’s targeted on a single function with
clear boundaries.

The session requires participation from growth staff members, who can elaborate the technical implementation.
It is nice to get attendance from product house owners, who know the enterprise context, and safety specialists, who can present worthwhile enter
however do not need to be blocked by their unavailability. Anybody concerned in constructing or supporting the function, such because the testers or
the enterprise analysts too, needs to be inspired to affix and contribute their perspective.
The supplies wanted are easy:
a whiteboard or shared digital canvas, totally different coloured markers for drawing parts, information flows, and sticky notes for capturing threats.
As soon as the staff is gathered with these supplies, they’re able to ‘clarify and discover’.
Clarify and Discover
On this stage, the staff goals to achieve a standard understanding of the system from totally different views earlier than they begin to determine threats.
Sometimes, the product proprietor begins the session with an elaboration of the purposeful flows highlighting the customers concerned.
A technical overview from builders follows after with them additionally capturing the low-level tech diagram on the whiteboard.
Right here may be a very good place to place these coloured markers to make use of to obviously classify totally different inner and exterior methods and their boundaries because it helps in figuring out threats tremendously in a while.
As soon as this low-level technical diagram is up, the entities that result in monetary loss, repute loss, or that ends in authorized disputes are highlighted as ‘belongings’ on the whiteboard earlier than
the ground opens for menace modeling.
A labored instance:
For the order administration scope — create and modify orders — the product proprietor elaborated the purposeful flows and recognized key enterprise belongings requiring safety. The stream begins with the customer support govt or the shop assistant logging within the net UI, touchdown on the house web page. To switch the order, the consumer should search the order ID from the house web page, land on the orders web page, and alter the main points required. To create a brand new order, the consumer should use the create order web page by navigating from the house web page menu. The product proprietor emphasised that buyer information and order data are important enterprise belongings that drive income and preserve buyer belief, notably as they’re lined by GDPR.
The builders walked by the technical parts supporting the purposeful stream.
They famous an UI element, an authentication service, a buyer database, an order service and the orders database.
They additional elaborated the information flows between the parts.
The UI sends the consumer credentials to the authentication service to confirm the consumer earlier than logging them in,
after which it calls the order service to carry out /GET
, /POST
,
and /DELETE
operations to view, create and delete orders respectively.
In addition they famous the UI element because the least trusted because it’s uncovered to exterior entry throughout these discussions.
The carousel beneath exhibits how the order administration staff went about capturing the low-level technical diagram step-by-step on the whiteboard:
All through the dialogue, the staff members had been inspired to level out lacking parts or corrections.
The objective was to make sure everybody understood the correct illustration of how the system labored earlier than diving into menace modeling.
As the subsequent step, they went on to figuring out the important belongings that want safety based mostly on the next logical conclusions:
- Order data: A important asset as tampering them might result in loss in gross sales and broken repute.
- Buyer particulars: Any publicity to delicate buyer particulars might end in authorized points beneath privateness legal guidelines.
With this concrete format of the system and its belongings, the staff went on to brainstorming threats immediately.
Establish Threats
Within the whiteboarding format, we might run the blackhat considering session as follows:
- First, distribute the sticky notes and pens to everybody.
- Take one information stream on the low-level tech diagram to debate threats.
- Ask the query, “what might go flawed?” whereas prompting by the STRIDE menace classes.
- Seize threats, one per sticky, with the mandate that the menace is restricted comparable to “SQL injection from
Web” or “No encryption of buyer information”. - Place stickies the place the menace might happen on the information stream visibly.
- Hold going till the staff runs out of concepts!
Keep in mind, attackers will use the identical information flows as professional customers, however in surprising methods.
Even a seemingly easy information stream from an untrusted supply could cause important havoc, and due to this fact, its important to cowl all the information flows earlier than you finish the session.
A labored instance:
The order administration staff opened the ground for black hat considering after figuring out the belongings. Every staff member was
inspired to suppose like a hacker and give you methods to assault the belongings. The STRIDE playing cards had been distributed as a precursor.
The staff went forward and flushed the board with their concepts freely with out debating if one thing was actually a menace or not for now,
and captured them as stickies alongside the information flows.
Attempt arising with an inventory of threats based mostly on the system understanding you’ve to this point.
Recall the crux of menace modeling. Begin considering what can go flawed and
cross-check with the checklist the staff got here up with. You will have recognized
extra as nicely. 🙂
The carousel right here exhibits how threats are captured alongside the information flows on the tech diagram because the staff brainstorms:
The staff flooded the whiteboard with many threats as stickies on the respective information flows just like these depicted within the carousel above:
Class | Threats |
---|---|
Spoofed identification | 1. Social engineering tips could possibly be performed on the customer support 2. The shop assistant might neglect to sign off, and anybody within the retailer |
Tampering with inputs | 3. The attacker might pay money for the order service endpoints from any open 4. Code injection could possibly be used whereas inserting an order to hijack buyer |
Repudiation of actions | 5. Builders with manufacturing entry, after they discover on the market are not any logs |
Data disclosure | 6. If the database is attacked by way of a again door, all the data it holds 7. Stealing passwords from unencrypted logs or different storage would allow 8. The customer support govt or retailer assistant doesn’t have any 9. The /viewOrders endpoint permits any variety of information to be returned. |
Denial of service | 10. The attacker might carry out a Distributed Denial of Service (DDoS) assault and produce down the order |
Elevation of privileges | 11. If an attacker manages to pay money for the credentials of any developer with admin rights, they may add new customers or elevate the privileges of current |
NOTE: This train is meant solely to get you accustomed to the
menace modeling steps, to not present an correct menace mannequin for an
order administration system.
Later, the staff went on to debate the threats one after the other and added their factors to every of them. They seen a number of design flaws, nuanced
permission points and in addition famous to debate manufacturing privileges for staff members.
As soon as the dialogue delved deeper, they realized most threats appeared important and that they should prioritize in an effort to
deal with constructing the correct defenses.
Prioritize and Repair
Time to show threats into motion. For every recognized menace,
consider its danger by contemplating chance, publicity, and affect. You
also can attempt to give you a greenback worth for the lack of the
respective asset. Which may sound daunting, however you simply must suppose
about whether or not you have seen this menace earlier than, if it is a widespread sample
like these within the OWASP High 10, and the way uncovered your system is. Think about
the worst case situation, particularly when threats would possibly mix to create
larger issues.
However we aren’t completed but. The objective of menace modeling is not to
instill paranoia, however to drive enchancment. Now that we’ve recognized the highest
threats, we should always undertake day-to-day practices to make sure the suitable protection is constructed for them.
A number of the day-to-day practices you possibly can use to embue safety into are:
- Add safety associated acceptance standards on current consumer tales
- Create targeted consumer tales for brand new security measures
- Plan spikes when you must examine options from a safety lens
- Replace ‘Definition of Accomplished’ with safety necessities
- Create epics for main safety structure adjustments
Keep in mind to take a photograph of your menace modeling diagram, assign motion gadgets to the product proprietor/tech lead/any staff member to get them into the backlog as per one of many above methods.
Hold it easy and use your regular planning course of to implement them. Simply tag them as ‘security-related’ so you may observe their progress consciously.
A labored instance:
The order administration staff determined to handle the threats within the following methods:
1. including cross-functional acceptance standards throughout all of the consumer tales,
2. creating new safety consumer tales and
3. following safety by design ideas as elaborated right here:
Threats | Measures |
---|---|
Any unencrypted delicate data within the logs, transit, and the database at relaxation is susceptible for assaults. | The staff determined to handle this menace by including a cross-functional “All delicate data comparable to order information, buyer information, entry |
Unprotected Order service APIs might result in publicity of order information. | Though the consumer must be logged in to see the orders (is “GIVEN any API request is shipped to the order service WHEN there is no such thing as a legitimate auth token for the present consumer included within the request THEN the API request is rejected as unauthorized.” This can be a important structure change as they should implement a |
Login credentials of retailer assistants and customer support executives are liable to social engineering assaults. | On condition that there are important penalties to the lack of login Together with these particular actions, the staff staunchly determined to observe |
Platform focussed menace mannequin workshop
Strategy and Preparation
There are occasions when safety calls for a bigger, extra cross-programme, or
cross-organizational effort. Safety points usually happen on the boundaries
between methods or groups, the place tasks overlap and gaps are typically
neglected. These boundary factors, comparable to infrastructure and deployment
pipelines, are important as they usually develop into prime targets for attackers because of
their excessive privilege and management over the deployment setting. However when a number of groups are concerned,
it turns into more and more arduous to get a complete view of vulnerabilities throughout the
complete structure.
So it’s completely important to contain the correct individuals in such cross-team menace modeling workshops. Participation from platform engineers, utility builders, and safety specialists goes to be essential. Involving different roles who carefully work within the product growth cycle, such because the enterprise analysts/testers, would assure a holistic view of dangers too.
Here’s a preparation package for such cross staff menace modeling workshops:
- Collaborative instruments: If operating the session remotely, use instruments like Mural,
Miro, or Google Docs to diagram and collaborate. Guarantee these instruments are
security-approved to deal with delicate data. - Set a manageable scope: Focus the session on important parts, comparable to
the CI/CD pipeline, AWS infrastructure, and deployment artifacts. Keep away from making an attempt
to cowl your entire system in a single session—timebox the scope. - Diagram forward of time: Think about creating primary diagrams asynchronously
earlier than the session to avoid wasting time. Guarantee everybody understands the diagrams and
symbols upfront. - Hold the session concise: Begin with 90-minute periods to permit for
dialogue and studying. As soon as the staff positive aspects expertise, shorter, extra frequent
periods could be held as a part of common sprints. - Engagement and facilitation: Be sure that everybody actively contributes,
particularly in distant periods the place it is simpler for contributors to disengage.
Use icebreakers or easy safety workouts to begin the session. - Prioritize outcomes: Refocus the discussions in the direction of figuring out actionable safety tales as it’s the main consequence of the workshop.
Put together for documenting them clearly. Establish motion house owners so as to add them to their respective backlogs. - Breaks and timing: Plan for additional breaks to keep away from fatigue when distant, and make sure the session finishes on time with clear, concrete
outcomes.
Clarify and Discover
Now we have a labored instance right here the place we deal with menace modeling the infrastructure
and deployment pipelines of the identical order administration system assuming it’s hosted on AWS.
A cross purposeful staff comprising of platform engineers, utility builders, and safety
specialists was gathered to uncover the entire localized and systemic vulnerabilities.
They started the workshop with defining the scope for menace modeling clearly to everybody. They elaborated on the varied customers of the system:
- Platform engineers, who’re accountable for infrastructure administration, have privileged entry to the AWS Administration Console.
- Software builders and testers work together with the CI/CD pipelines and utility code.
- Finish customers work together with the appliance UI and supply delicate private and order data whereas inserting orders.
The staff then captured the low-level technical diagram displaying the CI/CD pipelines, AWS infrastructure parts, information flows,
and the customers as seen within the carousel beneath.
The staff moved on to figuring out the important thing belongings of their AWS-based supply pipeline based mostly on the next conclusions:
- AWS Administration Console entry: Because it offers highly effective capabilities for infrastructure administration together with IAM configuration,
any unauthorized adjustments to core infrastructure might result in system-wide vulnerabilities and potential outages. - CI/CD pipeline configurations for each utility and infrastructure pipelines:
Tampering with them might result in malicious code shifting into manufacturing, disrupting the enterprise. - Deployment artifacts comparable to utility code, infrastructure as code for S3 (internet hosting UI), Lambda (Order service), and Aurora DB:
They’re delicate IP of the group and could possibly be stolen, destroyed or tampered with, resulting in lack of enterprise. - Authentication service: Because it permits interplay with the core identification service,
it may be abused for gaining illegitimate entry management to the order administration system. - Order information saved within the Aurora database: Because it shops delicate enterprise and buyer data, it may possibly result in lack of enterprise repute when breached.
- Entry credentials together with AWS entry keys, database passwords, and different secrets and techniques used all through the pipeline:
These can be utilized for ailing intentions like crypto mining resulting in monetary losses.
With these belongings laid on the technical diagram, the staff placed on their “black hat” and began occupied with how an attacker would possibly exploit the
privileged entry factors of their AWS setting and the application-level parts of their supply pipeline.
Establish Threats
The staff as soon as once more adopted the STRIDE framework to immediate the dialogue
(refer labored instance beneath ‘Fast Group Menace Modeling’ part above for STRIDE framework elaboration) and captured all their
concepts as stickies. This is is the checklist of threats they recognized:
Class | Threats |
---|---|
Spoofed identification | 1. An attacker might use stolen platform engineer credentials to entry the AWS 2. Somebody might impersonate an utility developer in GitHub to inject |
Tampering with inputs | 3. An attacker would possibly modify infrastructure-as-code information within the GitHub 4. Somebody might tamper with supply code for the app to incorporate malicious |
Repudiation of actions | 5. A platform engineer might make unauthorized adjustments to AWS configurations 6. An utility developer might deploy ill-intended code, if there isn’t any audit path within the CI/CD pipeline. |
Data disclosure | 7. Misconfigured S3 bucket permissions might expose the UI information and 8. Improperly written Lambda capabilities would possibly leak delicate order information by |
Denial of service | 9. An attacker might exploit the autoscaling configuration to set off 10. Somebody might flood the authentication service with requests, stopping |
Elevation of privilege | 11. An utility developer might exploit a misconfigured IAM position to achieve 12. An attacker would possibly use a vulnerability within the Lambda perform to achieve broader |
Prioritize and Repair
The staff needed to prioritize the threats to determine the correct protection measures subsequent. The staff selected to vote on threats based mostly on
their affect this time. For the highest threats, they mentioned the protection measures as shopping for secret vaults,
integrating secret scanners into the pipelines, constructing two-factor authentications, and shopping for particular off the shelf safety associated merchandise.
Aside from the instruments, additionally they recognized the necessity to observe stricter practices such because the ‘precept of least privileges’ even throughout the platform staff
and the necessity to design the infrastructure parts with nicely thought by safety insurance policies.
After they had efficiently translated these protection measures as safety tales,
they had been capable of determine the finances required to buy the instruments, and a plan for inner approvals and implementation, which subsequently
led to a smoother cross-team collaboration.
Conclusion
Menace modeling is not simply one other safety exercise – it is a
transformative follow that helps groups construct safety considering into their
DNA. Whereas automated checks and penetration checks are worthwhile, they solely
catch identified points. Menace modeling helps groups perceive and handle evolving
cyber dangers by making safety everybody’s accountability.
Begin easy and maintain enhancing. Run retrospectives after just a few periods.
Ask what labored, what did not, and adapt. Experiment with totally different diagrams,
attempt domain-specific menace libraries, and join with the broader menace
modeling neighborhood. Keep in mind – no staff has ever discovered this “too arduous” when
approached step-by-step.
At minimal, your first session will add concrete safety tales to your
backlog. However the actual worth comes from constructing a staff that thinks about
safety repeatedly, and never as an afterthought. Simply put aside that first 30
minutes, get your staff collectively, and begin drawing these diagrams.