SlideShare ist ein Scribd-Unternehmen logo
1 von 46
The Good News on Cryptography
Martijn Grooten, Virus Bulletin
NCSC One Conference 2016
How broken are these protocols really?How broken are these protocols really?
About me
I studied mathematics in Nijmegen (Netherlands).
I work for Virus Bulletin (UK).
I live in Athens (Greece).
Setting the Scene
● Authentication (SHA-1)
● Key agreement (Diffie-Hellman)
● Encrypted data-exchange (SSLv3)
Alice Bob
Eve
Not on the agenda
● Excuses not to use the latest and greatest crypto
● Implementation issues
● Short keys and downgrade attacks
● Dual_EC_DRBG
Diffie-Hellman and LogJam
Agreeing on protocol parameters
Alice and Bob publicly agree on a group “g” to be
used.
g? OK!
Generating private keys
Alice chooses a (large) secret number a.
Bob chooses a (large) secret number b.
a b
Computing public keys
Using the “group mechanism” Alice computes ga
and shares this with Bob.
Bob computes gb
and shares this with Alice.
ga
gb
Generating the secret key
● Alice combines a and gb
to compute (gb
)a
.
● Bob combines b and ga
to compute (ga
)b
.
● Mathematics is kind to us:
(gb
)a
= (ga
)b
● This is the secret key they will use.
● The key is broken if Eve can compute a from
g and ga
(or b from g and gb
).
Nothing is impossible!
● Like most cryptographic algorithms, Diffie-
Hellman can be broken. It is just very expensive
to do so.
● Breaking 1024-bit Diffie-Hellman costs about
$100m.
● No one will ever pay that to crack a single
key!
How would such an attack work?
● The expensive part is typical only to the group g.
● Only a small and cheap part is specific to the
numbers ga
and gb
.
● It would be really bad if many Alices and Bobs
used the same group g.
Guess what?
● Many Alices and Bobs do indeed use same
group g: e.g. some HTTPS, VPN
implementations.
● For $100m worth of “preparations” you can crack
all these implementations at once, in (near) real-
time.
● This is the LogJam attack.
● It is believed that this is how the NSA has broken
many VPN connections.
Is Diffie-Hellman broken?
● The Diffie-Hellman protocol has not been
broken.
● 2048-bit Diffie-Hellman is very secure.
● 1024-bit Diffie-Hellman with a unique g is also
secure in practice (but it's best avoided).
SSLv3 and POODLE
Block cipher encryption in SSLv3
Cipher Block Chaining (CBC)
Make the plaintext a little nicer
● Add a MAC to “avoid tampering”.
● Add padding to fill up final block.
Padding
? ? ? ? 4
Size of the rest
of the padding
Anything will do
In HTTP, Eve has a lot of control
● Eve can make sure padding fills the final block.
● And also replace that block by a previous block.
Bob doesn't suspect anything
? ? ? ? ????
● Bob's decryption attempt is “successful” if the
final byte is “correct”.
● This happens one in every 256 times.
● If Bob's attempt fails, he'll tell Alice (which Eve
hears) and Eve tries again.
● If he succeeds, Eve can compute one byte of
plaintext.
HTTP(S) requests are predictable
POST /xxxx HTTP/1.1
Host: target.website
Cookie: ??????????
xxxxxxxxx
Eve can force this to
vary to ensure the
padding fills the last
block…
…and for this to be
the final byte of a
block.
And thus “construct”
the cookie byte by
byte.
The POODLE attack against SSLv3
● Makes it easy for Eve to crack a session cookie
(under reasonable conditions).
● Does require HTTPS; doesn't work against
SMTP, FTP etc.
● Does not allow Eve to decrypt full requests, or
any part of the response.
● There are often mitigations against session
hijacks in place.
And there's (NO)MORE
NOMORE attack against RC4
● Stream cipher rather than block cipher.
● RC4 is “too good to be true”.
● Known to be (somewhat) bad for years.
● Best known attack (“NOMORE”) takes ~75 hours
and still only gives you session cookie.
DROWING in vulnerabilities
The DROWN attack against SSLv2
● Uses clever maths (“Bleichenbacher attack”) to
crack RSA private key.
● This key is often shared between weaker and
stronger servers.
● In worst/best case scenario, it is very cheap –
but still doesn't scale well.
● Most of the problems have to do with openssl
issues.
Preliminary conclusion
● Diffie-Hellman is safe, but beware of key sizes.
● Avoid SSLv3 for HTTPS.
● RC4 in general isn't broken in practice, but there
are better alternatives.
● Don't support SSLv2. Not even under the
counter.
SHA-1
Bob authenticates to Alice
● He signs something with the a private key,
corresponding to the public key in his certificate.
● His certificate is signed with a private key,
corresponding to the public key in another
certificate.
● This certificate is signed with a private key,
corresponding to the public key in a certificate
Alice already has.
Erm… what??
something
hardcoded in Alice's browser
If Eve can fake this so that this signature is
valid, she can impersonate Bob.
Certificates
Information on certificate
Information on signer
Public key
Signature
hash
Cryptographic hashes
One-way encryption: turns an arbitrary sequence
of bytes into a fixed-length block that gives no
information about the original.
Examples: MD5, SHA-1, SHA-256 etc.
sha-1("hello world") = 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
sha-1("Hello world") = 7b502c3a1f48c8609ae212cdfb639dee39673f5e
What could go wrong?
Information on certificate
Information on signer
Public key
Signature
hash
If Eve could
forge a
certificate with
the very same
hash as that of
Bob’s, she
could add the
signature of
Bob’s certificate
and
authenticate as
Bob.
From easy to difficult
● Find a hash collision for a weaker form of SHA-1
(“free start collision”).
● Find two blocks with the same SHA-1 hash
(“collision”).
● Find an arbitrary block of bytes with SHA-1 hash
value equal to that of another block.
● Find a certificate with the same SHA-1 hash as a
given certificate. What Eve wants
Where we are now
SHA-1 broken
Why the panic?
“The presented
attack does not yet
threaten practical
applications of
MD5, but it comes
rather close”.
Dobbertin, 1996. “We know, we know” Flame malware, 2012
A brief history of MD5
Breaking up with SHA-1 is hard to do
● Certificates often last for many years; we can't
just stop accepting those using SHA-1.
● Upgrading your certificates won't prevent
people from impersonating you!
● Phasing out will last years; it has already hurt
people.
● Flame-like attacks have been mitigated.
Conclusions
Why bother?
● Attacks only get better, they never get worse.
● I may be wrong!
● It shows that you care.
But please remember
A cryptographic protocol is unlikely to be the
weakest link in your organisation!
When is it OK to use weak crypto?
● If the alternative is worse.
● And you understand the attacks.
● You can respond to new threats quickly.
Example: Google supporting SSLv3 on its mail
servers for encrypted SMTP.
Thank you!
martijn.grooten@virusbtn.com
martijn_grooten

Weitere ähnliche Inhalte

Was ist angesagt?

Black ops of tcp2005 japan
Black ops of tcp2005 japanBlack ops of tcp2005 japan
Black ops of tcp2005 japan
Dan Kaminsky
 
Domain Key Infrastructure (From Black Hat USA)
Domain Key Infrastructure (From Black Hat USA)Domain Key Infrastructure (From Black Hat USA)
Domain Key Infrastructure (From Black Hat USA)
Dan Kaminsky
 

Was ist angesagt? (20)

What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
 
Dos threats and countermeasures
Dos threats and countermeasuresDos threats and countermeasures
Dos threats and countermeasures
 
Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...
Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...
Puppet Camp NYC 2014: Safely storing secrets and credentials in Git for use b...
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirus
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
 
HTTP/3 for everyone
HTTP/3 for everyoneHTTP/3 for everyone
HTTP/3 for everyone
 
CheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityCheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant Security
 
Confidence web
Confidence webConfidence web
Confidence web
 
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack Thereof
 
Dmk bo2 k8_bh_fed
Dmk bo2 k8_bh_fedDmk bo2 k8_bh_fed
Dmk bo2 k8_bh_fed
 
Just curl it!
Just curl it!Just curl it!
Just curl it!
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
 
HTTP/3 in curl 2020
HTTP/3 in curl 2020HTTP/3 in curl 2020
HTTP/3 in curl 2020
 
Black ops of tcp2005 japan
Black ops of tcp2005 japanBlack ops of tcp2005 japan
Black ops of tcp2005 japan
 
Domain Key Infrastructure (From Black Hat USA)
Domain Key Infrastructure (From Black Hat USA)Domain Key Infrastructure (From Black Hat USA)
Domain Key Infrastructure (From Black Hat USA)
 
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreA Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
 
Mo and Tao 魔与道
Mo and Tao 魔与道Mo and Tao 魔与道
Mo and Tao 魔与道
 

Ähnlich wie The Good News on Cryptography

Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developers
Kai Koenig
 
Wo defensive trickery_13mar2017
Wo defensive trickery_13mar2017Wo defensive trickery_13mar2017
Wo defensive trickery_13mar2017
Dan Kaminsky
 
SSL, X.509, HTTPS - How to configure your HTTPS server
SSL, X.509, HTTPS - How to configure your HTTPS serverSSL, X.509, HTTPS - How to configure your HTTPS server
SSL, X.509, HTTPS - How to configure your HTTPS server
hannob
 
Dmk blackops2006 ccc
Dmk blackops2006 cccDmk blackops2006 ccc
Dmk blackops2006 ccc
Dan Kaminsky
 

Ähnlich wie The Good News on Cryptography (20)

Applied cryptanalysis - everything else
Applied cryptanalysis - everything elseApplied cryptanalysis - everything else
Applied cryptanalysis - everything else
 
Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developers
 
Cracking the crypto
Cracking the cryptoCracking the crypto
Cracking the crypto
 
Wo defensive trickery_13mar2017
Wo defensive trickery_13mar2017Wo defensive trickery_13mar2017
Wo defensive trickery_13mar2017
 
SSL, X.509, HTTPS - How to configure your HTTPS server
SSL, X.509, HTTPS - How to configure your HTTPS serverSSL, X.509, HTTPS - How to configure your HTTPS server
SSL, X.509, HTTPS - How to configure your HTTPS server
 
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
 
1086: The SSL Problem and How to Deploy SHA2 Certificates (with Mark Myers)
1086: The SSL Problem and How to Deploy SHA2 Certificates (with Mark Myers)1086: The SSL Problem and How to Deploy SHA2 Certificates (with Mark Myers)
1086: The SSL Problem and How to Deploy SHA2 Certificates (with Mark Myers)
 
A Technical Dive into Defensive Trickery
A Technical Dive into Defensive TrickeryA Technical Dive into Defensive Trickery
A Technical Dive into Defensive Trickery
 
Go paranoid
Go paranoidGo paranoid
Go paranoid
 
Cryptography (under)engineering
Cryptography (under)engineeringCryptography (under)engineering
Cryptography (under)engineering
 
Web Crypto
Web CryptoWeb Crypto
Web Crypto
 
When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
 
Cours4.pptx
Cours4.pptxCours4.pptx
Cours4.pptx
 
Wordlist Generation and Wifi Cracking
Wordlist Generation and Wifi CrackingWordlist Generation and Wifi Cracking
Wordlist Generation and Wifi Cracking
 
How to Backdoor Diffie-Hellman
How to Backdoor Diffie-HellmanHow to Backdoor Diffie-Hellman
How to Backdoor Diffie-Hellman
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain Fundamentals
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applications
 
Dmk blackops2006 ccc
Dmk blackops2006 cccDmk blackops2006 ccc
Dmk blackops2006 ccc
 
Using Cryptography Properly in Applications
Using Cryptography Properly in ApplicationsUsing Cryptography Properly in Applications
Using Cryptography Properly in Applications
 

Kürzlich hochgeladen

💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 

Kürzlich hochgeladen (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 

The Good News on Cryptography

  • 1. The Good News on Cryptography Martijn Grooten, Virus Bulletin NCSC One Conference 2016
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. How broken are these protocols really?How broken are these protocols really?
  • 8. About me I studied mathematics in Nijmegen (Netherlands). I work for Virus Bulletin (UK). I live in Athens (Greece).
  • 9. Setting the Scene ● Authentication (SHA-1) ● Key agreement (Diffie-Hellman) ● Encrypted data-exchange (SSLv3) Alice Bob Eve
  • 10. Not on the agenda ● Excuses not to use the latest and greatest crypto ● Implementation issues ● Short keys and downgrade attacks ● Dual_EC_DRBG
  • 12. Agreeing on protocol parameters Alice and Bob publicly agree on a group “g” to be used. g? OK!
  • 13. Generating private keys Alice chooses a (large) secret number a. Bob chooses a (large) secret number b. a b
  • 14. Computing public keys Using the “group mechanism” Alice computes ga and shares this with Bob. Bob computes gb and shares this with Alice. ga gb
  • 15. Generating the secret key ● Alice combines a and gb to compute (gb )a . ● Bob combines b and ga to compute (ga )b . ● Mathematics is kind to us: (gb )a = (ga )b ● This is the secret key they will use. ● The key is broken if Eve can compute a from g and ga (or b from g and gb ).
  • 16. Nothing is impossible! ● Like most cryptographic algorithms, Diffie- Hellman can be broken. It is just very expensive to do so. ● Breaking 1024-bit Diffie-Hellman costs about $100m. ● No one will ever pay that to crack a single key!
  • 17. How would such an attack work? ● The expensive part is typical only to the group g. ● Only a small and cheap part is specific to the numbers ga and gb . ● It would be really bad if many Alices and Bobs used the same group g.
  • 18. Guess what? ● Many Alices and Bobs do indeed use same group g: e.g. some HTTPS, VPN implementations. ● For $100m worth of “preparations” you can crack all these implementations at once, in (near) real- time. ● This is the LogJam attack. ● It is believed that this is how the NSA has broken many VPN connections.
  • 19. Is Diffie-Hellman broken? ● The Diffie-Hellman protocol has not been broken. ● 2048-bit Diffie-Hellman is very secure. ● 1024-bit Diffie-Hellman with a unique g is also secure in practice (but it's best avoided).
  • 21. Block cipher encryption in SSLv3 Cipher Block Chaining (CBC)
  • 22. Make the plaintext a little nicer ● Add a MAC to “avoid tampering”. ● Add padding to fill up final block.
  • 23. Padding ? ? ? ? 4 Size of the rest of the padding Anything will do
  • 24. In HTTP, Eve has a lot of control ● Eve can make sure padding fills the final block. ● And also replace that block by a previous block.
  • 25. Bob doesn't suspect anything ? ? ? ? ???? ● Bob's decryption attempt is “successful” if the final byte is “correct”. ● This happens one in every 256 times. ● If Bob's attempt fails, he'll tell Alice (which Eve hears) and Eve tries again. ● If he succeeds, Eve can compute one byte of plaintext.
  • 26. HTTP(S) requests are predictable POST /xxxx HTTP/1.1 Host: target.website Cookie: ?????????? xxxxxxxxx Eve can force this to vary to ensure the padding fills the last block… …and for this to be the final byte of a block. And thus “construct” the cookie byte by byte.
  • 27. The POODLE attack against SSLv3 ● Makes it easy for Eve to crack a session cookie (under reasonable conditions). ● Does require HTTPS; doesn't work against SMTP, FTP etc. ● Does not allow Eve to decrypt full requests, or any part of the response. ● There are often mitigations against session hijacks in place.
  • 28. And there's (NO)MORE NOMORE attack against RC4 ● Stream cipher rather than block cipher. ● RC4 is “too good to be true”. ● Known to be (somewhat) bad for years. ● Best known attack (“NOMORE”) takes ~75 hours and still only gives you session cookie.
  • 29. DROWING in vulnerabilities The DROWN attack against SSLv2 ● Uses clever maths (“Bleichenbacher attack”) to crack RSA private key. ● This key is often shared between weaker and stronger servers. ● In worst/best case scenario, it is very cheap – but still doesn't scale well. ● Most of the problems have to do with openssl issues.
  • 30. Preliminary conclusion ● Diffie-Hellman is safe, but beware of key sizes. ● Avoid SSLv3 for HTTPS. ● RC4 in general isn't broken in practice, but there are better alternatives. ● Don't support SSLv2. Not even under the counter.
  • 31. SHA-1
  • 32. Bob authenticates to Alice ● He signs something with the a private key, corresponding to the public key in his certificate. ● His certificate is signed with a private key, corresponding to the public key in another certificate. ● This certificate is signed with a private key, corresponding to the public key in a certificate Alice already has.
  • 33. Erm… what?? something hardcoded in Alice's browser If Eve can fake this so that this signature is valid, she can impersonate Bob.
  • 34. Certificates Information on certificate Information on signer Public key Signature hash
  • 35. Cryptographic hashes One-way encryption: turns an arbitrary sequence of bytes into a fixed-length block that gives no information about the original. Examples: MD5, SHA-1, SHA-256 etc. sha-1("hello world") = 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed sha-1("Hello world") = 7b502c3a1f48c8609ae212cdfb639dee39673f5e
  • 36. What could go wrong? Information on certificate Information on signer Public key Signature hash If Eve could forge a certificate with the very same hash as that of Bob’s, she could add the signature of Bob’s certificate and authenticate as Bob.
  • 37. From easy to difficult ● Find a hash collision for a weaker form of SHA-1 (“free start collision”). ● Find two blocks with the same SHA-1 hash (“collision”). ● Find an arbitrary block of bytes with SHA-1 hash value equal to that of another block. ● Find a certificate with the same SHA-1 hash as a given certificate. What Eve wants Where we are now SHA-1 broken
  • 38. Why the panic? “The presented attack does not yet threaten practical applications of MD5, but it comes rather close”. Dobbertin, 1996. “We know, we know” Flame malware, 2012 A brief history of MD5
  • 39. Breaking up with SHA-1 is hard to do ● Certificates often last for many years; we can't just stop accepting those using SHA-1. ● Upgrading your certificates won't prevent people from impersonating you! ● Phasing out will last years; it has already hurt people. ● Flame-like attacks have been mitigated.
  • 41. Why bother? ● Attacks only get better, they never get worse. ● I may be wrong! ● It shows that you care.
  • 42. But please remember A cryptographic protocol is unlikely to be the weakest link in your organisation!
  • 43. When is it OK to use weak crypto? ● If the alternative is worse. ● And you understand the attacks. ● You can respond to new threats quickly. Example: Google supporting SSLv3 on its mail servers for encrypted SMTP.
  • 44.
  • 45.