COSC4377. Chapter 8 roadmap

Similar documents
Lecture 9: Network Level Security IPSec

CSC 4900 Computer Networks: Security Protocols (2)

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Managing and Securing Computer Networks. Guy Leduc. Chapter 7: Securing LANs. Chapter goals: security in practice: Security in the data link layer

Chapter 8 Security. Computer Networking: A Top Down Approach

Chapter 8 Security. Computer Networking: A Top Down Approach. Andrei Gurtov. 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016

Chapter 8 Network Security. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

Chapter 8 Network Security

Chapter 8 Network Security

Chapter 5: Network Layer Security

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

Chapter 4: Securing TCP connections

Chapter 8 Network Security

IPSec. Slides by Vitaly Shmatikov UT Austin. slide 1

Encryption. INST 346, Section 0201 April 3, 2018

IPSec. Overview. Overview. Levente Buttyán

Network Encryption 3 4/20/17

IP Security. Have a range of application specific security mechanisms

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

IP Security IK2218/EP2120

Protocols, Technologies and Standards Secure network protocols for the OSI stack P2.1 WLAN Security WPA, WPA2, IEEE i, IEEE 802.1X P2.

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Computer Networks II

CIS 6930/4930 Computer and Network Security. Topic 8.1 IPsec

Cryptography and Network Security Chapter 16. Fourth Edition by William Stallings

Chapter 6. IP Security. Dr. BHARGAVI H. GOSWAMI Department of Computer Science Christ University

