SSL/TLS Introduction and How to exploitBy BRIAN RITCHIETwitter : twitter.com/brianritchieFacebook : facebook.com/brianritchie
Who Am I ?Co worked on the Enterprise Architecture for some of the largest regional as well as international companiesRolled out the first official OSS Centre of Excellence strategy and implementation for a local Financial InstitutionExperience with large scale Project Management for core systemsDesigned and Implemented Research and Incubation Services for large scale corporationsAll rounded Geek
What is SSL ?An introduction
Some HistoryOriginally proposed by Netscape in the 90 sEvolved from SSL 1.0, 2.0, 3.0 and now to the Transport Layer  Security or TLSDeveloped with the intention of providing security for communications over networksIs used heavily today for ecommerce, and other web applications/services which require a higher level of security
What is SSL ?Intermediate layer between the Transport layer and the Application layerHas 2 main functions :Establish a secure connection between peersSecure is defined as = Authentic and ConfidentialUse the secure connection to transmit higher layer protocol data from sender to recipient
Let’s delve in a little deeper here
How does SSL transmit data ?SenderBreaks data down into manageable pieces called fragmentsEach fragment is compressed, authenticated with a MAC, encrypted, prepended with a header and transmittedRecipientNOTE :: These fragments are what we call SSL recordsThe fragments are decrypted, verified through MACs, decompressed and reassembled.
Just a little bit more theory and we’ll go to some cooler stuff
Graphical View of SSLApplication LayerSSL Handshake ProtocolSSL Change Cipher Spec ProtocolSSL Alert ProtocolApplication Data ProtocolApplication LayerSSL Record ProtocolTransport LayerNetwork LayerNetwork Access LayerTCPUDPIP
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 partiesSSL Change Cipher Spec Protocol – Allows peers to change ciphering strategy and the cryptography protection usedSSL Alert Protocol – Allows peers to signal for potential problem symptoms and exchange alert messagesSSL Application Data Protocol – Workhorse. Takes the higher level data and feeds it to the SSL Record protocol for cryptographic protection and secure transmission
What’s good about SSL ?
Plus pointsVery widely usedWell designedPretty much secures the InternetSecure out of the box
Now to the cool OWASP part
What’s the Minus points ?No one pays attention to itThis means if you can break it, you’re the boss.Can be compromised through HTTP
Tools and Attack PrinciplesSslsniff and sslstrip make attacking it easy as piePrinciple of attack :MITM – The usual suspectApp and configuration issuesFake certificatesBad implementation
SSL Threat ModelsLets look at a small part today
Endpoint IssuesEndpointsBad Server Side ConfigurationSSL not enforcedBad certificate configurationPrivate Key not protectedUse weak protocolsUnpatched librariesMixed (SSL&Non-SSL) configurationsAnd many many more…
Lets take a deeper dive and look at some examples
Inconsistent DNS confighttp://www.example.com  and  http://example.com point to different webserversMicrosoft
Another exampleA good example : OWASP
Different Sites on port 80 and 443Both http://www.example.com and https://www.example.com must be the same websiteA lot of major companies fail to verify this
Self Signed SSL CertsTwo words : DON’T BOTHERThis causes more issues than it solves.It is significantly harder for you to maintain a secure, well configured SSL certIt is much easier and more secure to buy one from a legitimate provider
Badly Configured SSL ServersOut 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
Incomplete certificatesA certificate has to encompass both http://example.com and http://www.example.comThey have to be the same siteThey must also be the same for the https://Your certificate must ensure that it is all-encompassing
Mixing SSL and Plain textTricky to implementActive user sessions can be compromisedSslstrip can perform MITM attacks and convert HTTPS to HTTP
There’s a few more but I’ll leave it there for now.
If you have any questions, contact me through the aboveTwitter : twitter.com/brianritchieFacebook : facebook.com/brianritchieOWASP MY Mailing List

