Cyber Risk Scoring Through an Attacker’s Lens- Part 2: Risk Scoring
In this two part article, we present a risk scoring framework that integrates corporate, cloud, application, and data security signals. Such a framework is essential for comprehensive risk management as it enables organizations to assess security gaps from various layers in a modern app stack, reduce blind spots, and ensure that response plans are prioritized.
Unlike existing approaches, we model risk from an attacker’s perspective. This helps us reason about risk based on what an attacker might be able to infer and strategies they might try, and to that extent, be more realistic.
In part 1, we map the typical organisation's risk landscape spanning corporate, application and data resources, stakeholders in risk management and their outcomes and the key tenets of a risk management framework. In part 2, we provide the risk scoring framework from an attacker's perspective.
Risk Scoring Framework
We assume the attack surface consists of a set of R entities / resources, of size |R|, where each entity can be referenced by the index r on R. The entities are assessed by a set of security technologies T, with |T| total technologies, with any given technology indexed by t. Concretely, an organization with 5 apps, 10 EC2 instances and 5 S3 buckets would have |R| = 20 resources. If they use Tenable for DAST (targeting the 5 apps) and Sumo Logic as their SIEM (targeting the 15 cloud resources) these two vendor products would be part of T with |T| = 2.
Let V(t, r) be the collection of weaknesses detected by technology t based on N(t, r) total tests done on entity (or resource) r. Let |V(t,r)| be the number of such weaknesses. In addition, for now, let us assume that we can segment weaknesses based on risk, say high (H) versus low (L) risk. In the estimation section, we provide ways to achieve this segmentation. Let VH and VL denote the collection of weaknesses of H or L risk and |VH| and |VL |be the total number of such weaknesses. Let V0 and |V0| be the set of secure (i.e. no weakness) tests and their number.
The attacker does not know these weaknesses but is aware of the N(t, .) tests that defenders typically do using technology t. Suppose the attacker attempts to probe the system by assessing these N(t, .) tests. They attempt K(t, r) times, each attempt indexed by k. In any given attempt, they might find a High risk or Low risk or no weakness. In K attempts, let's assume they find KH High risk weaknesses, KL Low risk weaknesses and K - KH - KL secure tests.
Given entity / resource r in the defender’s attack surface, we assess the probability of a breach in several steps:
STEP 1: Estimate the probability that the attacker discovers weaknesses
The probability that the attacker discovers KH High risk weaknesses, KL Low risk weaknesses and K - KH - KL secure tests is given by the hypergeometric distribution, modeled after the archetype of drawing KH High risk, KL Low risk and K - KH - KL secure tests, without replacement.
C(|VH|, KH) is the the number of ways KH weaknesses can be drawn from VH, C(|VL|, KL) is the the number of ways KL weaknesses can be drawn from VL and similarly for secure tests.
Equation (1) trends to zero because the term C(N, K) will be large as the number of tests N(t, .) is usually in the 100s. As a result, given that N is expected to be much larger than K, you can approximate the attacker’s draws from the pool of tests using the binomial distribution instead of the hypergeometric distribution. This approximation holds because, with a large N, drawing without replacement behaves almost like drawing with replacement since the relative depletion of any one category of tests becomes negligible. Next, the Poisson distribution is often used to approximate a binomial distribution when the probability of success is small and the number of trials is large.
Concretely, because we expect N >> K and K/N (the proportion of attacker attempts) to be small, KH follows a binomial distribution:
We expect K/N to be small as we hypothesize that attackers are driven by maximizing breaches with the least amount of effort, which is in this case, is modeled by the number of attempts, K.
For large N and small K/N, this binomial distribution can be approximated by a Poisson distribution with parameter (K VH / N):
Similarly, the number of low priority L tests can also be approximated by a Poisson distribution
The intuition for these Poisson approximations is that when N is large, the expected number of H or L tests drawn is roughly proportional to the number of attempts by the attacker and the relative proportion of H (or L) tests associated with the resource.
STEP 2: Estimate the probability that there is no breach
Suppose pH , pL are breach probabilities for High versus Low risk weaknesses. To get the probability of no breach from H tests, we calculate the probability that the attacker draws KH H tests and no breach occurs as the weighted sum over all possible KH:
This simplifies to:
Similarly, for L tests:
The probability of no breaches, assuming that the process of drawing High versus Low risk weaknesses are independent, is:
Recommended by LinkedIn
STEP 3: Estimate the probability of no breach for a resource r across all technologies in T
The probability of no breach of resource r, given tests from technologies in T, again assuming independence across technologies, is
STEP 4: Estimate the probability of breach for a resource r
The probability of a breach of resource r is just the complement of (7) or
STEP 5: Estimate the probability of breach for the entire attack surface
Now that we have the risk of a given entity, how do we include all entities, again with an attacker’s perspective? While a defender might view entity risk as proportional to likelihood times impact, we use that perspective to boost the probability of breach for critical entities. This is because, other things being equal, an attacker would derive greater returns by breaching critical entities. Practically, an attacker can infer critical entities based on their type. For example, storage buckets and databases and Internet-facing applications that are expected to contain confidential data (e.g. banking apps) might be higher risk than other entities.
Concretely, given c(r) the criticality of a resource r, we modify (8), as follows
where pCRIT( breach, r ) is the criticality modified breach risk for a given entity/resource r.
Suppose we segment entities into low and high criticality, denoted CRIT-L and CRIT-H. Let |RCRIT-H| and |RCRIT-L| be the number of CRIT-H and CRIT-L resources.
We assume the attacker assesses B resources in a breadth-first approach. Similar to (4) and (5), we can estimate the no-breach probability of a CRIT-H and CRIT-L resources as:
Similar to before, the probability of no breaches, after the attacker assesses B resources is
Finally, the overall risk, across all technologies and resources can be estimated as
Prioritization of remediation is based on ordering test failures based on
Other things being equal, this prioritizes test failures based on critical resources with a high count of high risk test failures, followed by a similar list for low risk resources.
Note that reactive signals such as threats from threat detection systems like SIEM or Amazon GuardDuty can be incorporated into this framework.
Estimation Approaches
The following parameters in the framework are hard to estimate in general. Below we discuss possible estimation approaches.
Numerical Results
Figure 5 simulates the risk formulas for one resource on which two technologies are evaluated with the test results indicated in the figure. Note that breach risk increases with attacker attempts. Next, Figure 6 constructs an attack surface with the indicated mix of High and Low criticality resources and their per-resource breach probability to calculate the total breach risk. Notice that the breach probability approaches 100% after the attacker probes just a small number of resources.
Conclusion
We provided a framework to model risk in a comprehensive manner for an attack surface consisting of app, service and infrastructure resources over diverse proactive and reactive security technologies. We also assessed risk by assuming the perspective of an attacker to maximise interpretability of the framework.