intrusion detection systems

32
Intrusion Detection Intrusion Detection Systems Systems

Upload: xena

Post on 25-Feb-2016

54 views

Category:

Documents


2 download

DESCRIPTION

Intrusion Detection Systems. Definitions. Intrusion A set of actions aimed to compromise the security goals, namely Integrity, confidentiality, or availability, of a computing and networking resource Intrusion detection The process of identifying and responding to intrusion activities. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Intrusion Detection Systems

Intrusion Detection SystemsIntrusion Detection Systems

Page 2: Intrusion Detection Systems

Definitions• Intrusion

– A set of actions aimed to compromise the security goals, namely

• Integrity, confidentiality, or availability, of a computing and networking resource

• Intrusion detection– The process of identifying and responding to

intrusion activities

Page 3: Intrusion Detection Systems

Elements of Intrusion Detection

• Primary assumptions: – System activities are observable – Normal and intrusive activities have distinct

evidence• Components of intrusion detection

systems:– From an algorithmic perspective:

• Features - capture intrusion evidences• Models - piece evidences together

– From a system architecture perspective:• Audit data processor, knowledge base, decision

engine, alarm generation and responses

Page 4: Intrusion Detection Systems

Components of Intrusion Detection System

Audit Data Preprocessor

Audit Records

Activity Data

Detection Models Detection Engine

Alarms

Decision Table

Decision EngineAction/Report

system activities are system activities are observableobservable

normal and intrusive normal and intrusive activities have distinct activities have distinct

evidenceevidence

Page 5: Intrusion Detection Systems

Intrusion Detection Approaches

• Modeling– Features: evidences extracted from audit data– Analysis approach: piecing the evidences

together• Misuse detection (a.k.a. signature-based)• Anomaly detection (a.k.a. statistical-based)

• Deployment: Network-based or Host-based• Development and maintenance

– Hand-coding of “expert knowledge”– Learning based on audit data

Page 6: Intrusion Detection Systems

Misuse Detection

Intrusion Patterns

activities

pattern matching

intrusion

Can’t detect new attacks

Example: if (src_ip == dst_ip) then “land attack”

Page 7: Intrusion Detection Systems

Anomaly Detection

activity measures

0102030405060708090

CPU ProcessSize

normal profileabnormal

probable intrusion

Relatively high false positive rate - anomalies can just be new normal

activities.

Page 8: Intrusion Detection Systems

Key Performance Metrics• Algorithm

– Alarm: A; Intrusion: I– Detection (true alarm) rate: P(A|I)

• False negative rate P(¬A|I)– False alarm rate: P(A|¬I)

• True negative rate P(¬A|¬I)• Architecture

– Scalable– Resilient to attacks

Page 9: Intrusion Detection Systems

Host-Based IDSs• Using OS auditing mechanisms

– E.G., BSM on Solaris: logs all direct or indirect events generated by a user

– strace for system calls made by a program

• Monitoring user activities– E.G., Analyze shell commands

• Monitoring executions of system programs– E.G., Analyze system calls made by sendmail

Page 10: Intrusion Detection Systems

Network IDSs• Deploying sensors at strategic locations

– E.G., Packet sniffing via tcpdump at routers• Inspecting network traffic

– Watch for violations of protocols and unusual connection patterns

• Monitoring user activities– Look into the data portions of the packets for malicious

command sequences• May be easily defeated by encryption

– Data portions and some header information can be encrypted• Other problems …

Page 11: Intrusion Detection Systems

Architecture of Network IDS

NetworkNetwork

libpcaplibpcap

Event EngineEvent Engine

Policy Script InterpreterPolicy Script Interpreter

Packet streamPacket stream

Filtered packet streamFiltered packet stream

Event streamEvent stream

Alerts/notificationsAlerts/notificationsPolicy scriptPolicy script

Event controlEvent control

tcpdump filterstcpdump filters

Page 12: Intrusion Detection Systems

Firewall Versus Network IDS

• Firewall– Active filtering– Fail-close

• Network IDS– Passive monitoring– Fail-open

FW

IDS

Page 13: Intrusion Detection Systems

Requirements of Network IDS

• High-speed, large volume monitoring– No packet filter drops

• Real-time notification• Mechanism separate from policy• Extensible• Broad detection coverage• Economy in resource usage• Resilience to stress• Resilience to attacks upon the IDS itself!

