Chapter 8
Security – Pt 2
Computer
Networking: A Top Down Approach
6th edition
Jim Kurose, Keith Ross Addison-Wesley
March 2012
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved
IC322
Fall 2014
Network Vulnerability Examples
v
Application Layer – DNS
§ Bandwidth Flooding, Poisoning, Man-in-the-middle Attacks
v
Transport Layer – TCP
§ SYN Flood Attack
v
Link Layer - Switched LAN
§ Switch Poisoning Attack
v
Network Layer – Datagrams
§ 8.8 Operational security: firewalls and IDS
Application Layer - DNS
v
DDoS bandwidth-flooding attack
§ sends a deluge of packets to each DNS root server, so the majority of legitimate DNS queries never get answered.
v
DNS poisoning attack,
§ send bogus replies to a DNS server, tricking the server into accepting bogus records into its cache.
v
Man-in-the-middle attack
§ intercept queries from hosts and returns bogus replies .
v
Exploit the DNS infrastructure
§ launch a DDoS attack against a targeted host by causing DNS server to send a deluge of replies to the target.
Transport Layer - TCP
v
TCP SYN flood attack
§ Server allocates and initializes connection variables and buffers in response to a received SYN.
§ Server sends a SYNACK awaits an ACK.
§ If no ACK received, after set time connection terminated and allocated resource reclaimed.
v
Attacker sends a large number of SYN segments, without completing the third handshake step.
§ Can be amplified by sending the SYNs from multiple sources, creating a DDoS SYN flood attack
v
Defense: SYN cookies
Link Layer – Switched LAN
v
Review
§ When node A sends a frame to node B, and there is an entry for node B in the switch table, then the switch will forward the frame only to node B. If node C is running a sniffer, node C will not be able to sniff this A-to-B frame.
§ However, node C can still sniff any broadcast messages.
v
Switch Poisoning
§ Send tons of packets to the switch with many different bogus source MAC addresses, filling the switch table with bogus entries and leaving no room for the MAC addresses of the legitimate nodes.
§ This causes the switch to broadcast most frames, which can then be picked up by the sniffer
Network Layer - Datagrams
v
Attackers, knowing the IP address range of your
network, can easily send IP datagrams to addresses in your range.
v
These datagrams can do all kinds of devious things
§ mapping your network with ping sweeps and port scans
§ crashing vulnerable hosts with malformed packets
§ flooding servers with a deluge of lCMP packets
§ infecting hosts by including malware in the packets
v
Two popular defense mechanisms to malicious packet attacks
§ Firewalls and Intrusion Detection Systems (lOSs).
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
Firewalls
isolates organization’s internal net from larger Internet, allowing some packets to pass, blocking others
firewall
administered network
public Internet
firewall
trusted “good guys” untrusted “bad guys”
Firewalls: why
prevent denial of service attacks:
v SYN flooding: attacker establishes many bogus TCP connections, no resources left for “real” connections prevent illegal modification/access of internal data
v e.g., attacker replaces CIA’s homepage with something else allow only authorized access to inside network
v set of authenticated users/hosts three types of firewalls:
v stateless packet filters
v stateful packet filters
v application gateways
Stateless packet filtering
v internal network connected to Internet via router firewall
v 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
Should arriving packet be allowed in?
Departing packet let out?
Stateless packet filtering: example
v 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
v 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.
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
Stateless packet filtering : more examples
action source address
dest
address protocol source port
dest port
flag bit allow 222.22/16 outside of
222.22/16 TCP > 1023 80 any
allow outside of 222.22/16
222.22/16
TCP 80 > 1023 ACK
allow 222.22/16 outside of
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
Access Control Lists
v
ACL:
table of rules, applied top to bottom to incoming packets: (action, condition) pairsStateful packet filtering
v 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 source address
dest
address protocol source port
dest port
flag bit allow outside of
222.22/16
222.22/16
TCP 80 > 1023 ACK
v 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
action source address
dest
address proto source port
dest port
flag bit
check conxion allow 222.22/16 outside of
222.22/16 TCP > 1023 80 any
allow outside of 222.22/16
222.22/16
TCP 80 > 1023 ACK x
allow 222.22/16 outside of
222.22/16 UDP > 1023 53 ---
allow outside of 222.22/16
222.22/16
UDP 53 > 1023 ---- x
deny all all all all all all
Stateful packet filtering
v ACL augmented to indicate need to check connection state table before admitting packet
Application gateways
v filters packets on application data as well as on IP/TCP/
UDP fields.
v example: allow select internal users to telnet outside.
host-to-gateway telnet session
gateway-to-remote host 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.
Application gateways
v filter packets on
application data as well as on IP/TCP/UDP fields.
v example: allow select internal users to telnet outside
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.
application gateway
host-to-gateway telnet session
router and filter
gateway-to-remote host telnet session
Limitations of firewalls, gateways
v IP spoofing: router can’t know if data “really”
comes from claimed source
v if multiple apps need
special treatment, each has own app. gateway
v client software must know how to contact gateway.
§ e.g., must set IP
address of proxy in Web browser
v filters often use all or nothing policy for UDP
v tradeoff: degree of communication with outside world, level of security
v many highly protected sites still suffer from attacks
Intrusion detection systems
v
packet filtering:
§ operates on TCP/IP headers only
§ no correlation check among sessions
v
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
Web server FTP server
DNS server
Internet
demilitarized zone
firewall
IDS sensors
Intrusion detection systems
v
multiple IDSs: different types of checking at different locations
internal network
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