62
Data Mining Approaches for Intrusion Detection Wenke Lee and Salvatore J. Stolfo Computer Science Department Columbia University

Data Mining Approaches for Intrusion Detection

  • Upload
    egan

  • View
    58

  • Download
    2

Embed Size (px)

DESCRIPTION

Data Mining Approaches for Intrusion Detection. Wenke Lee and Salvatore J. Stolfo Computer Science Department Columbia University. Overview. Intrusion detection and computer security Current intrusion detection approaches Our proposed approach Data mining - PowerPoint PPT Presentation

Citation preview

Page 1: Data Mining Approaches for Intrusion Detection

Data Mining Approaches for Intrusion Detection

Wenke Lee and Salvatore J. Stolfo

Computer Science DepartmentColumbia University

Page 2: Data Mining Approaches for Intrusion Detection

Overview• Intrusion detection and computer security• Current intrusion detection approaches• Our proposed approach• Data mining• Classification models for intrusion detection• Mining patterns from audit data• System architecture• Current status• Research plans

Page 3: Data Mining Approaches for Intrusion Detection

Overview• Current intrusion detection approaches and

problems• Our proposed approach• Data mining• Classification models for intrusion detection• Mining patterns from audit data• System architecture• Current status• Research plans

Page 4: Data Mining Approaches for Intrusion Detection

Intrusion Detection and Computer Security

• Computer security goals: confidentiality, integrity, and availability

• Intrusion is a set of actions aimed to compromise these security goals

• Intrusion prevention (authentication, encryption, etc.) alone is not sufficient

• Intrusion detection is needed

Page 5: Data Mining Approaches for Intrusion Detection

Intrusion Detection

• Primary assumption: user and program activities can be monitored and modeled

• Key elements:– Resources to be protected– Models of the “normal” or “legitimate”

behavior on the resources– Efficient methods that compare real-time

activities against the models and report probably “intrusive” activities.

Page 6: Data Mining Approaches for Intrusion Detection

InductiveLearning Engine

Audit Data Preprocessor

Audit Records

Activity Data

Detection Models

Decision Table

(Base) Detection Engine

Rules

Evidence

(Meta) Detection Engine

Evidence from Other Agents

Final Assertion

Decision EngineAction/Report

Learning Agent

Base Detection Agent

Meta Detection Agent

Page 7: Data Mining Approaches for Intrusion Detection

10:35:41.5 128.59.23.34.30 > 113.22.14.65.80 : . 512:1024(512) ack 1 win 921610:35:41.5 102.20.57.15.20 > 128.59.12.49.3241: . ack 1073 win 1638410:35:41.6 128.59.25.14.2623 > 115.35.32.89.21: . ack 2650 win 16225

tcpdumptime dur src dst bytes srv …10:35:41 1.2 A B 42 http …

10:35:41 0.5 C D 22 user …

10:35:41 10.2 E F 1036 ftp …

… … … … … ... …

Connection Records

