Netzwerksicherheit: Anwendungen

Similar documents
Chapter 6 CDMA/802.11i

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

Chapter 8 Network Security. Slides adapted from the book and Tomas Olovsson

Chapter 8 Network Security

Key Management (Distribution and Certification) (1)

Chapter 8. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April Thanks and enjoy!

Telematics Chapter 11: Network Security Beispielbild User watching video clip

Data Communications & Networks. Session 11 Main Theme Network Security. Dr. Jean-Claude Franchitti

12/3/08. Security in Wireless LANs and Mobile Networks. Wireless Magnifies Exposure Vulnerability. Mobility Makes it Difficult to Establish Trust

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

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Chapter 10. Network Security

Lecture Objectives. Lecture 8 Mobile Networks: Security in Wireless LANs and Mobile Networks. Agenda. References

Chapter 8 Network Security

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Network Security Part II: Standards

Chapter 8. Network Security

CS 3251: Computer Networking 1 Security Protocols I

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Chapter 8. Cryptography Symmetric-Key Algorithms. Digital Signatures Management of Public Keys Communication Security Authentication Protocols

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Symm ym e m t e r t ic i c cr c yptogr ypt aphy a Ex: RC4, AES 2

INTERNET SECURITY: FIREWALLS AND BEYOND. Mehernosh H. Amroli

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Chapter 5: Network Layer Security

Computer Networks. Secure Systems

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

Chapter 32 Internet Security

Overview of Network Security

Security (WEP, WPA\WPA2) 19/05/2009. Giulio Rossetti Unipi

What is network security?

Computer Networks - CS132/EECS148 - Spring

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

IP Security. Ola Flygt Växjö University, Sweden

Network Security #10. Overview. Encryption Authentication Message integrity Key distribution & Certificates Secure Socket Layer (SSL) IPsec

13 Virtual Private Networks 13.1 Point-to-Point Protocol (PPP) 13.2 Layer 2/3/4 VPNs 13.3 Multi-Protocol Label Switching 13.4 IPsec Transport Mode

Transport Level Security

APNIC elearning: IPSec Basics. Contact: esec03_v1.0

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Security in IEEE WLANs

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

Overview. SSL Cryptography Overview CHAPTER 1

Client Server Registration Protocol

Protocol Rollback and Network Security

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Lecture 9 - Network Security TDTS (ht1)

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Authenticity of Public Keys

Wireless security. Any station within range of the RF receives data Two security mechanism

CS5490/6490: Network Security- Lecture Notes - November 9 th 2015

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

Chapter 7: Network security

Other VPNs TLS/SSL, PPTP, L2TP. Advanced Computer Networks SS2005 Jürgen Häuselhofer

Security vulnerabilities in the Internet and possible solutions

Network Security Standards. Key distribution Kerberos SSL/TLS

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Virtual Private Networks

Key Hopping A Security Enhancement Scheme for IEEE WEP Standards

As enterprises conduct more and more

Chapter 4 Network Layer

Network Security. HIT Shimrit Tzur-David

TLS and SRTP for Skype Connect. Technical Datasheet

Chapter 17. Transport-Level Security

Internetwork Security

CPS Computer Security Lecture 9: Introduction to Network Security. Xiaowei Yang

Chapter 7 Transport-Level Security

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Outline. INF3510 Information Security. Lecture 10: Communications Security. Communication Security Analogy. Network Security Concepts

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

CS 4803 Computer and Network Security

Communication Security for Applications

Network Security Fundamentals

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

EXAM questions for the course TTM Information Security May Part 1

Secure Sockets Layer

Securing IP Networks with Implementation of IPv6

Part III-b. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Secure Use of the New NHS Network (N3): Good Practice Guidelines

Web Security Considerations

SSL A discussion of the Secure Socket Layer

Lecture 10: Communications Security

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Authentication in WLAN

Three attacks in SSL protocol and their solutions

CS 758: Cryptography / Network Security

Security: Focus of Control. Authentication

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

Network Security - Secure upper layer protocols - Background. Security. Question from last lecture: What s a birthday attack? Dr.

How To Understand And Understand The Security Of A Key Infrastructure

Chapter 8 Security Pt 2

Network Security. Lecture 3

CS 336/536 Computer Network Security. Summer Term Wi-Fi Protected Access (WPA) compiled by Anthony Barnard

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

Transcription:

Internet-Technologien (CS262) Netzwerksicherheit: Anwendungen 22. Mai 2015 Christian Tschudin & Thomas Meyer Departement Mathematik und Informatik, Universität Basel Chapter 8 Security in Computer Networks (with changes CS262 UniBasel, 2015) A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2010 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach, International Version, 5 th edition. Jim Kurose, Keith Ross Pearson Addison-Wesley, March 2009. CS262 FS15 Netzwerksicherheit: Anwendungen 2

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 CS262 FS15 Netzwerksicherheit: Anwendungen 3 Secure e-mail Alice wants to send confidential e-mail, m, to Bob. m K S K S (. ) K S (m ) K S (m ) K S.( ) m K S + K B (. ) K+ B K+ B (K S ) + Internet - + K B (K S ) K B - K S -. K B ( ) Alice: generates random symmetric private key, K S encrypts message with K S (for efficiency) also encrypts K S with Bob s public key sends both K S (m) and K B (K S ) to Bob CS262 FS15 Netzwerksicherheit: Anwendungen 4

Secure e-mail Alice wants to send confidential e-mail, m, to Bob. m K S K S (. ) K S (m ) K S (m ) K S.( ) m K S + K B (. ) K+ B K+ B (K S ) + Internet - + K B (K S ) K B - K S -. K B ( ) Bob: uses his private key to decrypt and recover K S uses K S to decrypt K S (m) to recover m CS262 FS15 Netzwerksicherheit: Anwendungen 5 Secure e-mail (continued) Alice wants to provide sender authentication, message integrity m K A - H(.) K A ( ) -. K A - (H(m)) K- A (H(m)) K A + K+ A (. ) H(m ) + - Internet compare m m H(.) H(m ) Alice digitally signs message sends both message (in the clear) and digital signature CS262 FS15 Netzwerksicherheit: Anwendungen 6

Secure e-mail (continued) Alice wants to provide secrecy, sender authentication, message integrity. - m m K A H(.) K A ( ) -. K- A (H(m)) + K S K S.( ) K+ B (. ) K+ B Alice uses three keys: her private key, Bob s public key, newly created symmetric key K S + + K B (K S ) Internet CS262 FS15 Netzwerksicherheit: Anwendungen 7 Pretty Good Privacy (PGP), GPG Written by Phil Zimmerman (1991) De facto e-mail encryption scheme Available for your favorite mail client Similar to the designe showed before: message digests: MD5/SHA symmetric key encryption: CAST, 3DES, IDEA public key encryption: RSA No certification authority Users mutually sign their keys private key rings public key rings (stored in so called key servers on the web) CS262 FS15 Netzwerksicherheit: Anwendungen 8

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 CS262 FS15 Netzwerksicherheit: Anwendungen 9 SSL: Secure Sockets Layer widely deployed security protocol supported by almost all browsers, web servers https billions $/year over SSL original design: Netscape, 1993 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 CS262 FS15 Netzwerksicherheit: Anwendungen 10

SSL and TCP/IP Application TCP Socket TCP IP Normal Application Application SSL Socket SSL Sublayer TCP Socket TCP IP Application with SSL SSL provides application programming interface (API) to applications C and Java SSL libraries/classes readily available CS262 FS15 Netzwerksicherheit: Anwendungen 11 Could do something like PGP: m K A - 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 CS262 FS15 Netzwerksicherheit: Anwendungen 12

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 CS262 FS15 Netzwerksicherheit: Anwendungen 13 Toy SSL: A simple handshake MS = master secret EMS = encrypted master secret CS262 FS15 Netzwerksicherheit: Anwendungen 14

Toy SSL: Key derivation It is considered bad practice 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 CS262 FS15 Netzwerksicherheit: Anwendungen 15 Toy SSL: 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 CS262 FS15 Netzwerksicherheit: Anwendungen 16

Toy SSL: Sequence Numbers attacker can capture and replay the record, or can re-order records solution: put sequence number into MAC: MAC = MAC(M x, sequence data) Note: no sequence number field needed, it s now implicit attacker could still replay all of the records use random nonce CS262 FS15 Netzwerksicherheit: Anwendungen 17 Toy SSL: Control information 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 CS262 FS15 Netzwerksicherheit: Anwendungen 18

Toy SSL: summary bob.com encrypted CS262 FS15 Netzwerksicherheit: Anwendungen 19 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 CS262 FS15 Netzwerksicherheit: Anwendungen 20

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 CS262 FS15 Netzwerksicherheit: Anwendungen 21 Real SSL: Handshake (1) Purpose 1. server authentication 2. negotiation: agree on crypto algorithms 3. establish keys 4. client authentication (optional) CS262 FS15 Netzwerksicherheit: Anwendungen 22