Page 14: Intrusion Detection Systems

Case Study: Snort IDS

Page 15: Intrusion Detection Systems

Problems with Current IDSs

• Knowledge and signature-based: – “We have the largest knowledge/signature base”– Ineffective against new attacks

• Individual attack-based:– “Intrusion A detected; Intrusion B detected …”– No long-term proactive detection/prediction

• Statistical accuracy-based:– “x% detection rate and y% false alarm rate”

• Are the most damaging intrusions detected?

• Statically configured.

Page 16: Intrusion Detection Systems

Firewalls

Page 17: Intrusion Detection Systems

What is a Firewall?• A choke point of control and monitoring • Interconnects networks with differing trust• Imposes restrictions on network services

– only authorized traffic is allowed • Auditing and controlling access

– can implement alarms for abnormal behavior• Itself immune to penetration• Provides perimeter defence

Page 18: Intrusion Detection Systems

Classification of FirewallCharacterized by protocol level it controls in• Packet filtering• Circuit gateways• Application gateways

• Combination of above is dynamic packet filter

Page 19: Intrusion Detection Systems

Firewalls – Packet Filters

Page 20: Intrusion Detection Systems

Firewalls – Packet Filters• Simplest of components • Uses transport-layer information only

– IP Source Address, Destination Address– Protocol/Next Header (TCP, UDP, ICMP, etc)– TCP or UDP source & destination ports– TCP Flags (SYN, ACK, FIN, RST, PSH, etc)– ICMP message type

• Examples– DNS uses port 53

• No incoming port 53 packets except known trusted servers

Page 21: Intrusion Detection Systems

Usage of Packet Filters• Filtering with incoming or outgoing

interfaces– E.g., Ingress filtering of spoofed IP

addresses– Egress filtering

• Permits or denies certain services– Requires intimate knowledge of TCP and UDP port

utilization on a number of operating systems

Page 22: Intrusion Detection Systems

How to Configure a Packet Filter

• Start with a security policy• Specify allowable packets in terms of logical

expressions on packet fields• Rewrite expressions in syntax supported by

your vendor• General rules - least privilege

– All that is not expressly permitted is prohibited– If you do not need it, eliminate it

Page 23: Intrusion Detection Systems

Every ruleset is followed by an implicit rule reading like this.

Example 1: Suppose we want to allow inbound mail

(SMTP, port 25) but only to our gateway machine. Also suppose that mail from

some particular site SPIGOT is to be blocked.

Page 24: Intrusion Detection Systems

Solution 1:

Example 2: Now suppose that we want to implement

the policy “any inside host can send mail to the outside”.

Page 25: Intrusion Detection Systems

Solution 2:

This solution allows calls to come from any port on an inside machine, and will direect them to port 25 on the outside.

Simple enough…

So why is it wrong?

Page 26: Intrusion Detection Systems

• Our defined restriction is based solely on the outside host’s port number, which we have no way of controlling.

• Now an enemy can access any internal machines and port by originating his call from port 25 on the outside machine.

Now for a better solution…

Page 27: Intrusion Detection Systems

• The ACK signifies that the packet is part of an ongoing conversation

• Packets without the ACK are connection establishment messages, which we are only permitting from internal hosts

Page 28: Intrusion Detection Systems

Backup Slides

Page 29: Intrusion Detection Systems

• 90% of DoS attacks use TCP SYN floods• Streaming spoofed TCP SYNs• Takes advantage of three way handshake• Server start “half-open” connections• These build up… until queue is full and all

additional requests are blocked

SYN Flooding Attack

Page 30: Intrusion Detection Systems

Security & Performance of Packet Filters

• IP address spoofing– Fake source address to be trusted– Add filters on router to block

• Degradation depends on number of rules applied at any point

• Order rules so that most common traffic is dealt with first

• Correctness is more important than speed

Page 31: Intrusion Detection Systems

Port Numbering• TCP connection

– Server port is number less than 1024 – Client port is number between 1024 and 16383

• Permanent assignment– Ports <1024 assigned permanently

• 20,21 for FTP, 23 for Telnet 25 for server SMTP, etc.

• Variable use– Ports >1024 must be available for client to make any

connection– This presents a limitation for stateless packet filtering

• If client wants to use port 2048, firewall must allow incoming traffic on this port

– Better: stateful filtering knows outgoing requests

Page 32: Intrusion Detection Systems

Stateful Filtering