The Final Nail in WEPs Coffin Andrea Bittau 1 Mark Handley 1 Joshua - - PowerPoint PPT Presentation

the final nail in wep s coffin
SMART_READER_LITE
LIVE PREVIEW

The Final Nail in WEPs Coffin Andrea Bittau 1 Mark Handley 1 Joshua - - PowerPoint PPT Presentation

Introduction Fragmentation Attack Implementation Conclusion 1/19 The Final Nail in WEPs Coffin Andrea Bittau 1 Mark Handley 1 Joshua Lackey 2 May 24, 2006 1 University College London. 2 Microsoft. Wired Equivalent Privacy Introduction


slide-1
SLIDE 1

Introduction Fragmentation Attack Implementation Conclusion 1/19

The Final Nail in WEP’s Coffin

Andrea Bittau1 Mark Handley1 Joshua Lackey2 May 24, 2006

1University College London. 2Microsoft.

slide-2
SLIDE 2

Introduction Fragmentation Attack Implementation Conclusion 2/19

Wired Equivalent Privacy

WEP is the 802.11 standard for encryption. Pre-shared key for whole network. Protects data privacy since data is encrypted. Access control: need key to transmit. In practice, only half of the networks are encrypted. In the subset of encrypted networks, WEP is most adopted. Popularity (%) of WEP and its alternatives based on our survey Region WEP WPA 802.11i London 76 20 4 Seattle region 85 14 1

slide-3
SLIDE 3

Introduction Fragmentation Attack Implementation Conclusion 3/19

Goals when attacking WEP

Decrypt data in packets. Obtain access to the network by being able to transmit data. Recover the WEP key.

slide-4
SLIDE 4

Introduction Fragmentation Attack Implementation Conclusion 4/19

Contribution

Today, millions of packets are required to break a WEP key. Our fragmentation attack allows:

1 Transmitting arbitrary data after eavesdropping a single data

packet on an 802.11 WEP protected network.

2 Real-time decryption given that network is connected to

Internet.

slide-5
SLIDE 5

Introduction Fragmentation Attack Implementation Conclusion 5/19

Outline

1

Introduction WEP Description WEP Attacks

2

Fragmentation Attack Transmission Decryption

3

Implementation Performance Evaluation

4

Conclusion

slide-6
SLIDE 6

Introduction Fragmentation Attack Implementation Conclusion 6/19

WEP operation

Data frame format

802.11 Header CRC Frame Body IV

