1. SSL/TLS Introduction and How to exploit By BRIAN RITCHIE Twitter : twitter.com/brianritchie Facebook : facebook.com/brianritchie
2. Who Am I ? Co worked on the Enterprise Architecture for some of the largest regional as well as international companies Rolled out the first official OSS Centre of Excellence strategy and implementation for a local Financial Institution Experience with large scale Project Management for core systems Designed and Implemented Research and Incubation Services for large scale corporations All rounded Geek
4. Some History Originally proposed by Netscape in the 90 s Evolved from SSL 1.0, 2.0, 3.0 and now to the Transport Layer Security or TLS Developed with the intention of providing security for communications over networks Is used heavily today for ecommerce, and other web applications/services which require a higher level of security
5. What is SSL ? Intermediate layer between the Transport layer and the Application layer Has 2 main functions : Establish a secure connection between peers Secure is defined as = Authentic and Confidential Use the secure connection to transmit higher layer protocol data from sender to recipient
7. How does SSL transmit data ? Sender Breaks data down into manageable pieces called fragments Each fragment is compressed, authenticated with a MAC, encrypted, prepended with a header and transmitted Recipient NOTE :: These fragments are what we call SSL records The fragments are decrypted, verified through MACs, decompressed and reassembled.
8. Just a little bit more theory and we’ll go to some cooler stuff
9. Graphical View of SSL Application Layer SSL Handshake Protocol SSL Change Cipher Spec Protocol SSL Alert Protocol Application Data Protocol Application Layer SSL Record Protocol Transport Layer Network Layer Network Access Layer TCP UDP IP
10. What are these protocols ? SSL Handshake Protocol – Core protocol. Allows peers to authenticate between themselves and negotiate a suitable cipher suite and compression method for both parties SSL Change Cipher Spec Protocol – Allows peers to change ciphering strategy and the cryptography protection used SSL Alert Protocol – Allows peers to signal for potential problem symptoms and exchange alert messages SSL Application Data Protocol – Workhorse. Takes the higher level data and feeds it to the SSL Record protocol for cryptographic protection and secure transmission
14. What’s the Minus points ? No one pays attention to it This means if you can break it, you’re the boss. Can be compromised through HTTP
15. Tools and Attack Principles Sslsniff and sslstrip make attacking it easy as pie Principle of attack : MITM – The usual suspect App and configuration issues Fake certificates Bad implementation
17. Endpoint Issues Endpoints Bad Server Side Configuration SSL not enforced Bad certificate configuration Private Key not protected Use weak protocols Unpatched libraries Mixed (SSL&Non-SSL) configurations And many many more…
18. Lets take a deeper dive and look at some examples
19. Inconsistent DNS config http://www.example.com and http://example.com point to different webservers Microsoft
21. Different Sites on port 80 and 443 Both http://www.example.com and https://www.example.com must be the same website A lot of major companies fail to verify this
22. Self Signed SSL Certs Two words : DON’T BOTHER This causes more issues than it solves. It is significantly harder for you to maintain a secure, well configured SSL cert It is much easier and more secure to buy one from a legitimate provider
23. Badly Configured SSL Servers Out of the box SSL is pretty secure iff (– if and only if) the configuration fits your deployment. More often than not, you will need to tweak the settings to fit your deployment. Updating patches is also equally crucial
24. Incomplete certificates A certificate has to encompass both http://example.com and http://www.example.com They have to be the same site They must also be the same for the https:// Your certificate must ensure that it is all-encompassing
25. Mixing SSL and Plain text Tricky to implement Active user sessions can be compromised Sslstrip can perform MITM attacks and convert HTTPS to HTTP
27. If you have any questions, contact me through the above Twitter : twitter.com/brianritchie Facebook : facebook.com/brianritchie OWASP MY Mailing List