Skip to content
ImagineWorld

Understanding and Evaluating Threats during Threat Modeling

node_idnode-book_threat-modeling-best-practices_chapter-02-understanding-and-evaluating-threats-during-threat-modeling
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num2
chapter_titleUnderstanding and Evaluating Threats during Threat Modeling
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 2 — Understanding and Evaluating Threats during Threat Modeling

Section titled “Chapter 2 — Understanding and Evaluating Threats during Threat Modeling”

In the first chapter, we explored the foundational concepts of threat modeling, emphasizing the importance of integrating it into the product development life cycle, iterating as new information (and threats) become available, and continuously reassessing your threat models to maintain a robust security posture. By focusing on identifying potential risks early and making threat modeling an ongoing part of the development process, organizations can effectively mitigate vulnerabilities before they become costly issues in a live environment. We’ll shift gears a bit in this chapter and deepen our understanding of the concept of threats and the assets we are attempting to protect in a system. This understanding is important as it helps sharpen your efforts in addressing certain threats that are identified during threat modeling.

We’ll also begin to create the foundational artifacts in threat modeling, such as data flow diagrams (DFDs) and security architecture diagrams, which provide a visual representation of the threats that are faced in an organization’s system. These tools will help shape the way we discuss and develop security controls to eliminate or limit the impacts of threats.

In this chapter, we will cover the following topics:

  • Identifying assets for threat modeling
  • Integrating threats with vulnerabilities
  • Creating a security architecture diagram

Organizations enumerate and classify their assets to understand the landscape of their technology. Put plainly, organizations will build their list of assets so that they know what they have, where they are, and the level of classification of those assets. This process of enumeration enables enhanced security management by allowing organizations to not only identify vulnerabilities but also know what the impact of those vulnerabilities is on the assets they have. Knowing the specific hardware, software, and physical and digital resources (as well as the versions of those assets) ensures a more informed approach to applying security controls, leading to better implementation of mitigation strategies.

It will come as no surprise that it also enhances incident response by ensuring that the organization knows and can locate affected assets while assessing the impact of security incidents on them. Those of you who were in the cybersecurity space in late 2021 may recall the Log4j vulnerability called “Log4Shell.” The Log4Shell vulnerability was a critical zero-day flaw that was discovered in the Log4j library. If exploited, it could allow remote code execution through user-supplied input in log messages. Half of the battle during that incident was knowing where the library was used. Many organizations were left scrambling to find ways to discover whether they were vulnerable or using any tool at their disposal to discover their exposure.

In the previous chapter, we discussed how not all assets in an organization are created equal and they can be of a wide variety. Some common assets you would find in many organizations include hardware assets, software assets, digital assets, cloud assets, network assets, and human assets.

Probably the most well understood, hardware assets form the physical foundation of an organization’s IT infrastructure. These include servers, computers, laptops, mobile devices, networking equipment, IoT devices, robotics on an assembly line, and peripherals such as printers and external storage devices. These devices are critical because they serve as the endpoints and central hubs for data processing and communication while also increasing the attack surface of an organization. Protecting hardware assets goes beyond preventing theft or physical damage as it also includes safeguarding the sensitive data they contain or can connect to.

Software assets encompass all the applications, operating systems, and licenses that are used in an organization’s operations. This includes on-premises software and cloud-based solutions such as SaaS, which are a mainstay in most modern technical environments. Software vulnerabilities are a primary entry point for cyberattacks (especially remote attacks), making it crucial to keep applications updated with the latest patches and ensure compliance with licensing agreements. Additionally, mismanagement of software assets can lead to inefficiencies, such as redundant licenses or outdated programs posing security risks.

There are roughly 750 new CVEs that are introduced every week. This can obviously change over time, but the takeaway is that new vulnerabilities are being introduced at an alarming rate. You can see more here: nvd.nist.gov/general/nvd-dashboard.

Digital assets are essential data such as documents, images, videos, and databases that keep the organization moving. Think of these as the data sitting in hardware assets such as drives and being processed by the software assets. Digital assets often represent the intellectual property, customer information, and operational data that are the lifeblood of the organization. For example, a breach of customer databases can result in significant financial losses and reputational damage. The corruption of that data could be as bad or even worse, depending on the organization (such as in the case of a pharmaceutical company working on a new formula). As digital assets often contain sensitive or proprietary information, encryption, access controls, and backup systems are necessary to ensure their confidentiality, integrity, and availability. But it doesn’t end at the operational level. Digital assets need to be properly destroyed when they are no longer needed and are at the end of their life cycle. There are plenty of stories of data being found on hard drives in dumpsters where they were improperly disposed of.

For example, in September 2021, HealthReach Community Health Centers in Maine suffered a major data breach when a third-party service improperly disposed of several hard drives without securely wiping or destroying them. This oversight exposed the health data of over 115,000 individuals, including more than 100,000 Maine residents. In response, HealthReach provided affected individuals with reimbursement insurance and data protection services to mitigate the impact of the breach, showing that the financial impact extends beyond the initial breach and exposure.

Very few companies today start by buying space in a data center to deploy their applications. Most are either exclusively in the cloud (cloud native) or use a hybrid approach that is a mix of cloud and on-premises deployments. Bigger and well-established companies may still maintain some on-premises footprint because it is likely where they started their business, but they are also either migrating to the cloud or simply building their new applications in the cloud. The bottom line is that there has been a huge shift to cloud computing over the past two decades. With this shift, cloud assets such as storage, computing power, and other cloud-based services have become a vital part of organizational infrastructure. Cloud assets are attractive for their scalability and cost-effectiveness, but they also introduce unique security challenges, such as service misconfiguration, which can lead to the over-exposure of data. Additionally, if the organization doesn’t understand the cloud shared responsibility model, which requires the organization to share the security burden with the cloud service provider (CSP), they are likely to fall victim to a poorly configured cloud platform.