Real SSL: Handshake (2) 1. client sends list of algorithms it supports, along with random client nonce (28 bytes) 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 5. client sends a MAC of all the handshake messages 6. server sends a MAC of all the handshake messages CS262 FS15 Netzwerksicherheit: Anwendungen 23 Real SSL: Handshaking (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 CS262 FS15 Netzwerksicherheit: Anwendungen 24

Real SSL: Handshaking (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 CS262 FS15 Netzwerksicherheit: Anwendungen 25 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) CS262 FS15 Netzwerksicherheit: Anwendungen 26

SSL Record Format 1 byte 2 bytes 3 bytes content type SSL version length data MAC data and MAC encrypted (symmetric algorithm) CS262 FS15 Netzwerksicherheit: Anwendungen 27 Real Connection Everything henceforth is encrypted TCP Fin follow CS262 FS15 Netzwerksicherheit: Anwendungen 28

General Lesson: 3 things needed We started with a toolbox of mechanisms: - encryption algorithms - hash function which permit to implement basic security services: - confidentiality - authenticity - non-repudation etc Mechanisms are not enough, we also need security protocols - to tie together the mechanims, prevent some attacks outside mechanisms (e.g. man-in-the-middle) - to enforce good practice (how to choose IVs, keys, etc) CS262 FS15 Netzwerksicherheit: Anwendungen 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 CS262 FS15 Netzwerksicherheit: Anwendungen 30

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 CS262 FS15 Netzwerksicherheit: Anwendungen 31 Virtual Private Networks (VPNs) 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 e.g. home access to private Unibas network CS262 FS15 Netzwerksicherheit: Anwendungen 32

Virtual Private Network (VPN) Public Internet IP header IPsec header Secure payload laptop w/ IPsec salesperson in hotel Router w/ IPv4 and IPsec Router w/ IPv4 and IPsec headquarters branch office CS262 FS15 Netzwerksicherheit: Anwendungen 33 IPsec services data integrity origin authentication replay attack prevention confidentiality two protocols providing different service models: AH (Authentication Header) ESP (Encapsulation Security Protocol) CS262 FS15 Netzwerksicherheit: Anwendungen 34

IPsec Transport Mode IPsec IPsec IPsec datagram emitted and received by endsystem protects upper level protocols CS262 FS15 Netzwerksicherheit: Anwendungen 35 IPsec tunneling mode IPsec IPsec IPsec IPsec edge routers IPsecaware hosts IPsec-aware CS262 FS15 Netzwerksicherheit: Anwendungen 36

Two 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 Four combinations are possible! CS262 FS15 Netzwerksicherheit: Anwendungen 37 Host mode with AH Host mode with ESP Tunnel mode with AH Tunnel mode with ESP most common and most important CS262 FS15 Netzwerksicherheit: Anwendungen 38

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 CS262 FS15 Netzwerksicherheit: Anwendungen 53 WEP Design Goals symmetric key crypto confidentiality end host authorization 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 can be implemented in hardware or software CS262 FS15 Netzwerksicherheit: Anwendungen 54

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 CS262 FS15 Netzwerksicherheit: Anwendungen 55 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 CS262 FS15 Netzwerksicherheit: Anwendungen 56

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: 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 CS262 FS15 Netzwerksicherheit: Anwendungen 57 WEP encryption (2) New IV for each frame CS262 FS15 Netzwerksicherheit: Anwendungen 58

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). CS262 FS15 Netzwerksicherheit: Anwendungen 59 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! CS262 FS15 Netzwerksicherheit: Anwendungen 60

WEP Authentication Not all APs do it, even if WEP is being used. AP indicates if authentication is necessary in beacon frame. Done before association. authentication request AP nonce (128 bytes) nonce encrypted shared key success if decrypted value equals nonce CS262 FS15 Netzwerksicherheit: Anwendungen 61 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 IV Trudy sees: c i = d i XOR k i IV Trudy knows c i d i, so can compute k i IV IV IV Trudy knows encrypting key sequence k 1 k 2 k 3 Next time IV is used, Trudy can decrypt! CS262 FS15 Netzwerksicherheit: Anwendungen 62

802.11i: improved security numerous (stronger) forms of encryption possible provides key distribution uses authentication server separate from access point CS262 FS15 Netzwerksicherheit: Anwendungen 63 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 servers as pass through 3 STA derives Pairwise Master Key (PMK) 3 AS derives same PMK, sends to AP 4 STA, AP use PMK to derive Temporal Key (TK) used for message encryption, integrity CS262 FS15 Netzwerksicherheit: Anwendungen 64

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 CS262 FS15 Netzwerksicherheit: Anwendungen 65 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 CS262 FS15 Netzwerksicherheit: Anwendungen 66