Robustness and Limitations

Multi-Stage Attack Graph Simulation Via Markov Chains: how far the results move when the inputs change, and what the model cannot show

The closed-form results on The Model are exact for one assumed transition matrix. This page asks where a control change has the most leverage, how much the results move when the transition probabilities are uncertain, and whether the solver code is correct. It ends with the model’s limitations and the data a calibrated version would need.

One-Row-at-a-Time Control Sensitivity

To ask where a control change has the most leverage, the comparison must change one row at a time and hold the starting stage fixed. Starting from S1 (so every row lies on the attacker’s path), the analysis applies two changes to each row separately: (a) a standardized shift of 0.05 of probability from the row’s largest non-self, non-A1 edge to A1, and (b) replacing that row with its improved-posture row.

Display code
harden_one_row <- function(P, i, delta = 0.05) {
  donor <- unname(which.max(replace(P[i, ], c(i, 7), 0)))
  P[i, donor] <- P[i, donor] - delta
  P[i, 7] <- P[i, 7] + delta
  list(P = P, donor = all_state_names[donor])
}

outcomes_from_s1 <- function(P) {
  B <- solve_absorbing_markov(P[1:t_dim, 1:t_dim], P[1:t_dim, 7:9], step_hours)$B
  c(cont = B[1, 1], cat = B[1, 2] + B[1, 3])
}
shift_delta <- params$sensitivity$shift_delta$value
prop_rel <- params$sensitivity$prop_rel$value
seed <- params$seed$value

base_s1 <- outcomes_from_s1(P_baseline_raw)

sens_df <- map(seq_len(t_dim), \(i) {
  shifted <- harden_one_row(P_baseline_raw, i, delta = shift_delta)
  full_row <- P_baseline_raw
  full_row[i, ] <- P_hardened_raw[i, ]

  tibble(
    Stage = transient_names[i],
    Donor_Edge = str_extract(shifted$donor, "^[SA][0-9]"),
    Shift_Cont = outcomes_from_s1(shifted$P)["cont"] - base_s1["cont"],
    Shift_Cat = outcomes_from_s1(shifted$P)["cat"] - base_s1["cat"],
    Row_Cont = outcomes_from_s1(full_row)["cont"] - base_s1["cont"],
    Row_Cat = outcomes_from_s1(full_row)["cat"] - base_s1["cat"]
  )
}) |>
  list_rbind()

best_row <- which.max(sens_df$Shift_Cont)
Display code
sens_df |>
  gt() |>
  tab_header(
    title = "One-Row-at-a-Time Control Sensitivity (Attack Starting at S1)",
    subtitle = "Change in outcome probabilities from S1 when only one stage's row is changed"
  ) |>
  cols_label(
    Stage = "Row changed",
    Donor_Edge = "Donor edge (0.05 moved to A1)",
    Shift_Cont = "Δ Containment, standardized shift (pp)",
    Shift_Cat = "Δ Catastrophic, standardized shift (pp)",
    Row_Cont = "Δ Containment, improved row (pp)",
    Row_Cat = "Δ Catastrophic, improved row (pp)"
  ) |>
  fmt_number(columns = c(Shift_Cont, Shift_Cat, Row_Cont, Row_Cat), scale_by = 100, decimals = 2) |>
  tab_options(table.font.size = 11, heading.title.font.size = 13.5, heading.subtitle.font.size = 11)
One-Row-at-a-Time Control Sensitivity (Attack Starting at S1)
Change in outcome probabilities from S1 when only one stage's row is changed
Row changed Donor edge (0.05 moved to A1) Δ Containment, standardized shift (pp) Δ Catastrophic, standardized shift (pp) Δ Containment, improved row (pp) Δ Catastrophic, improved row (pp)
S1: Recon & Phishing S2 2.12 −2.12 11.47 −11.47
S2: Initial Foothold S3 2.25 −2.25 10.01 −10.01
S3: Privilege Escalation S4 1.78 −1.78 10.07 −10.07
S4: Lateral Movement S5 1.75 −1.75 7.50 −7.50
S5: Domain Dominance S6 1.46 −1.46 6.76 −6.76
S6: Payload Staging A3 1.43 −1.43 7.13 −7.13

How to read the table. Each row tests one change to the defenses at a single stage, holding everything else fixed, for attacks that start at S1. The first approach moves a fixed 0.05 of probability from the attacker’s most likely next move to containment; the donor column names that move. The second swaps in that stage’s improved-posture values. Each column shows the resulting change in containment or catastrophe, in percentage points; positive containment changes are gains.

What the table tells you. Under the fixed shift, improving S2 gives the largest containment gain, 2.25 points, against 2.12 for S1, and the gains shrink for deeper stages. Early-stage defenses therefore carry somewhat more leverage, but the differences are modest, and the checks further down this page show that the order of S1 and S2 is not reliable. The values come from assumed inputs, not measured control effects.

