280 likes | 581 Views
network-layer secrecy: sending host encrypts the data in IP datagram TCP and UDP segments; ICMP and SNMP messages. network-layer authentication destination host can authenticate source IP address two principal protocols: authentication header (AH) protocol
E N D
8: Network Security network-layer secrecy: sending host encrypts the data in IP datagram TCP and UDP segments; ICMP and SNMP messages. network-layer authentication destination host can authenticate source IP address two principal protocols: authentication header (AH) protocol encapsulation security payload (ESP) protocol for both AH and ESP, source, destination handshake: create network-layer logical channel called a security association (SA) each SA unidirectional. uniquely determined by: security protocol (AH or ESP) source IP address 32-bit connection ID IPsec: Network Layer Security
8: Network Security firewall Firewalls isolates organization’s internal net from larger Internet, allowing some packets to pass, blocking others. public Internet administered network firewall
8: Network Security 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
8: Network Security 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 Stateless packet filtering Should arriving packet be allowed in? Departing packet let out?
8: Network Security example 1: block incoming and outgoing datagrams with IP protocol field = 17 and with either source or dest port = 23. all incoming, outgoing UDP flows and telnet connections are blocked. example 2: Block inbound TCP segments with ACK=0. prevents external clients from making TCP connections with internal clients, but allows internal clients to connect to outside. Stateless packet filtering: example
8: Network Security Stateless packet filtering: more examples
Access Control Lists • ACL: table of rules, applied top to bottom to incoming packets: (action, condition) pairs 8: Network Security
8: Network Security 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: Stateful packet filtering • stateful packet filter: track status of every TCP connection • track connection setup (SYN), teardown (FIN): can determine whether incoming, outgoing packets “makes sense” • timeout inactive connections at firewall: no longer admit packets
Stateful packet filtering • ACL augmented to indicate need to check connection state table before admitting packet 8: Network Security
8: Network Security filters packets on application data as well as on IP/TCP/UDP fields. example: allow select internal users to telnet outside. Application gateways gateway-to-remote host telnet session 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.
8: Network Security 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. Limitations of firewalls and gateways
8: Network Security 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
8: Network Security Intrusion detection systems • multiple IDSs: different types of checking at different locations application gateway firewall Internet internal network Web server IDS sensors DNS server FTP server demilitarized zone
8: Network Security 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
Availability • Access over Internet must be unimpeded • Context: flooding attacks, in which attackers try to overwhelm system resources • Denial of service (DoS) attacks disrupt availability • Distributed DoS is a coordinated attack from multiple attackers • Example: SYN flood • Problem: server cannot distinguish legitimate handshake from one that is part of this attack • Only difference is whether third part of TCP handshake is sent • Flood can overwhelm communication medium • Can’t do anything about this (except buy a bigger pipe) • Flood can overwhelm resources on legitimate system
Too many half-opened TCP connections at server creates a DoS attack Server is waiting client to finish the connection Buffer space is full and legitimate connection cannot be completed
Prevention of SYN flood: SYN Cookies • Server no longer keeps the client’s state • Embed the state in the sequence number • When SYN received, server computes a sequence number to be function of source, destination, counter, and a secret • The function may be one-way hash function • The secret is known only by the server • Use as reply SYN sequence number • When reply ACK arrives, validate it • The sequence number must be hard to guess
SYN Cookie Server no longer keeps client’s state Client cannot forge a sequence number without actually engaging in handshake Server verifies sequence number with s y = H(source, destination, secret, counter) computed by server s is secret known only by server H is a one-way hash function
Alternative prevention to SYN flood: adaptive Time-Out • Change time-out time as space available for pending connections decreases • Example: modified SunOS kernel • Time-out period shortened from 75 to 15 sec • Formula for queueing pending connections changed: • Process allows up to b pending connections on port • a number of completed connections but awaiting process • p total number of pending connections • c tunable parameter • Whenever a + p > cb, drop current SYN message
used by hosts & routers to communicate network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) network-layer “above” IP: ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error ICMP: Internet Control Message Protocol TypeCodedescription 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header
Slides credits J.F Kurose and K.W. Ross 2: Application Layer 24