Computer Security:
Computer Security:
Principles and Practice
Principles and Practice
First Edition First Edition
by William Stallings and Lawrie Brown by William Stallings and Lawrie Brown
Chapter 6 –
Agenda
Agenda
Quiz 1 (15 minutes)
Quiz 1 (15 minutes)
Lecture: Intrusion Detection Systems
Lecture: Intrusion Detection Systems
(30 minutes)
(30 minutes)
Break (10 minutes)
Break (10 minutes)
Lab 3: Intrusion Detection (30 minutes)
Lab 3: Intrusion Detection (30 minutes)
Due by Monday
Due by Monday
Case Study 2Case Study 2
Quiz 1
Quiz 1
Please turn computers off
Please turn computers off
Please turn cell phones off
Please turn cell phones off
Quiet Please
Quiet Please
Intruders
Intruders
significant issue hostile/unwanted trespass
significant issue hostile/unwanted trespass
from benign to seriousfrom benign to serious
user trespass
user trespass
unauthorized logon, privilege abuseunauthorized logon, privilege abuse
software trespass
software trespass
virus, worm, or trojan horsevirus, worm, or trojan horse
classes of intruders:
classes of intruders:
Examples of Intrusion
Examples of Intrusion
remote root compromiseremote root compromise web server defacementweb server defacement
guessing / cracking passwordsguessing / cracking passwords
copying viewing sensitive data / databasescopying viewing sensitive data / databases running a packet snifferrunning a packet sniffer
distributing pirated softwaredistributing pirated software
Security Intrusion & Detection
Security Intrusion & Detection
Security IntrusionSecurity Intrusion
a security event, or combination of multiple security
a security event, or combination of multiple security
events, that constitutes a security incident in which an
events, that constitutes a security incident in which an
intruder gains, or attempts to gain, access to a system
intruder gains, or attempts to gain, access to a system
(or system resource) without having authorization to
(or system resource) without having authorization to
do so.
do so.
Intrusion Detection
Intrusion Detection
a security service that monitors and analyzes system
a security service that monitors and analyzes system
events for the purpose of finding, and providing
events for the purpose of finding, and providing
real-time or near real-real-time warning of attempts to access
time or near real-time warning of attempts to access
system resources in an unauthorized manner.
Hackers
Hackers
motivated by thrill of access and statusmotivated by thrill of access and status
hacking community a strong meritocracyhacking community a strong meritocracy
status is determined by level of competencestatus is determined by level of competence
benign intruders might be tolerablebenign intruders might be tolerable
do consume resources and may slow performancedo consume resources and may slow performance
can’t know in advance whether benign or maligncan’t know in advance whether benign or malign
IDS / IPS / VPNs can help counterIDS / IPS / VPNs can help counter
Hacker Behavior Example
Hacker Behavior Example
1.
1.
select target using IP lookup tools
select target using IP lookup tools
2.
2.
map network for accessible services
map network for accessible services
3.
3.
identify potentially vulnerable services
identify potentially vulnerable services
4.
4.
brute force (guess) passwords
brute force (guess) passwords
5.
5.
install remote administration tool
install remote administration tool
6.
6.
wait for admin to log on and capture
wait for admin to log on and capture
password
password
7.
7.
use password to access remainder of
use password to access remainder of
Criminal Enterprise
Criminal Enterprise
organized
organized
groups of hackers now a threat
groups of hackers now a threat
corporation / government / loosely affi liated gangscorporation / government / loosely affi liated gangs typically youngtypically young
common target credit cards on e-commerce servercommon target credit cards on e-commerce server
criminal hackers usually have specifi c targets
criminal hackers usually have specifi c targets
once penetrated act quickly and get out
once penetrated act quickly and get out
Criminal Enterprise Behavior
Criminal Enterprise Behavior
1.
1.
act quickly and precisely to make their
act quickly and precisely to make their
activities harder to detect
activities harder to detect
2.
2.
exploit perimeter via vulnerable ports
exploit perimeter via vulnerable ports
3.
3.
use trojan horses (hidden software) to
use trojan horses (hidden software) to
leave back doors for re-entry
leave back doors for re-entry
4.
4.
use sniffers to capture passwords
use sniffers to capture passwords
5.
5.
do not stick around until noticed
do not stick around until noticed
6.
Insider Attacks
Insider Attacks
among most difficult to detect and preventamong most difficult to detect and prevent
employees have access & systems knowledgeemployees have access & systems knowledge
may be motivated by revenge / entitlementmay be motivated by revenge / entitlement
when employment terminatedwhen employment terminated
taking customer data when move to competitortaking customer data when move to competitor
IDS / IPS may help but also need:IDS / IPS may help but also need:
least privilege, monitor logs, strong authentication, least privilege, monitor logs, strong authentication,
termination process to block access & mirror data
Insider Behavior Example
Insider Behavior Example
1.
1. create network accounts for themselves and create network accounts for themselves and their friends
their friends
2.
2. access accounts and applications they wouldn't access accounts and applications they wouldn't normally use for their daily jobs
normally use for their daily jobs
3.
3. e-mail former and prospective employerse-mail former and prospective employers
4.
4. conduct furtive instant-messaging chatsconduct furtive instant-messaging chats
5.
5. visit web sites that cater to disgruntled visit web sites that cater to disgruntled employees, such as f'dcompany.com
employees, such as f'dcompany.com
6.
6. perform large downloads and fi le copyingperform large downloads and fi le copying
7.
Intrusion Techniques
Intrusion Techniques
objective to gain access or increase privileges
objective to gain access or increase privileges
initial attacks often exploit system or software
initial attacks often exploit system or software
vulnerabilities to execute code to get backdoor
vulnerabilities to execute code to get backdoor
e.g. buffer overflowe.g. buffer overflow
or to gain protected information
or to gain protected information
Intrusion Detection Systems
Intrusion Detection Systems
classify intrusion detection systems (IDSs) as:
classify intrusion detection systems (IDSs) as:
Host-based IDS: monitor single host activityHost-based IDS: monitor single host activity Network-based IDS: monitor network traffi cNetwork-based IDS: monitor network traffi c
logical components:
logical components:
sensors - collect datasensors - collect data
IDS Principles
IDS Principles
assume intruder behavior differs from
assume intruder behavior differs from
legitimate users
legitimate users
expect overlap as shownexpect overlap as shown
observe deviationsobserve deviations
from past history
from past history
problems of:problems of:IDS Requirements
IDS Requirements
run continuallyrun continually be fault tolerantbe fault tolerant resist subversionresist subversion
impose a minimal overhead on systemimpose a minimal overhead on system
configured according to system security policies configured according to system security policies adapt to changes in systems and usersadapt to changes in systems and users
scale to monitor large numbers of systemsscale to monitor large numbers of systems provide graceful degradation of serviceprovide graceful degradation of service
Host-Based IDS
Host-Based IDS
specialized software to monitor system activity to specialized software to monitor system activity to
detect suspicious behavior detect suspicious behavior
primary purpose is to detect intrusions, log suspicious primary purpose is to detect intrusions, log suspicious
events, and send alerts events, and send alerts
can detect both external and internal intrusionscan detect both external and internal intrusions
two approaches, often used in combination:two approaches, often used in combination:
anomaly detection - defines normal/expected behavioranomaly detection - defines normal/expected behavior
• threshold detectionthreshold detection
Audit Records
Audit Records
a fundamental tool for intrusion detection
a fundamental tool for intrusion detection
two variants:
two variants:
native audit records - provided by O/Snative audit records - provided by O/S
• always available but may not be optimumalways available but may not be optimum
detection-specific audit records - IDS specificdetection-specific audit records - IDS specific
• additional overhead but specific to IDS taskadditional overhead but specific to IDS task • often log individual elementary actionsoften log individual elementary actions
• e.g. may contain fields for: subject, action, object, e.g. may contain fields for: subject, action, object,
exception-condition, resource-usage, time-stamp
Anomaly Detection
Anomaly Detection
threshold detectionthreshold detection
checks excessive event occurrences over timechecks excessive event occurrences over time
alone a crude and ineffective intruder detectoralone a crude and ineffective intruder detector
must determine both thresholds and time intervalsmust determine both thresholds and time intervals
profile basedprofile based
characterize past behavior of users / groupscharacterize past behavior of users / groups
then detect significant deviationsthen detect significant deviations
based on analysis of audit recordsbased on analysis of audit records
Signature Detection
Signature Detection
observe events on system and applying a
observe events on system and applying a
set of rules to decide if intruder
set of rules to decide if intruder
approaches:
approaches:
rule-based anomaly detectionrule-based anomaly detection
• analyze historical audit records for expected analyze historical audit records for expected
behavior, then match with current behavior
behavior, then match with current behavior
rule-based penetration identificationrule-based penetration identification
Network-Based IDS
Network-Based IDS
network-based IDS (NIDS)
network-based IDS (NIDS)
monitor traffic at selected points on a networkmonitor traffic at selected points on a network in (near) real time to detect intrusion patternsin (near) real time to detect intrusion patterns may examine network, transport and/or may examine network, transport and/or
application level protocol activity directed application level protocol activity directed
toward systems toward systems
comprises a number of sensors
comprises a number of sensors
Intrusion Detection Techniques
Intrusion Detection Techniques
signature detection
signature detection
at application, transport, network layers; at application, transport, network layers;
unexpected application services, policy violations unexpected application services, policy violations
anomaly detection
anomaly detection
of denial of service attacks, scanning, wormsof denial of service attacks, scanning, worms
when potential violation detected sensor
when potential violation detected sensor
sends an alert and logs information
sends an alert and logs information
Distributed Adaptive Intrusion
Distributed Adaptive Intrusion
Intrusion
Intrusion
Detection
Detection
Exchange
Exchange
Honeypots
Honeypots
are decoy systems
are decoy systems
filled with fabricated infofilled with fabricated info
instrumented with monitors / event loggersinstrumented with monitors / event loggers
divert and hold attacker to collect activity infodivert and hold attacker to collect activity info
without exposing production systemswithout exposing production systems
initially were single systems
initially were single systems
SNORT
SNORT
lightweight IDS
lightweight IDS
real-time packet capture and rule analysisreal-time packet capture and rule analysis
SNORT Rules
SNORT Rules
use a simple, flexible rule definition languageuse a simple, flexible rule definition language
with fixed header and zero or more optionswith fixed header and zero or more options
header includes: action, protocol, source IP, source header includes: action, protocol, source IP, source
port, direction, dest IP, dest port port, direction, dest IP, dest port
many optionsmany options
example rule to detect TCP SYN-FIN attack:example rule to detect TCP SYN-FIN attack:
Alert tcp $EXTERNAL_NET any -> $HOME_NET any \ Alert tcp $EXTERNAL_NET any -> $HOME_NET any \
Summary
Summary
introduced intruders & intrusion detectionintroduced intruders & intrusion detection
hackers, criminals, insidershackers, criminals, insiders
intrusion detection approachesintrusion detection approaches
host-based (single and distributed)host-based (single and distributed)
networknetwork
distributed adaptivedistributed adaptive
exchange formatexchange format
honeypotshoneypots
Break
Break
Please enjoy a 10 minute break
Please enjoy a 10 minute break
When we return, we will begin our lab
When we return, we will begin our lab
Please visit the course website and
Please visit the course website and
download lab3_intrusion_detection.doc
Lab 3: Intrusion Detection
Lab 3: Intrusion Detection
Live CD: STD Knoppix
Live CD: STD Knoppix
Sniffer
Sniffer
Port Scanner
Port Scanner