33
Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef and Frank Piessens (KU Leuven) ACSAC 2014

Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Advanced WiFi Attacks Using

Commodity Hardware

Mathy Vanhoef and Frank Piessens (KU Leuven)

ACSAC 2014

Page 2: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

WiFi assumes each station acts fairly

With special hardware this isn’t the case

Continuous jamming (channel unusable)

Selective jamming (block specific packets)

Background

2

Page 3: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

WiFi assumes each station acts fairly

With special hardware this isn’t the case

Continuous jamming (channel unusable)

Selective jamming (block specific packets)

Background

3

>$4000

Page 4: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Our Contributions

4

A small 15$ USB allows:

Study of selfish behavior

Continuous & selective jamming

Reliable manipulation of encrypted traffic

Page 5: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selfish Behavior

Implement & study

selfish behavior

Page 6: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selfish Behavior

Steps taken to transmit a frame:

1. SIFS: let hardware process the frame

2. AIFSN: depends on priority of frame

3. Random backoff: avoid collisions

4. Send the packet

In use SIFS AIFSN Backoff Packet 2

Page 7: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selfish Behavior

Steps taken to transmit a frame:

Manipulate by modifying Atheros firmware:

Disable backoff

Reducing AIFSN

Reducing SIFS

In use SIFS AIFSN Backoff Packet 2

Page 8: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selfish Behavior

Steps taken to transmit a frame:

Manipulate by modifying Atheros firmware:

Disable backoff

Reducing AIFSN

Reducing SIFS

Optimal strategy:

From 14 to 37 Mbps

Reduces throughput

In use SIFS AIFSN Backoff Packet 2

Page 9: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Countermeasure

9

DOMINO defense system [MobiSys ‘04]

detects this selfish behavior.

More on this later!

Page 10: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selfish Behavior

What if there are multiple selfish stations?

In a collision, both frames are lost.

Capture effect: in a collision, frame with the best signal and lowest bitrate is decoded.

Result:

Selfish clients will lower their bitrate to beat other selfish stations!

Until this gives no more gain.

Page 11: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Continuous Jammer

11

Want to build a continuous jammer

1. Instant transmit: disable carrier sense

2. No interruptions: queue infinite #packets

Frames to be transmitted are in a linked list:

Frame 1 PHY

core … Frame 2

Page 12: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Continuous Jammer

12

Frame 1 PHY

core … Frame 2

Want to build a continuous jammer

1. Instant transmit: disable carrier sense

2. No interruptions: queue infinite #packets

Frames to be transmitted are in a linked list:

Infinite list!

Page 13: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Continuous Jammer

13

Experiments

No packets visible in monitor mode!

Other devices are silenced.

Default antenna gives range of ~80 meters.

Amplifier gives range of ~120 meters

Page 14: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selective Jammer

14

Decides, based on the header,

whether to jam the frame.

Page 15: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

How does it work?

Physical packet

Detect Init Jam

1. Detect and decode header

2. Abort receiving current frame

3. Inject dummy packet Easy

Hard

Page 16: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Detecting frame headers?

RAM

DMA

Internal

CPU

while(recvbuff[0] == 0): pass

PHY

core

Decodes physical

WiFi signals

Can read header of frames still in the air.

Page 17: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selective Jammer: Reliability

17

Jammed beacons with many devices/positions

How fast can it react?

Position of first mangled byte?

1 Mpbs beacon in 2.4 GHz: position 52

6 Mpbs beacon in 5 GHz: position 88

Context:

MAC header is 34 bytes

Page 18: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Selective Jammer: Reliability

18

Jammed beacons with many devices/positions

Conclusion

100% reliable selective jammer not possible

Medium to large packets can be jammed

Surprising this is possible with a limited API!

Page 19: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Countermeasures

19

DOMINO defense system [MobiSys ‘04]:

Assumes MAC header is still valid.

Attacker has low #(corrupted frames)

Thrown of the network

Unfortunately it’s flawed

Jammed (corrupted) frames are not authenticated, we can forge them.

Pretend that a client is jamming others.

Page 20: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Impact on higher-layers

20

What about higher-layer protocols?

Page 21: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Impact on higher-layers

21

What if we could reliably manipulate encrypted traffic?

Page 22: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Impact on higher-layers

22

What if we could reliably manipulate encrypted traffic?

We could attack TKIP!

not decrypt!

Page 23: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Reliably Intercepting Traffic!

23

Channel-based MiTM attack

Works against encrypted networks

Can reliably manipulate encrypted traffic.

Page 24: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Reliably Intercepting Traffic?

24

Create rogue AP with MAC address …

≠ AP handshake fails

= AP devices communicate directly

Same MAC address but different channel

We forward frames between channels

Handshake OK, all traffic via rogue AP

Jammers will force clients to our rogue AP

Page 25: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Example: attacking TKIP

25

1999 2002 2004

WEP

Not used

TKIP

Not used?

AES-CCMP

Mainly used

It would allow us to attack TKIP.

But why research TKIP? Isn’t it dead?

Page 26: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Example: attacking TKIP

26

1999 2002 2004

WEP

Not used

TKIP

Not used?

AES-CCMP

Mainly used

Used!!

It would allow us to attack TKIP.

But why research TKIP? Isn’t it dead?

Page 27: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Why research TKIP?

27

Network can allow both TKIP and CCMP:

New devices uses CCMP

Old devices uses TKIP

Broadcast traffic:

Old devices must be able to decrypt it …

Unicast traffic

Page 28: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Why research TKIP?

28

If a network supports TKIP, all

broadcast traffic is encrypted

using TKIP.

Page 29: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

TKIP Usage (2014)

Found ~6000 networks

7% support only TKIP

67% support TKIP

29

TKIP is still widely used!

Page 30: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Quick Background

1. Add Message Integrity Check (MIC)

2. Encrypt using RC4

MIC Data

Encrypted

How are packets sent/received?

30

MIC key

Page 31: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

MIC Countermeasures

31

MIC Data

If decrypted, reveals MIC key.

If ( two MIC failures within a minute)

halt all traffic for 1 minute

Oracle to decrypt last byte [WiSec ‘09]

Page 32: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

TKIP Group Cipher

32

For broadcast, all clients send a MIC failure.

Use channel-based MiTM and drop them

Avoids MIC countermeasures

Results

Can obtain MIC key within 7 minutes.

Inject/decrypt some packets [AsiaCCS ‘13]

Use only AES-CCMP!

Page 33: Advanced WiFi Attacks Using Commodity Hardware › 2014 › program-final › oc_multifile › 3 › ... · 2019-07-16 · Advanced WiFi Attacks Using Commodity Hardware Mathy Vanhoef

Questions?