The Internet community has developed application-specific security mechanisms in a number of application areas, including electronic mail (S/MIME,

Computer Security 3e. Dieter Gollmann. Security.di.unimi.it/sicurezza1415/ Chapter 16: 1

Cryptography and Network Security. Sixth Edition by William Stallings

CSCE 715: Network Systems Security

CSC 6575: Internet Security Fall 2017

CSC 8560 Computer Networks: Security Protocols

14. Internet Security (J. Kurose)

Internet security and privacy

The IPsec protocols. Overview

EEC-682/782 Computer Networks I

Int ernet w orking. Internet Security. Literature: Forouzan: TCP/IP Protocol Suite : Ch 28

Internet Security. - IPSec, SSL/TLS, SRTP - 29th. Oct Lee, Choongho

Lecture 13 Page 1. Lecture 13 Page 3

05 - WLAN Encryption and Data Integrity Protocols

Cryptography and secure channel. May 17, Networks and Security. Thibault Debatty. Outline. Cryptography. Public-key encryption

Lecture 12 Page 1. Lecture 12 Page 3

IPsec and SSL/TLS. Applied Cryptography. Andreas Hülsing (Slides mostly by Ruben Niederhagen) Dec. 1st, /43

Chapter 8. Network Security. Cryptography. Need for Security. An Introduction to Cryptography 10/7/2010

Chapter 6/8. IP Security

L13. Reviews. Rocky K. C. Chang, April 10, 2015

Network Security Chapter 8

Network Security - ISA 656 IPsec IPsec Key Management (IKE)

IPsec (AH, ESP), IKE. Guevara Noubir CSG254: Network Security

HW/Lab 4: IPSec and Wireless Security. CS 336/536: Computer Network Security DUE 11 am on 12/01/2014 (Monday)

Computer Security 3e. Dieter Gollmann. Security.di.unimi.it/sicurezza1516/ Chapter 16: 1

CS Computer Networks 1: Authentication

VPNs and VPN Technologies

Computer Networking. What is network security? Chapter 7: Network security. Symmetric key cryptography. The language of cryptography

Overview. SSL Cryptography Overview CHAPTER 1

Virtual Private Network

Chapter 8. Network Security. Need for Security. An Introduction to Cryptography. Transposition Ciphers One-Time Pads

CS 356 Internet Security Protocols. Fall 2013

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

8. Network Layer Contents

Transport Level Security

Cryptography and Network Security

IP Security Part 1 04/02/06. Hofstra University Network Security Course, CSC290A

INTERNET PROTOCOL SECURITY (IPSEC) GUIDE.

Lecture 9a: Secure Sockets Layer (SSL) March, 2004

CONTENTS. vii. Chapter 1 TCP/IP Overview 1. Chapter 2 Symmetric-Key Cryptography 33. Acknowledgements

Link & end-to-end protocols SSL/TLS WPA 2/25/07. Outline. Network Security. Networks. Link and End-to-End Protocols. Link vs. End-to-end protection

INFS 766 Internet Security Protocols. Lectures 7 and 8 IPSEC. Prof. Ravi Sandhu IPSEC ROADMAP

Security in IEEE Networks

Lecture Nov. 21 st 2006 Dan Wendlandt ISP D ISP B ISP C ISP A. Bob. Alice. Denial-of-Service. Password Cracking. Traffic.

Kurose & Ross, Chapters (5 th ed.)

IP Security Discussion Raise with IPv6. Security Architecture for IP (IPsec) Which Layer for Security? Agenda. L97 - IPsec.

Sample excerpt. Virtual Private Networks. Contents

Internet and Intranet Protocols and Applications

Wireless Network Security

Information Security & Privacy

Junos Security. Chapter 8: IPsec VPNs Juniper Networks, Inc. All rights reserved. Worldwide Education Services

Chapter 32 Security in the Internet: IPSec, SSL/TLS, PGP,

CIS 6930/4930 Computer and Network Security. Final exam review

Introduction to IPsec. Charlie Kaufman

Security issues: Encryption algorithms. Threats Methods of attack. Secret-key Public-key Hybrid protocols. CS550: Distributed OS.

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

CSC 8560 Computer Networks: Network Security

Network Security: IPsec. Tuomas Aura

Wireless Security. Comp Sci 3600 Security. Attacks WEP WPA/WPA2. Authentication Encryption Vulnerabilities

Lehrstuhl für Netzarchitekturen und Netzdienste Fakultät für Informatik Technische Universität München. ilab. Lab 8 SSL/TLS and IPSec

VPN and IPsec. Network Administration Using Linux. Virtual Private Network and IPSec 04/2009

SSL/TLS. How to send your credit card number securely over the internet

On the Internet, nobody knows you re a dog.

CSE509: (Intro to) Systems Security

IP Security. Cunsheng Ding HKUST, Kong Kong, China

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Security Architecture. Lecture 13: Prof. Shervin Shirmohammadi CEG

Chapter 8 Web Security

Security: Focus of Control. Authentication

Chapter 8. Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004.

Computer Networks. Wenzhong Li. Nanjing University

Protocol Architecture (2) Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

Security: Focus of Control

The World Wide Web is widely used by businesses, government agencies, and many individuals. But the Internet and the Web are extremely vulnerable to

Internet security and privacy

Transcription:

Lecture 28 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 1

SSL: Secure Sockets Layer widely deployed security protocol supported by almost all browsers, web servers https billions $/year over SSL mechanisms: [Woo 1994], implementation: Netscape variation TLS: transport layer security, RFC 2246 provides confidentiality integrity authentication original goals: Web e commerce transactions encryption (especially credit card numbers) Web server authentication optional client authentication minimum hassle in doing business with new merchant available to all TCP applications secure socket interface SSL and TCP/IP Application TCP IP normal application Application SSL TCP IP application with SSL SSL provides application programming interface (API) to applications C and Java SSL libraries/classes readily available 2

Could do something like PGP: m K Ā. H(. - ) K A ( ) - K A (H(m)) + K S (.) K S m K S K +. B ( ) K B + + + K B (K S ) Internet but want to send byte streams & interactive data want set of secret keys for entire connection want certificate exchange as part of protocol: handshake phase Toy SSL: a simple secure channel handshake: Alice and Bob use their certificates, private keys to authenticate each other and exchange shared secret key derivation: Alice and Bob use shared secret to derive set of keys data transfer: data to be transferred is broken up into series of records connection closure: special messages to securely close connection 3

Toy: a simple handshake MS: master secret EMS: encrypted master secret Toy: key derivation considered bad to use same key for more than one cryptographic operation use different keys for message authentication code (MAC) and encryption four keys: K c = encryption key for data sent from client to server M c = MAC key for data sent from client to server K s = encryption key for data sent from server to client M s = MAC key for data sent from server to client keys derived from key derivation function (KDF) takes master secret and (possibly) some additional random data and creates the keys 4

Toy: data records why not encrypt data in constant stream as we write it to TCP? where would we put the MAC? If at end, no message integrity until all data processed. e.g., with instant messaging, how can we do integrity check over all bytes sent before displaying? instead, break stream in series of records each record carries a MAC receiver can act on each record as it arrives issue: in record, receiver needs to distinguish MAC from data want to use variable length records length data MAC Toy: sequence numbers problem: attacker can capture and replay record or re order records solution: put sequence number into MAC: MAC = MAC(M x, sequence data) note: no sequence number field (M x = shared secret) problem: attacker could replay all records solution: use nonce 5

Toy: control information problem: truncation attack: attacker forges TCP connection close segment one or both sides thinks there is less data than there actually is. solution: record types, with one type for closure type 0 for data; type 1 for closure MAC = MAC(M x, sequence type data) length type data MAC Toy SSL: summary bob.com encrypted 6

Toy SSL isn t complete how long are fields? which encryption protocols? want negotiation? allow client and server to support different encryption algorithms allow client and server to choose together specific algorithm before data transfer SSL cipher suite cipher suite public key algorithm symmetric encryption algorithm MAC algorithm SSL supports several cipher suites negotiation: client, server agree on cipher suite client offers choice server picks one common SSL symmetric ciphers DES Data Encryption Standard: block 3DES Triple strength: block RC2 Rivest Cipher 2: block RC4 Rivest Cipher 4: stream SSL Public key encryption RSA 7

Real SSL: handshake (1) Purpose 1. server authentication 2. negotiation: agree on crypto algorithms 3. establish keys 4. client authentication (optional) Real SSL: handshake (2) 1. client sends list of algorithms it supports, along with client nonce 2. server chooses algorithms from list; sends back: choice + certificate + server nonce 3. client verifies certificate, extracts server s public key, generates pre_master_secret, encrypts with server s public key, sends to server 4. client and server independently compute encryption and MAC keys from pre_master_secret and nonces as defined by the SSL standard 5. client sends a MAC of all the handshake messages 6. server sends a MAC of all the handshake messages 8

Real SSL: handshake (3) last 2 steps protect handshake from tampering client typically offers range of algorithms, some strong, some weak man in the middle could delete stronger algorithms from list last 2 steps prevent this last two messages are encrypted Real SSL: handshake (4) why two random nonces? suppose Trudy sniffs all messages between Alice & Bob next day, Trudy sets up TCP connection with Bob, sends exact same sequence of records Bob (Amazon) thinks Alice made two separate orders for the same thing solution: Bob sends different random nonce for each connection. This causes encryption keys to be different on the two days Trudy s messages will fail Bob s integrity check 9

SSL record protocol data data fragment MAC data fragment MAC record header encrypted data and MAC record header encrypted data and MAC record header: content type; version; length MAC: includes sequence number, MAC key M x fragment: each SSL fragment 2 14 bytes (~16 Kbytes) SSL record format 1 byte 2 bytes 3 bytes content type SSL version length data MAC data and MAC encrypted (symmetric algorithm) 10

Real SSL connection everything henceforth is encrypted TCP FIN follows Key derivation client nonce, server nonce, and pre master secret input into pseudo random number generator. produces master secret master secret and new nonces input into another randomnumber generator: key block because of resumption: TBD key block sliced and diced: client MAC key server MAC key client encryption key server encryption key client initialization vector (IV) server initialization vector (IV) 11

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 What is network layer confidentiality? between two network entities: sending entity encrypts datagram payload, payload could be: TCP or UDP segment, ICMP message, OSPF message. all data sent from one entity to other would be hidden: web pages, e mail, P2P file transfers, TCP SYN packets blanket coverage 12

Virtual Private Networks (VPNs) motivation: institutions often want private networks for security. costly: separate routers, links, DNS infrastructure. VPN: institution s inter office traffic is sent over public Internet instead encrypted before entering public Internet logically separate from other traffic Virtual Private Networks (VPNs) public Internet laptop w/ipsec salesperson in hotel router w/ IPv4 and IPsec router w/ IPv4 and IPsec headquarters branch office 13

IPsec services data integrity origin authentication replay attack prevention confidentiality two protocols providing different service models: AH (Authentication Header) ESP (Encapsulation Security Payload) IPsec transport mode IPsec IPsec IPsec datagram emitted and received by end system protects upper level protocols 14

IPsec tunneling mode IPsec IPsec IPsec IPsec edge routers IPsecaware hosts IPsec-aware Two IPsec protocols Authentication Header (AH) protocol provides source authentication & data integrity but not confidentiality Encapsulation Security Protocol (ESP) provides source authentication, data integrity, and confidentiality more widely used than AH 15

Four combinations are possible! Host mode with AH Host mode with ESP Tunnel mode with AH Tunnel mode with ESP most common and most important Security associations (SAs) before sending data, security association (SA) established from sending to receiving entity SAs are simplex: for only one direction sending, receiving entities maintain state information about SA recall: TCP endpoints also maintain state info IP is connectionless; IPsec is connection oriented! how many SAs in VPN w/headquarters, branch office, and n traveling salespeople? 16

Example SA from R1 to R2 headquarters Internet branch office 200.168.1.100 193.68.2.23 172.16.1/24 R1 security association R2 172.16.2/24 R1 stores for SA: 32 bit SA identifier: Security Parameter Index (SPI) origin SA interface (200.168.1.100) destination SA interface (193.68.2.23) type of encryption used (e.g., 3DES with CBC) encryption key type of integrity check used (e.g., HMAC (Hash based MAC) with MD5) authentication key Security Association Database (SAD) endpoint holds SA state in security association database (SAD), where it can locate them during processing. with n salespersons, 2 + 2n SAs in R1 s SAD when sending IPsec datagram, R1 accesses SAD to determine how to process datagram. when IPsec datagram arrives to R2, R2 examines SPI in IPsec datagram, indexes SAD with SPI, and processes datagram accordingly. 17

IPsec datagram focus for now on tunnel mode with ESP enchilada authenticated encrypted new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth SPI Seq # padding pad length next header What happens? headquarters Internet branch office 200.168.1.100 193.68.2.23 172.16.1/24 R1 security association R2 172.16.2/24 enchilada authenticated encrypted new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth SPI Seq # padding pad length next header 18

R1: convert original datagram to IPsec datagram appends to back of original datagram (which includes original header fields!) an ESP trailer field. encrypts result using algorithm & key specified by SA. appends to front of this encrypted quantity the ESP header, creating enchilada. creates authentication MAC over the whole enchilada, using algorithm and key specified in SA; appends MAC to back of enchilada, forming payload; creates brand new IP header, with all the classic IPv4 header fields, which it appends before payload. Inside the enchilada: enchilada authenticated encrypted new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth SPI Seq # padding pad length next header ESP trailer: Padding for block ciphers ESP header: SPI, so receiving entity knows what to do Sequence number, to thwart replay attacks MAC in ESP auth field is created with shared secret key 19

IPsec sequence numbers for new SA, sender initializes seq. # to 0 each time datagram is sent on SA: sender increments seq # counter places value in seq # field goal: prevent attacker from sniffing and replaying a packet receipt of duplicate, authenticated IP packets may disrupt service method: destination checks for duplicates doesn t keep track of all received packets; instead uses a window Security Policy Database (SPD) policy: For a given datagram, sending entity needs to know if it should use IPsec needs also to know which SA to use may use: source and destination IP address; protocol number info in SPD indicates what to do with arriving datagram info in SAD indicates how to do it 20

Summary: IPsec services suppose Trudy sits somewhere between R1 and R2. She doesn t know the keys. will Trudy be able to see original contents of datagram? How about source, dest IP address, transport protocol, application port? flip bits without detection? masquerade as R1 using R1 s IP address? replay a datagram? IKE: Internet Key Exchange previous examples: manual establishment of IPsec SAs in IPsec endpoints: Example SA SPI: 12345 Source IP: 200.168.1.100 Dest IP: 193.68.2.23 Protocol: ESP Encryption algorithm: 3DES-cbc HMAC algorithm: MD5 Encryption key: 0x7aeaca HMAC key:0xc0291f manual keying is impractical for VPN with 100s of endpoints instead use IPsec IKE (Internet Key Exchange) 21

IKE: PSK and PKI authentication (prove who you are) with either pre shared secret (PSK) or with PKI (pubic/private keys and certificates). PSK: both sides start with secret run IKE to authenticate each other and to generate IPsec SAs (one in each direction), including encryption, authentication keys PKI: both sides start with public/private key pair, certificate run IKE to authenticate each other, obtain IPsec SAs (one in each direction). similar with handshake in SSL. IKE phases IKE has two phases phase 1: establish bi directional authenticated and encrypted IKE SA note: IKE SA different from IPsec SA uses ISAKMP (Internet Security Association and Key Management Protocol) security association establishes keys for authentication and authorization for the IKE SA establishes master secret for IPSec SA keys (used in Phase 2) phase 2: ISAKMP is used to securely negotiate IPsec pair of SAs Signed messages exchanged over the IKE SA channel Encryption and Authentication algorithms for IPSec SAs negotiated phase 1 has two modes: aggressive mode and main mode aggressive mode uses fewer messages main mode provides identity protection and is more flexible 22

IPsec summary IKE message exchange for algorithms, secret keys, SPI numbers either AH or ESP protocol (or both) AH provides integrity, source authentication ESP protocol (with AH) additionally provides encryption IPsec peers can be two end systems, two routers/firewalls, or a router/firewall and an end system 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 23

WEP design goals symmetric key crypto confidentiality end host authentication data integrity self synchronizing: each packet separately encrypted given encrypted packet and key, can decrypt; can continue to decrypt packets when preceding packet was lost (unlike Cipher Block Chaining (CBC) in block ciphers) Efficient implementable in hardware or software Review: symmetric stream ciphers key keystream generator keystream combine each byte of keystream with byte of plaintext to get ciphertext: m(i) = ith unit of message ks(i) = ith unit of keystream c(i) = ith unit of ciphertext c(i) = ks(i) m(i) ( = exclusive or) m(i) = ks(i) c(i) WEP uses RC4 24

Stream cipher and packet independence recall design goal: each packet separately encrypted if for frame n+1, use keystream from where we left off for frame n, then each frame is not separately encrypted need to know where we left off for packet n WEP approach: initialize keystream with key + new IV for each packet: Key+IV packet keystream generator keystream packet WEP encryption (1) sender calculates Integrity Check Value (ICV) over data four byte hash/crc for data integrity each side has 104 bit shared key sender creates 24 bit initialization vector (IV), appends to key: gives 128 bit key sender also appends keyid (in 8 bit field) 128 bit key inputted into pseudo random number generator to get keystream data in frame + ICV is encrypted with RC4: B\bytes of keystream are XORed with bytes of data & ICV IV & keyid are appended to encrypted data to create payload payload inserted into 802.11 frame encrypted IV Key ID data ICV MAC payload 25

WEP encryption (2) IV (per frame) K S : 104-bit secret symmetric plaintext frame data plus CRC k 1 IV key sequence generator ( for given K S, IV) k 2 IV k 3 IV k N IV k N+1 IV k N+1 IV d 1 d 2 d 3 d N CRC 1 CRC 4 802.11 header IV WEP-encrypted data plus ICV c 1 c 2 c 3 c N c N+1 c N+4 Figure new 7.8-new1: IV for each 802.11 WEP frame protocol WEP decryption overview encrypted IV Key ID data ICV MAC payload receiver extracts IV inputs IV, shared secret key into pseudo random generator, gets keystream XORs keystream with encrypted data to decrypt data + ICV verifies integrity of data with ICV note: message integrity approach used here is different from MAC (message authentication code) and signatures (using PKI). 26

End point authentication w/nonce Nonce: number (R) used only once in-a-lifetime How to prove Alice live : Bob sends Alice nonce, R. Alice must return R, encrypted with shared secret key I am Alice R K A-B (R) Alice is live, and only Alice knows key to encrypt nonce, so it must be Alice! WEP authentication authentication request nonce (128 bytes) nonce encrypted shared key Notes: success if decrypted value equals nonce not all APs do it, even if WEP is being used AP indicates if authentication is necessary in beacon frame done before association 27

Breaking 802.11 WEP encryption security hole: 24 bit IV, one IV per frame, > IV s eventually reused IV transmitted in plaintext > IV reuse detected attack: Trudy causes Alice to encrypt known plaintext d 1 d 2 d 3 d 4 Trudy sees: c i = d i XOR k i IV Trudy knows c i d i, so can compute k i IV Trudy knows encrypting key sequence k 1 IV k 2 IV k 3 IV Next time IV is used, Trudy can decrypt! 802.11i: improved security numerous (stronger) forms of encryption possible provides key distribution uses authentication server separate from access point 28

802.11i: four phases of operation STA: client station AP: access point wired network AS: Authentication server 1 Discovery of security capabilities 2 STA and AS mutually authenticate, together generate Master Key (MK). AP serves as pass through 3 STA derives Pairwise Master Key (PMK) 4 STA, AP use PMK to derive Temporal Key (TK) used for message encryption, integrity 3 AS derives same PMK, sends to AP EAP: extensible authentication protocol EAP: end end client (mobile) to authentication server protocol EAP sent over separate links mobile to AP (EAP over LAN) AP to authentication server (RADIUS over UDP) wired network EAP TLS EAP EAP over LAN (EAPoL) IEEE 802.11 RADIUS UDP/IP 29

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 30