{

Initialization Vector ICV

{

CRC32 of user data User Data

Encryption

IV + key

{

seed RC4

{

keystream 1 1 1 1

⊕ =

1 1 Plain text Cipher text

slide-7
SLIDE 7

Introduction Fragmentation Attack Implementation Conclusion 7/19

History of WEP attacks

. . . and how the real problem was ignored

Year 2000. Keystream attacks (independent of WEP key): Design flaw: WEP allows keystream reuse. Attacks were thought impractical:

Need plain-text to recover keystream. Need 224 keystreams to decrypt all possible packets.

Year 2001. Weak IV attacks (recover WEP key): Need millions of packets. Could take hours, and usually, days. Use EAP-based solutions to re-key, say, every ten minutes. Year 2006. Our contribution: fragmentation attack. Keystream attack which may be performed within minutes.

slide-8
SLIDE 8

Introduction Fragmentation Attack Implementation Conclusion 7/19

History of WEP attacks

. . . and how the real problem was ignored

Year 2000. Keystream attacks (independent of WEP key): Design flaw: WEP allows keystream reuse. Attacks were thought impractical:

Need plain-text to recover keystream. Need 224 keystreams to decrypt all possible packets.

Year 2001. Weak IV attacks (recover WEP key): Need millions of packets. Could take hours, and usually, days. Use EAP-based solutions to re-key, say, every ten minutes. Year 2006. Our contribution: fragmentation attack. Keystream attack which may be performed within minutes.

slide-9
SLIDE 9

Introduction Fragmentation Attack Implementation Conclusion 7/19

History of WEP attacks

. . . and how the real problem was ignored

Year 2000. Keystream attacks (independent of WEP key): Design flaw: WEP allows keystream reuse. Attacks were thought impractical:

Need plain-text to recover keystream. Need 224 keystreams to decrypt all possible packets.

Year 2001. Weak IV attacks (recover WEP key): Need millions of packets. Could take hours, and usually, days. Use EAP-based solutions to re-key, say, every ten minutes. Year 2006. Our contribution: fragmentation attack. Keystream attack which may be performed within minutes.

slide-10
SLIDE 10

Introduction Fragmentation Attack Implementation Conclusion 8/19

Fragmentation attack

Outline

Transmission

1 Recover a keystream. 2 Reuse the keystream to send arbitrary data.

❍❍❍❍❍❍❍❍ ❥

Keystream-based decryption Resend data through the AP to a buddy on the Internet. Recover the keystream used for encrypting the packet. WEP key recovery Use transmission ability for speeding up weak IV attacks.

slide-11
SLIDE 11

Introduction Fragmentation Attack Implementation Conclusion 9/19

Transmission

Recovering a short keystream

If cipher-text & plain-text pair is known, their XOR is a keystream. Known plain-text (LLC/SNAP headers) in IP packets:

802.11 header 0xAA 0xAA 0x03 0x00 0x00 0x00 0x08 0x00

slide-12
SLIDE 12

Introduction Fragmentation Attack Implementation Conclusion 9/19

Transmission

Recovering a short keystream

If cipher-text & plain-text pair is known, their XOR is a keystream. Known plain-text (LLC/SNAP headers) in IP packets:

802.11 header 0xAA 0xAA 0x03 0x00 0x00 0x00 0x08 0x00 802.11 header Cipher-text ⊕ = 8 bytes of keystream

Can recover 8 bytes of keystream by eavesdropping a packet. Can encrypt (and transmit) 8 bytes of arbitrary data.

slide-13
SLIDE 13

Introduction Fragmentation Attack Implementation Conclusion 10/19

Transmission

Sending arbitrarily long data

802.11 supports MAC layer fragmentation. Transmit arbitrary data in 8 byte chunks. Fragmentation

}

Data

abcd efgh Original plain-text & CRC. 1234

}

CRC32

abcd 1983 Fragments & CRC. ⊕ 1234 5678 Keystream (IV x). = 2911 8305 Encrypted frags. x efgh 1914 ⊕ 1234 5678 = 1337 6667 x

}

IV

slide-14
SLIDE 14

Introduction Fragmentation Attack Implementation Conclusion 10/19

Transmission

Sending arbitrarily long data

802.11 supports MAC layer fragmentation. Transmit arbitrary data in 8 byte chunks. Fragmentation

}

Data

abcd efgh Original plain-text & CRC. 1234

}

CRC32

abcd 1983 Fragments & CRC. ⊕ 1234 5678 Keystream (IV x). = 2911 8305 Encrypted frags. x efgh 1914 ⊕ 1234 5678 = 1337 6667 x

}

IV

slide-15
SLIDE 15

Introduction Fragmentation Attack Implementation Conclusion 10/19

Transmission

Sending arbitrarily long data

802.11 supports MAC layer fragmentation. Transmit arbitrary data in 8 byte chunks. Fragmentation

}

Data

abcd efgh Original plain-text & CRC. 1234

}

CRC32

abcd 1983 Fragments & CRC. ⊕ 1234 5678 Keystream (IV x). = 2911 8305 Encrypted frags. x efgh 1914 ⊕ 1234 5678 = 1337 6667 x

}

IV

slide-16
SLIDE 16

Introduction Fragmentation Attack Implementation Conclusion 10/19

Transmission

Sending arbitrarily long data

802.11 supports MAC layer fragmentation. Transmit arbitrary data in 8 byte chunks. Fragmentation

}

