Your SlideShare is downloading. ×
0
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Basics of ssl
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Basics of ssl

1,517

Published on

null Bangalore Chapter - April 2013 Meet

null Bangalore Chapter - April 2013 Meet

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,517
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
74
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BASICS OFSSL
  • 2. AGENDA• SSL Evolution• SSL Handshakes• Man in the Middle: Proxy Tools, SSLStrip• Recent Attacks on SSL• Security guidelines while configuring SSL
  • 3. SSL EVOLUTION• SSL 1.0 : Developed by Netscape. Never publicly released• SSL 2.0 : Released by Netscape in 1995. Contained lot of security flaws.• SSL 3.0 : Released by Netscape in 1996. Complete redesign of the protocol.Newer versions of SSL/TLS are based on SSL 3.0.• TLS 1.0 : RFC 2246 published by IETF in 1999. Nearly same as SSL 3.0• TLS 1.1 : RFC 4346 published by IETF in 2006. Protection against CBCattacks (BEAST attack) added.• TLS 1.2 : RFC 5246 published by IETF in 2008. Adds Elliptic CurveCipherSuites to TLS. Removed DES, RC2 and IDEA CipherSuites.SHA-256 hashing used.
  • 4. • TLS_RSA_WITH_RC4_128_MD5• TLS_RSA_WITH_RC4_128_SHA• TLS_RSA_WITH_3DES_EDE_CBC_SHA• TLS_RSA_WITH_AES_128_CBC_SHA• TLS_RSA_WITH_AES_128_CBC_SHA256• TLS_DH_DSS_WITH_3DES_EDE_CBC_SHASSL HANDSHAKES – CIPHERSUITES
  • 5. SSL HANDSHAKES – RECORD LAYER HEADER
  • 6. SSL RECORD LAYERFigure from William Stalling‟s article on “SSL: Foundation for Web Security” (http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_1-1/ssl.html)
  • 7. SSL HANDSHAKES
  • 8. SSL HANDSHAKES IN WIRESHARK
  • 9. SSL HANDSHAKES – CLIENT HELLO
  • 10. SSL HANDSHAKES – CLIENT HELLO
  • 11. SSL HANDSHAKES - SERVER HELLO
  • 12. SSL HANDSHAKES – SERVER HELLO
  • 13. SSL HANDSHAKES – CERTIFICATE, SERVER HELLO DONE
  • 14. SSL HANDSHAKES – CERTIFICATE, SERVER HELLO DONE
  • 15. SSL HANDSHAKES - CLIENT KEY EXCHANGE
  • 16. SSL HANDSHAKES – CLIENT KEY EXCHANGE
  • 17. SSL HANDSHAKES – KEY GENERATION
  • 18. SSL HANDSHAKES – CHANGE CIPHER SPEC, FINISHED
  • 19. SSL HANDSHAKES – CHANGE CIPHER SPEC, FINISHED
  • 20. SSL APPLICATION DATA
  • 21. SSL APPLICATION DATA
  • 22. MAN IN THE MIDDLE – PROXY TOOL
  • 23. MAN IN THE MIDDLE – PROXY TOOL
  • 24. MAN IN THE MIDDLE - WEBSCARAB, ZAP, BURP, CHARLES
  • 25. MAN IN THE MIDDLE – SSLSTRIP (BEFORE)
  • 26. MAN IN THE MIDDLE – SSLSTRIP
  • 27. MAN IN THE MIDDLE – SSLSTRIP (AFTER)
  • 28. MAN IN THE MIDDLE – SSLSTRIP (AFTER)
  • 29. MAN IN THE MIDDLE - SSLSTRIP
  • 30. • Header could be set in the response as below:response.setHeader("Strict-Transport-Security", "max-age=31536000;includeSubdomains");=> Tells that the domain and its subdomains should always be onHTTPS till a period of 12 months (31536000 seconds)• The browser caches this information, and always connects to thedomain/subdomain on HTTPS• Counter of 12 months is reset every time the browser gets a page with thisheader from the domain.• Setting this header also throws an error if SSL certificate is untrusted orerroneous, instead of showing a warning that user can override. This adds tothe security and prevents hacker from intercepting the SSL requests andseeing the SSL packets in clear using the proxy tools like WebScarab.MAN IN THE MIDDLE – SOLUTION – HSTS (HTTP STRICTTRANSPORT SECURITY)
  • 31. • BEAST ATTACK• LUCKY 13 ATTACK• CRIME ATTACK• RC4 ATTACKRECENT ATTACKS ON SSL
  • 32. • Configure all three protocols: TLS 1.0, 1.1 & 1.2• Choose a strong and secure CipherSuite• Certificate to be signed by Trusted CA like Verisign.• Don‟t configure wild card certificates• Ensure session cookies have “secure=true” flag set, so that it istransmitted only over SSL.• Ensure HSTS header is set for the domain and subdomains.• Run the server through https://www.ssllabs.com/ssltest/ and fixany issues identified.SECURITY GUIDELINES WHILE CONFIGURING SSL ONSERVERS
  • 33. SECURITY CONSIDERATION WHILE CONFIGURING SSL ONSERVERS
  • 34. SECURITY CONSIDERATION WHILE CONFIGURING SSL ONSERVERS
  • 35. THANK YOUSACHIN (sachinraj.shetty@gmail.com)
  • 36. SSL EVOLUTIONFigure from Wikipedia (http://en.wikipedia.org/wiki/Transport_Layer_Security)
  • 37. BUILDING BLOCKS – SYMMETRIC KEY ENCRYPTIONFigure from MSDN site: (http://msdn.microsoft.com/en-us/library/ff647097.aspx)
  • 38. BUILDING BLOCKS – SYMMETRIC KEY ENCRYPTION• Same key used for encryption and Decryption• Algorithms are Fast, but Sharing the key is a challenge.• Stream Cipher : RC4_128• Block Ciphers : AES_128_CBC, AES_256_CBC,3DES_EDE_CBC
  • 39. BUILDING BLOCKS – SYMMETRIC KEY ENCRYPTIONCipher Block Chaining (CBC) ModeFigure from Wikipedia (http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29)
  • 40. Public Key EncryptionBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)Figure from MSDN site: (http://msdn.microsoft.com/en-us/library/ff647097.aspx)
  • 41. BUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)Public Key Encryption• 2 separate keys used: Public key and Private key• Sender uses Public key (of the receiver) for Encrypting themessage.• Receiver uses his Private key for Decrypting the message.• X509 Certificates are carrier of public key, which is shared.• Private key is kept secret and is never shared.• Algorithms are slower compared to symmetric.• Algorithms: RSA, Diffie–Hellman, Elliptic curve
  • 42. Digital SignatureBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)Figure from MSDN site: (http://msdn.microsoft.com/en-us/library/ff647097.aspx)
  • 43. BUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)Digital Signature• Sender generates Hash of the message and then encrypts theHash with his Private Key, which is the Digital Signature• Signature is appended to the message and sent to the Receiver.• Receiver reads the Signature and decrypts it with Public Key (ofthe Sender) to obtain the hash.• Receiver generates the hash of the message and compares thegenerated hash with that of hash obtained by decryptingSignature.• Signature Algorithms: Sha1withRSA, MD5withRSA
  • 44. X509 CertificateBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)
  • 45. X509 Certificate EntriesBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)
  • 46. X509 Certificate ExtensionsBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)
  • 47. BUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)Obtaining CA Signed CertificateFigure from MSDN site: (http://msdn.microsoft.com/en-us/library/ff647097.aspx)
  • 48. Certificate ChainingBUILDING BLOCKS – PUBLIC KEY INFRASTRUCTURE (PKI)
  • 49. SSL HANDSHAKES – PRF (PSEUDO RANDOM FUNCTION)
  • 50. SSL HANDSHAKES – PFS (PERFECT FORWARD SECRECY)
  • 51. • Prime Numbers shared between Alice and Bob – p, g• Secret number chosen by Alice - a• Secret number chosen by Bob – b• Shared Secret - sSSL HANDSHAKES – PFS – DIFFIE-HELLMAN KEY EXCHANGEFigure from Wikipedia (http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange)
  • 52. SSL HANDSHAKES – 2 WAY SSL
  • 53. SSL HANDSHAKES – SSL RESUMPTION
  • 54. SSL HANDSHAKES – SSL RESUMPTION
  • 55. SSL HANDSHAKES – SSL RENEGOTIATION
  • 56. • Developed by Moxie Marlinspike• SSLStrip capable of logging packets in clear from SSL enabled sitesincluding login credentials passed to the site.• Running SSLStrip (available in BackTrack):-> sslstrip -l 10000-> tail –f sslstrip.log=> Configure browser of any system to redirect the packetsthrough BackTrack (port 10000). Alternatively you could tryarpspoof command to convince a host that our MACaddress is the router‟s MAC address.• Details in http://www.thoughtcrime.org/software/sslstrip/.MAN IN THE MIDDLE – SSLSTRIP
  • 57. • Developed by Moxie Marlinspike• Originally written to demonstrate IE„s vulnerability to"basicConstraints" extn - Microsoft fixed this vulnerability.• Currently can be used as a proxy tool to see SSL traffic inclear. The tool generates certs for the domain beingaccessed on the fly.• SSLSniff also to demonstrate Null-Prefix attacks and OCSPattacks.• Supports modes for hijacking auto-updates from Mozillaproducts, as well as for Firefox/Thunderbird addons.• More Info: http://www.thoughtcrime.org/software/sslsniffMAN IN THE MIDDLE - SSLSNIFF

×