+ All Categories
Home > Documents > Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s...

Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s...

Date post: 22-Jun-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
60
CS 155 Spring 2009 Network Security Protocols and Defensive Mechanisms Defensive Mechanisms John Mitchell
Transcript
Page 1: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

CS 155 Spring 2009

Network Security Protocols and Defensive MechanismsDefensive Mechanisms

John Mitchell

Page 2: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Plan for todayPlan for today

Network protocol securityNetwork protocol security IPSEC BGP instability and S-BGPy DNS rebinding and DNSSEC Wireless security – 802.11i/WPA2

Standard network perimeter defenses Firewall

Packet filter (stateless stateful) Application layer proxies Packet filter (stateless, stateful), Application layer proxies Traffic shaping Intrusion detection

2

Anomaly and misuse detection

Page 3: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Dan’s lecture last ThursdayDan s lecture last Thursday

Basic network protocolsBasic network protocols IP, TCP, UDP, BGP, DNS

Problems with themProblems with them TCP/IP

No SRC authentication: can’t tell where packet from Packet sniffing Connection spoofing, sequence numbers

BGP: advertise bad routes or close good ones BGP: advertise bad routes or close good ones DNS: cache poisoning, rebinding

(out of time; cover today)

3

Page 4: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

IPSECIPSEC

Security extensions for IPv4 and IPv6Security extensions for IPv4 and IPv6IP Authentication Header (AH) Authentication and integrity of payload and header Authentication and integrity of payload and header

IP Encapsulating Security Protocol (ESP) Confidentiality of payloadCo de a y o pay oad

ESP with optional ICV (integrity check value) Confidentiality, authentication and integrity of y, g y

payload

4

Page 5: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Recall packet formats and layersRecall packet formats and layers

ApplicationApplication message - data

TCP Header

message

Transport (TCP, UDP) TCP data TCP data TCP datasegment

k tNetwork (IP)

Link Layer

dataTCPIP

dataTCPIPETH ETF

packet

framey

IP Header Link (Ethernet)Header

Link (Ethernet)Trailer

5

Header Trailer

Page 6: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

IPSec Transport Mode: IPSEC instead of IP header

6 http://www.tcpipguide.com/free/t_IPSecModesTransportandTunnel.htm

Page 7: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

IPSEC Tunnel ModeIPSEC Tunnel Mode

7

Page 8: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

IPSec Tunnel Mode: IPSEC header + IP header

8

Page 9: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

VPNVPN

Three different modes of use:Three different modes of use: Remote access client connections LAN-to-LAN internetworking g Controlled access within an intranet

Several different protocols PPTP – Point-to-point tunneling protocol L2TP – Layer-2 tunneling protocol

Data layer

IPsec (Layer-3: network layer)

9

Page 10: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

BGP exampleBGP example

3 2 73 41 2 7

2 7

3 2 7

2 6 52 6 5 3 2 6 5 5

5

8 27

72 7

6 2 72 6 5

7 2 6 56 5

6 57

7 2 6 5

5

Transit: 2 provides transit for 7Algorithm seems to work OK in practice BGP is does not respond well to frequent node outages

10

BGP is does not respond well to frequent node outages

Figure: D. Wetherall

Page 11: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

BGP Security IssuesBGP Security Issues

BGP is the basis for all inter-ISP routinggBenign configuration errors affect about 1% of all routing table entries at any timeThe current system is highly vulnerable to human errors, and a wide range of malicious attacks links links routers management stations

MD5 MAC i l d h d t l k fMD5 MAC is rarely used, perhaps due to lack of automated key management, and it addresses only one class of attacks

11 Slide: Steve Kent

Page 12: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

S-BGP Design OverviewS BGP Design Overview

IPsec: secure point-to-point router communicationp pPublic Key Infrastructure: authorization framework for all S-BGP entitiesAttestations: digitally-signed authorizations Address: authorization to advertise specified address blocks Route: Validation of UPDATEs based on a new path Route: Validation of UPDATEs based on a new path

