Concepts used in SPARTA

This section briefly outlines the key concepts you need to understand for working with SPARTA.

DFD Concepts

System models in SPARTA are modeled as Data Flow Diagrams (DFDs). The DFD concepts are briefly explained below.

Process

Represents any type of running process of the system being modeled.

Data Store

Represents any type of data storage. This could be a file, a database, etc.

External Entity

Represents any type of entity external to the system. This can be users, but also external services the system relies upon.

Data Flow

Represents a flow of data between any of the above elements.

Solution Concepts

The DFD notation is extended with solutions in order to allow relevant security or privacy mitigations to be systematically captured in the system model. For representing solutions, SPARTA makes the distinction between solution types, the generic solutions, and their instances, the concrete applications in a specific DFD.

Solution Types

Solution types represent solutions in a way to be reusable across multiple models. These types are collected in a solution type catalog that can be reused across multiple projects.

Solution Type

A solution type represents a single type of solution. For example, a secure pipe to represent the use of HTTPS.

Role

Roles are used to capture the elements that are involved in a solution type. When a solution type is instantiated in a concrete DFD model, each role will have to be linked to a concrete DFD element. A role can also limit the type of element it needs to be associated with (e.g., only data flows). For example, the solution type for a secure pipe could encompass a role for each end of the pipe (i.e., the client and the server), as well as roles for the secured data flow(s).

Countermeasure

A solution type can encompass one or more countermeasures. A countermeasure specifies that a role in a solution is protected against a specific threat type. A countermeasure can also limit its scope of protection. For example, the authentication of the server in case of HTTPS only happens for those data flows which comminicate over HTTPS. Other data flows to the server do not have authentication of the server in place. The strength of a countermeasure can also be specified.

Solution Instances

Solution instances represent the concrete applications of security or privacy solution types that are added to a concrete DFD model.

Solution Instance

A solution instance refers to the solution type it instantiates. It also contains a set of RoleBindings for every Role in the solution type.

Role Binding

The role binding links a generic role from a solution type to the concrete DFD element in a model that fulfills that role. For example, a solution instance referring to the secure pipe solution type requires role bindings for the client and server of the secure pipe, as well as role bindings for the secured data flow(s).

Privacy-specific concepts

PersonalDataType

Used to represent a type of personal data. This can be linked to various DFD elements where that data is processed or stored. PersonalDataTypes also link to the DataSubjectType they pertain to.

DataSubjectType

This represents the type of data subject. It is used to make the distinction between different categories of people whose data is being processed by the system.

Threat Types

In order to enable threat elicitation, SPARTA requires information on which types of threats to elicit. This information is captured using threat types and threat specifications.

ThreatType

The threat types represent the actual types that are used for the threat elicitation. These will appear in the list of elicited threats. Threat types are documented in a threat type catalog, and can be re-used accross models and projects.

ThreatSpecification

Threat specifications are used to overrule a threat type (for example, disabling a certain threat type without modifying the threat type catalog).

Threat Type Pattern Syntax

Every threat type that needs to be elicited contains a list of DFD element patterns to elicit. This syntax is as follows: [ElementType][To/Through][ElementType], with a * after one of the three parts to indicate the location of the threat. For example, a threat for a data flow through a trust boundary from an External Entity to a Process at, respectively, the sending, data flow, or receiving side is expressed as:

ExternalEntity*ThroughProcess
ExternalEntityThrough*Process
ExternalEntityThroughProcess*

When the trustboundary does not matter:

ExternalEntity*ToProcess
ExternalEntityTo*Process
ExternalEntityToProcess*

Any other combination of element types can be used:

Process*ToProcess
ProcessThrough*DataStore
DataStore*ToProcess

While invalid combinations can also be specified, these will, in correctly constructed DFDs, not yield any threats. For example, the DFD notation does not allow data flows from data stores to data stores, but the following patterns can still be specified:

DataStore*ToDataStore

When there are no restrictions on the element type and the threat is positioned at the flow, just [DataFlow/DataFlowThrough] can be used.

Threat Types Hierarchy

Sparta only elicits the leaves of the threat type tree. To determine the applicability of a leaf, the following criteria are evaluated:

  • the leaf threat type must be enabled: ThreatType.enabled==true

  • check the type or its enabled ancestors for the relevant pattern; i.e. the parentType.enabled==true and parentType.map contains, for example, ProcessToProcess==true

  • check the ancestry to ensure that neither the type, nor the map entry is disabled

To verify that there is no threat specification that overrides any of this the following check is performed:

  • Verify a threat type’s ancestors that there is no Threat Type Specification with a disable entry. Any disable spec in the ancestry is sufficient to disable the threat type. Hence, a disable spec will override hte applicability for all children.

