630 likes | 891 Views
Internetworking Protocols and Programming CSE 5348 / 7348 Instructor: Anil Gurijala Session 12 (Ch. 32 & 33 ). Topics. Internet Security IPsec SSL Firewall Design IPv6. Ref: http://pirate.shu.edu/~jenninju/InternetLaw/10_UCITA/SSL.pdf. Two fundamental Techniques. Perimeter security
E N D
Internetworking Protocols and Programming CSE 5348 / 7348 Instructor:Anil Gurijala Session 12 (Ch. 32 & 33 )
Topics • Internet Security • IPsec • SSL • Firewall Design • IPv6 Ref: http://pirate.shu.edu/~jenninju/InternetLaw/10_UCITA/SSL.pdf
Two fundamental Techniques • Perimeter security • Allows an organization to determine the services and networks it will make availabe to outsiders and the extent to which outsiders can use resources. • Encryption
Many aspects of Protection • Data integrity: A secure system must protect information from unauthorized change. • Data availability: The system must guarantee that outsiders cannot prevent legitimate access to data • Privacy or confidentiality. The system must prevent outsiders from making copies of data as it passes across a network or understanding the contexts if copies are made. • Authorization • Authentication • Replay avoidance: must prevent a retransmitted copy of a packet from being accepted
Internet Security • An authorization scheme that uses a remote machine’s IP address to authenticate its identity does not suffice in an unsecured internet. An imposter who gains control of an intermediate router can obtain access by impersonating an authorized clients.
IPSec • Set of protocols, not a single one. • Both flexible and extensible • E.g. an application that employs IPsec can choose whether to use an authentication facility that validates the sender or to use an encryption facility that also ensures the payload will remain confidential; the choices can be asymmetric.
IPsec Authentication Header IP Header Authentication Header TCP Header TCP Data Next Header Payload Len Reserved Security Parameters Index Sequence Number Authentication Data
IPSec Headers • Next Header: specifies the upper layer protocol. • PAYLOAD LEN: Specifies the length of the authentication header. • SEQUENCE NUMBER: contains a unique sequence number of each packet sent; the number starts at zero when a particular security algorithm is selected and increases monotonically. • SECURITY PARAMETER INDEX: specifies the security scheme used • AUTHENTICATION DATA: contains data for data for the selected security scheme.
Security Association • The security scheme includes an authentication algorithm, a key that that algorithm uses, a lifetime over which the key will remain valid, a lifetime over which the destination agrees to use the algorithm and a list of source addresses that are authorized to use the scheme. This can not fit into the header. • IPsec arranges for each receiver to collect all the details about a security scheme into an abstraction known as a Security Association. • Each SA is given a number, known as a security parameters index, through which it is identified. Before sender can use IPsec to communicate with a receiver, the sender must know the index value for a particular SA. The Sender then places the value in the field SECURITY PARAMTEERS INDEX of each outgoing datagram.
Security Association • Index values are not globally specified. • Each destination creates as many SAs as it needs, and assigns an index value to each. • The destination can specify a life-time for each SA, and can reuse index values once an SA becomes invalid. • Consequently, the ixex cannot be interpreted without consulting the destination.
IPsec Encapsulating Security Payload • Handles both Privacy and Authentication. • Uses Encapsulating Security Protocol (ESP). More complex than authentication header. • A value 50 in the PROTOCOL field of the datagram informs a receiver that the datagram carries ESP.
ESP Protocol Header Format IP HEADER ESP HEADER TCP HEADER TCP DATA ESP TRAILER ESP AUTH ESP HEADER Security Parameters Index Sequence Number
ESP Trailer ESP TRAILER 0-255 OCTETS of PADDING PAD LENGTH NEXT HEADER ESP Authentication Data • PADDING • Some decryption algorithms require zeroes following an encrypted mesg. • NEXT HEADER field must be right justified within a 4-octet field. IPsec requires the authentication data that follows the trailer to be aligned at the start of a 4-octet boundary. • Some sites may choose to add random amount of padding to each datagram so eavesdroppers at intermediate points along the path cannot use the size of datagram to guess its purpose.
Authentication and Mutable Header Fields • IPsec authenticates only immutable fields (e.g. the source address and protcol types).
IPsec Tunneling • IPsec is designed to support encrypted tunnel. OUTER IP Header Authentication Header INNER IP DATAGRAM OUTERIP HEADER ESP HEADER INNER IP DATAGRAM ESP TRAILER ESP AUTH
Required Security Algorithms • Defines a minimal set of algorithms that are mandatory. • Authentication • HMAC with MD5 RFC2403 • HMAC with SHA-1 RFC2404 • Encapsulating Security Payload • DES in CBC mode RFC2405 • HMAC with MD5 RFC2403 • HMAC with SHA-1 RFC 2404 • Null Authentication • Null Encryption
Secure Sockets • Secure Sockets Layer (SSL) originally developed by Netscape. • SSL resides at the same layer as the socket API. • When a client uses SSL to contact a server, the SSL protocol allows each side to authenticate itself to the other. The two sides then negotiate to select an encryption algorithm that they both support. Finally, SSL allows the two sides to establish an encrypted connection.
SSL Protocol Layer HTTP Secure Socket Layer TCP
How SSL Works • Includes two sub protocols • SSL Record Protocol • Defines the format used to transmit data. • SSL Handshake Protocol • Used to exchange a series of messages between SSL enabled Server and Client.
SSL Handshake • Authenticate the Server to the Client • Allow the client and server to select the cryptographic algorithms, or ciphers. • Optionally authenticate the client to the Server. • Use public-key encryption techniques to generate shared secrets. • Establish an encrypted SSL Connection.
SSL Handshake Messages • The client sends the server the client’s SSL version number, cipher settings, randomly generated data, and other information the server needs to communicate with client using SSL. • The server sends the client the server’s SSL version number, cipher settings, randomly generated data, and other information the client needs to communicate with the server over SSL. The server also sends its own certificate and, if the client is requesting a server resource that requires client authentication, requests the client’s certificate. • The client uses some of the information sent by the server to authenticate the server.
SSL Handshake Messages • Using all data generated in the handshake so far, the client creates the premaster secret for the session, encrypts it with the server’s public key and sends the encrypted premaster secret to the server. • If the server has requested client authentication, the client also signs another piece of data that is unique to this handshake and known by both the client and server. In this case the client sends both the signed data and client’s own certificate to the sever along with the encrypted premaster secret.
SSL Handshake Messages • If the server has requested client authentication, the server attempts to authenticate the client. If the client cannot be authenticated, the session is terminated. If the client can be successfully authenticated, the server uses its private key to decrypt the premaster secret, then performs a series of steps to generate the master secret. • Both the client and the server use the master secret to generate the session keys, which are symmetric keys used to encrypt and decrypt information exchanged during the SSL session and to verify its integrity.
SSL Handshake Messages • The client sends a message to the server informing it that future message from the client will be encrypted with the session key. It then sends a separate message indicating that the client portion of the handshake is finished. • The server sends a message to the client informing it that future message from the server will be encrypted with session key. It then sends a separate message indicating that the server portion of the handshake is finished.
Certificate • Certificates are digital documents attesting to the binding of a public key to an individual. • They allow verification of the claim the a specific public key does in fact belong to a specific entity. • Certificates help prevent someone from using a phony key to impersonate someone else. • A certificate contains, • public key • Name • Expiration date, the name of the certifying authority that issued the certificate • A serial number • Etc.
SSL Certificate • The domain for which the certificate was issued. • The owner of the certificate. • The physical location of the owner. • The validity dates of the certificates.
Firewalls and Internet Access • Handles the problem of screening a particular network or an organization from unwanted communication. • A firewall partitions an internet into two regions, inside and outside. Or Intranet or Extranet.
Multiple Connection and Weakest Links • An organization that has multiple external connections must install a firewall on each external connections and must coordinate all firewalls. Failure to restrict access identically on all firewalls can leave the organization vulnerable.
Firewall Implementation • Firewall simply blocks all unauthorized communication between computers I the organization and computers outside the organization. • Implementation depends on the network technology, the capacity of the connection, the traffic load, and the organization’s policies. • A firewall must have hardware and software optimized for the task. • Most commercial routers include a high-speed filtering mechanism that can be used to perform much of the necessary work. • A manager can configure the filter in a router to request that the router block specified datagrams.
Packet-level filters OUTSIDE 2 1 INSIDE ARRIVES on Interface IP Source IP Dest. Protocol Src Port Dest. Port 2 * * TCP * 21 (FTP) 2 * * TCP * 23 (TELNET) 1 128.5.0.0/16 * TCP * 25 (E-mail Server) 2 * * UDP * 43 (WHOIS) 2 * * UDP * 69 (TFTP) 2 * * TCP * 79 (FINGER)
Security and Packet Filter Spec. • Drawbacks • Number of well-known ports is large and growing rapidly. Listing each eservice requires a manager to update the list continually; an error of omission can leave the firewall vulnerable. • Much of traffic on an internet does not travel to or from a well-known port. In addition to programmers who can choose port numbers of their private client-server applications, services like RPC assign ports dynamically. • Listing port of well-known services leaves the firewall vulnerable to tunneling. Tunneling can circumvent security if a host or routers on the inside agrees to accept encapsulated datagrams from an outsider, remove one layer of encapsulation and forward the datagram on to the serivce that would otherwise be restricted by the firewall. A packet allow a manager to specify which datagrams to admit instead of which datagrams to block can make such restrictions easy to specify.
Proxy Access through Firewall Global Internet Intranet Bastion Host Manually enabled bypass
Firewall Implementations Global Internet Intranet Intranet Bastion Host R2 R1 H Bastion Host R2 R3 R4 R5 R1 H Bastion Host
Monitoring • Active • Firewall notifies the manager whenever an incident occurs • Passive • Firewall logs a record of each incident in a file on disk.
Why Change • New Computer and Communication Technologies • New Applications • Increases In Size and Load
Motivation for IPv4 • Changes since IPv4 inception • Processor performance has been increase two orders of magnitude, • Memory sizes increased by a factor of 100 • Network BW of Internet Backbone by a factor of 7000 • LAN technologies emerged • Number of hosts about 56 millions and increasing.
IPv6 Features • Larger Addresses: Address field length 128 bits • Extended Address Hierarchy: defines a hierarchy of ISPs as well as hierarchical structure within a given site. • Flexible Header Format • Improved Options • Provision for Protocol extensions • Support for Auto-configuration and renumbering • Support for Resource allocation
General Form of IP Datagram Base Header Extension Header1 …… Extension Header N DATA
IPv6 Base Header Format 0 4 12 31 VERS TRAFFIC CLASS FLOW LABEL PAYLOAD LENGTH NEXT HEADER HOP LIMIT SOURCE ADDRESS DESTINATION ADDRESS
Changes • Alignment has been changed from 32 bits to 64 bits • HLEN removed. Datagram length has been replaced by PAYLOAD LENGTH • The size of SA and DA increased to 16 octets each.
Changes • Fragmentation information has been moved out of fixed fields in based header to extended header. • TTL is replaced by HOP LIMIT. • SERVICE TYPE is renamed to be a TRAFFIC CLASS field, and extended with a FLOW LABEL Field. • The PROTOCOL filed has been replaced by a field that specifies the type of the next header.
IPv6 Datagram Length Specifications • Based header is fixed= 40 Octets. HLEN is moved to Extended header. • PAYLOAD Length indicates the length of the payload and does not include the header part.
Parsing an IPv6 Header Base Header NEXT = TCP TCP Segment Base Header NEXT = ROUTE Route Headr NEXT = TCP TCP Segment Base Header NEXT = ROUTE Route Header NEXT = AUTH Auth Headr NEXT = TCP TCP Segment
IPv6 Fragmentation and Reassembly • In IPv6 the source fragments the datagrams. • PATH MTU Discovery is used. Minimum MTU 1280 octets. 0 8 12 31 RS M NEXT HEADER RESERVED FRAGMENT OFFSET DATAGRAM IDENTIFICATION
End2End Fragmentation and Route Change • When a router discovers that fragmentation is needed (due to change in the routing path), it sends ICMP error message to the source. • The source sends another Path MTU discovery to determine new minimum MTU.
IPv6 Source Routing 0 8 31 SEG LEFT NEXT HEADER HDR EXT LEN ROUTING TYPE TYPE-SPECIFIC DATA ROUTING TYPE = 0; Loose Source Routing.
IPv6 Options • IPv6 also supports options. • Two types of additional extension headers for Options • Hop by Hop Extension Header • End to End Extension Header 0 8 31 NEXT HEADER HDR LEN TYPE-SPECIFIC DATA
IPv6 Options TYPE LENGTH VALUE Bits in TYPE Meaning 00 Skip this option 01 Discard datagram; do not send ICMP message 10 Discard datagram; send ICMP message to source 11 Discard datagram: Send ICMP for non-multicast
Size of IPv6 Address Space • Every person on the planet can have sufficient addresses to have their own internet of the current size. • 10^24 addresses per square meter. • If addresses are assigned at the rate of one million addresses per microsecond, it takes 10^20 years to assign all possible addresses.