transport level security
play

Transport Level Security HTTPS SSH CSS322: Security and - PowerPoint PPT Presentation

CSS322 Transport Security Web Security TLS/SSL Transport Level Security HTTPS SSH CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 28 October 2013


  1. CSS322 Transport Security Web Security TLS/SSL Transport Level Security HTTPS SSH CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 28 October 2013 css322y13s2l12, Steve/Courses/2013/s2/css322/lectures/transport.tex, r2965 1/32

  2. CSS322 Contents Transport Security Web Security TLS/SSL Web Security Issues HTTPS SSH TLS/SSL HTTPS Secure Shell 2/32

  3. CSS322 Web Security Issues Transport Security ◮ Original Internet protocols do not have built-in security Web Security (IP, TCP, HTTP, . . . ) TLS/SSL ◮ Many threats arise for web and other Internet HTTPS applications SSH ◮ Issues at: client, server and traffic between client and server ◮ Cover: SSL/TLS, SSH, IPsec 3/32

  4. CSS322 Comparison of Threats on the Web Transport Security Web Security TLS/SSL HTTPS SSH 4/32

  5. CSS322 Security Options in TCP/IP Transport Security Web Security TLS/SSL HTTPS SSH ◮ IPsec: Security for IP datagrams; general solution for all Internet traffic; implemented in OS ◮ SSL/TLS: Security for TCP segments; general solution for all TCP-based applications; implemented in libraries/applications (e.g. OpenSSL) ◮ Application-specific: Security for application messages; specific to each applications; implemented in single application 5/32

  6. CSS322 Contents Transport Security Web Security TLS/SSL Web Security Issues HTTPS SSH TLS/SSL HTTPS Secure Shell 6/32

  7. CSS322 SSL and TLS Transport Security ◮ Secure Sockets Layer (SSL) originated in Netscape web Web Security browser TLS/SSL ◮ Transport Layer Security (TLS) standardised by IETF HTTPS ◮ SSLv3 and TLS are almost the same SSH ◮ SSL provides security services to application layer protocols using TCP ◮ SSL architecture consists of multiple protocols 7/32

  8. CSS322 SSL Architecture Transport Security Web Security TLS/SSL HTTPS SSH Record: provides confidentiality and message integrity Handshake: authenticate entities, negotiate parameter values Change Cipher: change cipher for use in connection Alert: alert peer entity of status/warning/error 8/32

  9. CSS322 Connections and Sessions Transport Security ◮ SSL connection corresponds with TCP connection Web Security ◮ Client and server may have multiple connections TLS/SSL ◮ SSL session is association between client and server HTTPS ◮ Session created with Handshake protocol SSH ◮ Multiple connections can be associated with one session ◮ Security parameters for session can be shared for connections ◮ State information is stored after Handshake protocol ◮ Session: ID, certificate, compression, cipher spec, master secret, . . . ◮ Connection: random values, encrypt keys, MAC secrets, IV, sequence numbers, . . . 9/32

  10. CSS322 SSL Record Protocol Operation Transport Security Web Security TLS/SSL HTTPS SSH 10/32

  11. CSS322 SSL Record Protocol Transport Security ◮ Fragmentation: maximum fragment size is 16384 Bytes Web Security ◮ Compression: lossless; algorithm chosen in Handshake TLS/SSL ◮ MAC: HMAC applied on compressed data; MAC secret HTTPS SSH key for connection used; MAC appended to compressed fragment ◮ Encrypt: applied to compressed fragment and MAC; algorithm chosen in Handshake ◮ SSL record header: ◮ Content type: higher layer protocol (change cipher spec, alert, handshake, application) ◮ Version ◮ Compressed length in bytes 11/32

  12. CSS322 SSL Record Format Transport Security Web Security TLS/SSL HTTPS SSH 12/32

  13. CSS322 SSL Record Protocol Payload Transport Security Web Security TLS/SSL HTTPS SSH 13/32

  14. CSS322 SSL Handshake Protocol Transport Security ◮ Allow client and server to authenticate each other Web Security ◮ Negotiate encryption and MAC algorithms, exchange TLS/SSL keys HTTPS ◮ Key Exchange: RSA, Diffie-Hellman SSH ◮ MAC: HMAC using SHA or MD5 ◮ Encryption: RC4, RC2, DES, 3DES, IDEA, AES ◮ Multiple phases: 1. Establish security capabilities: client proposes algorithms, server selects one 2. Server authentication and key exchange 3. Client authentication and key exchange 4. Finish setting up connection 14/32

  15. CSS322 SSL Handshake Protocol Messages Transport Security Web Security TLS/SSL HTTPS SSH 15/32

  16. CSS322 SSL Handshake Protocol Operation Transport Security Web Security TLS/SSL HTTPS SSH 16/32

  17. CSS322 Contents Transport Security Web Security TLS/SSL Web Security Issues HTTPS SSH TLS/SSL HTTPS Secure Shell 17/32

  18. CSS322 HTTPS Transport Security ◮ HTTPS: HTTP over SSL (or TLS) Web Security ◮ URL uses https:// TLS/SSL ◮ Web server listens on port 443 HTTPS SSH ◮ Encrypt: URL of requested document, contents of document, contents of browser forms, cookies, contents of HTTP header ◮ Server is authenticated using certificate (using SSL) ◮ Client is authenticated using password (using HTTP) 18/32

  19. CSS322 Contents Transport Security Web Security TLS/SSL Web Security Issues HTTPS SSH TLS/SSL HTTPS Secure Shell 19/32

  20. CSS322 Secure Shell Transport Security ◮ TELNET provides a remote login facility; insecure Web Security ◮ Secure Shell (SSH) designed for secure remote login TLS/SSL ◮ SSH also supports secure file transfer and tunnelling HTTPS SSH ◮ SSHv2 developed by IETF ◮ SSH architecture consists of 3 protocols 20/32

  21. CSS322 SSH Protocol Stack Transport Security Web Security TLS/SSL HTTPS SSH 21/32

  22. CSS322 SSH Authentication Transport Security Server Authentication Web Security TLS/SSL ◮ Server has public/private key pair HTTPS ◮ Assume client knows server’s public key SSH ◮ During key exchange, server signs message with public key Client Authentication ◮ Key-based: client has public/private key pair; server knows client public key ◮ Password-based: client sends password (encrypted); server knows password 22/32

  23. CSS322 SSH Transport Layer Packet Exchange Transport Security Web Security TLS/SSL HTTPS SSH 23/32

  24. CSS322 SSH Transport Layer Protocol Transport Security ◮ Identification string exchange: each entity identifies Web Security protocol and software version TLS/SSL ◮ Algorithm negotiation: client and server send list of HTTPS supported algorithms, in order of preference; first SSH common algorithm chosen ◮ Key exchange: Diffie-Hellman ◮ End of key exchange: new keys generated from shared secret, e.g. K c 2 s = Hash ( K || H || ′ C ′ || session id ) where H = Hash ( ID C || ID C || M C || M S || PU S || Y A || Y B || K ) ◮ Service request for User Authentication or Connection Protocol 24/32

  25. CSS322 SSH Algorithms Transport Security Web Security TLS/SSL HTTPS SSH 25/32

  26. CSS322 Key Exchange with Diffie-Hellman Transport Security Web Security TLS/SSL HTTPS SSH 26/32

  27. CSS322 SSH Key Exchange with Diffie-Hellman Transport Security ◮ SSH notation: q = P , α = G , Y A = e , Y B = f Web Security ◮ ID string for client and server: ID C , ID S ; TLS/SSL SSH MSG KEXINIT message from client and server: HTTPS M C , M S SSH ◮ Server key pair: ( PU S , PR S ); assume client knows/trusts PU S ◮ Client and server have agreed upon hash and encryption algorithms 27/32

  28. CSS322 SSH Key Exchange with Diffie-Hellman Transport Security (see Wireshark capture) Web Security TLS/SSL HTTPS SSH 28/32

  29. CSS322 SSH Transport Layer Packet Formation Transport Security Web Security TLS/SSL HTTPS SSH 29/32

  30. CSS322 TCP Connection Transport Security Web Security TLS/SSL HTTPS SSH a and b are application port numbers 30/32

  31. CSS322 SSH Tunnel over TCP Connection Transport Security Web Security TLS/SSL HTTPS SSH x and y are application port numbers, a and b are port numbers used by SSH 31/32

  32. CSS322 SSH Tunnels Transport Security ◮ Allow normal (unsecured) applications to securely Web Security transfer data TLS/SSL ◮ Bypass firewalls by using different ports HTTPS ◮ Local forwarding: traffic to local port is sent via SSH SSH client to remote port ◮ Remote forwarding: traffic to remote port is sent via SSH server to local port 32/32

Recommend


More recommend