Lecture 29

advertisement
7/18/2014
COSC4377
Lennart Johnsson
2013‐12‐03
COSC4377
Lecture 28
COSC4377
Lennart Johnsson
2013‐12‐03
Chapter 8 roadmap
8.1 What is network security?
8.2 Principles of cryptography
8.3 Message integrity
8.4 Securing e‐mail
8.5 Securing TCP connections: SSL
8.6 Network layer security: IPsec
8.7 Securing wireless LANs
8.8 Operational security: firewalls and IDS
Slide from Kurose & Ross, 6th Ed 1
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Firewalls
firewall
isolates organization’s internal net from larger Internet,
allowing some packets to pass, blocking others
public
Internet
administered
network
trusted “good guys”
firewall
untrusted “bad guys”
Slide from Kurose & Ross, 6th Ed COSC4377
Lennart Johnsson
2013‐12‐03
Firewalls: why
prevent denial of service attacks:
 SYN flooding: attacker establishes many bogus TCP
connections, no resources left for “real” connections
prevent illegal modification/access of internal data
 e.g., attacker replaces CIA’s homepage with something else
allow only authorized access to inside network
 set of authenticated users/hosts
three types of firewalls:
 stateless packet filters
 stateful packet filters
 application gateways
Slide from Kurose & Ross, 6th Ed 2
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Stateless packet filtering
Should arriving
packet be allowed in?
Departing packet let
out?
• internal network connected to Internet via router firewall
• router filters packet‐by‐packet, decision to forward/drop packet based on:
–
–
–
–
source IP address, destination IP address
TCP/UDP source and destination port numbers
ICMP message type
TCP SYN and ACK bits
Slide from Kurose & Ross, 6th Ed COSC4377
Lennart Johnsson
2013‐12‐03
Stateless packet filtering: example
• example 1: block incoming and outgoing datagrams with IP protocol field = 17 and with either source or dest port = 23
– result: all incoming, outgoing UDP flows and telnet connections are blocked
• example 2: block inbound TCP segments with ACK=0.
– result: prevents external clients from making TCP connections with internal clients, but allows internal clients to connect to outside.
Slide from Kurose & Ross, 6th Ed 3
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Stateless packet filtering: more examples
Policy
Firewall Setting
No outside Web access.
Drop all outgoing packets to any IP
address, port 80
No incoming TCP connections,
except those for institution’s
public Web server only.
Drop all incoming TCP SYN packets
to any IP except 130.207.244.203,
port 80
Prevent Web-radios from eating
up the available bandwidth.
Drop all incoming UDP packets except DNS and router broadcasts.
Prevent your network from being
used for a smurf DoS attack.
Drop all ICMP packets going to a
“broadcast” address (e.g.
130.207.255.255).
Prevent your network from being
tracerouted
Drop all outgoing ICMP TTL expired
traffic
Slide from Kurose & Ross, 6th Ed Lennart Johnsson
2013‐12‐03
COSC4377
Access Control Lists
 ACL: table of rules, applied top to bottom to incoming
packets: (action, condition) pairs
action
source
address
dest
address
protocol
source
port
dest
port
allow
222.22/16
outside of
222.22/16
TCP
> 1023
80
allow
outside of
222.22/16
TCP
80
> 1023
ACK
allow
222.22/16
UDP
> 1023
53
---
allow
outside of
222.22/16
222.22/16
UDP
53
> 1023
----
deny
all
all
all
all
all
all
222.22/16
outside of
222.22/16
flag
bit
any
Slide from Kurose & Ross, 6th Ed 4
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Stateful packet filtering
• stateless packet filter: heavy handed tool
– admits packets that “make no sense,” e.g., dest port = 80, ACK bit set, even though no TCP connection established:
action
allow

source
address
dest
address
outside of
222.22/16
222.22/16
protocol
source
port
dest
port
flag
bit
TCP
80
> 1023
ACK
stateful packet filter: track status of every TCP connection
 track connection setup (SYN), teardown (FIN): determine
whether incoming, outgoing packets “makes sense”
 timeout inactive connections at firewall: no longer admit
packets
Slide from Kurose & Ross, 6th Ed Lennart Johnsson
2013‐12‐03
COSC4377
Stateful packet filtering