Network assets, such as routers, switches, and other networking equipment, are the infrastructure that keeps the business moving. These assets facilitate communication, data transfer, and remote access, making them critical to daily operations. They also play an important role in the security of the organization through firewalls, intrusion detection systems, and network segmentation. A compromised or misconfigured network asset can serve as an open door for attackers, leading to access to sensitive systems.

Human assets are the people within an organization and are among the most valuable yet vulnerable resources. Employees’ skills, knowledge, and expertise drive innovation and get the work of the organization done. But human error is also one of the leading causes of security breaches. Employees can fall victim to phishing attacks; they can misconfigure systems or mishandle sensitive data. Training programs can only go so far in creating cybersecurity awareness, so technical controls need to be in place, such as strict access controls, to help reduce the attack surface.

Protecting assets is an approach that is just as varied as the assets themselves, and understanding the function, value, and criticality of the assets helps us decide how to prioritize security efforts. This process begins by identifying and evaluating the role of each asset in achieving core business objectives and determining the classification of the asset within the system. This should be carefully thought out as not all digital assets are considered confidential or critical to the business, and some assets hold both intrinsic and operational value within the organization. This type of nuance needs to be put through a process that can properly assess the assets.

It can be difficult to understand what value an asset has during a threat-modeling exercise, and you will want to have this determined prior to beginning a threat model; otherwise, you are likely to run into a situation where there will be assumptions made about the importance of the data but without any context. There are a few methods that should be used to evaluate assets.

Start by implementing a tiered asset classification that categorizes assets into distinct priority levels:

  • Tier 1: “Crown jewels” (customer databases, IP, authentication infrastructure requiring the most rigorous threat evaluation)
  • Tier 2: “Business critical” (email, CRM/ERP, development environments)
  • Tier 3: “Standard systems” (general file shares, non-critical applications)
  • Tier 4: “Low impact” (guest networks, isolated legacy systems)

This tiered approach allows threat-modeling efforts to focus disproportionately on the highest-value assets.

Next, conduct high-value data flow and attack path analysis to identify the most critical threat surfaces by examining data flows that cross trust boundaries, access sensitive data (PII, PHI, financial records, or trade secrets), perform authentication and authorization functions, or originate from untrusted sources. Assets that are involved in these data flows will warrant more scrutiny based on their operational and financial value, as well as being critical paths in the system.

Establish clear documentation linking asset criticality to threat priorities by explicitly connecting each critical asset to specific threat scenarios, potential business impacts, and required protection levels. Documenting the assets can be as simple as a one-page asset brief or annotations in architectural diagrams that identify the tiers of the assets in the system, a short business criticality statement, the data sensitivity, key business dependencies, and any compliance requirements. Documentation of assets can also be a Wiki page with more robust details, including business impact, asset owner information, and whether the assets are considered “crown jewels” or not. This clarity that documenting asset classification provides can prevent misalignment between asset protection levels and actual business criticality during threat-modeling exercises.

When an organization devises this type of asset classification, it allows for better prioritization based on what is most important to the organization. We can take it a step further by assigning actual value to the assets.

Threat modeling requires more than just knowing which assets are critical; it also requires understanding their value to prioritize threats and justify investment in security controls. A vulnerability affecting a 10,000serverwarrantsadifferentresponsethanthesameflawinasystemgenerating10,000 server warrants a different response than the same flaw in a system generating 50,000 monthly revenue. Asset valuation transform threat modeling from conceptual analysis into decision-making driven by monetary value, enabling teams to answer questions such as: “Is the cost of this mitigation justified by the value of what we’re protecting?”

There are a few methods that can be used to determine monetary value:

  • Cost method: Values an asset based on its original purchase price. While straightforward, it doesn’t account for market changes over time.

Example: A company purchased a high-end server for 10,000.Usingthecostmethod,theasset’svalueisrecordedas10,000. Using the cost method, the asset’s value is recorded as 10,000, regardless of its current market value or depreciation over time.

  • Market value: Values an asset according to its current market price or what it would fetch if sold today. This provides real-time value but can fluctuate with market conditions.

Example: A few years after purchase, the same server now has a market value of $5,000 if sold today. This value reflects what it would fetch in the current market, considering wear and tear and market conditions.

  • Income method: Values an asset based on the income it generates, often using methods to estimate the present value of expected future earnings.

Example: A proprietary software application generates $50,000 in annual revenue for the company. Using the income method, the value of this software is estimated based on the present value of its expected future earnings, discounted over a period.

  • Replacement cost: Values an asset based on the current market cost to replace it with a comparable asset, providing a realistic picture of replacement expenses.

Example: The company needs to replace an aging network router. The current market cost to buy a new, comparable router is $2,500. This replacement cost provides a realistic picture of the expenses required to replace the asset with a similar one.

  • Intangible assets: For assets such as patents, trademarks, or brand value, valuation methods often account for the future economic benefits they bring to the organization.

Example: The company holds a patent for a unique algorithm used in their software products. The value of this patent is assessed based on the future economic benefits it brings, such as increased revenue, competitive advantage, and market share. This could include projections of future cash flows directly attributed to the patented technology.