Profileexecve(“/usr/ucb/finger”, …open(“/dev/zero …mmap(…...

truss

execveopenmmap...

System callSequence

Profile

Learning

Learning

Page 8: Data Mining Approaches for Intrusion Detection

Intrusion Detection

• Two categories of techniques:– Misuse detection: use patterns of well-known

attacks to identify intrusions– Anomaly detection: use deviation from normal

usage patterns to identify intrusions

Page 9: Data Mining Approaches for Intrusion Detection

Current Intrusion Detection Approaches

• Misuse detection:– Record the specific patterns of intrusions– Monitor current audit trails (event sequences)

and pattern matching– Report the matched events as intrusions– Representation models: expert rules, Colored

Petri Net, and state transition diagrams

Page 10: Data Mining Approaches for Intrusion Detection

Current Intrusion Detection Approaches

• Anomaly detection:– Establishing the normal behavior profiles– Observing and comparing current activities

with the (normal) profiles– Reporting significant deviations as intrusions– Statistical measures as behavior profiles:

ordinal and categorical (binary and linear)

Page 11: Data Mining Approaches for Intrusion Detection

Current Intrusion Detection Approaches

• Main problems: manual and ad-hoc– Misuse detection:

• Known intrusion patterns have to be hand-coded• Unable to detect any new intrusions (that have no

matched patterns recorded in the system)– Anomaly detection:

• Selecting the right set of system features to be measured is ad hoc and based on experience

• Unable to capture sequential interrelation between events

Page 12: Data Mining Approaches for Intrusion Detection

Our Proposed Approach

• A systematic framework to:– Build good models:

• select appropriate features of audit data to build intrusion detection models

– Build better models:• architect a hierarchical detector system that combines

multiple detection models– Build updated models:

• dynamically update and deploy new detection system as needed

Page 13: Data Mining Approaches for Intrusion Detection

Our Proposed Approach

• Support for the feature selection and model construction process:– Apply data mining algorithms to find consistent

inter- and intra- audit record (event) patterns– Use the features and time windows in the

discovered patterns to build detection models– A support environment to semi-automate this

process

Page 14: Data Mining Approaches for Intrusion Detection

Our Proposed Approach

• Combining multiple detection models:– Each (base) detector model monitors one aspect

of the system– They can employ different techniques and be

independent of each other– The learned (meta) detector combines evidence

from a number of base detectors

Page 15: Data Mining Approaches for Intrusion Detection

Our Proposed Approach

• An intelligent agent-based architecture:– learning agents: continuously compute (learn)

the detection models– detection agents: use the (updated) models to

detect intrusions

Page 16: Data Mining Approaches for Intrusion Detection

Data Mining

• KDD (Knowledge Discovery in Database):– The process of identifying valid, useful and

understandable patterns in data– Steps: understanding the application domain,

data preparation, data mining, interpretation, and utilizing the discovered knowledge

– Data mining: applying specific algorithms to extract patterns from data

Page 17: Data Mining Approaches for Intrusion Detection

Data Mining

• Relevant data mining algorithms:– Classification: maps a data item into one of

several pre-defined categories– Link analysis: determines relations between

fields in the database– Sequence analysis: models sequence patterns

Page 18: Data Mining Approaches for Intrusion Detection

Data Mining

• Why is it applicable to intrusion detection?– Normal and intrusive activities leave evidence

in audit data– From the data-centric point view, intrusion

detection is a data analysis process– Successful applications in related domains, e.g.,

fraud detection, fault/alarm management

Page 19: Data Mining Approaches for Intrusion Detection

Building Classifiers for Intrusion Detection

• Experiments in constructing classification models for anomaly detection

• Two experiments:– sendmail system call data– network tcpdump data

• Use meta classifier to combine multiple classification models

Page 20: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• The data: sequence of system calls made by sendmail.

• Classification models (rules): describe the “normal” patterns of the system call sequences.

• The rule set is the normal profile of sendmail• Detection: calculate the deviation from the profile

– large number/high scores of “violations” to the rules in a new trace suggests an exploit

Page 21: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• The sendmail data:– Each trace has two columns: the process ids

and the system call numbers– Normal traces: sendmail and sendmail daemon– Abnormal traces: sunsendmailcap, syslog-

remote, syslog-remote, decode, sm5x and sm56a attacks.

Page 22: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• Data preprocessing:– Use sliding window to create sequence of

consecutive system calls– Label the sequences to create training data:

sequences (length 7) class labels

4 2 66 66 4 138 66 “normal”

5 5 5 4 59 105 104 “abnormal”

… …

Page 23: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• Experiment 1 - learning patterns of normal sequences:– Each record: n consecutive system calls plus a

class label, “normal” or “abnormal”– Training data: sequences from 80% of the

normal traces plus some of the attack traces– Testing data: traces not used in training– Use RIPPER to learn specific rules for the

minority classes

Page 24: Data Mining Approaches for Intrusion Detection

sendmail Experiment 1

• Examples of output RIPPER rules:– if the 2nd system call is vtimes and the 7th is

vtrace, then the sequence is “normal” – if the 6th system call is lseek and the 7th is

sigvec, then the sequence is “normal”– …– if none of the above, then the sequence is

“abnormal”

Page 25: Data Mining Approaches for Intrusion Detection

sendmail Experiment 1

• Using the learned rules to analyze a new trace:– label all sequences according to the rules– define a region as l consecutive sequences– define a “abnormal” region as having more

“abnormal” sequences than normal ones– calculate the percentage of “abnormal” regions– the trace is “abnormal” if the percentage is above

a threshold

Page 26: Data Mining Approaches for Intrusion Detection

sendmail Experiment 1• Hypothesis: need specific rules of “normal”

sequences to detect “unknown/new” intrusions

• Some results using various normal v.s. abnormal distributions:– Experiment A: 46% normal, length 11– Experiment B: 46% normal, length 7– Experiment C: 54% normal, length 11– Experiment D: 54% normal, length 7

Page 27: Data Mining Approaches for Intrusion Detection

sendmail Experiment 1• All 4 experiments:

– Training data includes sequences from intrusion traces in Bold and Italic, and sequences from 80% of the normal sendmail traces

– Percentage of abnormal “regions” of each trace (showed in the table) is used as the intrusion indicator

– The output rule sets contain ~250 rules, each with 2 or 3 attribute tests. This compares with the total ~1,500 different sequences.

• Experiment A and B generate rules that characterize “normal” sequences of length 11 and 7 respectively

• Experiment C and D generate rules that characterize “abnormal” sequences of length 11 and 7 respectively

Page 28: Data Mining Approaches for Intrusion Detection

sendmail Experiment 1traces Forrest et al. A B C Dsscp-1 5.2 41.9 32.2 40.0 33.1sscp-2 5.2 40.4 30.4 37.6 33.3sscp-3 5.2 40.4 30.4 37.6 33.3syslog-remote-1 5.1 30.8 21.2 30.3 21.9syslog-remote-2 1.7 27.1 15.6 26.8 16.5syslog-local-1 4.0 16.7 11.1 17.0 13.0syslog-local-2 5.3 19.9 15.9 19.8 15.9decode-1 0.3 4.7 2.1 3.1 2.1decode-2 0.3 4.4 2.0 2.5 2.2sm565a 0.6 11.7 8.0 1.1 1.0sm5x 2.7 17.7 6.5 5.0 3.0sendmail 0 1.0 0.1 0.2 0.3

3.4 1.9 0.9 0.7Anomaly detectors A and B performs better then misuse detectors C and D.

Page 29: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• Experiment 2 - learning to predict normal system call:– Each record: n-1 consecutive system calls plus

a class label, the nth or the middle system call– Training data: sequences from 80% of the

normal traces (no abnormal traces)– Testing data: traces not used in training– Use RIPPER to learn rules

Page 30: Data Mining Approaches for Intrusion Detection

sendmail Experiment 2

• Examples of output RIPPER rules:– if the 3rd system call is lstat and the 4th is

write, then the 7th is stat – if the 1st system call is sigblock and the 4th is

bind, then the 7th is setsockopt– …– if none of the above, then the 7th is open

Page 31: Data Mining Approaches for Intrusion Detection

sendmail Experiment 2

• Using the learned rules to analyze a new trace:– predict system calls according to the rules– if a rule is violated, the “violation” score is

increased by 100 times the accuracy of the rule– the trace is “abnormal” if the violation score is

above a threshold

Page 32: Data Mining Approaches for Intrusion Detection

sendmail Experiment 2

• Some results:– Experiment A: predict the 11th system call– Experiment B: predict the middle system call in

a sequence of length 7– Experiment C: predict the middle system call in

a sequence of length 11– Experiment D: predict the 7th system call

Page 33: Data Mining Approaches for Intrusion Detection

sendmail Experiment 2

• All 4 experiments:– Training data includes only the sequences from 80% of

the normal sendmail traces– Output rules predict what should be the “normal” nth or

the middle system call– Score of rule “violation” (mismatch) of each trace

(showed in the table) is used as the intrusion indicator– The output rule sets contain ~250 rules, each with 2 or

3 attribute tests. This compares with the total ~1,500 different sequences.

Page 34: Data Mining Approaches for Intrusion Detection

sendmail Experiment 2Traces A B C Dsscp-1 24.1 13.5 14.3 24.7sscp-2 23.5 13.6 13.9 24.4sscp-3 23.5 13.6 13.9 24.4syslog-remote-1 19.3 11.5 13.9 24.0syslog-remote-2 15.9 8.4 10.9 23.0syslog-local-1 13.4 6.1 7.2 19.0syslog-local-2 15.2 8.0 9.0 20.2decode-1 9.4 3.9 2.4 11.3decode-2 9.6 4.2 2.8 11.5sm565a 14.4 8.1 9.4 20.6sm5x 17.2 8.2 10.1 18.0*sendmail 5.7 0.6 1.2 12.6

3.7 3.3 1.2 1.3The 11th (A) and 4th (B) system call are more predictable

Page 35: Data Mining Approaches for Intrusion Detection

Classification Models on sendmail

• Lessons learned:– Normal behavior can be established and used to

detect anomalous usage– Need to collect near “complete” normal data in

order to build the “normal” model– But how do we know when to stop collecting? – Need tools to guide the audit data gathering

process

Page 36: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• The tcpdump data (part of a public data visualization contest):– Packets of incoming, out-going, and internal

broadcast traffic– One trace of normal network traffic– Three traces of network intrusions

Page 37: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Data preprocessing:– Extract the “connection” level features:

• Record connection attempts• Monitor data packets and count: # of bytes in each

direction, resent rate, hole rate, etc.• Watch how connection is terminated

Page 38: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Data Preprocessing:– Each record has:

• start time and duration• participating hosts and ports (applications)• statistics (e.g., # of bytes)• flag: “normal” or a connection/termination error• protocol: TCP or UDP

– Divide connections into 3 types: incoming, out-going, and inter-lan

Page 39: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Building classifier for each type of connections:– Use the destination service (port) as the class

label– Training data: 80% of the normal connections– Testing data: 20% of the normal connections

and connections in the 3 intrusion traces– Apply RIPPER to learn rules

Page 40: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump• The output RIPPER rules describe the

“normal” characteristics of the destination services. The rule set is the profile of the normal network traffic.

• Using the rules to analyze tcpdump traces:– Examine each connection record according to

the rules– Calculate the percentage of misclassification

(violation of a rule). This percentage is the deviation from the profile.

Page 41: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Results - misclassification rate on each type of connections:

Connection data Out-going In-coming Inter-lanNormal 3.91% 4.68% 4%Intrusion1 3.81% 6.76% 22.65%Intrusion2 4.76% 7.47% 8.7%Intrusion3 3.71% 13.7% 7.86%

This model is not very effective in detecting intrusions

Page 42: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Adding temporal features for better models:– Examine all connections in the past n seconds,

and count:• the number of connection errors, all other errors,

connections to system services, user applications, and connection to the same service as the current connection

• average duration and data bytes of all connections; and the same averages of connections to the same service.

Page 43: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Results of adding the temporal features, the time window is 30 seconds:

Connection data Out-going In-coming Inter-lanNormal 0.88% 0.31% 1.43%Intrusion1 2.54% 27.37% 20.48%Intrusion2 3.04% 27.42% 5.63%Intrusion3 2.32% 42.20% 6.80%

Adding temporal statistical features improves the effectiveness of the detection models

Page 44: Data Mining Approaches for Intrusion Detection

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0 20 40 60 80 100

time window in seconds

mis

clas

sific

atio

n ra

te

normalattack1attack2attack3

How do we obtain the optimal time window length?

Effects of time window length on misclassification rate

Page 45: Data Mining Approaches for Intrusion Detection

Classification Models on tcpdump

• Lessons learned:– Data preprocessing requires extensive domain

knowledge– Adding temporal features improves

classification accuracy– Need tools to guide (temporal) feature selection

Page 46: Data Mining Approaches for Intrusion Detection

Building Classifiers for Intrusion Detection

• Meta classifier that combines evidence from multiple detection models:– Build base classifiers that each model one aspect

of the system– The meta learning task:

• each record has a collection of evidence from base classifiers, and a class label “normal” or “abnormal” on the state of the system

– Apply a learning algorithm to produce the meta classifier

Page 47: Data Mining Approaches for Intrusion Detection

Mining Patterns from Audit Data

• Association rules: describe multi-feature (attribute) correlation from a database

• X => Y , confidence, support:– X and Y are subsets of the attribute values in a

record– support is the percentage of records that contain

X and Y– confidence is support(X+Y)/support(X)

Page 48: Data Mining Approaches for Intrusion Detection

Association Rules• Motivations:

– Audit data can be easily formatted into a database table

– Program executions and user activities have frequent correlation among system features

– Incremental updating of the rule set is easy• An example from the .sh_history :

– trn => rec.humor, [0.3, 0.1]– Meaning: 30% of the time when using trn, the

user is reading rec.humor; and reading this newsgroup constitutes 10% of all sh commands

Page 49: Data Mining Approaches for Intrusion Detection

Mining Patterns from Audit Data

• Frequent Episodes: frequent events occurring within a time window

• X => Y, confidence, support, window:– X and Y are subsets of the attribute values in a

record– support is the percentage of (sliding) windows

that contain X and Y– confidence is support(X+Y)/support(X)

Page 50: Data Mining Approaches for Intrusion Detection

Frequent Episodes• Motivation:

– Sequence information needs to be included in a detection model

• An example from a department’s web log:– home, research => theory, [0.2, 0.05], [30]– Meaning: 20% of the time, after home and

research pages are visited (in that order), the theory is then visited within 30 seconds from when home is visited; and visiting these three pages constitutes 5% of all visits to the web site

Page 51: Data Mining Approaches for Intrusion Detection

Using the Mined Patterns

• Guide the audit data gathering process:– Run a program under different settings– For each run, calculate the association rules and

frequent episodes from its audit data– Merge them into an aggregate rule set– Stop gathering audit data when no rules can be

added from a new run

Page 52: Data Mining Approaches for Intrusion Detection

Using the Mined Patterns

• Support the feature selection process:– System features in the association rules and

frequent episodes should be included in the classification models

– Time window and features in the frequent episodes suggest additional temporal features should be considered

Page 53: Data Mining Approaches for Intrusion Detection

Using the Mined Patterns

• Alternatives and complement to classification models:– Examine new audit trace and calculate

“violation” scores: missing rules, new rules, deviations in confidence and support, etc.

– Study the “unique” patterns in the trace of suspected attack to further pin point the cause of the intrusion alarms.

Page 54: Data Mining Approaches for Intrusion Detection

Using the Mined Patterns

• tcpdump data revisited:– How to select the right time window? – Hypothesis: the appropriate window should

contain stable sets of frequent episodes– Experiments: mine frequent episodes using

different window lengths, and count the number of episodes

Page 55: Data Mining Approaches for Intrusion Detection

0

50

100

150

200

250

300

0 50 100 150 200 250

time window in seconds

# of

epi

sode

s

raw episodesepisode rules, conf=0.8episode rules, conf=0.6

The optimal time window length for classification has stable # of episodes

Results on time window length v.s. # of episodes:

Page 56: Data Mining Approaches for Intrusion Detection

Using the Mined Patterns• tcpdump data revisited:

– “unique” patterns in intrusion data may provide some insights

– intrusion 3:• one of the unique frequent episode rules:

– dst_srv=“auth” => flag=“unwanted_syn_ack”, [0.82, 0.1], [30]

• one of the unique association rules:– src_srv=“smtp” => duration=0, flag=“unwanted_syn_ack”,

dst_srv=“user_apps”, [1.0, 0.38]

Page 57: Data Mining Approaches for Intrusion Detection

Architecture Support• Dedicated learning agents are responsible for

building detection models• Base and meta detection agents are equipped

with learned models• Detection agents provide new audit data to the

learning agents• Learning agents dispatch updated models• JAM (Java Agents for Meta-learning) on

fraud detection is the model architecture

Page 58: Data Mining Approaches for Intrusion Detection

InductiveLearning Engine

Audit Data Preprocessor

Audit Records

Activity Data

Detection Models

Decision Table

(Base) Detection Engine

Rules

Evidence

(Meta) Detection Engine

Evidence from Other Agents

Final Assertion

Decision EngineAction/Report

Learning Agent

Base Detection Agent

Meta Detection Agent

Page 59: Data Mining Approaches for Intrusion Detection

Current Status

• Accomplished:– Experiments on sendmail and tcpdump data– Implementation of the association rules and the

frequent episodes algorithms. Testing on medium size data sets (30,000+ records, each with 6+ fields) has been completed.

– Design and 35% of the implementation of a support environment for mining patterns from audit data

– High level design system architecture design

Page 60: Data Mining Approaches for Intrusion Detection

Research Plans

• To be completed within the next year and a half:– Finish the implementation of the support

environment for mining patterns– Experiments on using the algorithms and the

environment to gather audit data and select features

– Experiments on building meta detection models

Page 61: Data Mining Approaches for Intrusion Detection

Research Plans

• To be completed within the next year and a half:– Detailed architecture design– Implementing a prototype intrusion detection

system– Final evaluation using “standard/public” data

sets

Page 62: Data Mining Approaches for Intrusion Detection

Conclusions• We demonstrated the effectiveness of

classification models for intrusion detection• We propose to use systematic data mining

approaches to select the relevant system features to build better detection models

• We propose to use (meta) learning agent-based architecture to combine multiple models, and to continuously update the detection models.