ACL augmented to indicate need to check connection
state table before admitting packet
action
source
address
dest
address
proto
source
port
dest
port
allow
222.22/16
outside of
222.22/16
TCP
> 1023
80
allow
outside of
222.22/16
TCP
80
> 1023
ACK
allow
222.22/16
UDP
> 1023
53
---
allow
outside of
222.22/16
222.22/16
UDP
53
> 1023
----
deny
all
all
all
all
all
all
222.22/16
outside of
222.22/16
flag
bit
check
conxion
any
x
x
Slide from Kurose & Ross, 6th Ed 5
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Application gateways
gateway-to-remote
host telnet session
• filters packets on application data as well as on IP/TCP/UDP fields.
• example: allow select internal users to telnet outside.
host-to-gateway
telnet session
application
gateway
router and filter
1. require all telnet users to telnet through gateway.
2. for authorized users, gateway sets up telnet connection to
dest host. Gateway relays data between 2 connections
3. router filter blocks all telnet connections not originating
from gateway.
Slide from Kurose & Ross, 6th Ed Lennart Johnsson
2013‐12‐03
COSC4377
Application gateways
• filter packets on host-to-gateway
application data as well as telnet session
on IP/TCP/UDP fields.
• example: allow select internal users to telnet outside
application
gateway
router and filter
gateway-to-remote
host telnet session
1. require all telnet users to telnet through gateway.
2. for authorized users, gateway sets up telnet connection to
dest host. Gateway relays data between 2 connections
3. router filter blocks all telnet connections not originating
from gateway.
Slide from Kurose & Ross, 6th Ed 6
7/18/2014
COSC4377
Lennart Johnsson
2013‐12‐03
Limitations of firewalls, gateways
• IP spoofing: router can’t know if data “really”
comes from claimed source
• if multiple app’s. need special treatment, each has own app. gateway
• client software must know how to contact gateway.
– e.g., must set IP address of proxy in Web browser
• filters often use all or nothing policy for UDP
• tradeoff: degree of communication with outside world, level of security
• many highly protected sites still suffer from attacks
Slide from Kurose & Ross, 6th Ed COSC4377
Lennart Johnsson
2013‐12‐03
Intrusion detection systems
• packet filtering:
– operates on TCP/IP headers only
– no correlation check among sessions • IDS: intrusion detection system
– deep packet inspection: look at packet contents (e.g., check character strings in packet against database of known virus, attack strings)
– examine correlation among multiple packets
• port scanning
• network mapping
• DoS attack
Slide from Kurose & Ross, 6th Ed 7
7/18/2014
Lennart Johnsson
2013‐12‐03
COSC4377
Intrusion detection systems
• multiple IDSs: different types of checking at different locations
firewall
internal
network
IDS
sensors
Internet
Web
DNS
server FTP server
server
demilitarized
zone
Slide from Kurose & Ross, 6th Ed COSC4377
Lennart Johnsson
2013‐12‐03
Network Security (summary)
basic techniques…...
– cryptography (symmetric and public)
– message integrity
– end‐point authentication
…. used in many different security scenarios
–
–
–
–
secure email
secure transport (SSL)
IP sec
802.11
operational security: firewalls and IDS
Slide from Kurose & Ross, 6th Ed 8
7/18/2014
COSC4377
Lennart Johnsson
2013‐12‐03
Sample Certificate
Certificate: Data: Version: 1 (0x0) Serial Number: 7829 (0x1e95) Signature Algorithm: md5WithRSAEncryption Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/emailAddress=server‐certs@thawte.com Validity Not Before: Jul 9 16:04:02 1998 GMT Not After : Jul 9 16:04:02 1999 GMT Subject: C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/emailAddress=baccala@freesoft.org Subject Public Key Info: Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit) Modulus (1024 bit): 00:b4:31:98:0a:c4:bc:62:c1:88:aa:dc:b0:c8:bb: 33:35:19:d5:0c:64:b9:3d:41:b2:96:fc:f3:31:e1: 66:36:d0:8e:56:12:44:ba:75:eb:e8:1c:9c:5b:66: 70:33:52:14:c9:ec:4f:91:51:70:39:de:53:85:17: 16:94:6e:ee:f4:d5:6f:d5:ca:b3:47:5e:1b:0c:7b: c5:cc:2b:6b:c1:90:c3:16:31:0d:bf:7a:c7:47:77: 8f:a0:21:c7:4c:d0:16:65:00:c1:0f:d7:b8:80:e3: d2:75:6b:c1:ea:9e:5c:5c:ea:7d:c1:a1:10:bc:b8: e8:35:1c:9e:27:52:7e:41:8f Exponent: 65537 (0x10001) Signature Algorithm: md5WithRSAEncryption 93:5f:8f:5f:c5:af:bf:0a:ab:a5:6d:fb:24:5f:b6:59:5d:9d: 92:2e:4a:1b:8b:ac:7d:99:17:5d:cd:19:f6:ad:ef:63:2f:92: ab:2f:4b:cf:0a:13:90:ee:2c:0e:43:03:be:f6:ea:8e:9c:67: d0:a2:40:03:f7:ef:6a:15:09:79:a9:46:ed:b7:16:1b:41:72: 0d:19:aa:ad:dd:9a:df:ab:97:50:65:f5:5e:85:a6:ef:19:d1: 5a:de:9d:ea:63:cd:cb:cc:6d:5d:01:85:b5:6d:c8:f3:d9:f7: 8f:0e:fc:ba:1f:34:e9:96:6e:6c:cf:f2:ef:9b:bf:de:b5:22: 68:9f http://en.wikipedia.org/wiki/X.509
9
Download