SlideShare a Scribd company logo
All Your Biases Belong To Us:
Breaking RC4 in WPA-TKIP and TLS
Mathy Vanhoef and Frank Piessens, KU Leuven
USENIX Security 2015
RC4
2
Intriguingly simple stream cipher
WEP
WPA-TKIP
SSL / TLS PPP/MPPE
And others ...
RC4
3
Plaintext CiphertextKeystreamRC4
Key
Intriguingly simple stream cipher
Is RC4 still used?!
4
ICSI Notary: TLS connections using RC4
50%
30%
13%
0%
10%
20%
30%
40%
50%
60%
March 2013 Februari 2015 July 2015
RC4 fallback not taken into account!
RC4 Fallback
5
Client Server
ClientHello: without RC4 Browser first tries without RC4
ServerHello: use AES
Alert: Handshake Failed
RC4 Fallback
6
ClientHello: without RC4 Browser first tries without RC4
If that fails …
Client Server
ClientHello: with RC4
ServerHello: use RC4
RC4 Fallback
7
Client Server
Alert: Handshake Failed
ClientHello: without RC4 Browser first tries without RC4
If that fails …
… fallback to RC4
ClientHello: with RC4
ServerHello: use RC4
RC4 Fallback
8
Client Server
Alert: Handshake Failed
ClientHello: without RC4 Browser first tries without RC4
Forgeable by attacker!
… fallback to RC4
 13% estimate is a lower bound
 Force connection (which we
assumed secure) to use RC4
Our Goal: further kill RC4
9
New Biases Plaintext Recovery
Break WPA-TKIP Attack HTTPS
First: Existing Biases
10
Distribution keystream byte 2
Pr 𝒁 𝟐 = 𝟎 =
𝟐
𝟐𝟓𝟔
[MS01]
First: Existing Biases
11
Distribution keystream byte 1 (to 256)
First: Existing Biases
12
Distribution keystream byte 1 (to 256)
AlFardan et al. ‘13:
first 256 bytes biased
Short-term biases
Long-Term Biases
13
A B S A B
Fluhrer-McGrew (2000):
 Some consecutive values are biased
Examples: 0, 0 and (0, 1)
Mantin’s ABSAB Bias (2005):
 A byte pair (𝐴, 𝐵) likely reappears
Fluhrer-McGrew: only 8 out
of 65 536 pairs are biased
Search for new biases
14
Traditional emperical approach:
 Generate large amount of keystreams
 Manually inspect data or graph
How to automate
the search?
Search for new biases
15
Hypothesis tests!
 Uniformly distributed: Chi-squared test.
 Correlated: M-test (detect outliers = biases)
Traditional emperical approach:
 Generate large amount of keystreams
 Manually inspect data or graph
Allows a large-scale search,
revealing many new biases
Biases in Bytes 258-513
16
Example: keystream byte 258
Biases in Bytes 258-513
17
Example: keystream byte 320
Biases in Bytes 258-513
18
Example: keystream byte 352
Biases quickly
become quite weak
New Long-term Bias
19
(𝑍256∙𝑤, 𝑍256∙𝑤+2) = (128, 0)
with probability 2−16
(1 + 2−8
)
128 0 ...
Every block of 256 bytes
Additional Biases
20
See paper!
Our Goal: further kill RC4
21
New Biases Plaintext Recovery
Break WPA-TKIP Attack HTTPS
Existing Methods [AlFardan et al. ‘13]
22
Plaintext encrypted under
several keystreams
Ciphertext Distribution Plaintext guess 𝜇
Induced keystream
distribution
Verify guess: how close to
real keystream distribution?
Example: Decrypt byte 1
23
Ciphertext Distribution
Example: Decrypt byte 1
24
RC4 & Ciphertext distribution
Example: Decrypt byte 1
25
If plaintext byte 𝜇 = 0x28: RC4 & Induced
𝜇 = 0x28 has low likelihood
Example: Decrypt byte 1
26
If plaintext byte 𝜇 = 0x5C: RC4 & Induced
𝜇 = 0x5C has higher likelihood
Example: Decrypt byte 1
27
If plaintext byte 𝜇 = 0x5A: RC4 & Induced
𝜇 = 0x5A has highest likelihood!
Types of likelihood estimates
28
Previous works: pick value with highest likelihood.
Better idea: list of candidates in decreasing likelihood:
 Most likely one may not be correct!
 Prune bad candidates (e.g. bad CRC)
 Brute force cookies or passwords