In more detail

Under these illustrative parameters, the largest standardized containment gain from S1 comes from changing the S2: Initial Foothold row (2.25 pp), not S1 itself (2.12 pp). Gains decline for deeper rows, to 1.43 pp at S6, which is 36% below the best row. Under this standardized shift the gradient looks moderate (the best row is about 1.6 times the last). The next table shows that this depends on how the perturbation is defined, and the ranking check in Parameter Uncertainty shows that the order of the top two rows is not stable. Two caveats: the 0.05 shift is a different relative change in each row, and the table only covers attacks that start at S1. The ranking reflects the hand-set parameters.

Why the ranking looks this way. For a small shift \(\varepsilon\) from edge \((i, j)\) to A1, the change in containment from S1 is approximately

\[\Delta B_{1,A1} \approx \varepsilon \, N_{1i} \, \bigl(1 - B_{j,A1}\bigr)\]

That is, expected visits to row \(i\) times the catastrophic share of the donor state \(j\). The table below confirms that the identity reproduces the standardized-shift column. The modest gradient is the product of two opposing trends: visits fall with depth while the donor’s catastrophic share rises. It also depends on the perturbation design.

Display code
harden_one_row_prop <- function(P, i, rel = 0.10) {
  inc <- rel * P[i, t_dim + 1]
  others <- setdiff(which(P[i, ] > 0), c(i, t_dim + 1))
  P[i, others] <- P[i, others] - inc * P[i, others] / sum(P[i, others])
  P[i, t_dim + 1] <- P[i, t_dim + 1] + inc
  P
}
B_full <- rbind(base_solution$B, diag(r_dim))
rownames(B_full) <- all_state_names
donor_idx <- map_int(seq_len(t_dim), \(i) unname(which.max(replace(P_baseline_raw[i, ], c(i, t_dim + 1), 0))))

identity_df <- tibble(
  Stage = transient_names,
  Donor_Edge = sens_df$Donor_Edge,
  Visits = base_solution$N[1, ],
  Donor_Cat_Share = 1 - B_full[donor_idx, 1],
  Identity_Pred = shift_delta * Visits * Donor_Cat_Share,
  Shift_Cont = sens_df$Shift_Cont,
  Prop_Cat = map_dbl(seq_len(t_dim), \(i) {
    outcomes_from_s1(harden_one_row_prop(P_baseline_raw, i, rel = prop_rel))["cat"] - base_s1["cat"]
  })
)
stopifnot(max(abs(identity_df$Identity_Pred - identity_df$Shift_Cont)) < 5e-4)

ratio_shift <- max(identity_df$Shift_Cont) / identity_df$Shift_Cont[t_dim]
ratio_prop <- min(identity_df$Prop_Cat) / identity_df$Prop_Cat[t_dim]
Display code
identity_df |>
  gt() |>
  tab_header(
    title = "Why the One-Row Ranking Looks the Way It Does",
    subtitle = "Standardized shift ≈ 0.05 × expected visits from S1 × catastrophic share of the donor state; compared with a proportional (+10% A1) perturbation"
  ) |>
  cols_label(
    Stage = "Row changed", Donor_Edge = "Donor edge",
    Visits = "Expected visits from S1 (N[1, i])",
    Donor_Cat_Share = "Donor catastrophic share (1 − B[j, A1])",
    Identity_Pred = "Identity prediction (pp)", Shift_Cont = "Standardized shift, actual (pp)",
    Prop_Cat = "Δ Catastrophic, +10% relative A1 (pp)"
  ) |>
  fmt_number(columns = c(Visits, Donor_Cat_Share), decimals = 3) |>
  fmt_number(columns = c(Identity_Pred, Shift_Cont, Prop_Cat), scale_by = 100, decimals = 2) |>
  tab_footnote("S6's donor is A3, a catastrophic absorbing state, so its standardized shift converts catastrophe into containment directly and is not comparable with the other rows.") |>
  tab_options(table.font.size = 11, heading.title.font.size = 13.5, heading.subtitle.font.size = 11)
Why the One-Row Ranking Looks the Way It Does
Standardized shift ≈ 0.05 × expected visits from S1 × catastrophic share of the donor state; compared with a proportional (+10% A1) perturbation
Row changed Donor edge Expected visits from S1 (N[1, i]) Donor catastrophic share (1 − B[j, A1]) Identity prediction (pp) Standardized shift, actual (pp) Δ Catastrophic, +10% relative A1 (pp)
S1: Recon & Phishing S2 1.111 0.381 2.12 2.12 −1.06
S2: Initial Foothold S3 0.850 0.529 2.25 2.25 −1.15
S3: Privilege Escalation S4 0.543 0.659 1.79 1.78 −0.74
S4: Lateral Movement S5 0.434 0.807 1.75 1.75 −0.52
S5: Domain Dominance S6 0.325 0.895 1.46 1.46 −0.30
S6: Payload Staging A3 0.285 1.000 1.43 1.43 −0.29
S6's donor is A3, a catastrophic absorbing state, so its standardized shift converts catastrophe into containment directly and is not comparable with the other rows.