attribute, using PKI certificates and attestations

Repositories for distribution of certificates, CRLs, and address attestationsaddress attestationsTools for ISPs to manage address attestations, process certificates & CRLs, etc.

12

p ,

Slide: Steve Kent

Page 13: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Address AttestationAddress Attestation

Indicates that the final AS listed in the UPDATE is authorized by the owner of those address blocks to advertise the address blocks in the UPDATEI l d id tifi ti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Digitally signed by owner of the address blocksDigitally signed by owner of the address blocks, traceable up to the IANA via certificate chainUsed to protect BGP from erroneous UPDATEs

13

p(authenticated but misbehaving or misconfigured BGP speakers)

Page 14: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Route AttestationRoute Attestation

Indicates that the speaker or its AS authorizes the plistener’s AS to use the route in the UPDATEIncludes identification of:

f f AS’s or BGP speaker’s certificate issued by owner of the AS the address blocks and the list of ASes in the UPDATE the neighbor expiration date

Digitally signed by owner of the AS (or BGP speaker) distributing the UPDATE traceable to the IANAdistributing the UPDATE, traceable to the IANA ...Used to protect BGP from erroneous UPDATEs (authenticated but misbehaving or misconfigured BGP speakers)

14

Page 15: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Validating a RouteValidating a Route

To validate a route from ASn, ASn+1 needs:To validate a route from ASn, ASn+1 needs: address attestation from each organization owning an

address block(s) in the NLRIaddress allocation certificate from each organization owning address allocation certificate from each organization owning address blocks in the NLRI

route attestation from every AS along the path (AS1 to ASn), where the route attestation for AS specifies the NLRI andwhere the route attestation for ASk specifies the NLRI and the path up to that point (AS1 through ASk+1)

certificate for each AS or router along path (AS1 to ASn) to check signatures on the route attestationscheck signatures on the route attestations

and, of course, all the relevant CRLs must have been checked

15Slide: Kent et al.

Page 16: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Recall: DNS LookupRecall: DNS LookupQuery: "www.example.com A?"

Reply Resource Records in Reply

"com NS a gtld net"3 com. NS a.gtld.net"a.gtld.net A 192.5.6.30"

5 "example.com. NS a.iana.net""a.iana.net A 192.0.34.43"

7

8

"www.example.com A 1.2.3.4"

"www.example.com A 1.2.3.4"

16Local recursive resolver caches these for TTL specified by RR

p

Page 17: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNS is InsecureDNS is Insecure

Packets over UDP, < 512 bytesPackets over UDP, < 512 bytes16-bit TXID, UDP Src port only “security”Resolver accepts packet if above matchResolver accepts packet if above matchPacket from whom? Was it manipulated?

Cache poisoning Attacker forges record at resolver Attacker forges record at resolver Forged record cached, attacks future lookups Kaminsky (BH USA08)

Attacks delegations with “birthday problem”

17

Attacks delegations with birthday problem

Page 18: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNSSEC Goal

“The Domain Name System (DNS) security extensions

DNSSEC Goal

y ( ) yprovide origin authentication and integrity assurance services for DNS data, including mechanisms for authenticated denial of existence of DNS data.”authenticated denial of existence of DNS data.

-RFC 4033

18

Page 19: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNSSECDNSSEC

Basically no change to packet formaty g p Object security of DNS data, not channel security

New Resource Records (RRs)f RRSIG : signature of RR by private zone key

DNSKEY : public zone key DS : crypto digest of child zone key NSEC / NSEC3 :authenticated denial of existence

Lookup referral chain (unsigned)O i i tt t ti h i (PKI) ( i d)Origin attestation chain (PKI) (signed) Start at pre-configured trust anchors

DS/DNSKEY of zone (should include root)

19

DS → DNSKEY → DS forms a link

Page 20: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNSSEC LookupQuery: "www.example.com A?"

DNSSEC Lookup

3

Reply

"com. NS a.gtld.net"

