41
Network Security - ISA 656 Wireless Security Angelos Stavrou November 13, 2007

Network Security - ISA 656 Wireless Security

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Network Security - ISA 656 Wireless Security

Network Security - ISA 656

Wireless Security

Angelos Stavrou

November 13, 2007

Page 2: Network Security - ISA 656 Wireless Security

Wireless Security

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

2 / 41

Page 3: Network Security - ISA 656 Wireless Security

Wireless Security

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

3 / 41

■ What is Wireless Security?

■ The usual: confidentiality, integrity,availability?

■ Or Butler Lampson’s “Gold” (Au) standard:authentication, authorization, audit?

■ Both!

Page 4: Network Security - ISA 656 Wireless Security

Confidentiality

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

4 / 41

■ Obvious danger — it’s easy to intercept traffic

■ Obvious countermeasure — cryptography

■ But it’s harder to use here than it looks

Page 5: Network Security - ISA 656 Wireless Security

Integrity

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

5 / 41

■ At first glance, integrity seems ok

■ This is radio — how can an attacker changemessages in mid-packet?

■ Solution: the “Evil Twin” (or “Sybil”) attack

Page 6: Network Security - ISA 656 Wireless Security

Wireless Architecture

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

6 / 41

■ The obvious architecture is pure peer-to-peer— each machine has a radio, and talks directlyto any other machine

■ In fact, 802.11 (WiFi) can work that way, butrarely does

■ More common scenario: base stations (alsoknown as access points)

Page 7: Network Security - ISA 656 Wireless Security

Access Points

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

7 / 41

■ An ordinary wireless node associates with anaccess point (AP)

■ More precisely, it associates with the APhaving a matching network name (if specified)and the strongest signal

■ If another AP starts sending a stronger signal(probably because the wireless node hasmoved), it will re-associate with the newaccess point

■ All transmissions from the laptop go to theaccess point

■ All transmissions to the laptop come from theaccess point

Page 8: Network Security - ISA 656 Wireless Security

Which AP?

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

8 / 41

■ Which AP is your laptop associated with?

■ Which network (SSID)?

■ Many people know neither

■ “My ISP is NETGEAR”

■ Those who specify anything specify the SSID

Page 9: Network Security - ISA 656 Wireless Security

The Evil Twin Attack

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

9 / 41

■ Simplest way: carry an access point with you

■ Simpler solution: many laptops can emulateaccess points

■ On Linux, useiwconfig eth0 mode Master

■ Force others to associate with your laptop, andsend you all their traffic. . .

Page 10: Network Security - ISA 656 Wireless Security

Why This Works

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

10 / 41

■ Conventionally, we worry about authenticatingthe client to the server

■ Here, we need to authenticate the server tothe client

■ The infrastructure wasn’t designed for that;more important, users don’t expect to checkfor it (and have no way to do so in any event)

Page 11: Network Security - ISA 656 Wireless Security

Integrity Attacks

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

11 / 41

■ We now see how to do integrity attacks

■ We don’t tinker with the packet in the air, weattract it to our attack node

■ You don’t go through strong security, you goaround it

Page 12: Network Security - ISA 656 Wireless Security

Availability

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

12 / 41

■ Simple version: black-hole evil twin

■ Sophisticated version: battery exhaustion

Page 13: Network Security - ISA 656 Wireless Security

Black Holes

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

13 / 41

■ Emulate an access point

■ Hand out IP addresses

■ Do nothing with received packets

■ More subtly, drop 10-15% of them —connections will work, but very slowly

Page 14: Network Security - ISA 656 Wireless Security

Battery Exhaustion

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

14 / 41

“ Wi-Fi is also a power-hungry technology thatcan cause phone batteries to die quickly in somecases, within an hour or two of talk time.

When you turn on the Wi-Fi it does bring thebattery life down, said Mike Hendrick, director ofproduct development for T-Mobile.”

New York Times, 27 November 2006

Page 15: Network Security - ISA 656 Wireless Security

Battery Exhaustion

Wireless Security

Wireless Security

Confidentiality

Integrity

WirelessArchitecture

Access Points

Which AP?The Evil TwinAttack

Why This Works

Integrity Attacks

Availability

Black Holes

Battery Exhaustion

Battery Exhaustion

WEP

War-Driving

Network AccessControl

15 / 41

■ Send your enemy large “ping” packets

■ The reply packets will be just as big — andtransmitting such packets uses a lot of power

■ The more you transmit, the more power —often battery power — you use up