How to read the table. Each row is one stage whose defenses are improved, for attacks starting at S1. Expected visits is how often an attack passes through that stage on average. The donor share is the chance that an attack at the stage it would otherwise have moved to ends in catastrophe. Multiplying the two by the 0.05 shift gives a predicted gain, shown next to the actual gain. The last column repeats the exercise with a 10% proportional improvement instead.

What the table tells you. The prediction matches the actual gain in every row, so the ranking is explained by two opposing forces: early stages are visited more often, but attacks moving on from them are less likely to end badly. Because these roughly offset, the gains differ only modestly. Under a proportional improvement, the gap between the first and last stages grows from about 1.6 times to 4.0 times, so the answer depends on how an improvement is defined.

The gradient depends on the perturbation. Under a proportional perturbation (+10% relative A1 probability, taken pro rata from the other exits), the upstream-to-downstream ratio is about 4.0× rather than 1.6×. A defensible ranking needs a control-to-parameter mapping, ideally expressed as hazard ratios on rates. A fixed absolute shift is not enough.

Parameter Uncertainty (Dirichlet)

Closed-form results are exact only given \(P\), and \(P\) is uncertain. To quantify that, each transient row is treated as Dirichlet(\(\alpha \cdot p_{\text{row}}\)) over its non-zero entries (structural zeros stay zero), with concentration \(\alpha = 50\) as a stand-in for “moderate confidence” in the elicited values. The solver is re-run on 5,000 sampled matrices per regime.

Display code
draw_P <- function(P, alpha) {
  for (i in seq_len(t_dim)) {
    idx <- which(P[i, ] > 0)
    g <- rgamma(length(idx), shape = alpha * P[i, idx])
    P[i, idx] <- g / sum(g)
  }
  P
}

summarise_draw <- function(P) {
  sol <- solve_absorbing_markov(P[1:t_dim, 1:t_dim], P[1:t_dim, 7:9], step_hours)
  tibble(Stage = transient_names, cont = sol$B[, 1], cat = sol$B[, 2] + sol$B[, 3], hours = sol$hours)
}
alpha_conc <- params$dirichlet$alpha_conc$value
n_draws <- params$dirichlet$n_draws$value

set.seed(seed)
draws <- map(seq_len(n_draws), \(d) {
  b <- summarise_draw(draw_P(P_baseline_raw, alpha_conc))
  h <- summarise_draw(draw_P(P_hardened_raw, alpha_conc))
  tibble(draw = d, Stage = b$Stage,
         cont_b = b$cont, cat_b = b$cat, hours_b = b$hours,
         cont_h = h$cont, cat_h = h$cat, hours_h = h$hours)
}) |>
  list_rbind() |>
  mutate(Stage = factor(Stage, levels = transient_names))

q05 <- \(x) quantile(x, 0.05)
q95 <- \(x) quantile(x, 0.95)

unc_summary <- draws |>
  summarise(
    cont_b_lo = q05(cont_b), cont_b_hi = q95(cont_b),
    cat_b_lo = q05(cat_b), cat_b_hi = q95(cat_b),
    hours_b_lo = q05(hours_b), hours_b_hi = q95(hours_b),
    p_improved_better = mean(cont_h > cont_b),
    .by = Stage
  ) |>
  left_join(res |> select(Stage = stage, cont_b, cat_b, hours_b) |> mutate(Stage = factor(Stage, levels = transient_names)),
            by = "Stage") |>
  arrange(Stage)

crossing_dist <- draws |>
  summarise(
    cross = which(cat_b > cont_b)[1],
    .by = draw
  ) |>
  count(cross) |>
  mutate(share = n / sum(n))

p_cross_s3 <- crossing_dist |> filter(cross == 3) |> pull(share)
Display code
unc_summary |>
  transmute(
    Stage,
    Containment = sprintf("%.1f%% (%.1f–%.1f)", 100 * cont_b, 100 * cont_b_lo, 100 * cont_b_hi),
    Catastrophic = sprintf("%.1f%% (%.1f–%.1f)", 100 * cat_b, 100 * cat_b_lo, 100 * cat_b_hi),
    Hours = sprintf("%.1f (%.1f–%.1f)", hours_b, hours_b_lo, hours_b_hi),
    p_improved_better
  ) |>
  gt() |>
  tab_header(
    title = "Baseline Outcomes with 90% Parameter-Uncertainty Intervals",
    subtitle = sprintf("Point estimate (5th–95th percentile); Dirichlet α = %d, %s draws", alpha_conc, format(n_draws, big.mark = ","))
  ) |>
  cols_label(
    Containment = "Containment",
    Catastrophic = "Catastrophic",
    Hours = "Time to resolution (h)",
    p_improved_better = "P(improved > baseline containment)"
  ) |>
  fmt_number(columns = p_improved_better, decimals = 3) |>
  tab_options(table.font.size = 11, heading.title.font.size = 13.5, heading.subtitle.font.size = 11)