How to calculate list of candidates?
1st idea: Generate List of Candidatess
29
Gist of the Algorithm: Incremental approach
Calculate candidates of length 1, length 2, ...
1
2
𝑛
1
2
𝑛
1
2
𝑛
...
2nd idea: abusing the ABSAB bias
30
Assume there’s surrounding known plaintext
 Derive values of A, B
 Combine with ABSAB bias to (probablisticly) predict A′, B′
 Ordinary likelihood calculation over only (A′, B′)
A B S A’ B’
Known Plaintext Unknown Plaintext
Likelihood estimate:
!
Our Goal: further kill RC4
31
New Biases Plaintext Recovery
Break WPA-TKIP Attack HTTPS
TKIP Background
32
How are packets sent/received?
1. Add Message Integrity Check (MIC)
2. Add CRC (leftover from WEP)
3. Add IV (increments every frame)
4. Encrypt using RC4 (per-packet key)
Encrypted
MICDataIV CRC
Flaw #1: TKIP Per-packet Key
33
Key-Mix
Key Sender MAC 𝐼𝑉
packet key
Anti-FMS(𝐼𝑉0, 𝐼𝑉1)
 𝐼𝑉-dependent biases in keystream
[Gupta/Paterson et al.]
Avoid weak keys which broke WEP
Flaw #2: MIC is invertible
34
If decrypted, reveals MIC key
MICDataIV CRC
 With the MIC key, an attacker can inject and
decrypt some packets [AsiaCCS ‘13]
Goal: decrypt data and MIC
35
If decrypted, reveals MIC key
MICDataIV CRC
Generate identical packets (otherwise MIC changes):
 Assume victim connects to server of attacker
 Retransmit identical TCP packet
 List of plaintext candidates (unknown MIC and CRC)
 Prune bad candidates based on CRC
Evaluation
36
Simulations with 230
candidates:
 Need ≈ 224
captures to decrypt with high success rates
Emperical tests:
 Server can inject 2 500 packets per second
 Roughly one hour to capture sufficient traffic
 Successfully decrypted packet & found MIC key!
Our Goal: further kill RC4
37
New Biases Plaintext Recovery
Break WPA-TKIP Attack HTTPS
TLS Background
38
Client Server
 Focus on record protocol with RC4 as cipher
Handshake protocol
Negotiate keys
Record protocol
Encrypt data
Targeting HTTPS Cookies
39
Previous attacks only used Fluhrer-McGrew (FM) biases
We combine FM bias with the ABSAB bias
Must surround cookie with known plaintext
1. Remove unknown plaintext arround cookie
2. Inject known plaintext arround cookie
Example: manipulated HTTP request
40
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
Trident/7.0; rv:11.0) like Gecko
Host: a.site.com
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: auth=????????????????; P=aaaaaaaaaaaaaaaaa
Surrounded by known
plaintext at both sides
Headers are
predictable
Preparation: manipulating cookies
41
Clienta.site.com fake.site.com
HTTPS insecure
Remove & inject
secure cookies!
Performing the attack!
42
JavaScript: Cross-Origin requests in WebWorkers
Performing the attack!
43
Keep-Alive connection to generate them fast
Performing the attack!
44
Combine Fluhrer-McGrew and ABSAB biases
Decrypting 16-character cookie
45
Takes 75 hours with 4450 requests / second
Ciphertext copies times 227
Decrypting 16-character cookie
46
DEMO!
rc4nomore.com
Questions?
May the bias be ever in your favor

More Related Content

What's hot

