This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Threat Risk Modeling"

From OWASP
Jump to: navigation, search
(Performing threat risk modeling using the Microsoft Threat Modeling Process)
(Performing threat risk modeling using the Microsoft Threat Modeling Process)
Line 22: Line 22:
 
# Identify Threats
 
# Identify Threats
 
# Identify Vulnerabilities
 
# Identify Vulnerabilities
 +
 +
[[Image:Threat_model_flow.gif|none|thumb|300px|Figure 1: Threat Model Flow]]
  
 
Let’s consider the steps in more detail.
 
Let’s consider the steps in more detail.

Revision as of 15:30, 19 May 2006

Guide Table of Contents

When you start a web application design, it is essential to apply threat risk modeling; otherwise you will squander resources, time and money on useless controls that fail to focus on the real risks.

The method used to assess risk is not nearly as important as actually performing a structured threat risk modeling. Microsoft notes that the single most important factor in their security improvement program was the corporate adoption of threat risk modeling .

OWASP recommends Microsoft’s threat modeling process because it works well for addressing the unique challenges facing web application security and is simple to learn and adopt by designers, developers, code reviewers, and the quality assurance team.

The following sections provide some overview information (or see Section 6.9, Further Reading, for additional resources).

Threat Risk Modeling

Threat risk modeling is an essential process for secure web application development. It allows organizations to determine the correct controls and to produce effective countermeasures within budget. For example, there is little point in spending $100,000 for fraud control for a system that has negligible fraud risk.

Performing threat risk modeling using the Microsoft Threat Modeling Process

The threat risk modeling process has five steps , enumerated below and shown graphically in Figure 1. They are:

  1. Identify Security Objectives
  2. Survey the Application
  3. Decompose it
  4. Identify Threats
  5. Identify Vulnerabilities
File:Threat model flow.gif
Figure 1: Threat Model Flow

Let’s consider the steps in more detail.

Identify Security Objectives

The business (or project management) leadership, in concert with the software development and quality assurance teams, all need to understand the security objectives. To facilitate this, start by breaking down the application’s security objectives into the following categories:

  • Identity: Does the application protect user identity from abuse? Are there adequate controls in place to ensure evidence of identity (as required for many banking applications?)
  • Financial: Assess the level of risk the organization is prepared to absorb in remediation, as a potential financial loss. For example, forum software may have a lower estimated financial risk than an Internet banking application.
  • Reputation: Quantify or estimate of the loss of reputation derived from the application being misused or successfully attacked.
  • Privacy and Regulatory: To what extent will the application have to protect user data? Forum software by its nature is public, but a tax preparation application is subject to tax regulations and privacy legislation requirements in most countries.
  • Availability Guarantees: Is the application required to be available per a Service Level Agreement (SLA) or similar guarantee? Is it a nationally protected infrastructure? To what level will the application have to be available? High availability techniques are significantly more expensive, so applying the correct controls up front will save a great deal of time, resources, and money.

This is by no means an exhaustive list, but it gives an idea of some of the business risk decisions leading into selecting and building security controls.

Other sources of risk guidance come from:

  • Laws (such as privacy or finance laws)
  • Regulations (such as banking or e-commerce regulations)
  • Standards (such as ISO 17799)
  • Legal Agreements (such as payment card industry standards or merchant agreements)
  • Corporate Information Security Policy

Application Overview

Once the security objectives have been defined, analyze the application design to identify the components, data flows, and trust boundaries.

Do this by surveying the application’s architecture and design documentation. In particular, look for UML component diagrams. Such high level component diagrams are generally sufficient to understand how and why data flows to various places. For example, data movement across a trust boundary (such as from the Internet to the web tier, or from the business logic to the database server), needs to be carefully analyzed, whereas data that flows within the same trust level does not need as much scrutiny.

Decompose Application

Once the application architecture is understood then decompose it further, to identify the features and modules with a security impact that need to be evaluated. For example, when investigating the authentication module, it is necessary to understand how data enters the module, how the module validates and processes the data, where the data flows, how the data is stored, and what fundamental decisions and assumptions are made by the module.

Identify Threats

It is impossible to write down unknown threats, but it is likewise unlikely that new malware will be created to exploit new vulnerabilities within custom systems. Therefore, concentrate on known risks, which can be easily demonstrated using tools or techniques from Bugtraq .

Microsoft suggests two different approaches for writing up threats. One is a threat graph, as shown in Figure 2, and the other is a structured list, as shown in Figure 3.

File:Threat Graph.JPG

Typically, a threat graph imparts more information quickly but it takes longer to construct, while a structured list is easier to create but it will take longer for the threat impacts to become obvious.

  • Attacker may be able to read other user’s messages
  • User may not have logged off on a shared PC
  • Data validation may allow SQL injection
  • Implement data validation
  • Authorization may fail, allowing unauthorized access
  • Implement authorization checks
  • Browser cache may contain contents of message
  • Implement anti-caching directive in HTTP headers
  • If eavesdropping risk is high, use SSL

File:Figure 3: Threat List

Note that it takes a motivated attacker to exploit a threat; they generally want something from your application or to obviate controls. To understand the relevant threats, use the following categories to understand who might attack the application:

  • Accidental Discovery: An ordinary user stumbles across a functional mistake in your application, just using a web browser, and gains access to privileged information or functionality.
  • Automated Malware: Programs or scripts, which are searching for known vulnerabilities, and then report them back to a central collection site.
  • The Curious Attacker: a security researcher or ordinary user, who notices something wrong with the application, and decides to pursue further.
  • Script Kiddies: Common renegades, seeking to compromise or deface applications for collateral gain, notoriety, or a political agenda, perhaps using the attack categories described in the OWASP Web Application Penetration Checklist.
  • The Motivated Attacker: Potentially, a disgruntled staff member with inside knowledge or a paid professional attacker.
  • Organized Crime: Criminals seeking high stake payouts, such as cracking e-commerce or corporate banking applications, for financial gain.

It is vital to understand the level of attacker you are defending against. For example, a motivated attacker, who understands your internal processes is often more dangerous than script kiddies.




Guide Table of Contents