Introduction to SSL and How to Exploit & Secure

  • 1.
    SSL/TLS Introduction andHow to exploitBy BRIAN RITCHIETwitter : twitter.com/brianritchieFacebook : facebook.com/brianritchie
  • 2.
    Who Am I?Co worked on the Enterprise Architecture for some of the largest regional as well as international companiesRolled out the first official OSS Centre of Excellence strategy and implementation for a local Financial InstitutionExperience with large scale Project Management for core systemsDesigned and Implemented Research and Incubation Services for large scale corporationsAll rounded Geek
  • 3.
    What is SSL?An introduction
  • 4.
    Some HistoryOriginally proposedby Netscape in the 90 sEvolved from SSL 1.0, 2.0, 3.0 and now to the Transport Layer Security or TLSDeveloped with the intention of providing security for communications over networksIs 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 layerHas 2 main functions :Establish a secure connection between peersSecure is defined as = Authentic and ConfidentialUse the secure connection to transmit higher layer protocol data from sender to recipient
  • 6.
    Let’s delve ina little deeper here
  • 7.
    How does SSLtransmit data ?SenderBreaks data down into manageable pieces called fragmentsEach fragment is compressed, authenticated with a MAC, encrypted, prepended with a header and transmittedRecipientNOTE :: These fragments are what we call SSL recordsThe fragments are decrypted, verified through MACs, decompressed and reassembled.
  • 8.
    Just a littlebit more theory and we’ll go to some cooler stuff
  • 9.
    Graphical View ofSSLApplication LayerSSL Handshake ProtocolSSL Change Cipher Spec ProtocolSSL Alert ProtocolApplication Data ProtocolApplication LayerSSL Record ProtocolTransport LayerNetwork LayerNetwork Access LayerTCPUDPIP
  • 10.
    What are theseprotocols ?SSL Handshake Protocol – Core protocol. Allows peers to authenticate between themselves and negotiate a suitable cipher suite and compression method for both partiesSSL Change Cipher Spec Protocol – Allows peers to change ciphering strategy and the cryptography protection usedSSL Alert Protocol – Allows peers to signal for potential problem symptoms and exchange alert messagesSSL Application Data Protocol – Workhorse. Takes the higher level data and feeds it to the SSL Record protocol for cryptographic protection and secure transmission
  • 11.
  • 12.
    Plus pointsVery widelyusedWell designedPretty much secures the InternetSecure out of the box
  • 13.
    Now to thecool OWASP part
  • 14.
    What’s the Minuspoints ?No one pays attention to itThis means if you can break it, you’re the boss.Can be compromised through HTTP
  • 15.
    Tools and AttackPrinciplesSslsniff and sslstrip make attacking it easy as piePrinciple of attack :MITM – The usual suspectApp and configuration issuesFake certificatesBad implementation
  • 16.
    SSL Threat ModelsLetslook at a small part today
  • 17.
    Endpoint IssuesEndpointsBad ServerSide ConfigurationSSL not enforcedBad certificate configurationPrivate Key not protectedUse weak protocolsUnpatched librariesMixed (SSL&Non-SSL) configurationsAnd many many more…
  • 18.
    Lets take adeeper dive and look at some examples
  • 19.
    Inconsistent DNS confighttp://www.example.com and http://example.com point to different webserversMicrosoft
  • 20.
    Another exampleA goodexample : OWASP
  • 21.
    Different Sites onport 80 and 443Both http://www.example.com and https://www.example.com must be the same websiteA lot of major companies fail to verify this
  • 22.
    Self Signed SSLCertsTwo words : DON’T BOTHERThis causes more issues than it solves.It is significantly harder for you to maintain a secure, well configured SSL certIt is much easier and more secure to buy one from a legitimate provider
  • 23.
    Badly Configured SSLServersOut 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 certificatesA certificatehas to encompass both http://example.com and http://www.example.comThey have to be the same siteThey must also be the same for the https://Your certificate must ensure that it is all-encompassing
  • 25.
    Mixing SSL andPlain textTricky to implementActive user sessions can be compromisedSslstrip can perform MITM attacks and convert HTTPS to HTTP
  • 26.
    There’s a fewmore but I’ll leave it there for now.
  • 27.
    If you haveany questions, contact me through the aboveTwitter : twitter.com/brianritchieFacebook : facebook.com/brianritchieOWASP MY Mailing List