While these are not completely fool-proof models, they can provide the organization with a method for predicting the value of a given asset. Why is this important to understand in the context of threat modeling? Without this understanding of what an asset’s value is in the organization, it is difficult to align a threat with its actual impact. For example, the cost of a DDoS attack on a sensor in a water treatment plant will be difficult to measure if the revenue of that plant is not understood, specifically, how much an outage would impact the bottom line. Knowing this helps inform the appropriate security controls to be implemented to protect the assets that are likely to have the biggest impact on the organization.

Maintaining a comprehensive asset inventory

Section titled “Maintaining a comprehensive asset inventory”

As organizations expand, so does their list of assets. The number of assets an average technology company has can vary widely depending on the size and nature of the business. For example, a large technology company such as Apple or Microsoft might have millions or even hundreds of millions of assets, ranging from physical assets such as data centers and office buildings to intangible assets such as patents and trademarks. Smaller technology companies will have far fewer assets, but they still require effective asset management to ensure they are not caught off guard when they need to make a key decision or locate vulnerable assets. A combination of tools and processes is used to streamline asset tracking and maintenance, which provides visibility into the asset landscape.

Here are a few methods to manage an asset inventory:

  • Inventory management: Asset management software, such as ManageEngine, Ivanti, and Asset Panda, helps catalog and track assets throughout their life cycle. Organizations conduct regular audits to maintain accurate asset records and ensure no gaps, such as untracked devices or software, exist in their inventory.
  • Life cycle management: Platforms such as ServiceNow and Snipe-IT are used to track assets from acquisition through maintenance to decommissioning. Defined policies for procurement, upgrades, and disposal of assets help ensure they remain efficient and secure throughout their life cycle.
  • Security and compliance: Security management tools such as Symantec and McAfee ensure that assets comply with organizational security policies and industry standards. Routine patch management, security assessments, and compliance audits protect assets from threats and help avoid regulatory penalties.
  • Financial management: Enterprise resource planning (ERP) systems such as SAP and Oracle integrate asset management with financial reporting and budgeting. Organizations track asset depreciation, acquisition costs, and maintenance expenses to inform budgeting and strategic investments.
  • Maintenance and support: IT service management (ITSM) platforms, such as BMC Remedy and Freshservice, facilitate maintenance scheduling and support ticketing. Preventive maintenance schedules and responsive troubleshooting ensure assets remain functional and downtime is minimized.
  • Data analysis and reporting: Business intelligence (BI) tools such as Power BI and Tableau analyze performance and utilization metrics for assets. Reports and dashboards provide actionable insights, enabling optimization of asset usage and identification of underperforming resources.
  • Automation: Robotic process automation (RPA) solutions automate repetitive tasks, such as inventory updates and compliance checks. Automating routine tasks improves efficiency and reduces the likelihood of human error in asset management activities.

These asset management tools allow better-informed threat modeling by ensuring the threat-modeling teams have accurate and current information about what is in the environment. When organizations integrate their asset management platforms with threat-modeling workflows, they get automatic identification when new assets go live, visibility into asset classifications and business criticality during modeling sessions, and continuous validation that threat models remain aligned with the actual technology deployed.

With these tools, organizations can establish automated triggers, where adding Tier 1 or Tier 2 assets to ServiceNow or similar systems automatically generates threat-modeling work items that are routed to the security teams’ work item intake process. Additionally, quarterly asset inventory reviews can be used to identify systems whose threat models have become outdated (or even missing) due to architectural changes or new dependencies.

Without this integration, threat-modeling efforts operate on incomplete or stale information and can lead to teams wasting time on modeling outdated systems. Keep in mind that effective asset management goes beyond just maintaining a list of resources; it is about enabling strategic decision-making, securing the organization’s critical components, and ensuring that resources are allocated thoughtfully. As a byproduct, organizations also get the following benefits:

  • Enhanced visibility: Comprehensive inventories provide clarity on what assets exist, where they are, and how they are being used
  • Improved security: Regular assessments and automated updates ensure vulnerabilities are addressed promptly
  • Operational efficiency: Proactive maintenance and life cycle tracking minimize downtime and maximize resource utilization
  • Regulatory compliance: Asset management tools help demonstrate adherence to industry standards, reducing the risk of penalties
  • Cost optimization: Accurate financial tracking ensures assets are used efficiently and unnecessary expenditures are avoided

Asset inventory is not just about building a list of things you must manage; it can drive effective threat identification and streamline the creation of the architecture diagram and thereby the threat model. Well-maintained asset inventories not only streamline the threat-modeling process but also ensure that critical assets are prioritized, simplifying the efforts to identify and mitigate threats effectively.

How can asset inventory be used in threat identification and remediation? Here, an asset inventory enables security teams to quickly identify and isolate affected assets, assess the impact of breaches, and implement mitigation strategies, such as removing compromised assets from the environment. For instance, consider the case of the Log4Shell vulnerability mentioned previously. Organizations that were able to query their asset management systems were more likely to determine where Log4j was deployed and what versions. More importantly, they were able to understand what assets were most at risk. Conversely, those organizations without strong asset management spent weeks searching manually for vulnerable systems, often missing deployments that were not tracked or were buried in third-party dependencies.

The level of visibility provided by asset inventory ensures that threats can be linked to specific assets, facilitating targeted recovery plans and prioritizing mitigations to minimize downtime and disruption. Additionally, for industries subject to regulatory compliance, robust asset tracking supports audit readiness, ensuring sensitive information is safeguarded and legal obligations are met.

Now that we understand the role of assets and asset management in our system, let’s take a look at how threats impact our assets and our overall organization.

