---
title: "ATLAS Threshold Detection Rules Analysis"
subtitle: "Calibrating detection-rule thresholds with miss rates, false-positive rates and stated costs"
author: "Patrick Lefler"
date: "2026-07-16"
---
```{r load}
#| include: false
source("R/setup.R")
source("R/atlas.R")
source("R/analysis.R")
bf <- res[["Brute Force Login"]]
lat <- res[["Lateral Movement"]]
exf <- res[["Data Exfiltration"]]
lat_eer <- proj[["Lateral Movement.EER"]]
bf_eer <- proj[["Brute Force Login.EER"]]
```
## Introduction
A detection rule's alert threshold sets two errors at once: how many real attacks the rule misses, and how many benign events it flags. This project uses ATLAS, the Alert Threshold Lifecycle Assessment System from Mattei, *Data-Driven Cybersecurity* (Manning, 2025), Ch. 8.4–8.5, to review three rules: Brute Force Login, Lateral Movement and Data Exfiltration. ATLAS here refers to the Alert Threshold Lifecycle Assessment System (Mattei, Ch. 8.4), not MITRE ATLAS (Adversarial Threat Landscape for AI Systems).
**Approach.** For each rule, the confusion matrix at the current threshold gives the miss rate (FRR), the false-positive rate (FAR) and precision, each with a 95% confidence interval. An equal-variance Gaussian model, anchored to that one observed point, gives the Equal Error Rate (EER) and d′, a measure of how well the rule separates threats from benign events. Two decision rules then recommend an action. The **EER-based** rule is the original ATLAS reading: move the threshold until FRR equals FAR. The **cost-weighted** rule moves the threshold to the point of lowest expected cost, given a stated, per-rule ratio between the cost of a missed threat and the cost of a false alarm. Each recommendation is re-run on `r comma(params$bootstrap_draws)` resamples of the counts, to see whether it survives sampling noise.
**Headline results, in this illustrative dataset:**
- **Lateral Movement** misses `r pct(lat$frr)` of threats (95% CI `r pct(lat$frr_lo)`–`r pct(lat$frr_hi)`), against a false-positive rate of `r pct(lat$far)`. Both decision rules say `r lat$cost_action`, in `r pct(lat$cost_conf, 1)` of resamples. It is the only rule whose recommendation is robust under both decision rules. Moving to the EER would catch about `r number(lat_eer$delta_tp, 1)` more threats per `r rules$window_days[rules$rule_name == "Lateral Movement"]`-day window, at the price of about `r number(lat_eer$delta_fp, 1)` more false alarms (precision falls from `r pct(lat$precision)` to `r pct(lat_eer$precision_new)`).
- **Brute Force Login** already sits close to its EER: moving there would `r if_else(bf_eer$delta_fp < 0, "cut", "raise")` false positives by only `r pct(abs(bf_eer$delta_fp) / bf$fp, 1)`. The EER-based `r bf$eer_action` is reproduced in `r pct(bf$eer_conf, 1)` of resamples. The rule's real problem is weak separability (d′ = `r number(bf$d_prime, 0.01)`), so the cost-weighted result is **`r bf$cost_label`**: better features, not a new threshold.
- **Data Exfiltration** sits at its EER (FRR and FAR both `r pct(exf$frr)`), but the EER-based `r exf$eer_action` is reproduced in `r pct(exf$eer_conf, 1)` of resamples. Holding at the EER implicitly prices a miss at `r number(exf$eer_implied_cost_ratio, 1)` false alarms. At the stated `r exf$cost_ratio`:1 ratio for this highest-consequence rule, the cost-weighted result is **`r exf$cost_label`**.
- **Prevalence flatters the queues.** Threats are `r pct(bf$prevalence, 1)` of events here. At a more realistic 0.1%, Brute Force Login's precision would fall from `r pct(bf$precision)` to `r pct(precision_at_prevalence(bf$frr, bf$far, 0.001))`.
The wider point is for leadership: choosing the EER is itself a cost decision. Every threshold encodes a risk appetite, and this analysis makes that choice explicit. See [For Leaders](leadership.qmd).
::: {.callout-warning icon=false}
## Illustrative data
The counts are constructed for teaching and do not come from a production SOC. Each rule uses `r comma(bf$n_threat + bf$n_benign)` events and `r bf$n_threat` threats (`r pct(bf$prevalence, 1)` prevalence). The cost ratios are illustrative too. Read the results as a worked example of the method, not as findings about any real environment.
:::
::: {.callout-note icon=false}
## ATLAS methodology
ATLAS is an 8-step cyclical process: Select → Define → Categorize → Collect → Analyze → Implement → Measure → Report. Rules are selected for review, success criteria are defined, incoming events are categorized against ground truth, and data are collected over a fixed observation window before analysis begins. This report covers the **Analyze** step and produces **Implement** recommendations: it computes the error rates from the collected confusion matrix and translates them into a threshold action for each rule. Re-running after a threshold change closes the **Measure** loop, and the resulting change feeds the next **Report** step, which makes the calibration history auditable.
:::
## Results at a glance
```{r}
#| label: tbl-headline
#| tbl-cap: "Current error rates and recommended action for each detection rule"
results |>
transmute(
rule,
frr = pct(frr), far = pct(far), precision = pct(precision),
eer_action = action_cell(eer_action, eer_label),
cost_action = action_cell(cost_action, cost_label)
) |>
kable_house(
col.names = c("Detection rule", "Miss rate (FRR)", "False-positive rate (FAR)",
"Precision", "EER-based action", "Cost-weighted action"),
escape = FALSE
)
```
**How to read the table.** Each row is one detection rule. The first two figures are its error rates today: the share of real threats it misses, and the share of harmless events it wrongly flags. Precision is the share of its alerts that turn out to be real threats. The last two columns give the recommended action under each of the two decision methods; "low confidence" means the answer did not hold up when the data were resampled.
**What the table tells you.** Lateral Movement is the clear priority. It misses `r pct(lat$frr)` of real threats, and both methods say `r lat$cost_action` (lower the threshold), an answer that held in `r pct(lat$cost_conf, 1)` of resamples. For the other two rules the methods disagree. Brute Force Login needs better detection logic more than a new setting. Data Exfiltration should become more sensitive once a missed data theft is priced at `r exf$cost_ratio` false alarms. All figures are illustrative.
## How this site is organized
- [Methodology](methodology.qmd): definitions, the calibration model, and the two decision rules.
- [Rule Analysis](rules.qmd): the input data, a calibration chart and discussion for each rule, and the projected workload change.
- [Summary & Robustness](robustness.qmd): all metrics with confidence intervals, the resampling check, prevalence sensitivity and interpretation notes.
- [For Leaders](leadership.qmd): why threshold calibration is a risk-appetite and audit question.
- [Reproducibility](reproducibility.qmd): how to rebuild the site, the parameters, and the [known limitations](reproducibility.qmd#sec-limitations).