Baseline Outcomes with 90% Parameter-Uncertainty Intervals
Point estimate (5th–95th percentile); Dirichlet α = 50, 5,000 draws
Stage Containment Catastrophic Time to resolution (h) P(improved > baseline containment)
S1: Recon & Phishing 72.5% (64.0–80.2) 27.5% (19.8–36.0) 14.2 (12.2–16.3) 1.000
S2: Initial Foothold 61.9% (52.1–71.1) 38.1% (28.9–47.9) 13.5 (11.8–15.3) 1.000
S3: Privilege Escalation 47.1% (36.5–57.7) 52.9% (42.3–63.5) 12.6 (11.2–14.0) 1.000
S4: Lateral Movement 34.1% (23.9–45.1) 65.9% (54.9–76.1) 10.9 (9.9–12.1) 1.000
S5: Domain Dominance 19.3% (10.9–29.0) 80.7% (71.0–89.1) 7.7 (7.2–8.3) 1.000
S6: Payload Staging 10.5% (4.4–18.8) 89.5% (81.2–95.6) 4.2 (4.0–4.5) 0.999

How to read the table. Each row is a starting stage under the baseline. Each cell gives the model’s point estimate followed, in brackets, by a 90% range: the band within which the result fell in 90% of 5,000 reruns with randomly varied input probabilities. Wider ranges mean the result is more sensitive to the assumed inputs. The last column is the share of reruns in which the improved posture contained more attacks than the baseline.

What the table tells you. Uncertainty in the inputs matters. At S3 the chance of catastrophe is 52.9%, but its 90% range runs from 42.3% to 63.5%, so whether catastrophe or containment is more likely at S3 can flip. The improved posture beats the baseline in nearly every rerun, but that check is weak by design, because its matrix was built to be better. The ranges also depend on an assumed confidence level, examined next.

The improved-posture comparison draws baseline and improved matrices independently, so the last column checks whether the improvement survives parameter noise, not a paired control effect. The paired comparison below estimates the scenario effect directly.

In more detail

The S3 crossing is fairly, not fully, stable. In 63.7% of draws, catastrophic outcomes first become more likely than containment at S3 (the baseline point estimate); the remaining draws place the crossing at other stages (shares: S2 2.6%; S3 63.7%; S4 32.8%; S5 1.0%). The statement “S3 is the tipping point” is therefore conditional on these parameters and on the assumed concentration \(\alpha\); the α sweep below shows that α changes the location of the crossing, not just the interval widths.

Uncertainty is substantial for the point estimates. At S3 the 90% interval for catastrophic probability is 42.3% to 63.5%, around the point estimate of 52.9%.

The improved posture is better in almost every draw, which says little by itself. The improved posture has higher containment than the baseline in at least 99.9% of draws at every stage. The improved matrix was built to have higher A1 probabilities, and the two regimes are drawn independently, so this check is weak. The paired comparison below gives the size of the difference with an interval.

Sensitivity to the Concentration α

Display code
alpha_grid <- as.numeric(unlist(params$dirichlet$alpha_grid$value))
n_sweep <- params$dirichlet$n_sweep$value
set.seed(seed)
alpha_sweep <- map(alpha_grid, \(a) {
  map(seq_len(n_sweep), \(d) {
    B <- summarise_draw(draw_P(P_baseline_raw, a))
    tibble(alpha = a, cross = coalesce(which(B$cat > B$cont)[1], 0L), cat_s3 = B$cat[3])
  }) |> list_rbind()
}) |>
  list_rbind() |>
  summarise(
    p_cross_s3 = mean(cross == 3),
    cat_s3_lo = quantile(cat_s3, 0.05),
    cat_s3_hi = quantile(cat_s3, 0.95),
    .by = alpha
  )
Display code
alpha_sweep |>
  gt() |>
  tab_header(
    title = "How the S3 Tipping Point Depends on Assumed Confidence (α)",
    subtitle = sprintf("Baseline matrix; %s Dirichlet draws per α", format(n_sweep, big.mark = ","))
  ) |>
  cols_label(alpha = "Concentration α", p_cross_s3 = "P(first crossing at S3)",
             cat_s3_lo = "S3 catastrophic, 5th pct", cat_s3_hi = "S3 catastrophic, 95th pct") |>
  fmt_percent(columns = c(p_cross_s3, cat_s3_lo, cat_s3_hi), decimals = 1) |>
  tab_options(table.font.size = 11, heading.title.font.size = 13.5, heading.subtitle.font.size = 11)