RRs in DNS Reply Added by DNSSEC

"com. DS"3 "a.gtld.net A 192.5.6.30"

"example com NS a iana net"

"RRSIG(DS) by ."

"com. DNSKEY""RRSIG(DNSKEY) by com "5 example.com. NS a.iana.net

"a.iana.net A 192.0.34.43"RRSIG(DNSKEY) by com.

"example.com. DS""RRSIG(DS) by com."

7 "www.example.com A 1.2.3.4""example.com DNSKEY"

"RRSIG(DNSKEY) by example.com.""RRSIG(A) by example.com."

20

8 "www.example.com A 1.2.3.4" Last Hop?

Page 21: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Authenticated Denial-of-ExistenceAuthenticated Denial of Existence

Most DNS lookups result in denial-of-existence pUnderstood mandate of offline-techniqueNSEC (Next SECure) Lists all extant RRs associated with an owner name Points to next owner name with extant RR Easy zone enumeration Easy zone enumeration

NSEC3 Hashes owner names

Public salt to prevent pre-computed dictionaries

NSEC3 chain in hashed order Opt-out bit for TLDs to support incremental adoption

21

For TLD type zones to support incremental adoption Non-DNSSEC children not in NSEC3 chain

Page 22: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNS Rebinding Attack[DWF’96, R’01]

g<iframe src="http://www.evil.com"> DNSSEC cannot

h k

ns.evil.comwww.evil.com?

171 64 7 115 TTL = 0

stop this attack

Firew

DNS server171.64.7.115 TTL = 0

192.168.0.100

wall www.evil.com

web servercorporate

Read permitted: it’s the “same origin”

171.64.7.115corporate

web server192.168.0.100

22

Read permitted: it s the same origin

Page 23: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

DNS Rebinding DefensesDNS Rebinding Defenses

Browser mitigation: DNS PinningBrowser mitigation: DNS Pinning Refuse to switch to a new IP Interacts poorly with proxies, VPN, dynamic DNS, …p y p , , y , Not consistently implemented in any browser

Server-side defenses Check Host header for unrecognized domains Authenticate users with something other than IP

Firewall defenses External names can’t resolve to internal addresses

23

Protects browsers inside the organization

Page 24: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Mobile IPv6 ArchitectureMobile IPv6 Architecture

Mobile Node (MN)

IPv6

Mobile Node (MN)

Direct connection via binding updateg p

Corresponding Node (CN)

Home Agent (HA)

Authentication is a requirement

24

Home Agent (HA) Early proposals weak

Page 25: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

802.11i ProtocolAuthentica-tion Server(RADIUS)

AuthenticatorUnAuth/UnAssoc802.1X BlockedNo Key

SupplicantUnAuth/UnAssoc802.1X BlockedNo Key

SupplicantAuth/Assoc802.1X BlockedNo Key

AuthenticatorAuth/Assoc802.1X BlockedNo Key

Authentica-tion Server(RADIUS)

SupplicantAuth/Assoc802.1X BlockedMSK

AuthenticatorAuth/Assoc802.1X BlockedNo Key

Authentica-tion Server(RADIUS)

SupplicantAuth/Assoc802.1X BlockedPMK

AuthenticatorAuth/Assoc802.1X BlockedPMK

Authentica-tion Server(RADIUS)

SupplicantAuth/Assoc802.1X UnBlockedPTK/GTK

AuthenticatorAuth/Assoc802.1X UnBlockedPTK/GTK

Authentica-tion Server(RADIUS)

SupplicantAuth/Assoc802.1X UnBlockedNew GTK

AuthenticatorAuth/Assoc802.1X UnBlockedNew GTK

Authentica-tion Server(RADIUS)

SupplicantAuth/Assoc802.1X UnBlockedPTK/GTK

AuthenticatorAuth/Assoc802.1X UnBlockedPTK/GTK

Authentica-tion Server(RADIUS)(RADIUS)No Key

No KeyNo KeyNo Key No Key (RADIUS)No Key