Chapter 6 firewall
Chapter 6 firewallChapter 6 firewall
Chapter 6 firewall
newbie2019
 
Super Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
Super Barcode Training Camp - Motorola AirDefense Wireless Security PresentationSuper Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
Super Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
System ID Warehouse
 
Hacking L2 Switches
Hacking L2 SwitchesHacking L2 Switches
Hacking L2 Switches
Navaneetha Sankar
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
phanleson
 
Hacking Cisco
Hacking CiscoHacking Cisco
Hacking Cisco
guestd05b31
 
Best!
Best!Best!
Exploiting WiFi Security
Exploiting WiFi Security Exploiting WiFi Security
Exploiting WiFi Security
Hariraj Rathod
 
05 06 ike
05   06 ike05   06 ike
05 06 ike
Babaa Naya
 
Network Security - Layer 2
Network Security - Layer 2Network Security - Layer 2
Network Security - Layer 2
samis
 
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Sumutiu Marius
 
Snort
SnortSnort
Snort
nazzf
 
3.Network
3.Network3.Network
3.Network
phanleson
 
Wireless hacking and security
Wireless hacking and securityWireless hacking and security
Wireless hacking and security
Adel Zalok
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocols
phanleson
 
Attacks and their mitigations
Attacks and their mitigationsAttacks and their mitigations
Attacks and their mitigations
Mukesh Chaudhari
 
Ceh v5 module 21 cryptography
Ceh v5 module 21 cryptographyCeh v5 module 21 cryptography
Ceh v5 module 21 cryptography
Vi Tính Hoàng Nam
 
Stream Ciphers
Stream CiphersStream Ciphers
Stream Ciphers
SHUBHA CHATURVEDI
 
Wireless security presentation
Wireless security presentationWireless security presentation
Wireless security presentation
Muhammad Zia
 
Snort
SnortSnort

What's hot (19)

Chapter 6 firewall
Chapter 6 firewallChapter 6 firewall
Chapter 6 firewall
 
Super Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
Super Barcode Training Camp - Motorola AirDefense Wireless Security PresentationSuper Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
Super Barcode Training Camp - Motorola AirDefense Wireless Security Presentation
 
Hacking L2 Switches
Hacking L2 SwitchesHacking L2 Switches
Hacking L2 Switches
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
 
Hacking Cisco
Hacking CiscoHacking Cisco
Hacking Cisco
 
Best!
Best!Best!
Best!
 
Exploiting WiFi Security
Exploiting WiFi Security Exploiting WiFi Security
Exploiting WiFi Security
 
05 06 ike
05   06 ike05   06 ike
05 06 ike
 
Network Security - Layer 2
Network Security - Layer 2Network Security - Layer 2
Network Security - Layer 2
 
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
 
Snort
SnortSnort
Snort
 
3.Network
3.Network3.Network
3.Network
 
Wireless hacking and security
Wireless hacking and securityWireless hacking and security
Wireless hacking and security
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocols
 
Attacks and their mitigations
Attacks and their mitigationsAttacks and their mitigations
Attacks and their mitigations
 
Ceh v5 module 21 cryptography
Ceh v5 module 21 cryptographyCeh v5 module 21 cryptography
Ceh v5 module 21 cryptography
 
Stream Ciphers
Stream CiphersStream Ciphers
Stream Ciphers
 
Wireless security presentation
Wireless security presentationWireless security presentation
Wireless security presentation
 
Snort
SnortSnort
Snort
 

Similar to USENIX Security '15: All Your Biases Belong To Us: Breaking RC4 in WPA-TKIP and TLS

Wireless security837
Wireless security837Wireless security837
Wireless security837
mark scott
 
Fundamentals of network hacking
Fundamentals of network hackingFundamentals of network hacking
Fundamentals of network hacking
Pranshu Pareek
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)
NYversity
 
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
Igalia
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
guestff64339
 
KRACK attack
KRACK attackKRACK attack
KRACK attack
VadimDavydov3
 
Unit 3:Enterprise Security
Unit 3:Enterprise SecurityUnit 3:Enterprise Security
Unit 3:Enterprise Security
prachi67
 