How the S3 Tipping Point Depends on Assumed Confidence (α)
Baseline matrix; 2,000 Dirichlet draws per α
Concentration α P(first crossing at S3) S3 catastrophic, 5th pct S3 catastrophic, 95th pct
10 38.0% 29.2% 76.1%
20 52.2% 37.1% 68.9%
50 63.4% 42.1% 63.1%
200 79.1% 47.3% 58.0%

How to read the table. Each row assumes a different level of confidence in the input probabilities, written α: a low α means the inputs could be well off, and a high α means they are close to right. For each level, the model was rerun 2,000 times. The columns give the share of reruns in which S3 is the first stage where catastrophe is more likely than containment, and the 90% range of the S3 catastrophe probability.

What the table tells you. How sure one can be that S3 is the tipping point depends heavily on how much the inputs are trusted. With low confidence, S3 is the tipping point in only 38.0% of reruns; with high confidence, in 79.1%. The confidence level is itself an assumption, so it should be set from structured expert input rather than chosen for convenience. Until then, the tipping point is best described as around S3, not exactly at S3.

The tipping point depends on α. The share of draws in which the first crossing is at S3 ranges from 38.0% at α = 10 to 79.1% at α = 200. α changes the conclusion, not just the interval width. It should be elicited (for example, by matching expert quantiles for each edge) rather than assumed.

Correlated Detection Quality Across Stages

Display code
shared_sd_log <- params$dirichlet$shared_sd_log$value
set.seed(seed)
shared_cat_s1 <- map_dbl(seq_len(n_draws), \(d) {
  P <- draw_P(P_baseline_raw, alpha_conc)
  f <- exp(rnorm(1, 0, shared_sd_log))
  for (i in seq_len(t_dim)) {
    a_new <- min(P[i, t_dim + 1] * f, 0.95)
    others <- setdiff(seq_len(ncol(P)), t_dim + 1)
    P[i, others] <- P[i, others] * (1 - a_new) / (1 - P[i, t_dim + 1])
    P[i, t_dim + 1] <- a_new
  }
  stopifnot(abs(sum(P[1:t_dim, ]) - t_dim) < 1e-8)
  outcomes_from_s1(P)["cat"]
})
indep_cat_s1 <- draws |> filter(Stage == transient_names[1]) |> pull(cat_b)
shared_int <- quantile(shared_cat_s1, c(0.05, 0.95))
indep_int <- quantile(indep_cat_s1, c(0.05, 0.95))

Correlated detection quality widens the intervals. The analysis above draws each row independently, which lets errors cancel along the attack path. Detection quality is an organizational capability: a SOC that is weak at S2 is probably weak at S3 and S4 too. Multiplying every row’s A1 probability by a common log-normal factor (log-scale SD 0.35) widens the 90% interval for catastrophic probability from S1 from 19.8%–36.0% to 7.0%–51.3%.

Paired Improvement Effect

Display code
# Common random numbers: the same uniforms drive both regimes' gamma draws
draw_pair <- function(Pb, Ph, alpha) {
  for (i in seq_len(t_dim)) {
    idx <- which(Pb[i, ] > 0 | Ph[i, ] > 0)
    u <- runif(length(idx))
    gb <- qgamma(u, shape = pmax(alpha * Pb[i, idx], 1e-8))
    gh <- qgamma(u, shape = pmax(alpha * Ph[i, idx], 1e-8))
    Pb[i, idx] <- gb / sum(gb)
    Ph[i, idx] <- gh / sum(gh)
  }
  list(b = Pb, h = Ph)
}
set.seed(seed)
paired <- map(seq_len(n_draws), \(d) {
  pr <- draw_pair(P_baseline_raw, P_hardened_raw, alpha_conc)
  tibble(draw = d, Stage = transient_names,
         uplift = summarise_draw(pr$h)$cont - summarise_draw(pr$b)$cont)
}) |>
  list_rbind() |>
  mutate(Stage = factor(Stage, levels = transient_names))

paired_summary <- paired |>
  summarise(med = median(uplift), lo = quantile(uplift, 0.05), hi = quantile(uplift, 0.95), .by = Stage) |>
  arrange(Stage)