Data

abcd efgh Original plain-text & CRC. 1234

}

CRC32

abcd 1983 Fragments & CRC. ⊕ 1234 5678 Keystream (IV x). = 2911 8305 Encrypted frags. x efgh 1914 ⊕ 1234 5678 = 1337 6667 x

}

IV

slide-17
SLIDE 17

Introduction Fragmentation Attack Implementation Conclusion 10/19

Transmission

Sending arbitrarily long data

802.11 supports MAC layer fragmentation. Transmit arbitrary data in 8 byte chunks. Fragmentation

}

Data

abcd efgh Original plain-text & CRC. 1234

}

CRC32

abcd 1983 Fragments & CRC. ⊕ 1234 5678 Keystream (IV x). = 2911 8305 Encrypted frags. x efgh 1914 ⊕ 1234 5678 = 1337 6667 x

}

IV

slide-18
SLIDE 18

Introduction Fragmentation Attack Implementation Conclusion 11/19

Transmission

Recovering a longer keystream

Discover a longer keystream to avoid sending many tiny packets: Send a long broadcast frame via multiple smaller fragments. AP relays it as a single packet. (New cipher & plain-text pair.) Keystream discovery

Encrypted frags.

IV

}

x

Data

}

2911

CRC

}

8305 x 1337 6667 De-crypt & reassemble. Calculate entire CRC. abcd efgh ⊕ 1234 Keystream for IV y. 3141 5926 5358 = Relayed payload. 2718 2818 2845 y

slide-19
SLIDE 19

Introduction Fragmentation Attack Implementation Conclusion 11/19

Transmission

Recovering a longer keystream

Discover a longer keystream to avoid sending many tiny packets: Send a long broadcast frame via multiple smaller fragments. AP relays it as a single packet. (New cipher & plain-text pair.) Keystream discovery

Encrypted frags.

IV

}

x

Data

}

2911

CRC

}

8305 x 1337 6667 De-crypt & reassemble. Calculate entire CRC. abcd efgh ⊕ 1234 Keystream for IV y. 3141 5926 5358 = Relayed payload. 2718 2818 2845 y

slide-20
SLIDE 20

Introduction Fragmentation Attack Implementation Conclusion 11/19

Transmission

Recovering a longer keystream

Discover a longer keystream to avoid sending many tiny packets: Send a long broadcast frame via multiple smaller fragments. AP relays it as a single packet. (New cipher & plain-text pair.) Keystream discovery

Encrypted frags.

IV

}

x

Data

}

2911

CRC

}

8305 x 1337 6667 De-crypt & reassemble. Calculate entire CRC. abcd efgh ⊕ 1234 Keystream for IV y. 3141 5926 5358 = Relayed payload. 2718 2818 2845 y

slide-21
SLIDE 21

Introduction Fragmentation Attack Implementation Conclusion 11/19

Transmission

Recovering a longer keystream

Discover a longer keystream to avoid sending many tiny packets: Send a long broadcast frame via multiple smaller fragments. AP relays it as a single packet. (New cipher & plain-text pair.) Keystream discovery

Encrypted frags.

IV

}

x

Data

}

2911

CRC

}

8305 x 1337 6667 De-crypt & reassemble. Calculate entire CRC. abcd efgh ⊕ 1234 Keystream for IV y. 3141 5926 5358 = Relayed payload. 2718 2818 2845 y

slide-22
SLIDE 22

Introduction Fragmentation Attack Implementation Conclusion 11/19

Transmission

Recovering a longer keystream

Discover a longer keystream to avoid sending many tiny packets: Send a long broadcast frame via multiple smaller fragments. AP relays it as a single packet. (New cipher & plain-text pair.) Keystream discovery

Encrypted frags.

IV

}

x

Data

}

2911

CRC

}