We covered threats a bit in the first chapter, outlining what they are and how they impact an organization’s system. Here, we’ll begin to dissect threats a little more for the purpose of threat modeling. While threats are considered potential sources of harm and answer questions such as “What can go wrong?” vulnerabilities are specific weaknesses, flaws, or security gaps in a system that can be exploited. This represents the “how” in relation to a threat succeeding.

One way to think about this in the context of threat modeling is that threats exploit vulnerabilities to create a risk to the organization. Let’s take a closer look at vulnerabilities.

Vulnerabilities represent weaknesses in an organization’s systems, applications, or processes that can be exploited by threat actors to compromise assets. These weaknesses come in various forms, such as software vulnerabilities (buffer overflows, SQL injection, etc.), network vulnerabilities (misconfigured firewalls, insecure protocols, etc.), human vulnerabilities exploited through social engineering, and physical vulnerabilities in infrastructure and access controls. While vulnerabilities are dormant until acted upon, their presence in a system poses a significant risk as attackers continuously evolve their tactics to identify and exploit them.

Attackers have time and patience on their side. We’re fond of saying that defenders must be right every time, and attackers only have to be right once. When a complex attack surface exists in organizations, an attacker simply needs to find the weakest link and make their move.

There are plenty of methods for identifying vulnerabilities in a system. Often, this is completed through some type of scanner. Each scanner is purpose built for a type of asset and scan in the environment. For instance, one method of locating vulnerable endpoints is using the popular tool called Shodan. Shodan, often called the “Google for internet-connected devices,” is a specialized search engine that indexes devices and services exposed to the internet. It scans the global internet by querying various ports and collecting detailed information about publicly accessible devices such as routers, webcams, servers, and even industrial control systems.

Shodan’s powerful search capabilities allow users to identify specific devices, services, or vulnerabilities, and its real-time monitoring features provide alerts for unexpected exposures. With additional features such as API access for developers and on-demand scanning, Shodan offers a comprehensive view of network exposure, making it an invaluable tool for security professionals to uncover potential vulnerabilities and enhance their cybersecurity strategies.

Additionally, there are other scanners that can locate vulnerabilities in software, such as static analysis and dynamic analysis tools or software composition analysis (SCA) tools. Static application security testing (SAST) tools, such as Checkmarx and Veracode, analyze source code, bytecode, or binaries without executing the application. Dynamic application security testing (DAST) tools, such as Burp Suite and OWASP ZAP, take the opposite approach by testing running applications from an external perspective, simulating real-world attacks to discover runtime vulnerabilities, including authentication bypasses, session management flaws, and misconfigurations, that only manifest when the application is operational. Lastly, SCA tools, such as Sonatype and Black Duck, address third-party dependencies’ security by scanning applications to identify open source components and their known vulnerabilities. In most modern software development life cycles (SDLCs), these tools work together to identify the vulnerabilities within the software.

The impact of vulnerabilities extends beyond individual system compromises, as attackers often chain multiple vulnerabilities together to achieve their objectives. This is why threat modeling focuses not on specific vulnerabilities, but rather on identifying the broader attack surface and potential impact points in a system. Understanding this relationship is crucial, as even a single vulnerability in a well-protected attack surface can lead to a compromise. This is like how a burglar needs to find just one open window in an otherwise secure building. The interconnection between vulnerabilities and threats forms the foundation for understanding how attackers operate and why comprehensive security measures are essential.

Most organizations have a well-defined vulnerability management program that develops the prioritization of vulnerabilities with the help of their threat model. Think of the vulnerability management program along the same lines as the asset management program. Both provide insight into the environment that the organization’s assets are operating in and are critical inputs into the threat-modeling exercise.

Best practices with vulnerabilities and threat modeling

Section titled “Best practices with vulnerabilities and threat modeling”

While threat modeling is most powerful when we do it before a single line of code has been written, you will often find yourself threat-modeling systems that have something developed and running, even if it’s a development or test system. That’s not a bad thing if you plan on using vulnerability information to help inform your threat model. In this case, being able to query scanners for that particular system and software for “what known vulnerabilities exist in this application” can create a better sense of urgency in the remediation efforts. An example is if a threat model exercise identifies that credentials could be exposed if they are stored in source code. A recent SAST scan then identifies that hardcoded credentials are in several places within the source code. A finding like this will likely trigger a prioritization of the remediation efforts.

Threat-modeling exercises can also predict vulnerabilities where a hypothesis such as “If authentication can be spoofed, there is likely a vulnerability in session token validation” is made during threat modeling. A finding like this can lead to more stringent testing that confirms whether JWT signatures are properly validated and verified, turning the hypothesis into a threat-driven vulnerability hunt.

We can also create a feedback loop when vulnerabilities are discovered. Consider a penetration test that locates a SQL injection in an application. The findings from the penetration test should lead to a review of the threat model to determine whether the threat was identified and whether the identified controls were ineffective. The review of the threat model isn’t just limited to findings from penetration testing; it should also be done when a security incident exposure occurs, a finding is submitted from a bug bounty, or other sources of vulnerability intake.

With the combination of threat modeling and vulnerability information, organizations can better prioritize their efforts. Not all vulnerabilities are equal and will have varying priorities based on the threat-modeling context. For instance, a high-severity vulnerability in a scanning tool might be found by the threat model to be in an isolated system on a segmented network with only five trusted users and no sensitive information. This will reduce the criticality of the finding and allow the team to focus on more critical ones.