Common crypto attacks and secure implementations
Common crypto attacks and secure implementationsCommon crypto attacks and secure implementations
Common crypto attacks and secure implementations
Trupti Shiralkar, CISSP
 
Wpa vs Wpa2
Wpa vs Wpa2Wpa vs Wpa2
Wpa vs Wpa2
Nzava Luwawa
 
SSL overview
SSL overviewSSL overview
SSL/TLS Eavesdropping with Fullpath Control
SSL/TLS Eavesdropping with Fullpath ControlSSL/TLS Eavesdropping with Fullpath Control
SSL/TLS Eavesdropping with Fullpath Control
Mike Thompson
 
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
Aaron Zauner
 
Hacking SSL When Using RC4
Hacking SSL When Using RC4Hacking SSL When Using RC4
Hacking SSL When Using RC4
Khairi Aiman
 
802.11i
802.11i802.11i
802.11i
akruthi k
 
Cours4.pptx
Cours4.pptxCours4.pptx
Cours4.pptx
Bellaj Badr
 
DTS Solution - Wireless Security Protocols / PenTesting
DTS Solution - Wireless Security Protocols / PenTesting DTS Solution - Wireless Security Protocols / PenTesting
DTS Solution - Wireless Security Protocols / PenTesting
Shah Sheikh
 
Wifi Security
Wifi SecurityWifi Security
Wifi Security
Shital Kat
 
Wi fi-security-the-details-matter
Wi fi-security-the-details-matterWi fi-security-the-details-matter
Wi fi-security-the-details-matter
DESMOND YUEN
 
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdfFragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
YuChianWu
 

Similar to USENIX Security '15: All Your Biases Belong To Us: Breaking RC4 in WPA-TKIP and TLS (20)

Wireless security837
Wireless security837Wireless security837
Wireless security837
 
Fundamentals of network hacking
Fundamentals of network hackingFundamentals of network hacking
Fundamentals of network hacking
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)
 
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
HTTPS: Achievements, Challenges, and Epiphany (Web Engines Hackfest 2015)
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
KRACK attack
KRACK attackKRACK attack
KRACK attack
 
Unit 3:Enterprise Security
Unit 3:Enterprise SecurityUnit 3:Enterprise Security
Unit 3:Enterprise Security
 
Common crypto attacks and secure implementations
Common crypto attacks and secure implementationsCommon crypto attacks and secure implementations
Common crypto attacks and secure implementations
 
Wpa vs Wpa2
Wpa vs Wpa2Wpa vs Wpa2
Wpa vs Wpa2
 
SSL overview
SSL overviewSSL overview
SSL overview
 
SSL/TLS Eavesdropping with Fullpath Control
SSL/TLS Eavesdropping with Fullpath ControlSSL/TLS Eavesdropping with Fullpath Control
SSL/TLS Eavesdropping with Fullpath Control
 
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
[BlackHat USA 2016] Nonce-Disrespecting Adversaries: Practical Forgery Attack...
 
Hacking SSL When Using RC4
Hacking SSL When Using RC4Hacking SSL When Using RC4
Hacking SSL When Using RC4
 
802.11i
802.11i802.11i
802.11i
 
Cours4.pptx
Cours4.pptxCours4.pptx
Cours4.pptx
 
DTS Solution - Wireless Security Protocols / PenTesting
DTS Solution - Wireless Security Protocols / PenTesting DTS Solution - Wireless Security Protocols / PenTesting
DTS Solution - Wireless Security Protocols / PenTesting
 
Wifi Security
Wifi SecurityWifi Security
Wifi Security
 
Wi fi-security-the-details-matter
Wi fi-security-the-details-matterWi fi-security-the-details-matter
Wi fi-security-the-details-matter
 
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdfFragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
Fragattacks-Breaking-Wi-Fi-Through-Fragmentation-And-Aggregation.pdf
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 