8305 x 1337 6667 De-crypt & reassemble. Calculate entire CRC. abcd efgh ⊕ 1234 Keystream for IV y. 3141 5926 5358 = Relayed payload. 2718 2818 2845 y

slide-23
SLIDE 23

Introduction Fragmentation Attack Implementation Conclusion 12/19

Decryption

Keystream expansion

Decrypt data locally in linear time with respect to its length: If n bytes of keystream were known, n bytes of data could be

  • decrypted. Base case: 8 bytes of keystream are known.

Guess keystream byte n + 1 and verify it. Send a broadcast using extended keystream. If AP relayed it, guess is correct. Continue keystream expansion for whole length of packet. Decryption example

Known keystream 00 Known keystream 01 Known keystream 01 00 AP

slide-24
SLIDE 24

Introduction Fragmentation Attack Implementation Conclusion 13/19

Decryption

Resending data to our Internet buddy

To decrypt data in real-time, resend it to the Internet.

1 Eavesdrop a payload to decrypt. 2 Send two 802.11 fragments: an IP header with our buddy as

destination, and the original encrypted payload as a fragment.

3 AP will decrypt and send it in clear-text to our Internet buddy.

Decrypting with an Internet buddy

IP, data Destination Source Attacker IP, data IP AP Buddy IP {IP, Data}

slide-25
SLIDE 25

Introduction Fragmentation Attack Implementation Conclusion 14/19

Fragmentation attack

Summary

To encrypt data:

1 Eavesdrop a data packet. 2 Cipher-text ⊕ known plain-text = 8 bytes of keystream. 3 Transmit data in multiple 8 byte fragments.

To decrypt data:

1 Eavesdrop packet to decrypt. 2 Send two 802.11 fragments: 1

An IP header destined to a buddy on the Internet.

2

A fragment containing the original eavesdropped payload.

3 Internet buddy will receive the payload in clear-text.

slide-26
SLIDE 26

Introduction Fragmentation Attack Implementation Conclusion 15/19

Implementation

Hardware: Atheros chipset. Software radio. Ideal for packet injection. Supports 802.11{a,b,g}. Software:

  • FreeBSD. Added packet injection support to ath driver.
  • wesside. Proof-of-concept fragmentation attack tool.
slide-27
SLIDE 27

Introduction Fragmentation Attack Implementation Conclusion 16/19

wesside

1 Eavesdrops data packet and uses fragmentation to transmit. 2 Determines the network IP via keystream expansion. 3 Contacts buddy on Internet instructing him to flood the WiFi. 4 Recovers WEP key via weak IV attack (using aircrack).

Operation of wesside

AP Attacker

Fragmentation Data packet Weak IV WEP key

Buddy on Internet

Flood request Flood

slide-28
SLIDE 28

Introduction Fragmentation Attack Implementation Conclusion 17/19

Performance

Fragmentation attack, after eavesdropping one packet: Recover 1500 bytes of keystream: < 2 seconds. Decrypt network’s IP: < 30 seconds. CDF of cracked keys via weak IV

25 50 75 100 2 4 6 8 10 12 14 16 28 65 93 121 148 176 204 232 Percentage of cracked keys Number of packets (millions) Attack Time (min) 40-bit keys 104-bit keys

slide-29
SLIDE 29

Introduction Fragmentation Attack Implementation Conclusion 18/19

Lessons

Fragmentation attack: May be performed instantly. Frequent re-keying (EAP) does not mitigate the problem. Migrate to 802.11i. Non-solution: ship hardware with no fragmentation support. Solution: ship hardware with no WEP support. WEP history: Attacks evolve over time. In 2000, theoretical issues were

  • identified. Today, we provide a practical exploit for them.

Theoretical guidelines must be followed. Perfect example of damage incurred by keystream reuse and no authentication.

slide-30
SLIDE 30

Introduction Fragmentation Attack Implementation Conclusion 19/19

Conclusion

Do not use WEP—teach about its failures. Future Work: The First Nail in WPA’s Coffin. . .