Here are a few best practices for avoiding common pitfalls with vulnerability and threat-modeling integration:

  • Prepare a “top 10” list of vulnerabilities that are relevant to the system that highlights the most significant findings aligned to the system architecture and threat model.
  • Implement vulnerability validation before threat-modeling exercises where scan results are triaged and can confirm exploitability. Results can be classified as “Confirmed Vulnerability,” “Likely False Positive – Requires Review,” or “False Positive – Architectural Protection Exists,” preventing wasted session time.
  • Establish clear roles and ownership for vulnerability-threat model integration: the threat-modeling facilitator is responsible for collecting and preparing vulnerability context before sessions, development leads are responsible for explaining architectural mitigations, security specialists are responsible for interpreting vulnerability data and assessing exploitability, and product owners are responsible for prioritization decisions when trade-offs arise.

Having established how vulnerabilities create exploitable weaknesses in systems, we will now examine the diverse sources of harm: the threats themselves.

Effective threat modeling requires the categorization of threats to ensure comprehensive coverage during evaluation. Rather than focusing exclusively on high-profile cyberattacks, the threat-modeling practices should consider threats across multiple dimensions: their origin (external versus internal), their target (physical versus digital assets), and their nature (malicious versus accidental). This categorization ensures teams don’t develop tunnel vision and focus solely on external hackers while overlooking insider threats, operational failures, or physical security gaps.

There are several categories to consider during threat modeling:

  • External threats originate outside the organization and can come from malicious actors or environmental factors. Cybercriminals, hackers, and natural disasters are common sources. These threats often target digital infrastructure through methods such as malware attacks, phishing scams, or distributed denial of service (DDoS) attacks.
  • Internal threats come from within the organization and can be either intentional or accidental. Disgruntled employees, accidental data leaks, and misuse of resources are some common examples. Intentional threats include sabotage or theft, while unintentional threats might involve an employee inadvertently sharing sensitive data. Internal threats are especially concerning due to the insider access and knowledge often involved.
  • Physical threats impact an organization’s tangible infrastructure. This category includes theft, natural disasters, and equipment failure. Physical security measures, such as surveillance systems, secure facilities, and access controls, are essential to protecting against these risks and ensuring the safety of critical infrastructure.
  • Cyber threats specifically target an organization’s digital assets. These include viruses, ransomware, phishing attacks, and DDoS attacks. Cyber threats can have wide-reaching consequences, from data breaches to operational downtime. With the rise of increasingly sophisticated cyberattacks, organizations must employ a range of security measures, including firewalls, intrusion detection systems, and regular software updates, to defend against these threats.
  • Operational threats stem from disruptions to the day-to-day functions of an organization. These threats include process failures, supply chain disruptions, and equipment malfunctions. For instance, a failure in a critical production system or delays in the supply chain can halt operations and lead to significant financial losses. Identifying and addressing operational vulnerabilities is crucial to maintaining business continuity.

While we will dive deep into threat evaluation in the subsequent chapters, let’s look at an introduction to the topic next.

Threats are complex, but how do we identify and evaluate the ones that are most impactful to the organization? Effective threat identification requires us to take a holistic approach that accounts for the potential threats. External threats such as cyberattacks, natural disasters, and geopolitical events are often the most visible, but internal threats such as human error, insider threats, and system misconfigurations can be just as damaging, if not more so, due to their proximity to critical systems. They are also more likely to happen.

However, threat identification is not one-size-fits-all. Every organization operates within a unique industry and regulatory environment and is constrained (or freed, depending on how you look at it) by the technology it relies on. A financial institution is likely to face cybercriminals who attempt to change the flow of finances to their own accounts or commit fraud against customers of the institution, whereas a healthcare provider is likely to face ransomware attacks where the attacker is hoping to take the provider offline to extract a payment. This context-specific evaluation of the potential attackers and the threats they pose helps organizations tailor their threat evaluation efforts to focus on the threats most relevant to their profile, rather than spreading their attention too thinly on less likely scenarios.

Adapting to a shifting threat landscape

The global shift to remote work fundamentally altered the threat landscape for many organizations that were not prepared to send their workforce home for an extended period. This significantly expanded organizations’ attack surfaces, with employees accessing corporate networks from personal devices and home networks, potentially exposing new vulnerabilities and attack vectors. This change demanded a reassessment of defense strategies, including updating policies, implementing stronger endpoint security measures, enhancing VPN protocols, and ensuring that remote work security best practices are followed.

How does threat evaluation help in threat modeling? Well, it’s kind of the point. Review of an organization’s threat landscape ensures that the threat model remains aligned with reality and updated to reflect changes in the environment, and it helps the organization capture emerging risks, allowing them to adapt their defenses.

All the data points and components of a threat model lead us to create an artifact during the threat-modeling exercise. This can come in several forms that we’ll cover throughout the book, but one of the most prominent methods of conveying a threat model is through a security architecture diagram that builds on the system architecture diagram and documentation.

While we can start threat modeling by using the Shostack Four Question framework, visually representing the architecture and security implications conveys these in pictorial form in what is called a security architecture diagram. The security architecture diagram can resemble a simple “block-itecture” diagram or be a derivative of a formal C4 model. The C4 model is a preferred starting point for creating the security architecture diagram and is a framework for visualizing software architecture using a set of hierarchical diagrams. It stands for context, containers, components, and code. Here’s a brief description of each level:

  • C1:The context diagram is the most zoomed-out view, showing the system in its broader environment. It is used to depict the system’s interactions with external entities such as users, external systems, and other actors.
  • C2: The containers diagram focuses on the high-level containers within the system. This shows how different applications, databases, and other containers interact and distribute responsibilities.
  • C3: The components diagram provides a detailed view of the containers, breaking them down into components. This is used to highlight the internal structure of each container, showing how components interact within the container.
  • C4:The code diagram is the most detailed view, showing the actual code structure. It is used to depict the relationships between classes, functions, and other code elements.