Display code
paired_summary |>
  gt() |>
  tab_header(
    title = "Paired Containment Uplift, Improved Posture minus Baseline",
    subtitle = sprintf("Common random numbers across regimes; Dirichlet α = %d, %s draws", alpha_conc, format(n_draws, big.mark = ","))
  ) |>
  cols_label(Stage = "Starting stage", med = "Median uplift (pp)", lo = "5th pct (pp)", hi = "95th pct (pp)") |>
  fmt_number(columns = c(med, lo, hi), scale_by = 100, decimals = 1) |>
  tab_options(table.font.size = 11, heading.title.font.size = 13.5, heading.subtitle.font.size = 11)
Paired Containment Uplift, Improved Posture minus Baseline
Common random numbers across regimes; Dirichlet α = 50, 5,000 draws
Starting stage Median uplift (pp) 5th pct (pp) 95th pct (pp)
S1: Recon & Phishing 24.6 18.2 31.7
S2: Initial Foothold 31.5 24.6 38.4
S3: Privilege Escalation 40.0 33.5 45.6
S4: Lateral Movement 40.5 36.0 44.4
S5: Domain Dominance 36.9 33.0 40.8
S6: Payload Staging 26.4 21.0 31.3

How to read the table. Each row is a starting stage. The values show how many percentage points more attacks the improved posture contains than the baseline, across 5,000 reruns with randomly varied inputs. Both postures share the same random variation in each rerun, so the difference reflects the change in posture rather than noise. The median is the typical gain, and the 5th and 95th percentiles bound the middle 90% of results.

What the table tells you. The gain is large and clearly positive everywhere: from S1, a median of 24.6 pp, with 90% of reruns between 18.2 pp and 31.7 pp. It is largest for attacks starting at S4. Even so, both postures are hand-set scenarios, not measured controls, so this shows how much difference such a change in assumptions makes, not what a specific security investment would deliver.

The scenario effect has a meaningful interval. Drawing both regimes from the same random numbers (common random numbers through the gamma quantile function) isolates the scenario difference from parameter noise. The S1 containment uplift is 24.6 pp, with a 90% interval of 18.2 pp–31.7 pp. This is still a difference between two hand-set matrices, not a measured control effect.

Robustness of the One-Row Ranking

Display code
shift_cont_from_s1 <- function(P, i, delta = 0.05) {
  donor <- unname(which.max(replace(P[i, ], c(i, t_dim + 1), 0)))
  if (P[i, donor] < delta) return(NA_real_)
  P2 <- P
  P2[i, donor] <- P2[i, donor] - delta
  P2[i, t_dim + 1] <- P2[i, t_dim + 1] + delta
  outcomes_from_s1(P2)["cont"] - outcomes_from_s1(P)["cont"]
}
n_rank <- params$dirichlet$n_rank$value
set.seed(seed)
rank_draws <- map(seq_len(n_rank), \(d) {
  P <- draw_P(P_baseline_raw, alpha_conc)
  g <- map_dbl(seq_len(t_dim), \(i) shift_cont_from_s1(P, i, delta = shift_delta))
  tibble(draw = d, best = which.max(g), s2_beats_s1 = g[2] > g[1])
}) |> list_rbind()

best_row_share <- rank_draws |> count(best) |> mutate(share = n / sum(n))
p_best_s2 <- sum(best_row_share$share[best_row_share$best == 2])
p_best_s1 <- sum(best_row_share$share[best_row_share$best == 1])
p_s2_beats_s1 <- mean(rank_draws$s2_beats_s1, na.rm = TRUE)

The one-row ranking is not robust. Repeating the standardized 0.05 shift on 2,000 Dirichlet draws, the S2 row gives the largest containment gain from S1 in 61.9% of draws and the S1 row in 31.6%; S2 beats S1 in 65.7% of draws. The defensible statement is that the S1 and S2 rows carry the most leverage, not that one of them ranks first.

Simulation Check of the Closed-Form Solver

A short Monte Carlo run from S1 under the baseline matrix is a code-correctness check on \(B\), \(\mathbf{t}\), the conditional times to each outcome, and one cumulative-incidence point. Each simulated value must fall within four Monte Carlo standard errors of its closed-form counterpart.

Display code
simulate_walk <- function(P, start) {
  s <- start
  steps <- 0
  while (s <= t_dim) {
    s <- sample.int(ncol(P), 1, prob = P[s, ])
    steps <- steps + 1
  }
  c(outcome = s - t_dim, steps = steps)
}
n_sim <- params$simulation$n_sim$value
set.seed(seed)
sims <- map(seq_len(n_sim), \(k) simulate_walk(P_baseline_raw, 1)) |>
  map(\(v) tibble(outcome = v[["outcome"]], steps = v[["steps"]])) |>
  list_rbind() |>
  mutate(hours = steps * unname(step_hours[1]))

