Problemintro
Intrusion detection
Also called intrusion detection problem.
Decide from audit logs, system calls or network traffic which events are attacks, with few missed attacks and few false alarms.
Intrusion detection is the problem of finding, in a record of activity on a computer system or a network, the events that belong to an attack. The record can be an audit log, a sequence of system calls or a stream of packets. A detector reads the record and raises alarms. It can make two errors: an alarm on harmless activity (a false alarm) and silence during an attack (a miss), so the problem is a statistical decision problem with a cost for each error. Anderson (1980) proposed to search audit trails for penetrators, and Denning (1987) gave the first general model. The two classic approaches are misuse detection, which matches known attack patterns, and anomaly detection, which flags departures from normal behavior. This page is about detection: it describes what defenders observe and decide, not how to attack.
In plain words
A computer or a network keeps a diary of what happens: who logged in, which files were opened, which machines talked to which. Somewhere in that diary there may be an intruder. The task is to point at the entries that belong to the intruder.
There are two ways to fail. You can point at an honest user, which is a false alarm. Or you can miss the intruder. Pointing at everything never misses but is useless. Pointing at nothing never raises a false alarm and is also useless.
The hard part is that intruders are rare. If one entry in a hundred thousand is bad, even a detector that is almost always right about honest entries can bury the real alarms under false ones. A good detector must be right about honest activity far more often than it seems at first.
Definition
Events and truth. The input is a sequence of events from a set , such as audit records or packets. A security policy defines which events are intrusive: in the simplest form a label , and in a more general form a set of bad sequences, so that is intrusive when some suffix of that ends at completes a pattern in . The labels are not part of the input.
Detector. An online detector is a family of functions , where raises an alarm on . An offline detector sees the whole sequence first.
Measures. Under a probability model of the events, the detection rate is , the false alarm rate is , and the Bayesian detection rate is . A detector with a threshold traces a curve of pairs, its ROC curve. Other measures are the delay from the start of an attack to the first alarm and the cost of processing per event.
Goal. For a given limit on the false alarm rate, or on the cost of the alarms, maximize the detection rate, and raise the alarm as early as possible. With known distributions of benign and intrusive events, this is a hypothesis test. In practice the intrusive distribution is unknown and chosen by an adversary, so the goal is stated against a set of attacks or measured on data.
Variants
- By the source of the data. Host based detectors read audit logs, system calls or file changes of one machine. Network based detectors read packets or flows at a point of the network. Debar, Dacier and Wespi (1999) use the audit source as one axis of their taxonomy.
- By the method. Misuse detection (knowledge based) matches the events against descriptions of known attacks. Anomaly detection (behavior based) learns a model of normal behavior and flags departures, and is the anomaly detection problem applied to security data. Specification based detection flags events that violate a written specification of correct behavior of a program.
- By the unit. A decision can be per event, per session, per source address or per host. Scan detection decides per remote source. Worm detection decides per content string.
- By the response. A detection system reports alarms to a person. An intrusion prevention system also blocks the traffic or stops the process, which makes a false alarm a denial of service.
- Real time or after the fact. An online detector must decide with a bounded delay and bounded memory per event. A forensic analysis reads a stored log.
Examples
Rare attacks. Take a site that writes 1,000,000 audit records per day and has 2 intrusions per day with 10 records each, so a fraction of the records is intrusive. These numbers are hypothetical and follow the style of Axelsson (2000). By Bayes' rule,
| detection rate | false alarm rate | share of alarms that are real |
|---|---|---|
| 1.0 | 0.66667 | |
| 0.7 | 0.58334 | |
| 1.0 | 0.16667 | |
| 0.7 | 0.12281 |
A false alarm rate of one in ten thousand, which sounds small, makes more than 5 of each 6 alarms false. This is the base-rate fallacy.
Port scans. A remote source tries many local addresses, and many attempts fail. A detector per source decides from the outcomes of its first contacts, as in threshold random walk.
Password guessing. Denning's example profile counts the failed passwords of a user per session and flags a count far above the usual one.
Worm outbreaks. The same content string appears in many packets between many different sources and destinations, which content prevalence detection finds.
Known algorithms
- Statistical profiles. The Denning model keeps per subject statistics, such as a mean and a standard deviation, and flags values outside a confidence interval.
- Signature matching. Misuse detection matches packets or records against a set of patterns, with multiple-pattern string matching such as Aho-Corasick, or with state machines for multi-step attacks.
- Sequential tests. Threshold random walk runs a sequential probability ratio test per source.
- Streaming counts. Content sifting counts substrings and their address dispersion with small memory.
- Sequences of system calls. System call sequence detection compares short windows of calls of a program with those of its normal runs.
- Payload models. Payload anomaly detection compares the byte distribution of a packet with that of normal traffic to the same service.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Content prevalence worm detection | O(n s) worst · average | O(s q + a) extra | deterministicno false negatives from filteronlineiterative | 1 language |
| Threshold random walk scan detection | O(n log n) worst | O(d) extra | deterministicexact error boundsonlineiterative | 1 language |
Bounds
Base rate (theorem). By the formula above, holds if and only if . So when intrusive events are a fraction of all events, the false alarm rate must be of the order of or smaller for most alarms to be real. This bound holds for every detector.
Overlap (theorem). If benign and intrusive events have distributions and , then every detector has , where is the total variation distance. An attack that looks like normal use cannot be detected from the same observations. The proof is on the anomaly detection page.
Sequential tests (theorem). For independent observations with two known distributions, Wald's sequential test reaches given error rates with the smallest expected number of observations among all tests with those error rates. This bounds how fast a per source decision can be made.
Undecidability (theorem). If the policy speaks about what a program will do, detection from the program text is undecidable in general, as the undecidability of virus detection shows. A detector that watches the events as they happen avoids this, but then it can only react.
Reductions
- To hypothesis testing. With models of benign and intrusive events, each decision is a test, and the best test at a given false alarm rate is the likelihood ratio test.
- To pattern matching. Misuse detection with a fixed set of byte patterns reduces to multiple-pattern string matching on each packet or on each reassembled stream.
- To anomaly detection. Without a model of attacks, the problem becomes the anomaly detection problem on features of the events.
- To classification. With labeled examples of both kinds, it becomes supervised classification, with the caveat that attacks in the training set may not resemble future attacks.
Applications
Host and network intrusion detection systems use these methods to alert operators. Network monitors such as Bro (now Zeek) and Snort run signature and protocol analyses at the edge of a site. Intrusion prevention systems put a detector in the path of the traffic. Security operations centers correlate alarms from many detectors, and attack graphs help to relate alarms to the paths an attacker could take. Sommer and Paxson (2010) list why learned detectors are rare in operation: errors are costly, normal traffic is diverse and changes over time, and data for evaluation are hard to get.
References
- James P. Anderson, Computer security threat monitoring and surveillance, technical report, James P. Anderson Company, Fort Washington, Pennsylvania, 1980, the use of audit trails to find penetrators, and the classes of external penetrators, internal penetrators and misfeasors
- Dorothy E. Denning, An intrusion-detection model, IEEE Transactions on Software Engineering 13(2), 1987, pages 222 to 232, the hypothesis that security violations show as abnormal use, and the model of subjects, objects, audit records and profiles
- Herve Debar, Marc Dacier and Andreas Wespi, Towards a taxonomy of intrusion-detection systems, Computer Networks 31(8), 1999, pages 805 to 822, the taxonomy by detection method (behavior based and knowledge based), audit source, behavior on detection and usage frequency, and the measures of accuracy, performance and completeness
- Stefan Axelsson, The base-rate fallacy and the difficulty of intrusion detection, ACM Transactions on Information and System Security 3(3), 2000, pages 186 to 205, the Bayesian detection rate and the false alarm rate it requires when intrusions are rare
- Robin Sommer and Vern Paxson, Outside the closed world, on using machine learning for network intrusion detection, IEEE Symposium on Security and Privacy 2010, pages 305 to 316, the challenges of the high cost of errors, the diversity of traffic and the difficulty of evaluation
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 3MS5SP Edit this page History Report an error Markdown