While a block diagram can quickly convey the architecture of a given application or system, this will lack a lot of the details that are required to perform a decent threat model. These details would come from a C4 diagram.

Figure 2.1: C4 Diagram depicting a simple software architecture of a banking system

Figure 2.1: C4 Diagram depicting a simple software architecture of a banking system

Venture out to https://c4model.com/ and check out some of the example C4 models available to get more familiar with the concept.

One complication with gathering C4 models is that not every system will likely have one. These are models that are typically found in more mature architecture organizations with a high level of discipline, and you are more likely to find them in software development projects as opposed, say, to IoT or manufacturing technology systems.

With a C4 model in hand, a security architect will have the seedlings for a security architecture diagram. Recall from Chapter 1 that we must understand the scope of what we are building, and the C4 diagram may include more or even less detail than what is required for the threat model. For instance, it may not include all the security controls and details that you as the security expert are aware of. However, the C4 model should still serve as the map to the system architecture and a pathway to building a security architecture diagram.

When completed, the security architecture diagram should contain the following:

  • Assets under consideration
  • The flow of data through those assets
  • Third-party integrations
  • Actors (or subjects) that interact with the system
  • Trust boundaries that demark permission shift

Let’s put this into practice by taking an example of a banking system and building a security architecture diagram. To set the stage, our system supports personal banking operations through multiple customer touchpoints and backend systems. Customers access the system through either a single-page or mobile application, both communicating via JSON/HTTPS with three primary application controllers: the sign-in controller handles authentication, the reset password controller manages credential recovery, and the accounts summary controller provides account information and transaction capabilities. These controllers interact with security within the system.

To begin to create our security architecture diagram, it’s ideal to start with the C3 (components) diagram as it adds enough detail about the system without being too distracted by the low-level code implementation. Your starting point may look like the following:

Figure 2.2: A simple starting example of a security architecture diagram that is derived from a C4 model

Figure 2.2: A simple starting example of a security architecture diagram that is derived from a C4 model

Let’s start with this basic diagram and begin building it up a bit more with additional details.

You will have noticed that in Figure 2.2, the area which includes the Backend provides a delineation of where sensitive information and workflows reside, as well as who has access to areas of the system called trust zones and trust boundaries.

Trust zones group components with similar security needs and a consistent application of security policies. For example, critical assets such as sensitive data might reside in a high-trust zone with strict controls, while less critical components are placed in lower-trust zones. Consider our banking system architecture, where trust zones segregate components based on their security requirements and exposure levels. The untrusted zone encompasses customers and their access points through the applications, representing the lowest trust level with internet exposure. On the opposite end, we have the internal highly trusted zone, which contains internal systems such as the database and banking systems, representing the most critical assets storing customer financial data and executing core banking operations. In between, there can be semi-trusted zones, such as the security components and the components that process customer requests, such as the accounts summary and the sign-in controller. In these types of trust zones, the security applied will be different according to the level of sensitivity of the data and workflows.

Trust boundaries, on the other hand, define the transition points where the level of trust changes as data or control flows between zones with differing security levels. These boundaries represent the interfaces, connections, and communication channels where information crosses from one trust level to another. As an example, trust boundaries delineate where an external user accesses internal systems through the web application, when the mobile app communicates with backend APIs over the internet, or when data moves from a public-facing DMZ into the protected internal network.

Consider the banking system architecture where a trust boundary exists between the customer zone (untrusted) and the application controllers (semi-trusted zone). At this boundary, where customers interact with banking services, the organization must implement stringent security controls, such as input validation to prevent SQL injection targeting the database, strong multi-factor authentication mechanisms to verify customer identity, and session management with secure token validation to prevent session hijacking.

Trust boundaries are the primary focus areas in threat-modeling exercises since they represent the attack surface where adversaries attempt to exploit the transition between security contexts when security controls might be insufficient, improperly implemented, or altogether missing.

Incorporating both trust boundaries and trust zones into a threat model allows the organization to see where their sensitive data is, as well as where security levels may change in the model.

The data flowing through the system may be captured in the C4 model, but it will likely require more in-depth information to fully understand. Usually, this will require a DFD to better describe the movement of data. DFDs are a visual map that highlights how information interacts with your components, like a roadmap of data’s journey. To be clear, the DFD is not a replacement for a solid architecture diagram, but it should provide more clarity on how the system utilizes data.

Figure 2.3: A DFD depicting data flow from a web and mobile application to internal systems

Figure 2.3: A DFD depicting data flow from a web and mobile application to internal systems

This data visualization helps break down systems into clear, understandable components that show exactly how data enters, transforms, leaves, and is stored in different parts of a system. More importantly, it shows how your software uses data.

It’s important to reach out to your engineering counterparts to confirm that they have a DFD or similar, to understand the threat model more clearly as you build it out. Not knowing how data is being used in the system will only make knowing how the data could be misused in the system more difficult.

Highlighting the data moving through the system in the DFD will help you identify where different third-party integrations might exist and where they are ingressing and egressing on your system. While integrations with third parties, such as other applications or systems that you directly send or receive data from, are easier to understand and document, there are others that are less clear but likely to exist in your system. Some simple examples of often overlooked integrations are the following:

  • CRM and marketing automation tools
  • E-commerce and analytics platforms
  • Payment gateways
  • Social media APIs
  • Cloud storage services
  • APIs for data integration

These integrations will be largely dependent on the type of application and the industry you operate in; the preceding examples are provided to help you understand that the integrations can be varied and not what you think of when you look at the system diagram for the first time.