sim_props <- as.vector(prop.table(table(factor(sims$outcome, levels = 1:3))))
sim_check <- tibble(
  Quantity = c(absorbing_names, "Expected steps from S1",
               "E[hours | contained], from S1", "E[hours | catastrophic], from S1",
               "P(catastrophic within 24 h), from S1"),
  Closed_form = c(base_solution$B[1, ], base_solution$steps[1],
                  res$t_cont_b[1], res$t_cat_b[1], p_cat_by_24h),
  Simulated = c(sim_props, mean(sims$steps),
                mean(sims$hours[sims$outcome == 1]), mean(sims$hours[sims$outcome > 1]),
                mean(sims$outcome > 1 & sims$hours <= 24)),
  MC_SE = c(sqrt(base_solution$B[1, ] * (1 - base_solution$B[1, ]) / n_sim),
            sd(sims$steps) / sqrt(n_sim),
            sd(sims$hours[sims$outcome == 1]) / sqrt(sum(sims$outcome == 1)),
            sd(sims$hours[sims$outcome > 1]) / sqrt(sum(sims$outcome > 1)),
            sqrt(p_cat_by_24h * (1 - p_cat_by_24h) / n_sim))
)

# Each simulated value must lie within 4 Monte Carlo standard errors of the closed form
stopifnot(all(abs(sim_check$Closed_form - sim_check$Simulated) < 4 * sim_check$MC_SE))
Display code
sim_check |>
  gt() |>
  fmt_number(columns = c(Closed_form, Simulated, MC_SE), decimals = 3) |>
  cols_label(Closed_form = "Closed form",
             Simulated = sprintf("Monte Carlo (%s walks)", format(n_sim, big.mark = ",")),
             MC_SE = "Monte Carlo SE")
Quantity Closed form Monte Carlo (20,000 walks) Monte Carlo SE
A1: Contained / Terminated 0.725 0.723 0.003
A2: Data Exfiltration 0.130 0.130 0.002
A3: Enterprise Ransomware 0.145 0.146 0.002
Expected steps from S1 3.548 3.554 0.016
E[hours | contained], from S1 10.089 10.103 0.055
E[hours | catastrophic], from S1 25.010 24.967 0.066
P(catastrophic within 24 h), from S1 0.179 0.182 0.003

How to read the table. Each row compares a result calculated exactly by the model’s formulas with the same result estimated by simulating 20,000 individual attacks step by step. The first three rows are the chances of each final outcome, followed by the expected number of steps, the expected hours to each kind of outcome, and the chance of catastrophe within 24 hours. The last column gives the simulation’s expected margin of error.

What the table tells you. Every simulated value lies within four margins of error of the exact value, the pass mark for this check; the largest gap is 1.0 margins. That confirms the formulas are coded correctly. It is a check on the arithmetic only: the simulation uses the same assumed probabilities, so agreement says nothing about whether those probabilities are realistic. That question needs real incident data, discussed under limitations below.

Limitations and Future Work

The model’s structural assumptions are listed under Parameterization and Assumptions, and the sections above show how sensitive the results are to the elicited inputs. This section covers the data a richer, calibrated version would need.

Future work: real-world data sources

The current model uses none of the following sources. They describe network and identity topology, which tells a richer model which edges exist. They do not by themselves supply the transition probabilities or timing this model needs (see the calibration note after the table).

Network Telemetry & Flow Logs: Real connection edges and service dependencies come from VPC Flow Logs (AWS/Azure/GCP), Zeek/Corelight network analysis sensors, and NetFlow/IPFIX from core network routers and firewalls.

Service Dependency & Configuration Management Databases (CMDB): Service-to-service call maps are extracted from application performance monitoring tools (e.g., Datadog, Dynatrace), service mesh registries (e.g., Istio, Envoy), and enterprise CMDBs (e.g., ServiceNow).

Vulnerability Management & Posture Assessment Scanners: CVSS scores, exploit metrics, and missing patches are pulled via API from enterprise vulnerability scanners such as Tenable Nessus, Qualys, Rapid7 InsightVM, or cloud posture platforms (Wiz, Prisma Cloud).

Active Directory & Identity Access Graphs: Identity edges and lateral movement pathways are exported from tools like BloodHound Enterprise, Microsoft Entra ID, and Okta Access Graph logs.

Obtaining this type of accurate data at scale is not easy:

Display code
# 1. Recreate the dataset
data_ingestion_tbl <- tibble(
  ingestion_layer = c(
    "Network & Firewall Flows",
    "Vulnerability & Exploit Feeds",
    "Microservice & Service Topology",
    "Identity & Privilege Paths",
    "Data Normalization & Reconciliation"
  ),
  acquisition_difficulty = c(
    "Moderate",
    "Low to Moderate",
    "High",
    "Moderate to High",
    "High"
  ),
  key_operational_challenges = c(
    "Massive log volume and high egress costs; ephemeral cloud workloads and container IPs change constantly, requiring dynamic IP-to-asset mapping.",
    "Scanners provide standardized CVSS scores easily, but unauthenticated scans miss local software dependencies and internal configurations.",
    "Modern distributed applications have thousands of interdependent microservices; legacy CMDBs are frequently out-of-date and incomplete without automated runtime tracing.",
    "Multi-hop privilege escalation (nested Active Directory groups and delegated cloud IAM roles) requires specialized graph extraction agents.",
    "Correlating disparate naming conventions across cloud providers, on-prem active directories, and scanner hostnames into a single cohesive graph topology is the single most time-consuming engineering barrier."
  )
)