Page 16: Network Security - ISA 656 Wireless Security

WEP

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

16 / 41

Page 17: Network Security - ISA 656 Wireless Security

WEP — Using a Flawed Cipher in a

Bad Way for the Wrong ApplicationWireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

17 / 41

■ It was obvious from the start that some cryptowas needed

■ Choice: WEP — Wireline Equivalent Privacy

for 802.11 networks

■ Many different mistakes

■ Case study in bad crypto design

Page 18: Network Security - ISA 656 Wireless Security

Datagrams and Stream Ciphers

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

18 / 41

■ WEP uses RC4 because RC4 is very efficient

■ But 802.11 is datagram-oriented; there’s nointer-packet byte stream to use

⇒ Must re-key for every packet

■ But you can’t reuse a stream cipher key ondifferent packets. . .

Page 19: Network Security - ISA 656 Wireless Security

Key Setup

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

19 / 41

Encrypted Packet

Counter

104 bits24 bits

Per−Packet Key

RC4

Key stream

Packet

Provisioned Key

Actual Key

IV

Page 20: Network Security - ISA 656 Wireless Security

Key Setup for WEP

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

20 / 41

■ Each WEP node keeps a 24-bit packet counter(the IV)

■ Actual cipher key is configured keyconcatenated with counter

■ Two different flaws. . .

■ 224 packets isn’t that many — you still get key

reuse when the packet counter overflows

■ RC4 has a cryptanalytic flaw

■ But it’s worse than that

Page 21: Network Security - ISA 656 Wireless Security

Cryptanalysis of RC4

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

21 / 41

■ In 2001, Fluhrer, Mantin and Shamir showedthat RC4 could be cryptanalyzed if the keyswere “close” to each other — a related key

attack

■ Because of the IV algorithm, they are close inWEP

■ Key recovery attacks are feasible and havebeen implemented

Page 22: Network Security - ISA 656 Wireless Security

IV Replay

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

22 / 41

■ Suppose you recover the complete plaintext ofa single packet

■ You can generate new packets that use thesame counter

■ Receiving nodes don’t — and can’t — checkfor rapid counter reuse

■ Indefinite forgery!

Page 23: Network Security - ISA 656 Wireless Security

Packet Redirection

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

23 / 41

■ Suppose you know (or can guess) thedestination IP address of a packet

■ Because RC4 is a stream cipher, you can makecontrolled changes to the plaintext by flippingciphertext bits

■ Flip the proper bits to send the packet to youinstead, and re-inject it

Page 24: Network Security - ISA 656 Wireless Security

Checksums

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

24 / 41

■ WEP does use a checksum

■ However, it’s a CRC rather than acryptographic hash

■ It’s also un-keyed

■ Result: it’s feasible to compensate for plaintextchanges without disturbing the checksum

Page 25: Network Security - ISA 656 Wireless Security

The Biggest Flaw in WEP

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

25 / 41

■ There’s no key management; all users at a sitealways share the same WEP key.

⇒ You can’t re-key when the counter overflows

⇒ Everyone shares the same key; if it’scryptanalyzed or stolen or betrayed, everyoneis at risk

⇒ It’s all but impossible to re-key a site of anysize, since everyone has to change their keyssimultaneously and you don’t have a secureway to provide the new keys

Page 26: Network Security - ISA 656 Wireless Security

What WEP Should Have Been

Wireless Security

WEPWEP — Using aFlawed Cipher in aBad Way for theWrong Application

Datagrams andStream Ciphers

Key Setup

Key Setup for WEP

Cryptanalysis of RC4

IV Replay

Packet Redirection

ChecksumsThe Biggest Flaw inWEPWhat WEP ShouldHave Been

War-Driving

Network AccessControl

26 / 41

■ Use a block cipher in CBC mode

■ Use a separate key per user, plus a keyidentifier like the SPI

■ Provide dynamic key management

■ WPA — WiFi Protected Access — is betterthan WEP; forthcoming wireless securitystandards will use AES.

Page 27: Network Security - ISA 656 Wireless Security

War-Driving

Wireless Security

WEP

War-Driving

War-Driving

UnprotectedNetworks!

The Consequences

Network AccessControl

27 / 41

Page 28: Network Security - ISA 656 Wireless Security

War-Driving

Wireless Security

WEP

War-Driving

War-Driving

UnprotectedNetworks!

The Consequences

Network AccessControl

28 / 41

■ Put a laptop in network (SSID) scanning mode