In IT systems, the actors (sometimes referred to as “subjects”) are entities that interact with your system to achieve specific objectives. These actors can range from human users to external systems and devices, each playing a unique role in the system’s functionality. Understanding these actors is critical for system design, as it helps define interactions, identify dependencies, and assess potential vulnerabilities. Previously in the chapter, we covered the various threat actors that exist in the cyberworld. Specifically, when it comes to creating the diagram, we need to keep these actors in mind:

  • Human actors are end users, administrators, and engineers who directly interact with the system to perform tasks or access information.
  • Beyond human actors, IT systems often interact with external systems, applications, and hardware devices. They can be third-party applications, databases, or hardware devices.
  • Many IT systems rely on services that operate behind the scenes, often without direct user interaction, such as web services and background processes.

You can add the actors to the security architecture diagram or your DFD, depending on how you like to organize your work. In this case, we’ll add the actors to the DFD diagram and use this to inform the eventual security architecture diagram.

Figure 2.4: The DFD including the actors that participate within the system

Figure 2.4: The DFD including the actors that participate within the system

Cybersecurity involves defending against a range of threat actors, each with unique skill levels, motivations, and methods. Understanding these actors is essential for crafting tailored defenses that align with the threats an organization is most likely to face. For instance, a financial organization is likely to face cybercriminals or even malicious insiders as their primary threat actor. Let’s look in more depth at the threat actors, their motivations, and how they impact an organization’s system. This will help us understand the threat scenarios we should create for our threat model.

Script kiddies are low-skill attackers that often flood the system with automated tools to exploit known vulnerabilities in exposed systems. In our banking environment, they typically target public-facing applications (single-page applications or mobile applications) with basic attacks such as credential stuffing against the sign-in controller, attempting SQL injection on customer-facing forms, or launching unsophisticated DDoS attacks that disrupt online banking availability.

Hacktivists are motivated by ideology and possess variable skills. If they are targeting financial institutions, it’s often due to the institutions’ perceived unethical or controversial causes. They can deface banking websites, launch DDoS attacks against online banking platforms to disrupt customer access, or leak customer data to embarrass the institution. Their attacks against banking systems are often timed to coincide with political events or social movements, making them unpredictable but typically focused on reputational damage, rather than financial theft.

Insiders are current or former employees, contractors, or partners with legitimate access to internal banking systems and pose unique threats given their inside access and knowledge. In our banking architecture, insiders might include system administrators with privileged access to the mainframe banking system and database, developers with access to security components, or support staff who can query customer accounts through the accounts summary controller.

Hackers have high technical skills and range from curious ethical hackers to malicious actors targeting banking system vulnerabilities. They are likely to probe authentication mechanisms in the sign-in and reset password controllers, exploit API vulnerabilities in JSON/HTTPS communications between applications and backend systems, and attempt to bypass the security components through sophisticated techniques.

Cybercriminals are especially concerning for our system, given that they are financially motivated and often organized groups with strong technical skills who view banking systems as high-value targets. They deploy ransomware against banking infrastructure, conduct sophisticated phishing campaigns to harvest customer credentials for the personal banking customer login, exploit vulnerabilities to manipulate financial transactions, steal customer data from the database for identity theft and fraud, and could target the mainframe banking system for direct financial manipulation. Their persistent, profit-driven attacks make them one of the most significant threats to financial institutions.

ATPs may be less likely in our scenario, but still one to call out. These state-sponsored actors are very highly skilled and can conduct long-term, targeted campaigns against financial institutions for espionage, economic advantage, or strategic disruption. APTs infiltrate banking networks through spear phishing, zero-day exploits, or supply chain compromises, looking to establish persistent backdoor access to the system for continuous intelligence gathering and potential attack when the time comes for future geopolitical leverage.

It can often be difficult to imagine various threat actors that might target your application or system. I highly recommend that organizations maintain their own internal registry of threat agents that are most likely to target their systems. This information should come from a few sources:

  • Internal monitoring and logging that looks for indicators of compromise in the system
  • Historical data of attempted and successful threat agents in your organization or industry
  • Information sharing and analysis centers (ISACs) are sector-specific organizations that gather and share information on cyber threats
  • Threat intelligence relevant to the organization and the industry they are in
  • Sources such as MITRE ATT&CK Cyber Threat Intelligence (CTI) groups or Microsoft’s threat actor insights

You are looking for the most likely threat agents that will target your system, and the ones that are most likely to be successful. You can catalog these threat actors on your security architecture diagram, in a spreadsheet, or in some other data store. Ideally, they will be accessible to any security architect who is building a security architecture diagram or threat model.

We have the diagrams, the data, and the actors. It’s now time to start building the likely attack scenarios that can be used in the security architecture diagram.

An attack refers to a deliberate attempt by an individual or group to compromise the system through found vulnerabilities. These attacks can be either targeted, focusing on specific financial institutions or high-value customers, or opportunistic, exploiting widespread vulnerabilities across an entire banking system. Understanding some of the concepts related to attacks and how they play into your threat model will help you describe the attack scenarios that you’ll place in the security architecture diagram.

When considering individual attacks, start with the attack surface, which encompasses all possible points where an attacker can attempt to gain access to a system. In our banking system, the attack surface includes multiple entry points across trust boundaries: the personal banking customer zone exposes the single-page application and mobile application accessible via JSON/HTTPS from the internet. The application layer (sign-in controller, reset password controller, accounts summary controller) processes customer authentication and transaction requests, each controller representing a potential exploitation point. Internal components, including security components, email components, the database, and the mainframe banking system, expand the attack surface for insider threats or attackers who successfully penetrate outer defenses. Even the developers’ and security team’s access points are part of the attack surface, as compromising developer credentials or workstations could enable backdoor insertion.