# 2. Build the gt table matching the dark theme and typography
gt_table <- data_ingestion_tbl |>
  gt() |>
  cols_label(
    ingestion_layer = "Ingestion Layer",
    acquisition_difficulty = "Acquisition Difficulty",
    key_operational_challenges = "Key Operational Challenges"
  ) |>
  tab_style(
    style = cell_text(weight = "bold", color = "#000000"),
    locations = list(
      cells_body(columns = c(ingestion_layer, acquisition_difficulty)),
      cells_column_labels(columns = everything())
    )
  ) |>
  tab_style(
    style = cell_text(weight = "normal", color = "#000000"),
    locations = cells_body(columns = key_operational_challenges)
  ) |>
  tab_style(
    style = cell_text(size = px(14), font = "system-ui"),
    locations = list(
      cells_body(columns = everything()),
      cells_column_labels(columns = everything())
    )
  ) |>
 tab_header(
    title = "Difficulty and Operational Challenges in Acquiring Accurate Data"
  ) |>
  tab_options(
    table.background.color = "#ffffff",
    column_labels.background.color = "#ffffff",
    column_labels.border.top.style = "none",
    column_labels.border.bottom.style = "none",
    table_body.border.top.style = "none",
    table_body.border.bottom.style = "none",
    table_body.hlines.style = "none",
    table_body.vlines.style = "none",
    data_row.padding = px(18),
    table.width = pct(100)
  )

# Display table
gt_table
Difficulty and Operational Challenges in Acquiring Accurate Data
Ingestion Layer Acquisition Difficulty Key Operational Challenges
Network & Firewall Flows Moderate Massive log volume and high egress costs; ephemeral cloud workloads and container IPs change constantly, requiring dynamic IP-to-asset mapping.
Vulnerability & Exploit Feeds Low to Moderate Scanners provide standardized CVSS scores easily, but unauthenticated scans miss local software dependencies and internal configurations.
Microservice & Service Topology High Modern distributed applications have thousands of interdependent microservices; legacy CMDBs are frequently out-of-date and incomplete without automated runtime tracing.
Identity & Privilege Paths Moderate to High Multi-hop privilege escalation (nested Active Directory groups and delegated cloud IAM roles) requires specialized graph extraction agents.
Data Normalization & Reconciliation High Correlating disparate naming conventions across cloud providers, on-prem active directories, and scanner hostnames into a single cohesive graph topology is the single most time-consuming engineering barrier.

How to read the table. Each row is one kind of data a real-world version of this model would need, from network traffic logs to identity and permission records. The middle column rates how hard that data is to collect, and the right column explains the main practical obstacles. The ratings are qualitative judgments, not measured scores. The table covers data for mapping which attack paths exist, not data on how likely each path is.

What the table tells you. Building an accurate map of a real network is a substantial engineering project in its own right. Service dependencies and reconciling names across systems are rated hardest, because records are incomplete and constantly changing. Even with all of this data in hand, the model would still need timestamped incident histories to estimate how likely and how fast each move is, as the calibration notes below explain.

Calibration Data and Survival-Analysis Pitfalls

The parameters of this model are stage-transition probabilities and stage durations. Estimating them requires timestamped transitions rather than topology:

  • Internal incident-response timelines and EDR or SIEM alert timestamps mapped to MITRE ATT&CK tactics.
  • Purple-team and breach-and-attack-simulation results (time to detect per technique).
  • The VERIS Community Database, whose timeline fields record initial compromise, exfiltration, discovery, and containment in coarse units (VERIS Framework).
  • Public benchmarks as priors: M-Trends, the Sophos Active Adversary Report, and CrowdStrike breakout times.

Fitting these data raises standard survival-analysis issues:

  • Right censoring: incidents still open at data extraction.
  • Interval censoring: stage entry is known only to a window, or to a unit such as “days.”
  • Left truncation and detection-dependent selection: only detected intrusions are recorded.
  • Competing risks: containment censors progression, so naive Kaplan–Meier estimates of time to catastrophe are biased, and Aalen–Johansen estimators are appropriate.
  • Unobserved heterogeneity: attacker types differ, for example fast eCrime affiliates versus slow espionage actors.

Multi-state packages such as msm, mstate, and flexsurv handle these directly.