Risk Analysis For Secure Software Design
Risk Analysis For Secure Software Design
Software Design
Dr. Natarajan Meghanathan
Associate Professor
Department of Computer Science
Jackson State University
E-mail: [email protected]
Terminologies
• Vulnerability – Is a weakness in the security system, in
procedures, design or implementation, that might be
exploited to cause loss or harm.
• Threat – A threat to a computing system is a set of
circumstances that has the potential to cause loss or
harm.
• Attack – An attack on the system is the execution of the
threat by exploiting the vulnerabilities of the system.
• Risk – The possibility of an attack to occur
• Control – A control is an action, device, procedure, or
technique that removes or reduces a vulnerability.
• A threat is blocked by control of a vulnerability.
Terminologies
• Asset – The object of protection efforts. Example: a system
component, data or even a complete system
• Likelihood – The probability that a given event will be triggered. This
quantity is often expressed as a percentage (it is tough to calculate
one) or categories (e.g., High – H, Medium – M, Low – L)
• Impact – The impact on the organization using the software, if the risk
is to be realized. The impact could be monetary, or tied to reputation,
or may result from the breach of a law, regulation or contract. It is
critical to quantify the impact (e.g., categories: High, Medium and Low)
• Risk Exposure – A measure of the overall impact to the organization
and an indication of the extent to which the risk has to be mitigated.
Risk Exposure = likelihood * impact.
• A risk indicator is a sign that the risk is materializing, an objective,
measurable event that can be monitored and measured by the analyst
to determine the status of a risk over time.
• Various factors determine the calculation for risk – the ease of
executing an attack, the motivation and resources of an attacker, the
existence of vulnerabilities in a system, and the cost or impact in a
particular business context.
5/7 Stages of Risk Assessment
• Qualitative Model: The risk assessment methodology
encompasses seven fundamental activity stages, listed
below:
– Application characterization
– Asset Identification
– Architectural vulnerability assessment
– Threat analysis
– Risk likelihood determination
– Risk impact determination
– Risk mitigation
• Quantitative Model (5 stages):
– Application characterization
– Asset Identification
– Architectural vulnerability assessment
– Threat analysis
– Risk Quantification
• DREAD risk quantification model
• Annualized loss expectancy (ALE) model
1. Application Characterization
• Application characterization – defining the scope of the
software system architecture, documented as artifacts.
The goal is to produce document(s) that depict the vital
relationships between the critical parts of the system.
• Each path (called the attack path) tracing from the root node to a leaf
node represents a unique way to achieve the goal of the attacker.
Bribe Blackmail
Keyboard Read
capture screen
1 2 6 3 4 5 5
0.6 0.3
10 3 11 4 13 9 1 8 3 6 4 7 2
0.3 0.4 0.1 0.3 0.4 0.2
14 1 15 2
0.5 0.1
1 2 6 3 4 4 5 5
0.3
0.6 0.3
10 3 11 4 13 3 9 1 8 3 6 4 7 2
0.5
0.3 0.4 0.1 0.3 0.4 0.2
14 1 15 2
0.5 0.1
If the cost denotes Attack skills or the cost incurred in $ to launch the attack,
then path # 1 is the cheapest and it also has the least probability of apprehension.
Hence, path # 1 is the most vulnerable to attack and hence more security controls
should be added to increase the cost of node 10.
DREAD: Risk Quantification Model
• The DREAD model can be used to quantify, compare and prioritize the
amount of risk presented by each evaluated threat so that the risks
posed by different threats can be directly sorted.
• Risk_DREAD = (Damage + Reproducibility + Exploitability + Affected
Users + Discoverability)/ 5
• Each of the above five categories can be assigned a score of 3-HIGH, 2-
Medium, 1-Low and 0-None
• Damage potential:
– How great is the damage if the vulnerability is exploited?
• Reproducibility:
– How easy is it to reproduce the attack?
• Exploitability:
– How easy is it to launch an attack?
• Affected users:
– As a rough percentage, how many users are affected?
• Discoverability:
– How easy is it to find the vulnerability?
DREAD: Threat Rating Criteria
• Damage Potential
– High: The attacker can subvert the security system; get full trust
authorization; run as administrator; upload content.
– Medium: Leaking sensitive information
– Low: Leaking trivial information
• Reproducibility
– High: The attack can be reproduced every time and does not require
a timing window
– Medium: The attack can be reproduced, but only with a timing
window and a particular race situation.
– Low: The attack is very difficult to reproduce, even with knowledge of
the security hole.
• Exploitability
– High: A novice programmer could make the attack in a short time
– Medium: A skilled programmer could make the attack, then repeat the
steps.
DREAD: Threat Rating Criteria
• Exploitability
– Low: The attack requires an extremely skilled person and in-depth
knowledge every time to exploit.
• Affected Users
– High: All users, default configuration, key customers
– Medium: Some users, non-default configuration
– Low: Very small % of users, obscure feature; effects anonymous
users
• Discoverability
– High: Published info explains the attack. The vulnerability is found in
the most commonly used feature and is very noticeable.
– Medium: The vulnerability is in a seldom-used part of the product,
and only a few users should come across it. It would take some
thinking to see malicious user.
– Low: The bug is obscure, and it is unlikely that users will work out
damage potential.
STRIDE Analysis Example
• Application Scenario
• Student-Faculty Appointment System for Course Registration:
Through this application, students can login and request for
appointments from their faculty/academic advisors to register for
their classes. Care will be taken to ensure that there is no denial of
service attacks wherein a student makes multiple fake appointments
for a particular faculty during a particular time period. The financial
aid opportunities available to the student for the particular semester
are also displayed when the student makes the appointment for
registration.
• Threats
1. Making multiple fake appointments - Denial of service
• Student making multiple fake appointments within a time period so that
genuine students are denied appointments
2. SQL injection attacks to login to the database – Tampering with
data
• A student may try to delete the records in the database by passing
mischievous inputs for the username and password
DREAD Analysis for Fake RISK_DREAD
Score
= (2+3+3+3+2)/5
Appointments Threat = 2.6
• Damage potential: How great is the damage if the vulnerability is
exploited?
– MEDIUM (2) – While the whole registration server system will not be
affected, the students who want to make appointments to an advisor
will be affected
• Reproducibility: How easy is it to reproduce the attack?
– HIGH (3) – A student can make any number of appointments with any
number of advisors if there are no proper controls set up.
• Exploitability: How easy is it to launch an attack?
– HIGH (3) – It does not require sufficient expertise to make fake
appointments
• Affected users: As a rough percentage, how many users are affected?
– MEDIUM (2) – While all students may not be affected, the students
who require appointments to meet with an advisor will be affected.
• Discoverability: How easy is it to find the vulnerability?
– MEDIUM (2) – The vulnerability is not so common like a SQL
injection attack on the login screen or username/password exposed
in plaintext during transmission. The vulnerability of not controlling the
number of appointments a student makes is very unique for such
registration applications. Hence, it requires some thinking to exploit
this vulnerability, if present.
STRIDE Analysis Example (contd..)
• Threats
3. Student registers for a course/appointment and later denies that he
did not do it – Repudiation
4. Login using the username and password (either reset or original)
corresponding to a different user – Spoofing the identity
• Node 1: Through a social engineering attack –
• Node 1.1: Nexus with the system/db admin or
• Node 1.2: Send email from a fake address that appears to belong to that
user
• Node 1.3: Stand next to the targeted user and read the
username/password to the registration server when the user logs in
• Node 2: Privacy Intrusion
• Node 2.1, 2.2: By knowing a list of secret questions and the answers to
these questions (learn the personal information of the targeted user) – lets
say the system requires users to answer two questions correctly
• Node 2.3: Learn the email address/password of the targeted user and
click the Forget Password button in the Registration Page – Have the
system send the reset password to the compromised email account.
• Node 3: Hack the channel
• Node 3.1: Capture the username/password of the targeted user
• Node 3.2: Do a cryptanalysis on it, if it is encrypted.
Attack Tree for Spoofing the Identity
Threat
Node 0
Node 1 Node 3
OR OR Node 2 AND
AND OR
• Denial of service
– Use resource and bandwidth throttling techniques
– Validate and filter input
• Elevation of privilege
– Follow the principle of least privilege and use least privileged service
accounts to run processes and access resources
5. Risk Likelihood Determination
• The likelihood of a risk is a qualitative estimate of how successful an
attack (equivalent to the probability of a successful attack) and it will be
based on analysis and past experience.
– Based on the presence of threats and the vulnerabilities that might exist to
be exploited.
– Likelihood can be useful when prioritizing risks and evaluating the
effectiveness of potential mitigations.
• Since, the likelihood of a risk is determined based on past experience,
the likelihood cannot be accounted for new types of attacks or
vulnerabilities that have not yet been discovered.
• The following factors must be considered in the likelihood estimation:
– The motivation for the attack and the attacker’s capability
– The vulnerability’s directness and impact
– The effectiveness of current controls
• The motivation for the threat and the attacker’s capability vary widely.
• Vulnerabilities vary in their directness and the severity of their impacts.
• The effectiveness of security controls can be stronger or weaker
depending on the level of difficulty they pose for an intentional attacker
or how they can deter an unlikely accidental failure.
Risk Likelihood Determination
The likelihood is a subjective combination of the three qualities:
Motivation, Directness of vulnerability and Strength of the Security controls
A quality is said to be weak if it increases the risk and
A quality is said to be strong if it decreases the risk
High All the three qualities are weak: a threat is highly
motivated and sufficiently capable, a vulnerability exists
that is severe and direct, and controls to prevent the
vulnerability from being exploited are ineffective.
Medium One of the three qualities is strong, but the others are
not. The threat is perhaps not very motivated or not
sufficiently capable, the controls in place may be
reasonably strong, or the vulnerability might be indirect
or not very severe.
Low Two or more of the three qualities are strong. The threat
might lack motivation or capability. Strong controls might
be in place to prevent, or at least significantly impede,
the vulnerability from being exploited. The vulnerability
might be very indirect or very low impact.
6. Risk Impact Determination
• The impact of a risk (if it was to materialize) is determined by
the following three aspects:
– Identification of the threatened assets – The assets threatened by a
risk and the nature of what will happen to them must be identified.
• Common impacts are loss of data, corruption of data,
unauthorized or unaudited modification of data, unavailability of
data, corruption of audit trails and insertion of invalid data.
– Impact Locality: All impacts will have a locality in space, time, policy
and law.
• Example: If an encryption key is stored unencrypted, it matters
whether that key is in the dynamically allocated RAM of an
application on a trusted server, or on the hard disk of a server on
the Internet, or in the memory of a client application.
Risk Impact Determination
– Identification of business impact – The primary concern is monetary.
In addition, there could be tangible impacts like exposing the
business to liability to lawsuits or a race condition in database update
operations leading to duplication or loss of data.