Next, consider the attack vectors. These are the specific methods or pathways attackers use to exploit vulnerabilities across the attack surface. In the banking system threat model, common attack vectors include credential-based attacks targeting the sign-in controller through phishing campaigns against personal banking customers, credential stuffing using previously breached passwords, or brute-force attacks against authentication methods. Injection attacks represent another vector, where attackers may try to inject malicious SQL statements through the web application to manipulate queries against the database, potentially accessing unauthorized customer records or modifying account balances. Attackers may attempt session hijacking to exploit vulnerabilities in the JSON/HTTPS communications between the customer zone and backend controllers, allowing attackers to steal session tokens and impersonate legitimate customers. One last example is attempting to attack the REST endpoints connecting applications to controllers provide vectors for authentication bypass, authorization flaws, or data manipulation.

The last part of understanding the attack scenarios is determining the exploit. This is the tool, technique, process, or code that attackers use to take advantage of a specific vulnerability within a system or application. This is the “how” of achieving their objectives against the system. In the context of our banking system, exploits might include a crafted SQL injection payload specifically targeting the database technology (visible to attackers through reconnaissance or error message disclosure) that, when passed through a vulnerability in the accounts summary controller’s query construction, extracts customer account details or modifies transaction records. Authentication bypass exploits could leverage vulnerabilities in the sign-in controller’s token validation logic, allowing attackers to forge JWT tokens that grant unauthorized access without valid credentials. Another opportunity is a cross-site scripting (XSS) exploit that injects malicious JavaScript into the single-page application, executing victims’ browsers to steal session cookies or redirect customers to phishing pages that harvest credentials.

We tie exploits to vulnerabilities to better understand the path that an attacker can take to negatively affect the system. Identifying that the reset password controller has an insecure direct object reference vulnerability means little until you understand that attackers can exploit this by manipulating password reset tokens to gain access to arbitrary customer accounts.

Let’s take what we’ve learned here and develop our final security architecture diagram that encompasses our banking system and the potential threats to it.

Finalizing the security architecture diagram

Section titled “Finalizing the security architecture diagram”

We understand the varying trust zones, the data flow, who is targeting our system, and how they may attempt to get in. It’s time to finalize the security architecture diagram to pull it all together. We have a DFD and our security architecture diagram based on C3, so we can now add additional details to finalize the diagram.

Begin by adding the relevant data flows from the DFD into your security architecture diagram. You should add as much detail as is applicable to the understanding of how threat actors can influence, change, or degrade the data flow. Keep in mind confidentiality, integrity, and availability (CIA) as you build out the data flow in the security architecture diagram. Your results should look something like this:

Figure 2.5: Incorporating the DFD into the security architecture diagram

Figure 2.5: Incorporating the DFD into the security architecture diagram

This diagram essentially overlays the DFD that was provided earlier. You will notice the protocol (HTTPS) and the payload type (JSON) in the diagram, which are relevant security controls and data transmission types, respectively.

The actors are outlined in the diagram already (administrator and customer); however, we now add the potential threat actors that can harm the system. Since this is a simple exercise, we will add just a few threat actors and potential threat scenarios:

  • Cybercriminals conduct a credential-stuffing attack against the sign-in controller using stolen credentials, attempting to compromise customer accounts and transfer funds
  • A disgruntled system administrator with privileged access attempts to exfiltrate customer records to sell on the dark web
  • An APT group executes a spear-phishing campaign targeting the developers, establishing backdoor access to monitor financial transactions and extract intelligence

You can continue to build additional scenarios and actors as you see fit, but this should get you started. Given this, our security architecture diagram should look like this:

Figure 2.6: Security architecture diagram including three attack scenarios

Figure 2.6: Security architecture diagram including three attack scenarios

We now have a basis for a threat model that we can build upon and begin to devise our security controls from. With this diagram in hand, the security team can develop the listing of threat scenarios and security controls that address them. We’ll dive deeper into how to utilize the threat-modeling process in different scenarios throughout the remainder of the book, but in the next chapter, we’ll address how these threats result in risk and how an organization understands and manages those risks.

This chapter explored the foundational elements of threat modeling. We began by discussing assets, which form the backbone of any threat model. Assets include tangible items, such as hardware and software, intangible elements, such as intellectual property and trust, and operational resources, such as processes and employee expertise. We also underscored the importance of enumerating and classifying assets to understand their role within the organization’s ecosystem.

We explored the critical relationship between vulnerabilities and threats, where vulnerabilities represent exploitable weaknesses in systems while threats represent the potential sources of harm that exploit those weaknesses. These threats range from external cybercriminals and natural disasters to internal actors and operational errors. The chapter emphasized the unique nature of threats faced by different industries, stressing the need for context-specific threat evaluation.

Finally, the chapter provided practical guidance for expressing threats through security architecture diagrams that map trust zones (groupings of components with similar security needs) and trust boundaries (transition points where data flows between different trust levels). Using a banking system architecture as an example, we illustrated how to profile threat actors and construct attack scenarios. This scenario-based approach transforms abstract threat identification into actionable security improvements by revealing which trust boundary crossings lack adequate controls and which threats warrant immediate remediation.

Next, we’ll explore how threats represent risk to an organization and how organizations can reduce risks that map to threats found through the threat-modeling process.

Get This Book’s PDF Version and Exclusive Extras