Attacker Profiles

AttackerProfile

An AttackerProfile represents a specific type of attacker, with a certain capability, probability of action and context frequency. To express insiders that are able to bypass certain countermeasures, an AttackerProfile contains an insider list of DFDElements on which countermeasures from security or privacy solutions could be bypassed.

Contains a number of attributes.

ContactFrequency

How frequently the attacker comes into contact with the system.

ProbabilityOfAction

How likely the attacker will attempt an attack.

ThreatCapability

The capability of the attacker. This is compared to the strength of a countermeasure, if any, when calculating the likelihood of a threat. Therefore, this parameter should be expressed using the same scale as the one used for countermeasure estimates.

Insider

The list of elements for which the attacker is able to bypass countermeasures.

Note

Multiple attackers can be specified in an attacker profile, and SPARTA takes into account all of them during risk calculation.

Output

Based on the the provided inputs (DFD model, solutions, threat type catalog, attacker profile), SPARTA elicits potential threats and calculates their risk.

Threat Elicitation

Threats are elicited in a per-interaction manner, based on the patterns specified in the threat type catalog. For each threat, the threatened DFD element, threat type, and data flow via which the threat is possible, are elicited.

        flowchart LR
   Risk --> LossEventFrequency

   LossEventFrequency --> ThreatEventFrequency

   ThreatEventFrequency --> ContactFrequency
   ThreatEventFrequency --> ProbabilityOfAction


   LossEventFrequency --> Vulnerability

   Vulnerability --> countermeasure-defeated

   countermeasure-defeated --> Strength
   countermeasure-defeated --> ThreatCapability


   Vulnerability --> countermeasure-bypassed

   countermeasure-bypassed --> insider


   LossEventFrequency --> RetentionPeriod


   Risk --> LossMagnitude

   LossMagnitude --> AssetValue
   LossMagnitude --> PrivacyValue

   PrivacyValue --> DataSubjecTType
   PrivacyValue --> PersonalDataType
   PrivacyValue --> NumberOfRecords
   PrivacyValue --> NumberOfDataSubjects
    
Risk Components

The risk of a threat is calculated using several components, based on the FAIR [1] risk model adapter for use in the context of threat modeling. Distributions for the input values and Monte Carlo simulations are used to account for uncertainty in each of the components. An overview of the components is provided here. A more in-depth explanation can be found in our publication. [2]

Danger

TODO Fig 1 SPARTA paper ?

Strength (S)

The strength value is directly tied to the countermeasures against the threat. It should be expressed in the same scale as the threat capability (TC).

Threat Capability (TC)

Represents the strength of an attacker, as specified in the attacker model. An attacker can break a countermeasure if its capability is greater than the strength of the countermeasure (TC > S).

Contact Frequency (CF)

Specifies how frequently an attacker comes in contact with the system (either with or without malicious intent), and is documented in the attacker model. This enables the distinction between potential attackers that have very frequent (or likely) contact with the system (e.g., an insider, a customer, or a script kiddie) and attackers with less frequent contact with the system. The contact frequency is specified as a number of contacts per year.

Probability of Action (PoA)

Specifies how likely an attacker is to attempt an attack (successful or not) once the attacker comes into contact with the system, and is documented in the attacker model. It is expressed as a probability (i.e., a number between 0 and 1).

Vulnerability (V)

Derived from the countermeasure strength and attacker type. It specifies whether attackers succeed in attacking the system by breaking the countermeasure(s). The vulnerability is calculated as the percentage of successful attacks, estimated by sampling from both the strength and threat capability distributions.

Threat Event Frequency (TEF)

Specifies the frequency of attempted attacks on the system. It is derived from the contact frequency of the attacker and the probability of actions of that attacker. Note that the threat event frequency does not specify the frequency of successful attacks; this is derived later by incorpo rating the vulnerability.

Loss Event Frequency (LEF)

The frequency of successful attacks that actually result in a loss. It is derived from the threat event frequency (i.e., the number of attempted attacks) and the vulnerability (i.e., the percentage of successful attacks).

Loss Magnitude (FM)

Specifies the loss or damage of a successful attack. It is based on the value of the threatened DFD element for the considered type of threat. It is most naturally expressed as a currency (e.g., in EUR), but it is also possible to use relative numbers (e.g., the relative importance of the elements in the model) to compare the relative risks for different elements.

Risk (R)

Calculated by multiplying the loss magnitude (the value attached to the threatened DFD element) with the loss event frequency (the frequency of successful attack, given the countermeasures applied in the context of the threat and the attacker profile). This provides an annualized risk (expected loss per year).