Lesson map
Lesson 02 published. Map, example, EX008.
flowchart TD
N0["Learning outcomes"]
N1["2.1 How detection works"]
N2["Lab — The base-rate problem"]
N3["2.2 Reading the base rates"]
N4["2.3 Triage in practice"]
N5["Flow records as a second view"]
N6["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6
N6 --> EX["Worked example"]
EX --> Q["Exercise EX008"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["2.1 How detection works"]
N2["Lab — The base-rate problem"]
N3["2.2 Reading the base rates"]
N4["2.3 Triage in practice"]
N5["Flow records as a second view"]
N6["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> Q["EX008"]
[Learning outcomes]
|
v
[2.1 How detection works]
|
v
[Lab — The base-rate problem]
|
v
[2.2 Reading the base rates]
|
v
[2.3 Triage in practice]
|
v
[Flow records as a second view]
|
v
[Synthesis]
|
v
[Worked example] --> [Exercise EX008]
Learning outcomes
You will (1) explain how network intrusion detection works; (2) analyse the base-rate problem; (3) discuss alert triage practice.
2.1 How detection works
Network intrusion detection systems inspect traffic or flow records and raise alerts when patterns match signatures or deviate from expected behaviour. NIST SP 800-94 distinguishes signature-based, anomaly-based and stateful protocol analysis methods. Signatures are precise for known patterns but miss novel ones; anomaly methods can find new patterns but produce more false alarms. Paxson's Bro, now Zeek, emphasised policy scripts that describe what the operator cares about, a philosophy that fits Amara's tuning focus.
For Amara, the practical consequence is that each rule's false alarms on Corvane's traffic must be measured rather than assumed from its description.
Understanding this explains why tuning matters.
Lab — The base-rate problem
"""Precision of an alert rule at different base rates (Axelsson's point), synthetic numbers (stdlib only)."""
tpr, fpr, events = 0.95, 0.01, 1_000_000
for prev in (0.1, 0.01, 0.001, 0.0001):
tp = tpr * prev * events; fp = fpr * (1 - prev) * events
print(f"base rate {prev:<7} true alerts {tp:9.0f} false alerts {fp:8.0f} precision {tp/(tp+fp):.3f}")
Run with python3 lab_baserate.py. Verified output:
base rate 0.1 true alerts 95000 false alerts 9000 precision 0.913
base rate 0.01 true alerts 9500 false alerts 9900 precision 0.490
base rate 0.001 true alerts 950 false alerts 9990 precision 0.087
base rate 0.0001 true alerts 95 false alerts 9999 precision 0.009
2.2 Reading the base rates
With a rule that detects 95 percent of malicious events and falsely alerts on only 1 percent of benign events, precision is 0.913 when one event in ten is malicious, but only 0.009 when one in ten thousand is. Axelsson (2000) made exactly this point: in real networks malicious events are rare, so even a good detector produces mostly false alarms. Tuning that lowers the false positive rate on benign traffic therefore matters more than small gains in detection rate.
At one malicious event in ten thousand, the rule raises roughly a hundred false alerts for every true one.
2.3 Triage in practice
In seminar, Amara compares triage practices from published guidance and partner interviews. Effective teams group related alerts, enrich them with asset and owner information, and document why alerts are closed. Weak practice closes alerts without notes, which loses the information needed to tune rules. She notes that closure notes are also her best source of labels, linking triage quality to research quality.
Triage means deciding quickly which alerts need investigation. Analysts check the rule, the hosts involved and recent context, then close, escalate or investigate. Time pressure makes bulk closing tempting, which is the behaviour Amara's study aims to reduce.
Flow records as a second view
Signatures inspect packet content, but much of Corvane's traffic is encrypted with TLS, which hides payloads from the sensors. Flow records, standardised as IPFIX in RFC 7011, summarise each connection by addresses, ports, timing and byte counts without content. Amara notes that flow data remain useful when payloads are encrypted, for example to see that a backup server transfers large volumes at night, and that this context helps judge alerts. It also protects privacy better than full packet capture, since it records who talked to whom rather than what was said.
Worked example
Amara presents the base-rate table and shows that Corvane's estimated prevalence puts them close to the 0.001 row, explaining why analysts see mostly false alerts.
Synthetic case. Rates are synthetic.
Errors and limits
Quoting a detector's accuracy without the base rate misleads decision makers.
Exercises
- EX008 — Detection methods. Contrast signature and anomaly detection in two sentences.
Show marking criteria
Rubric: 3 = strengths and weaknesses of both;; 2 = definitions;; 1 = vague;; 0 = none. - EX009 — Precision collapse. Using the lab, state precision at base rates 0.01 and 0.0001.
Show marking criteria
Rubric: 3 = 0.490 and 0.009;; 2 = one;; 1 = vague;; 0 = none. - EX010 — Tuning priority. Why does lowering false positive rate matter more than raising detection rate here?
Show marking criteria
Rubric: 3 = base rate effect;; 2 = noise;; 1 = vague;; 0 = none. - EX011 — Closure notes. Why are closure notes valuable for research?
Show marking criteria
Rubric: 3 = source of labels and tuning info;; 2 = records;; 1 = vague;; 0 = none. - EX012 — Enrichment. How does asset enrichment help triage?
Show marking criteria
Rubric: 3 = context on importance and owner;; 2 = context;; 1 = vague;; 0 = none. - EX013 — Policy philosophy. What did Bro's design emphasise?
Show marking criteria
Rubric: 3 = operator-defined policy scripts;; 2 = policy;; 1 = vague;; 0 = none. - EX014 — Prevalence estimate. Why does Corvane's prevalence near 0.001 explain analyst experience?
Show marking criteria
Rubric: 3 = precision about 0.09;; 2 = mostly false;; 1 = vague;; 0 = none.
Synthesis
Low base rates make false positive control the central problem of alert quality.
Continue studying — chapter 02 of 08
← Chapter 01 (draft) · Course chapter index · Chapter 03 (draft) →