802.11 Association

MSK No Key (RADIUS)MSK

PMK PMK (RADIUS)No Key

PTK/GTK PTK/GTK (RADIUS)No Key

New GTK New GTK (RADIUS)No Key

PTK/GTK PTK/GTK (RADIUS)No Key

EAP/802.1X/RADIUS Authentication

MSKMSK

4-Way Handshake

Group Key Handshake

25

Data Communication

Page 26: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

AnnouncementsAnnouncements

Homework 2 will be out by ThursHomework 2 will be out by Thurs Due one week from Thursday

26

Page 27: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Perimeter and Internal DefensesPerimeter and Internal Defenses

Commonly deployed defensesCo o y dep oyed de e ses Perimeter defenses – Firewall, IDS

Protect local area network and hosts Keep external threats from internal network

Rest of this lecture

Keep external threats from internal network Internal defenses – Virus scanning

Protect hosts from threats that get through the i t d fperimeter defenses

Extend the “perimeter” – VPN

27

Page 28: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Basic Firewall ConceptBasic Firewall Concept

Separate local area net from internetSeparate local area net from internet

Firewall

Local network Internet

Router

28

All packets between LAN and internet routed through firewall

Page 29: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Packet FilteringPacket FilteringUses transport-layer information only IP Source Address, Destination Address Protocol (TCP, UDP, ICMP, etc) TCP or UDP source & destination ports TCP Flags (SYN, ACK, FIN, RST, PSH, etc) ICMP message type

Examplesa p es DNS uses port 53

Block incoming port 53 packets except known trusted servers

IssuesIssues Stateful filtering Encapsulation: address translation, other complications Fragmentation

29

Fragmentation

Page 30: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Source/Destination Address ForgerySource/Destination Address Forgery

30

Page 31: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

More about networking: port numberingMore about networking: port numbering

TCP connection Server port uses number less than 1024 Client port uses number between 1024 and 16383

Permanent assignmentPermanent assignment Ports <1024 assigned permanently

20,21 for FTP 23 for Telnet 25 for server SMTP 80 for HTTP25 for server SMTP 80 for HTTP

Variable use Ports >1024 must be available for client to make connection

Limitation for stateless packet filtering Limitation for stateless packet filtering If client wants port 2048, firewall must allow incoming traffic

Better: stateful filtering knows outgoing requests Only allow incoming traffic on high port to a machine that has

31

Only allow incoming traffic on high port to a machine that has initiated an outgoing request on low port

Page 32: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Filtering Example: Inbound SMTPFiltering Example: Inbound SMTP

32

Can block external request to internal server based on port number

Page 33: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Filtering Example: Outbound SMTPFiltering Example: Outbound SMTP

33

Known low port out, arbitrary high port inIf firewall blocks incoming port 1357 traffic then connection fails

Page 34: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Stateful or Dynamic Packet FilteringStateful or Dynamic Packet Filtering

34

Page 35: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

TelnetTelnet

Telnet ClientTelnet Server

23 1234

Client opens channel to server; tells server its port number The ACK bit is

number. The ACK bit is not set while establishing the connection but will be set on the remaining packetspackets

Server acknowledges

35Stateful filtering can use this pattern to identify legitimate sessions

Page 36: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

FTPFTP ClientFTP Server

FTP

20Data

21Command 5150 5151 Client opens

Data Command 5150 5151 Client opens command channel to server; tells server second port number

Server acknowledges

Server opens data

pchannel to client’s second port

Client

36

Client acknowledges

Page 37: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Normal IP FragmentationComplication for firewalls

Normal IP Fragmentation

37

Flags and offset inside IP header indicate packet fragmentation

Page 38: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Abnormal FragmentationAbnormal Fragmentation

Low offset allows second packet to overwrite TCP header at receiving host

38

Page 39: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Packet Fragmentation AttackPacket Fragmentation AttackFirewall configuration

