IY5511 2008 2009 Lecture08
IY5511 2008 2009 Lecture08
1
IY5511 – Network Security
Lecture 8
Wireless LAN Security
2
Objectives of Lecture
4
8.1 WLAN Technologies
5
Frequency Division Multiplexing (FDM)
• Available frequency range of the medium is
divided into non-overlapping frequency bands.
• Each transmitter is assigned a frequency band
which can be used continuously.
• When using optical fiber, FDM is referred to as
wavelength division multiplexing (WDM).
• When frequencies are selected in a particular
way, we refer to Orthogonal FDM (OFDM).
S ig nal
Frequenc A
S ig nal
y B
S ig nal
C Time 6
Time Division Multiplexing (TDM)
Frequenc
S ig nal
S ig nal
S ig nal
S ig nal
S ig nal
S ig nal
y
A
A
C
C
B
Time
7
Code Division Multiplexing (CDM)
• All transmitters are allowed to transmit in the whole
frequency range all the time.
• Separation is achieved by encoding each signal with a
special code that is designed to minimise interference
between transmitters.
• A receiver can extract the signal for each transmitter
from the combined signal of all transmitters.
S ig nal C
S ig nal B
S ig nal A
Frequenc
y
Time 8
Spread Spectrum
9
Spread Spectrum
10
Spread Spectrum Properties
• Spread spectrum signals can share frequency with
existing services.
– Prime example is unregulated ISM band.
• The wide bandwidth of the signals provides
protection against a variety of noise types.
• The data rate may be varied to adapt gracefully to
changing load conditions.
• May offer some form of inherent security.
– Signals involve low energy across a wide spectrum.
– Anti-jamming.
– Widely used in military applications prior to adoption in
civilian applications.
– But needs careful design of hopping sequences/CDMA
code sequences.
11
8.2 IEEE 802.11 Standards
• IEEE 802 is a dominant collection of networking
standards developed by IEEE.
– E.g. IEEE 802.3 specifies the physical and data link layer
properties of Ethernet.
• IEEE 802.11 is a family of standards for wireless LANs.
– Provides protocols at Layer 1 & Layer 2 of OSI model.
– Baseline IEEE Std 802.11-1997 was approved in June 1997.
• Offering 1 Mbps and 2Mbps rates.
• Typical indoor range of 20m.
– Current standard is IEEE Std 802.11-2007.
• Includes various enhancements and extensions developed by
IEEE 802.11 working groups (a,b,d,e,g,h,i,j).
• Supports various operating frequencies (2.4GHz, 5GHz), national
operating requirements, data transfer speeds,…
12
802.11b, 802.11g, 802.11n
• 802.11b ratified in 1999 adding 5.5 Mbps and 11 Mbps.
– DSSS as physical layer.
– Dynamic rate shifting.
– Maximum specified range 100 metres.
– Average throughput of ~4Mbps, range of 30-40m (indoor).
• 802.11g ratified in 2002.
– Supports up to 54Mbps in 2.4Ghz range.
– Backwards-compatible with 802.11b.
– Average throughput of ~20 Mbps, range of 30-40m (indoor).
• 802.11n aiming for final approval in late 2009.
– Aiming for typical 75Mbps and maximum of 300Mbps.
– Range of 70m (indoor).
– Products already appearing, based on draft standard.
13
Wi-Fi Alliance
14
802.11 Components
15
802.11 Modes
• Infrastructure mode
– Basic Service Set
• One access point
– Extended Service Set
• Two or more BSSs forming a single subnet.
– Corporate WLANs operate in this mode.
• Ad-hoc mode
– Also called peer-to-peer.
– Independent Basic Service Set.
– Set of 802.11 wireless stations that communicate
directly without an access point.
• Useful for quick & easy wireless networks.
16
Infrastructure Mode
Access Point
17
Ad-hoc Mode
18
802.11 Physical Layers
• Original standard 802.11-1997 standardised
three alternative physical layers.
– Two spread-spectrum methods in 2.4Ghz Industrial-
Scientific-Medical (ISM) band
• Frequency Hopping Spread Spectrum (FHSS) on 75
channels.
• Direct Sequence Spread Spectrum (DSSS) using up to 14
channels.
– One infrared physical layer.
• 802.11a standard defined a physical layer for
the 5GHz band.
– Using OFDM as the modulation technique.
– OFDM also later adopted in 802.11g.
19
802.11 Data Link Layer
• Layer 2 split into:
– Logical Link Control (LLC).
– Media Access Control (MAC).
• LLC – uses same 48-bit addresses as 802.3 (Ethernet).
• MAC – CSMA/CD not possible.
– Can’t listen for collision while transmitting.
• Instead use CSMA/CA – Collision Avoidance.
– Sender waits for clear air, waits random time, then sends data.
– Receiver sends explicit ACK when data arrives intact.
– Also handles interference.
– But adds significant communications overhead.
– Hence 802.11 always slower than equivalent 802.3 network.
20
Hidden nodes
21
RTS/CTS
22
Joining a BSS
23
Access Point Roaming
Channel 1
Channel 4
Channel 9
Channel 7
24
Roaming and Channels
25
8.3 Security of IEEE 802.11 Wireless LANs
26
SSID Hiding
Station outside
building perimeter.
tres
100 me
29
Interception
30
Directional Antennae
– http://www.saunalahti.fi/~elepal/antennie.html
– http://www.usbwifi.orcon.net.nz/
31
WarDriving
• Software:
– e.g. NetStumbler, Kismet, Kismac.
• Laptop with appropriate 802.11 card.
• Optional Global Positioning System receiver.
• Logging of MAC address, network name, SSID,
manufacturer, channel, signal strength, noise (GPS –
location).
• Legality?
– Detecting presence and configuration of APs not an offence.
– Attempting to connect to someone else’s AP may be.
– Using someone else’s AP to obtain network access is an
offence (in many legal jurisdictions).
32
WarDriving Results
33
WarDriving Map
Source: www.dis.org/wl/maps/ 34
Worldwide War Drive 2004
35
War Driving Prosecutions
36
War Driving Prosecutions
• June 2004, Connecticut, Myron Tereshchuk
guilty of drive-by extortion via unprotected
WLANs.
– “Make the check payable to Myron Tereshchuk”.
– 63 month prison sentence.
38
8.4 Security Issues Specific to IEEE
802.11a, b and g
IEEE 802.11a, b and g provide two main
security services:
• Encryption
– Wired Equivalence Privacy (WEP).
• Entity Authentication
– Shared Key Authentication, based on challenge-
response protocol building on WEP algorithm.
39
Wired Equivalence Privacy (WEP)
42
WEP Encryption
IV
Initialisation
Vector (IV) Key-stream
|| RC4
Cipher
Secret key
⊕ text
Plaintext
||
32-bit CRC
43
WEP – Receiving
• Ciphertext is received.
• Ciphertext decrypted using RC4 stream cipher.
– RC4 initialised with:
• 40-bit secret key;
• 24-bit initialisation vector (IV) from start of ciphertext.
– RC4 generates key-stream as function of these 64 bits.
– Key-stream XORed with ciphertext to recover plaintext.
• Check ICV
– Separate plaintext to obtain ICV and message.
– Compute expected ICV for message.
– Compare with received ICV.
44
Shared Key Authentication
45
WEP Safeguards
• Shared secret key required for:
– Associating with an access point.
– Sending data.
– Receiving data.
• Messages are encrypted.
– Confidentiality.
• Messages have checksum.
– Intended to provide integrity.
• But management traffic still broadcast in clear
containing SSID.
• And other critical vulnerabilities….
46
Insecurity of Shared Key Authentication
48
Passive WEP Attack
50
Active WEP Attacks
• Bit-flipping:
– Flip a bit in ciphertext.
– Either changes 0 to 1 or 1 to 0 in plaintext.
• As with all stream ciphers.
– What about CRC-32?
– Bits of CRC-32 are linear functions of the message
bits.
• Consequence is that change needed to correct CRC-32
field after flipping bits in ciphertext/plaintext can be easily
computed.
– So can “repair” ICV after bit-flipping.
– ICV does not provide any cryptographic integrity
protection.
• Encrypting it doesn’t help in this case.
51
Limited WEP Keys
52
Brute Force Key Attack
• Capture ciphertext.
– IV is included in message.
• Search all 240 possible secret keys.
– A few days on a modern laptop.
• Select key that decrypts ciphertext to a
meaningful plaintext.
– WLAN logical link control layer frames have well-
defined format.
– E.g. first two bytes are always AA, AA (hex).
– Automated recognition of correct key is possible.
• 40-bit keys do not provide adequate security.
53
128-bit WEP
54
The FMS Attack
Paper from Fluhrer, Mantin, Shamir, 2001.
• http://www.drizzle.com/~aboba/IEEE/rc4_ksaproc.pdf
• Detailed analysis of several features of RC4 key
scheduling algorithm.
• Main result of interest to us:
– If the RC4 key is composed from a known IV and an unknown
secret part by concatenation;
– And if the attacker knows the first byte of key-stream for
enough different IVs;
– Then the whole RC4 key can be determined in a statistical
attack.
– Attack only makes use of some of the IVs – so-called “weak”
IVs.
55
The FMS Attack (2)
• In WEP, RC4 key material is composed by combining
known IV with 40/104-bit secret key.
• And initial byte of key-stream is known because of fixed
802.11 frame format.
• So the FMS method is applicable to RC4 as used in
WEP.
• The FMS attack is practical for 40-bit and 128-bit keys.
– Complexity of attack grows only linearly with key size rather
than exponentially.
• The attack is passive.
– Non-intrusive.
– No warning that it is being conducted.
56
Wepcrack
57
Airsnort
58
The FMS Attack (3)
• FMS attack uses a particular class of IVs.
– Most IV values are not useful in the FMS analysis.
– Many manufacturers avoided the “weak” IVs after 2002.
– Therefore attack tools using basic FMS may not work on
recent hardware.
• However David Hulton (aka h1kari), KoreK, Tews-
Weinmann-Pyshkin and others have extended the FMS
attacks:
– Extended sets of weak/weakish IVs.
• e.g. leaking RC4 key into second byte of key-stream.
– And new cryptanalytic techniques.
– Much faster key recovery than the original FMS attack is now
possible.
• As little as 60s of traffic and 220 RC4 key setups.
• See, e.g., http://eprint.iacr.org/2007/120.pdf for details.
59
Generating WEP Traffic
60
WEP – Last Words
61
8.5 Recent Developments
• The IEEE 802.11 community has responded to the
many security problems identified in WEP.
• Intermediate solution: Wi-Fi Protected Access (WPA).
• Longer-term solution: WPA2.
• WPA and WPA2 are standardised in IEEE 802.11i
– The output of a working group tasked with improving the
security of 802.11 family.
– First published in 2004, but drafts available much earlier.
• IEEE 802.11i specification itself is now incorporated
into 802.11-2007 standard.
• WPA widely implemented, WPA2 becoming more
common.
– E.g. in survey of Tews et al., 32% of networks using WPA or
WPA2.
62
WPA
• Wi-Fi Protected Access (WPA)
– Works with 802.11b, a and g.
– An intermediate solution to address WEP’s problems.
– Existing hardware can still be used; only firmware upgrade
needed.
63
WPA – TKIP
64
WPA – TKIP
• TKIP introduces a special-purpose 8-byte MAC
algorithm called “Michael” to replace WEP’s CRC.
– A MAC algorithm with 64-bit keys derived from PTK.
– Uses different keys in each direction (S to AP, AP to S).
– With packet serial number, prevents packet replays.
– Constrained design to work with existing hardware
• 5 instructions per byte.
– Known to have several security weaknesses, but raises bar
considerably compared to WEP.
• Hence 802.11i standard dictates counter-measures to handle
active attacks against Michael.
• Essentially block traffic if 2 MAC failures seen in 60s period.
• These in turn lead to DoS attacks against WPA…
65
WPA – TKIP
Encrypted
Integrity Protected
WEP
TSC1 TSC0 Reserved Ext IV Key ID TSC2 TSC3 TSC4 TSC5
Seed[1]
b0 b4 b5 b6 b7
“WEPSeed[1] is not used to construct the TSC, but is set to (TSC1 | 0x20) & 0x7f”
66
WPA – Authentication Protocol
• WPA also introduced a new authentication protocol to
replace the one used in WEP.
– Called the 4-way handshake.
– Protected negotiation of capabilities (WEP, WPA, WPA2, …)
– Exchange of nonces and MACs on nonces to provide mutual
authentication.
• MACs computed using key derived from PMK.
• PMK is fixed across BSS/ESS or obtained from 802.1X protocol
execution before 4-way handshake.
– PTK used in WPA is then derived from PMK, nonces and MAC
addresses of protocol participants.
• Using a PRF based on HMAC-SHA-1.
– Variants of this approach are used to handle group keying and
peer-to-peer keying.
67
Practical WPA attacks
68
WPA2
70
WPA/WPA2 and IEEE 802.1x
73
8.6 Securing Wireless LANs
Additional counter-measures:
• Security Policy
• Treat as untrusted LAN
• Discover unauthorised use
• Access point audits
• Station protection
• Access point location
• Antenna design
74
Security Policy & Architecture
75
Wireless as Untrusted LAN
76
Discover Unauthorised Use
• Search for unauthorised access points, ad-hoc
networks or clients.
• Port scanning
– For unknown SNMP agents.
– For unknown web or telnet interfaces.
• Warwalking!
– Sniff 802.11 packets,
– Identify IP addresses,
– Detect signal strength,
– But may sniff your neighbours…
• Wireless Intrusion Detection
– AirMagnet, AirDefense, Trapeze, Aruba,…
77
Access Point Audits
78
Station Protection
• Personal firewalls
– Protect the station from attackers.
• VPN from station into Intranet
– End-to-end encryption into the trusted network.
– But consider roaming issues.
• Host intrusion detection
– Provide early warning of intrusions onto a station.
• Configuration scanning
– Check that stations are securely configured.
79
Location of Access Points
80
Wireless IDS/IPS
• Sensors deployed in WLAN.
• Monitoring to detect:
– Unauthorised clients by MAC address;
• Accidental
• Malicious
– Ad-hoc mode networks;
– Unauthorised access points;
– Policy violations.
• Possible to identify approximate locations.
81
Further Reading
• www.drizzle.com/~aboba/IEEE/
– Good website providing links to many articles, standards, etc,
concerning WLAN security.
• http://standards.ieee.org/getieee802/802.11.html
– Free download of IEEE 802.11-2007.
– Warning: 1200 pages!
– Chapter 8 (pp. 155-250) concerns security.
• http://standards.ieee.org/getieee802/download/802.1X-
2004.pdf
– Free download of IEEE 802.1X-2004.
• http://eprint.iacr.org/2007/471.pdf
– Diploma thesis by Tews, giving fairly exhaustive overview of
attacks against WEP (up to 2007).
• Various RFCs specifying EAP and EAP methods.
82