24
Fast Portscan Detection Using Sequential Hypothesis Testing Authors: Jaeyeon Jung, Vern Paxson, Arthur W. Berger, and Hari Balakrishnan Publication: IEEE Symposium on Security and Privacy 2004 Presenter: Ryan Cunningham

Fast Portscan Detection Using Sequential Hypothesis Testing

Embed Size (px)

DESCRIPTION

Fast Portscan Detection Using Sequential Hypothesis Testing. Authors : Jaeyeon Jung, Vern Paxson, Arthur W. Berger, and Hari Balakrishnan Publication : IEEE Symposium on Security and Privacy 2004 Presenter :Ryan Cunningham. A quick note. - PowerPoint PPT Presentation

Citation preview

Page 1: Fast Portscan Detection Using Sequential Hypothesis Testing

Fast Portscan Detection Using Sequential Hypothesis Testing

Authors: Jaeyeon Jung, Vern Paxson, Arthur W. Berger, and Hari Balakrishnan

Publication: IEEE Symposium on Security and Privacy 2004

Presenter: Ryan Cunningham

Page 2: Fast Portscan Detection Using Sequential Hypothesis Testing

A quick note

All images and equations taken directly from the publication

Page 3: Fast Portscan Detection Using Sequential Hypothesis Testing

Port scanning

Network reconnaissance technique Usually a prelude to an attack Difficult to detect

Traffic difficult to distinguish from regular traffic Stealth scans can occur very slowly Some scans are legitimate

Search engine spiders SSH, peer-to-peer applications, etc.

Page 4: Fast Portscan Detection Using Sequential Hypothesis Testing

Previous detection techniques Limit distinct connection attempts from one IP

Network Security Monitor Snort

Also detects malformed packets

Limit failed connection attempts from one IP Bro

Sensitive to service on specific port Robertson et al. showed threshold very important

Page 5: Fast Portscan Detection Using Sequential Hypothesis Testing

Previous detection techniques Probabilistic model

Developed by Leckie et al. Assesses typical traffic a machine receives Also assesses the traffic a remote machine is

likely to send Combines these probabilities

If the result is too much, an alert is sounded Generates too many false positives

Page 6: Fast Portscan Detection Using Sequential Hypothesis Testing

Previous detection techniques SPICE

Similar to probabilistic model Used to detect low traffic “stealth” scans Too computationally intensive for real world

Page 7: Fast Portscan Detection Using Sequential Hypothesis Testing

Data set

Traffic from two sites LBL

6,000 hosts Sparse address space 4.4%

ICSI 200 hosts Dense address space 42%

Page 8: Fast Portscan Detection Using Sequential Hypothesis Testing

Data set

Anonymized TCP logs from Bro Recorded for one 24 hour period Bro NIDS flags for comparison and validation

Page 9: Fast Portscan Detection Using Sequential Hypothesis Testing

Data set

Unsuccessful Login attempt analysis

Page 10: Fast Portscan Detection Using Sequential Hypothesis Testing

Data set

Ratio of successful login attempts to unsuccessful login attempt analysis

Page 11: Fast Portscan Detection Using Sequential Hypothesis Testing

Observations

Scans usually come from one host Scans make lots of failed connection

attempts and few successful connection attempts

Scans should ideally be detected quickly False positive rate should be configurable

Page 12: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing Proposed by Wald in the 1940’s Method of doing repeated hypothesis testing

as sequential data is gathered Deciding between two hypotheses Each time a data point arrives, decide

Accept H0 (in our case, benign traffic)

Accept H1 (in our case, port scan traffic) Wait for more data (next connection attempt)

Page 13: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing We specify parameters and

> false positive rate < detection accuracy

We must estimate parameters and

probability a benign connection attempt is successful

probability a scanner connection attempt is successful

Page 14: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing For each test, we compute the likelihood ratio:

Where

Page 15: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing Compare likelihood ratio to:

If < then this is benign traffic

> then this is scan traffic Otherwise, wait for another connection

Page 16: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing We can estimate the expected number of

connections required to decide with:

Derivation is long and messy

Page 17: Fast Portscan Detection Using Sequential Hypothesis Testing

Sequential Hypothesis Testing

Page 18: Fast Portscan Detection Using Sequential Hypothesis Testing

Algorithm

Page 19: Fast Portscan Detection Using Sequential Hypothesis Testing

Results

Efficiency =true positive / total reported positive

Effectiveness =true positive / total actually positive

Page 20: Fast Portscan Detection Using Sequential Hypothesis Testing

Results

Comparison with Snort and Bro N bar = average number of local hosts scanned

before decision is made

Page 21: Fast Portscan Detection Using Sequential Hypothesis Testing

Contributions

Extremely fast port scan detection algorithm High accuracy Low false positive rate Sound statistical foundation Soundly evaluate the weaknesses of their

approach Good use of appendixes Cure for insomnia

Page 22: Fast Portscan Detection Using Sequential Hypothesis Testing

Weaknesses

Buffer of activity Attacker can spoof multiple IP addresses

How is filled buffer dealt with? Flush buffer

Attacker can use this to hide scan activity Maintain larger buffer

Attacker can keep going until system crashes

Distributed port scans undetectable Botnets are increasing in popularity

Page 23: Fast Portscan Detection Using Sequential Hypothesis Testing

Weaknesses

Test assumes independent connection attempts As suggested in paper, an attacker could exploit

knowledge of the system to connect to some systems while doing surveillance on others

No real time testing conducted, only simulation

Reasoning is a little circular Poor use of language

Page 24: Fast Portscan Detection Using Sequential Hypothesis Testing

Improvements

Implement and test in real time Perform suggested improvements in paper

Differentiate between different services Differentiate between rejected and unanswered

connection attempts Use a honeypot to see if complete three way hand

shake is completed (to detect spoofed IPs) Should have kept some of the data away as a

sort of test data set