TCP port 23 is blocked but SMTP port 25 is allowed TCP port 23 is blocked but SMTP port 25 is allowedFirst packet Fragmentation Offset = 0. DF bit = 0 : "May Fragment"

MF bit 1 "M F t " MF bit = 1 : "More Fragments" Destination Port = 25. TCP port 25 is allowed, so firewall allows packet

Second packet Fragmentation Offset = 1: second packet overwrites all but first 8 bits of

th fi t k tthe first packet DF bit = 0 : "May Fragment" MF bit = 0 : "Last Fragment." Destination Port = 23. Normally be blocked, but sneaks by!

Wh t hWhat happens Firewall ignores second packet “TCP header” because it is fragment of first At host, packet reassembled and received at port 23

39

Page 40: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Proxying FirewallBeyond packet filtering

Proxying Firewall

Application-level proxiespp p Tailored to http, ftp, smtp, etc. Some protocols easier to proxy than others

Policy embedded in proxy programsPolicy embedded in proxy programs Proxies filter incoming, outgoing packets Reconstruct application-layer messages Can filter specific application-layer commands etc Can filter specific application-layer commands, etc.

Example: only allow specific ftp commands Other examples: ?

Several network locations – see next slidesSeveral network locations – see next slides

40

Page 41: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Firewall with application proxiesFirewall with application proxies

Telnet FTP

proxy SMTP proxy proxy

Telnet daemon

SMTP daemon

FTP daemon

h d d

Network Connection

41

Daemon spawns proxy when communication detected …

Page 42: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Screened Host ArchitectureScreened Host Architecture

42

Page 43: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Screened Subnet Using Two RoutersScreened Subnet Using Two Routers

43

Page 44: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Dual Homed Host ArchitectureDual Homed Host Architecture

44

Page 45: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Application-level proxiesApplication level proxies

Enforce policy for specific protocolsp y p p E.g., Virus scanning for SMTP

Need to understand MIME, encoding, Zip archives

Flexible approach but may introduce network delays Flexible approach, but may introduce network delays