■ Drive around a neighborhood looking foraccess points

■ Perhaps include a GPS receiver to log locations

■ Detect presence or absence of WEP

■ Name from movie “War Games”

Page 29: Network Security - ISA 656 Wireless Security

Unprotected Networks!

Wireless Security

WEP

War-Driving

War-Driving

UnprotectedNetworks!

The Consequences

Network AccessControl

29 / 41

■ Statistics show that only O(1/3) use evenWEP

■ The rest tend to be wide open

■ Many people don’t change or hide the SSID

Page 30: Network Security - ISA 656 Wireless Security

The Consequences

Wireless Security

WEP

War-Driving

War-Driving

UnprotectedNetworks!

The Consequences

Network AccessControl

30 / 41

■ Some incidence of theft of service

■ (Is it war-driving a crime? Unclear under USlaw)

■ Sometimes done to hide criminal activity

Page 31: Network Security - ISA 656 Wireless Security

Network Access Control

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

31 / 41

Page 32: Network Security - ISA 656 Wireless Security

No Perimeter

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

32 / 41

■ The fundamental difference: there’s nophysical boundary

■ On a wired net, physical access control cancompensate for lack of technical security

■ Most of the attacks are the same, for wired orwireless nets

■ But physical perimeter let us take shortcuts

Page 33: Network Security - ISA 656 Wireless Security

Associations

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

33 / 41

■ Wired nets don’t have a base station thatnodes associate with at layer 2

■ However, ARP attacks can compensate

■ ARP attacks are even harder to detect —there’s no pop-up informing you about localEthernet addresses

Page 34: Network Security - ISA 656 Wireless Security

Tracing Attacks

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

34 / 41

■ With wired networks, you can trace an attackto a given switch port

■ With wireless networks, you can trace anattack to a given AP, but the AP might servehundreds or thousands of square meters

■ No good way to trace — all you can do is logand block MAC addresses

Page 35: Network Security - ISA 656 Wireless Security

MAC Address Filtering

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

35 / 41

■ Can allow or block endpoints based on MACaddress

■ However – MAC address spoofing is pretty easy

■ Evade blocks and/or impersonate acceptedhosts

■ What’s accepted? Look for machines thatreceive non-SYN TCP packets

Page 36: Network Security - ISA 656 Wireless Security

Clayton’s Spoofing Attack

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

36 / 41

■ Impersonate a known-good IP and MACaddress

■ TCP replies will go to the real owner and thefake one

■ The real one will send out a TCP RST packet

■ Build a circuit that listens for the bit patternof the RST and sends a jam signal instead

Page 37: Network Security - ISA 656 Wireless Security

Windows XP SP2 and Spoofing

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

37 / 41

■ With SP2, the built-in firewall blocks mostin-bound packets

■ In particular, it only allows in replies tooutbound packets

■ The TCP reply packets don’t match anyoutbound connections

■ TCP never sees the reply, and hence doesn’tgenerate RST

■ No need for Clayton’s attack

Page 38: Network Security - ISA 656 Wireless Security

Network Access Control

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

38 / 41

■ Fundamentally, the problem is network accesscontrol

■ We have none with wireless

■ Usual solution: let people onto your network,but require some sort of Web-based login

Page 39: Network Security - ISA 656 Wireless Security

Evil Twin Redux

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

39 / 41

■ Set up your evil twin in a hotspot

■ Intercept the login session and/or theregistration

■ Registration often involves a credit card. . .

Page 40: Network Security - ISA 656 Wireless Security

The Gold Standard

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

40 / 41

■ No authentication at the WEP layer;higher-layer authentication susceptible to eviltwin attack

■ Authorization based on MAC address andWEP key; both are vulnerable

■ Rarely any logging for audit

■ Oops. . .

Page 41: Network Security - ISA 656 Wireless Security

Living with Wireless

Wireless Security

WEP

War-Driving

Network AccessControl

No Perimeter

Associations

Tracing Attacks

MAC AddressFiltering

Clayton’s SpoofingAttackWindows XP SP2and Spoofing

Network AccessControl

Evil Twin Redux

The Gold Standard

Living with Wireless

41 / 41

■ For residential use, turn off SSID broadcast

■ (Hard to do in an enterprise)

■ Put your wireless net outside the firewall

■ Use WEP — it’s still (marginally) better thannothing

■ Better yet, use WPA

■ Use end-to-end crypto

■ Check the certificate on registration or loginpages