USENIX Security '15: All Your Biases Belong To Us: Breaking RC4 in WPA-TKIP and TLS

  • 1. All Your Biases Belong To Us: Breaking RC4 in WPA-TKIP and TLS Mathy Vanhoef and Frank Piessens, KU Leuven USENIX Security 2015
  • 2. RC4 2 Intriguingly simple stream cipher WEP WPA-TKIP SSL / TLS PPP/MPPE And others ...
  • 4. Is RC4 still used?! 4 ICSI Notary: TLS connections using RC4 50% 30% 13% 0% 10% 20% 30% 40% 50% 60% March 2013 Februari 2015 July 2015 RC4 fallback not taken into account!
  • 5. RC4 Fallback 5 Client Server ClientHello: without RC4 Browser first tries without RC4 ServerHello: use AES
  • 6. Alert: Handshake Failed RC4 Fallback 6 ClientHello: without RC4 Browser first tries without RC4 If that fails … Client Server
  • 7. ClientHello: with RC4 ServerHello: use RC4 RC4 Fallback 7 Client Server Alert: Handshake Failed ClientHello: without RC4 Browser first tries without RC4 If that fails … … fallback to RC4
  • 8. ClientHello: with RC4 ServerHello: use RC4 RC4 Fallback 8 Client Server Alert: Handshake Failed ClientHello: without RC4 Browser first tries without RC4 Forgeable by attacker! … fallback to RC4  13% estimate is a lower bound  Force connection (which we assumed secure) to use RC4
  • 9. Our Goal: further kill RC4 9 New Biases Plaintext Recovery Break WPA-TKIP Attack HTTPS
  • 10. First: Existing Biases 10 Distribution keystream byte 2 Pr 𝒁 𝟐 = 𝟎 = 𝟐 𝟐𝟓𝟔 [MS01]
  • 11. First: Existing Biases 11 Distribution keystream byte 1 (to 256)
  • 12. First: Existing Biases 12 Distribution keystream byte 1 (to 256) AlFardan et al. ‘13: first 256 bytes biased Short-term biases
  • 13. Long-Term Biases 13 A B S A B Fluhrer-McGrew (2000):  Some consecutive values are biased Examples: 0, 0 and (0, 1) Mantin’s ABSAB Bias (2005):  A byte pair (𝐴, 𝐵) likely reappears
  • 14. Fluhrer-McGrew: only 8 out of 65 536 pairs are biased Search for new biases 14 Traditional emperical approach:  Generate large amount of keystreams  Manually inspect data or graph How to automate the search?
  • 15. Search for new biases 15 Hypothesis tests!  Uniformly distributed: Chi-squared test.  Correlated: M-test (detect outliers = biases) Traditional emperical approach:  Generate large amount of keystreams  Manually inspect data or graph Allows a large-scale search, revealing many new biases
  • 16. Biases in Bytes 258-513 16 Example: keystream byte 258
  • 17. Biases in Bytes 258-513 17 Example: keystream byte 320
  • 18. Biases in Bytes 258-513 18 Example: keystream byte 352 Biases quickly become quite weak
  • 19. New Long-term Bias 19 (𝑍256∙𝑤, 𝑍256∙𝑤+2) = (128, 0) with probability 2−16 (1 + 2−8 ) 128 0 ... Every block of 256 bytes
  • 21. Our Goal: further kill RC4 21 New Biases Plaintext Recovery Break WPA-TKIP Attack HTTPS
  • 22. Existing Methods [AlFardan et al. ‘13] 22 Plaintext encrypted under several keystreams Ciphertext Distribution Plaintext guess 𝜇 Induced keystream distribution Verify guess: how close to real keystream distribution?
  • 23. Example: Decrypt byte 1 23 Ciphertext Distribution
  • 24. Example: Decrypt byte 1 24 RC4 & Ciphertext distribution
  • 25. Example: Decrypt byte 1 25 If plaintext byte 𝜇 = 0x28: RC4 & Induced 𝜇 = 0x28 has low likelihood
  • 26. Example: Decrypt byte 1 26 If plaintext byte 𝜇 = 0x5C: RC4 & Induced 𝜇 = 0x5C has higher likelihood
  • 27. Example: Decrypt byte 1 27 If plaintext byte 𝜇 = 0x5A: RC4 & Induced 𝜇 = 0x5A has highest likelihood!
  • 28. Types of likelihood estimates 28 Previous works: pick value with highest likelihood. Better idea: list of candidates in decreasing likelihood:  Most likely one may not be correct!  Prune bad candidates (e.g. bad CRC)  Brute force cookies or passwords How to calculate list of candidates?
  • 29. 1st idea: Generate List of Candidatess 29 Gist of the Algorithm: Incremental approach Calculate candidates of length 1, length 2, ... 1 2 𝑛 1 2 𝑛 1 2 𝑛 ...
  • 30. 2nd idea: abusing the ABSAB bias 30 Assume there’s surrounding known plaintext  Derive values of A, B  Combine with ABSAB bias to (probablisticly) predict A′, B′  Ordinary likelihood calculation over only (A′, B′) A B S A’ B’ Known Plaintext Unknown Plaintext Likelihood estimate: !
  • 31. Our Goal: further kill RC4 31 New Biases Plaintext Recovery Break WPA-TKIP Attack HTTPS
  • 32. TKIP Background 32 How are packets sent/received? 1. Add Message Integrity Check (MIC) 2. Add CRC (leftover from WEP) 3. Add IV (increments every frame) 4. Encrypt using RC4 (per-packet key) Encrypted MICDataIV CRC
  • 33. Flaw #1: TKIP Per-packet Key 33 Key-Mix Key Sender MAC 𝐼𝑉 packet key Anti-FMS(𝐼𝑉0, 𝐼𝑉1)  𝐼𝑉-dependent biases in keystream [Gupta/Paterson et al.] Avoid weak keys which broke WEP
  • 34. Flaw #2: MIC is invertible 34 If decrypted, reveals MIC key MICDataIV CRC  With the MIC key, an attacker can inject and decrypt some packets [AsiaCCS ‘13]
  • 35. Goal: decrypt data and MIC 35 If decrypted, reveals MIC key MICDataIV CRC Generate identical packets (otherwise MIC changes):  Assume victim connects to server of attacker  Retransmit identical TCP packet  List of plaintext candidates (unknown MIC and CRC)  Prune bad candidates based on CRC
  • 36. Evaluation 36 Simulations with 230 candidates:  Need ≈ 224 captures to decrypt with high success rates Emperical tests:  Server can inject 2 500 packets per second  Roughly one hour to capture sufficient traffic  Successfully decrypted packet & found MIC key!
  • 37. Our Goal: further kill RC4 37 New Biases Plaintext Recovery Break WPA-TKIP Attack HTTPS
  • 38. TLS Background 38 Client Server  Focus on record protocol with RC4 as cipher Handshake protocol Negotiate keys Record protocol Encrypt data
  • 39. Targeting HTTPS Cookies 39 Previous attacks only used Fluhrer-McGrew (FM) biases We combine FM bias with the ABSAB bias Must surround cookie with known plaintext 1. Remove unknown plaintext arround cookie 2. Inject known plaintext arround cookie
  • 40. Example: manipulated HTTP request 40 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko Host: a.site.com Connection: Keep-Alive Cache-Control: no-cache Cookie: auth=????????????????; P=aaaaaaaaaaaaaaaaa Surrounded by known plaintext at both sides Headers are predictable
  • 41. Preparation: manipulating cookies 41 Clienta.site.com fake.site.com HTTPS insecure Remove & inject secure cookies!
  • 42. Performing the attack! 42 JavaScript: Cross-Origin requests in WebWorkers
  • 43. Performing the attack! 43 Keep-Alive connection to generate them fast
  • 44. Performing the attack! 44 Combine Fluhrer-McGrew and ABSAB biases
  • 45. Decrypting 16-character cookie 45 Takes 75 hours with 4450 requests / second Ciphertext copies times 227
  • 47. Questions? May the bias be ever in your favor