“Batch” protocols are natural to proxy SMTP (E-Mail) NNTP (Net news) DNS (Domain Name System) NTP (Network Time Protocol

Must protect host running protocol stackDisable all non required services; keep it simple Disable all non-required services; keep it simple

Install/modify services you want Run security audit to establish baseline

45

Be prepared for the system to be compromised

Page 46: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

ReferencesReferences

Elizabeth D Zwicky William R Cheswick

46

Elizabeth D. ZwickySimon Cooper

D. Brent Chapman

William R CheswickSteven M Bellovin

Aviel D Rubin

Page 47: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Traffic ShapingTraffic ShapingTraditional firewall Allow traffic or not

Traffic shaping Limit certain kinds of traffic Can differentiate by host addr, protocol, etc Multi-Protocol Label Switching (MPLS)

Label traffic flows at the edge of the network and let core grouters identify the required class of service

47

Page 48: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Stanford computer useStanford computer use

48

Page 49: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

PacketShaper ControlsPacketShaper Controls

A partition: Creates a virtual pipe within a link for

each traffic class Provides a min, max bandwidth, Enables efficient bandwidth use

Rate shaped P2P capped at 300kbpsp

Rate shaped HTTP/SSL to give better performance

49

Page 50: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

PacketShaper report: HTTPPacketShaper report: HTTP Outside Web Server Normalized Network Response TimesNetwork Response Times

Inside Web Ser er Normali edNo Shaping Shaping

Inside Web Server Normalized Network Response Times

50 No Shaping Shaping

Page 51: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Host and network intrusion detectionHost and network intrusion detection

Intrusion preventionIntrusion prevention Network firewall

Restrict flow of packets

System security Find buffer overflow vulnerabilities and remove them!

I t i d t tiIntrusion detection Discover system modifications

Tripwire Tripwire

Look for attack in progress Network traffic patterns

51

System calls, other system events

Page 52: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

TripwireTripwire

Outline of standard attackOutline of standard attack Gain user access to system Gain root access Replace system binaries to set up backdoor Use backdoor for future activities

Tripwire detection point: system binaries Compute hash of key system binaries Compare current hash to hash stored earlier Report problem if hash is different

Store reference hash codes on read only medium

52

Store reference hash codes on read-only medium

Page 53: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Is Tripwire too late?Is Tripwire too late?

Typical attack on serverTypical attack on server Gain access Install backdoor

This can be in memory, not on disk!!

Use it

Tripwire Is a good idea

W t t h tt k th t d ’t h t fil Wont catch attacks that don’t change system files Detects a compromise that has happened

53

Remember: Defense in depth

Page 54: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Detect modified binary in memory?Detect modified binary in memory?

Can use system-call monitoring techniquesCan use system call monitoring techniquesFor example [Wagner, Dean IEEE S&P ’01]

Build automaton of expected system calls Build automaton of expected system calls Can be done automatically from source code

Monitor system calls from each program Catch violation

Results so far: lots better than not using source code!

54

Results so far: lots better than not using source code!

Page 55: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Example code and automatonExample code and automaton

Entry(f)Entry(g)open()f(int x) {

x ? getuid() : geteuid();x++

close() getuid() geteuid()

x++}g() {

fd ("f " O RDONLY)

Exit(f)Exit(g)exit()

fd = open("foo", O_RDONLY);f(0); close(fd); f(1);exit(0);

}

55

If code behavior is inconsistent with automaton, something is wrong

Page 56: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

General intrusion detectionGeneral intrusion detection

Many intrusion detection systems

http://www.snort.org/

Many intrusion detection systems Close to 100 systems with current web pages Network-based, host-based, or combination, ,

Two basic models Misuse detection model

Maintain data on known attacks Look for activity with corresponding signatures

Anomaly detection model Anomaly detection model Try to figure out what is “normal” Report anomalous behavior

56

Fundamental problem: too many false alarms

Page 57: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Anomaly DetectionAnomaly Detection

Basic ideaBasic idea Monitor network traffic, system calls Compute statistical propertiesp p p Report errors if statistics outside established range

Example – IDES (Denning, SRI) For each user, store daily count of certain

activities E g Fraction of hours spent reading email E.g., Fraction of hours spent reading email

Maintain list of counts for several days Report anomaly if count is outside weighted norm

57

Report anomaly if count is outside weighted norm

Big problem: most unpredictable user is the most important

Page 58: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Anomaly – sys call sequences[Hofmeyr, Somayaji, Forrest]

Anomaly sys call sequences

Build traces during normal run of programBuild traces during normal run of program Example program behavior (sys calls)

open read write open mmap write fchmod close

Sample traces stored in file (4-call sequences)open read write openread write open mmapread write open mmapwrite open mmap writeopen mmap write fchmodmmap write fchmod close

Report anomaly if following sequence observedopen read read open mmap write fchmod close

58

open read read open mmap write fchmod close

Compute # of mismatches to get mismatch rate

Page 59: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

Difficulties in intrusion detectionDifficulties in intrusion detection

Lack of training dataLack of training data Lots of “normal” network, system call data Little data containing realistic attacks, anomaliesg ,

Data drift Statistical methods detect changes in behavior Attacker can attack gradually and incrementally

Main characteristics not well understood By many measures, attack may be within bounds

of “normal” range of activities

F l id tifi ti tl

59

False identifications are very costly Sys Admin spend many hours examining evidence

Page 60: Network Security Protocols and Defensive ......Ild id tifiti fIncludes identification of: owner’s certificate AS to be advertising the address blocks address blocks expiration date

SummarySummary

Network protocol securityNetwork protocol security IPSEC BGP instability and S-BGPy DNSSEC, DNS rebinding Wireless security – 802.11i/WPA2

Standard network perimeter defenses Firewall

Packet filter (stateless stateful) Application layer proxies Packet filter (stateless, stateful), Application layer proxies Traffic shaping Intrusion detection

60

Anomaly and misuse detection


Recommended