Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

73
007 Levente Buttyán and Jean-Pierre Hubaux Security and Cooperation in Wireless Networks http://secowinet.epfl.ch/ Chapter 9: Selfish behavior at the MAC layer of CSMA/CA operating principles of IEEE 802.11; detecting selfish behavior in hot spots; selfish behavior in pure ad hoc networks;

description

 

Transcript of Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

Page 1: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

© 2007 Levente Buttyán and Jean-Pierre Hubaux

Security and Cooperation in Wireless Networks

http://secowinet.epfl.ch/

Chapter 9: Selfish behavior at the MAC layer of CSMA/CA

operating principles of IEEE 802.11; detecting selfish behavior in hot spots;selfish behavior in pure ad hoc networks;

Page 2: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

2/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Chapter outline

9.1 Operating principles of IEEE 802.119.2 Detecting selfish behavior in hotspots9.3 Selfish behavior in pure ad hoc networks

Page 3: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

3/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Infrastructure vs. ad hoc networks

Infrastructurenetwork

Ad hoc network

APAP

AP

wired network

AP: Access Point

9.1 Operating principles of IEEE 802.11

Note: Slides 3 to 14 are derived from the slide show of the book “Mobile Communications” byJochen Stiller, Addison-Wesley, 2003

Page 4: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

4/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Distribution System

Portal

802.x LAN

Access Point

802.11 LAN

BSS2

802.11 LAN

BSS1

Access Point

IEEE 802.11 - Architecture of an infrastructure network

Station (STA)– terminal with access

mechanisms to the wireless medium and radio contact to the access point

Basic Service Set (BSS)– group of stations using the

same radio frequency

Access Point– station integrated into the

wireless LAN and the distribution system

Portal– bridge to other (wired)

networks

Distribution System– interconnection network to

form one logical network (ESS: Extended Service Set) based on several BSS

STA1

STA2 STA3

ESS

9.1 Operating principles of IEEE 802.11

Page 5: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

5/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - Architecture of an ad-hoc network

Direct communication within a limited range– Station (STA):

terminal with access mechanisms to the wireless medium

– Basic Service Set (BSS):group of stations using the same radio frequency

802.11 LAN

BSS2

802.11 LAN

BSS1

STA1

STA4

STA5

STA2

STA3

9.1 Operating principles of IEEE 802.11

Page 6: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

6/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Interconnection of IEEE 802.11 with Ethernet

mobile station

access point

server

fixed terminal

application

TCP

802.11 PHY

802.11 MAC

IP

802.3 MAC

802.3 PHY

application

TCP

802.3 PHY

802.3 MAC

IP

802.11 MAC

802.11 PHY

infrastructure network

9.1 Operating principles of IEEE 802.11

Page 7: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

7/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - Layers and functions

PLCP (Physical Layer Convergence Protocol)

– clear channel assessment signal (carrier sense)

PMD (Physical Medium Dependent)

– modulation, coding PHY Management

– channel selection, MIB Station Management

– coordination of all management functions

PMD

PLCP

MAC

IP

MAC Management

PHY Management

MAC– access mechanisms,

fragmentation, encryption MAC Management

– synchronization, roaming, MIB, power management

PH

Y

Sta

tion

Man

agem

ent

9.1 Operating principles of IEEE 802.11

Page 8: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

8/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - Physical layer

3 versions: 2 radio: DSSS and FHSS (both typically at 2.4 GHz), 1 IR– data rates 1, 2, 5 or 11 Mbit/s

DSSS (Direct Sequence Spread Spectrum)– DBPSK modulation (Differential Binary Phase Shift Keying) or DQPSK

(Differential Quadrature PSK)– chipping sequence: +1, -1, +1, +1, -1, +1, +1, +1, -1, -1, -1 (Barker

code)– max. radiated power 1 W (USA), 100 mW (EU), min. 1mW

FHSS (Frequency Hopping Spread Spectrum)– spreading, despreading, signal strength– min. 2.5 frequency hops/s, two-level GFSK modulation (Gaussian

Frequency Shift Keying)

Infrared– 850-950 nm, diffuse light, around 10 m range– carrier detection, energy detection, synchronization

9.1 Operating principles of IEEE 802.11

Page 9: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

9/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - MAC layer principles (1/2) Traffic services

– Asynchronous Data Service (mandatory)• exchange of data packets based on “best-effort”• support of broadcast and multicast

– Time-Bounded Service (optional)• implemented using PCF (Point Coordination Function)

Access methods (called DFWMAC: Distributed Foundation Wireless MAC)– DCF CSMA/CA (mandatory)

• collision avoidance via randomized „back-off“ mechanism• minimum distance between consecutive packets• ACK packet for acknowledgements (not for broadcasts)

– DCF with RTS/CTS (optional)• avoids hidden terminal problem

– PCF (optional)• access point polls terminals according to a list

DCF: Distributed Coordination Function PCF: Point Coordination Function

9.1 Operating principles of IEEE 802.11

Page 10: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

10/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - MAC layer principles (2/2)

t

medium busySIFS

PIFS

DIFSDIFS

next framecontention

direct access if medium is free DIFS time slot

Note : IFS durations are specific to each PHYNote : IFS durations are specific to each PHY

Priorities– defined through different inter frame spaces– no guaranteed, hard priorities– SIFS (Short Inter Frame Spacing)

• highest priority, for ACK, CTS, polling response– PIFS (PCF IFS)

• medium priority, for time-bounded service using PCF– DIFS (DCF, Distributed Coordination Function IFS)

• lowest priority, for asynchronous data service

9.1 Operating principles of IEEE 802.11

Page 11: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

11/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

t

medium busy

DIFSDIFS

next frame

contention window(randomized back-offmechanism)

802.11 - CSMA/CA principles

time slotdirect access if medium has been free for at least DIFS

station ready to send starts sensing the medium (Carrier Sense based on CCA, Clear Channel Assessment)

if the medium is free for the duration of an Inter-Frame Space (IFS), the station can start sending (IFS depends on service type)

if the medium is busy, the station has to wait for a free IFS, then the station must additionally wait a random back-off time (collision avoidance, multiple of slot-time)

if another station occupies the medium during the back-off time of the station, the back-off timer stops (to increase fairness)

9.1 Operating principles of IEEE 802.11

Page 12: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

12/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 – CSMA/CA broadcast

t

busy

boe

station1

station2

station3

station4

station5

packet arrival at MAC

DIFSboe

boe

boe

busy

elapsed backoff time

bor residual backoff time

busy medium not idle (frame, ack etc.)

bor

bor

DIFS

boe

boe

boe bor

DIFS

busy

busy

DIFSboe busy

The size of the contention window can be adapted(if more collisions, then increase the size)

The size of the contention window can be adapted(if more collisions, then increase the size)

Here St4 and St5 happen to havethe same back-off time

=

Note: broadcast is not acknowledgedNote: broadcast is not acknowledged

(detection by upper layer)

(detection by upper layer)

Page 13: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

13/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 - CSMA/CA unicast

t

SIFS

DIFS

data

ACK

waiting time

otherstations

receiver

senderdata

DIFS

Contentionwindow

The ACK is sent right at the end of SIFS(no contention)

The ACK is sent right at the end of SIFS(no contention)

NAV (DATA)

NAV: Net Allocation VectorNAV: Net Allocation Vector

Sending unicast packets– station has to wait for DIFS before sending data– receiver acknowledges at once (after waiting for SIFS) if the packet

was received correctly (CRC)– automatic retransmission of data packets in case of transmission

errors

9.1 Operating principles of IEEE 802.11

Page 14: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

14/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

802.11 – DCF with RTS/CTS Sending unicast packets

– station can send RTS with reservation parameter after waiting for DIFS (reservation determines amount of time the data packet needs the medium)

– acknowledgement via CTS after SIFS by receiver (if ready to receive)– sender can now send data at once, acknowledgement via ACK– other stations store medium reservations distributed via RTS and CTS

t

SIFS

DIFS

data

ACK

defer access

otherstations

receiver

senderdata

DIFS

Contentionwindow

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

NAV: Net Allocation VectorNAV: Net Allocation VectorRTS/CTS can be present forsome packets and not for other

RTS/CTS can be present forsome packets and not for other

9.1 Operating principles of IEEE 802.11

Page 15: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

15/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Chapter outline

9.1 Operating principles of IEEE 802.119.2 Detecting selfish behavior in hotspots9.3 Selfish behavior in pure ad hoc networks

Page 16: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

16/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Section outline

Motivation

System model

Misbehavior techniques

Components of DOMINO (System for Detection Of

greedy behavior in the MAC layer of IEEE 802.11

public NetwOrks)

Simulation

Implementation

Related work

Conclusion9.2 Detecting selfish behavior in hotspots

Page 17: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

17/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Motivation

9.2 Detecting selfish behavior in hotspots

Internet access through public hotspots

Problem: misuse of protocols

What about MAC-layer misbehavior?

– Considerable bandwidth gains

– Hidden from the upper layers

– Always usable

If the misbehavior is detected, the WISP can take

measures

How to detect?

Page 18: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

18/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

System model

Infrastructure mode

DCF (Distributed Coordination Function)

Single trusted AP operated by a WISP

Misbehavior is greedy as opposed to malicious

DOMINO is implemented only at the AP

9.2 Detecting selfish behavior in hotspots

Page 19: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

19/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Example scenario

Well-behaved node CheaterWell-behaved node

DOMINO

9.2 Detecting selfish behavior in hotspots

Page 20: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

20/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

IEEE 802.11 MAC – Brief reminder

9.2 Detecting selfish behavior in hotspots

Page 21: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

21/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Misbehavior techniques – Overview

Uplink traffic (stations AP)

– Example scenarios: backup, webcam, …

Downlink traffic (AP stations)

– Constitutes most of the wireless traffic

– Over 90% is TCP

– Example scenarios: Web browsing, FTP, video streaming, …

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 22: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

22/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uplink traffic – Frame scrambling

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 23: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

23/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution: Number of retransmissions

Lost frames are retransmitted

Sequence numbers in the MAC header distinguish

retransmissions

Cheater’s retransmissions are fewer than those of

well-behaved stations

By counting retransmissions, the AP can single out

the cheater

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 24: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

24/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uplink traffic – Oversized NAV

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 25: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

25/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution: Comparison of NAVs

AP measures the actual NAV and compares to the

received one

A repeated pattern of oversized NAVs distinguishes

the cheater

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 26: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

26/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uplink traffic – Short DIFS

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 27: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

27/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution: Comparison of DIFS

The value of DIFS is constant and provided by the

IEEE 802.11 standard

A short DIFS cannot be but the result of cheating

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 28: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

28/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uplink traffic – Backoff

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 29: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

29/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution (1/2): Actual backoff test

Compares the average actual backoff of each station to the average actual backoff of the AP

Collisions are not taken into account

Unsuitable for sources with interframe delays (e.g., due to TCP congestion control)

Transmissionfrom S

Transmissionfrom S

DIFS DIFS+

Measured actual backoff

...

Transmission(s) from other node(s)

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 30: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

30/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution (2/2): Consecutive backoff test

Useful when cheaters have interframe delays (mainly TCP sources)

Does not work if the traffic is very high due to the lack of samples

Complementary to the actual backoff test

Transmission fromS

Transmission fromS

DIFS Consecutivebackoff

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 31: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

31/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Internet

AP Well-behaved user

Cheater

Server

Server

Downlink traffic – TCP ACK scrambling

TCP DATA TCP ACK

Server receives no TCP ACK and slows down the TCP flow

Repeated scrambling kills the TCP connection

The AP receives less packets destined to the well-behaved station

Packets destined to the cheater are delayed less in AP’s queue

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 32: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

32/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Internet

AP Well-behaved user

Cheater

Server

Server

TCP DATA scrambling with MAC forging

TCP DATA

Tries to kill the TCP connection like the previous attack

MAC ACK contains no source address

The forged MAC ACK prevents the AP from retransmitting the lost packet

MAC ACK

9.2 Detecting selfish behavior in hotspots9.2.1 Misbehavior techniques

Page 33: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

33/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Solution: Dummy frame injection

AP periodically injects dummy frames destined to

non- existing stations

If it receives corresponding MAC ACKs, there is

cheating

Higher-layer mechanisms will identify the cheater

(e.g., by monitoring the TCP flows of stations)

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 34: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

34/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Components of DOMINO

Consecutive backoff

Actual backoffBackoff manipulation

Comparison of the idle time after the last ACK with DIFS

Transmission before DIFS

Comparison of the declared and actual NAV values

Oversized NAV

Number of retransmissionsFrame scrambling

Detection testCheating method

Frame scrambling with MAC forging Periodic dummy frame injection

9.2 Detecting selfish behavior in hotspots9.2.2 A possible solution: DOMINO

Page 35: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

35/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Simulation – Topology

ns-2

Backoff manipulation

CBR / UDP traffic

FTP / TCP traffic

misbehavior coefficient (m):

cheater chooses its backoff

from the fixed contention

window (1 - m) x CWmin

9.2 Detecting selfish behavior in hotspots9.2.3 Simulation results

Page 36: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

36/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Simulation – DOMINO performance – UDP case

9.2 Detecting selfish behavior in hotspots9.2.3 Simulation results

Page 37: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

37/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Simulation – DOMINO performance – TCP case

9.2 Detecting selfish behavior in hotspots9.2.3 Simulation results

Page 38: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

38/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Implementation

Equipment

– Adapters based on the

Atheros AR5212 chipset

– MADWIFI driver

Misbehavior (backoff)

– Write to the register

containing CWmin and

CWmax (in driver)

Monitoring

– The driver in MONITOR mode

– prism2 frame header

AP DOMINO

Cheater Well-behaved

9.2 Detecting selfish behavior in hotspots9.2.4 Implementation

Page 39: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

39/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Implementation – Throughput

9.2 Detecting selfish behavior in hotspots9.2.4 Implementation

Page 40: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

40/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Implementation – Backoff and DOMINO

9.2 Detecting selfish behavior in hotspots9.2.4 Implementation

Page 41: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

41/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Discussion

Hidden terminals

– Well-chosen detection thresholds can reduce false positives

Security

– Hybrid attacks: limited efficiency

Adaptive cheating

– Hard to implement

Overhead

– Negligible

9.2 Detecting selfish behavior in hotspots9.2.4 Discussion

Page 42: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

42/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Related work

Detection at the MAC layer (Kyasanur and Vaidya, DSN’03)– Concept: the receiver assigns backoff values to the sender – Detection: compares expected and observed backoffs – Correction: assigns penalty to the cheater

– Issues:• Modification of IEEE 802.11• The receiver can control the sender• Communication and computation overhead

9.2 Detecting selfish behavior in hotspots

Page 43: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

43/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Conclusion on Section 9.2

MAC-layer greedy behavior can be a serious problem

DOMINO is a simple and efficient solution compatible

with the existing infrastructure

DOMINO can be seamlessly integrated with existing

WiFi security tools to provide ultimate protection

First proof-of-concept implementation prototype

http://domino.epfl.ch

9.2 Detecting selfish behavior in hotspots

Page 44: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

44/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Chapter outline

9.1 Operating principles of IEEE 802.119.2 Detecting selfish behavior in hotspots9.3 Selfish behavior in pure ad hoc networks

Page 45: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

45/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Section outline

System Model and Assumptions

Bianchi’s Model

Static CSMA/CA Game

Repeated CSMA/CA Game

Implementation

9.3 Selfish behavior in pure ad hoc networks

Page 46: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

46/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

9.3.1 System Model and Assumptions

Ad hoc mode (no access point) N wireless nodes transmit to N receivers (N links) Any node can hear any other node (single-collision

domain) IEEE 802.11 CSMA/CA MAC layer Bianchi’s Model for throughput calculation

9.3 Selfish behavior in pure ad hoc networks9.3.1 System Model and Assumptions

Cheater

Well-behaved

Page 47: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

47/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Topology and Parameters N links with the same physical condition (single-collision domain):

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

PHY Layer

MAC Layer

P

= Probability of Transmission

= Probability of Collision= More than one transmission at the same time= 1 – (1- )N-1

1 2 3 NAP

1

234

NN-1

N-2

Page 48: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

48/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Two Dimensional Markov chain

(0,0) (0,1) (0,2) (0,CW0-2) (0,CW0-1)

(i,0) (i,1) (i,2) (i,CWi-2) (i,CWi-1)

(i-1,0)

(m,0) (m,1) (m,2) (m,CWm-2) (m,CWm-1)

(m-1,0)

1 1 1 1

1-p

1 1 1 1

1 1 1 1

p

1/CW0

p/CW1

p/CWi

p/Cwi+1

p/CWm

1/CWm

(s(t), b(t))(Backoff Stage, Backoff Timer)

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 49: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

49/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Two Dimensional Markov chain

Probability of transmission:

(0,0) (0,1) (0,2) (0,CW0-2) (0,CW0-1)

(i,0) (i,1) (i,2) (i,CWi-2) (i,CWi-1)

(i-1,0)

(m,0) (m,1) (m,2) (m,CWm-2) (m,CWm-1)

(m-1,0)

1 1 1 1

1-p

1 1 1 1

1 1 1 1

p

1/CW0

p/CW1

p/CWi

p/Cwi+1

p/CWm

1/CWm

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

, lim ( ) , ( ) , (0, ), (0, 1)i k t ib P s t i b t k i m k CW Stationary distribution:

Page 50: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

50/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Two Dimensional Markov chain

(0,0) (0,1) (0,2) (0,CW0-2) (0,CW0-1)

(i,0) (i,1) (i,2) (i,CWi-2) (i,CWi-1)

(i-1,0)

(m,0) (m,1) (m,2) (m,CWm-2) (m,CWm-1)

(m-1,0)

1 1 1 1

1-p

1 1 1 1

1 1 1 1

p

1/CW0

p/CW1

p/CWi

p/Cwi+1

p/CWm

1/CWm

SuccessfulTransmission

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 51: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

51/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Two Dimensional Markov chain

(0,0) (0,1) (0,2) (0,CW0-2) (0,CW0-1)

(i,0) (i,1) (i,2) (i,CWi-2) (i,CWi-1)

(i-1,0)

(m,0) (m,1) (m,2) (m,CWm-2) (m,CWm-1)

(m-1,0)

1 1 1 1

1-p

1 1 1 1

1 1 1 1

p

1/CW0

p/CW1

p/CWi

p/Cwi+1

p/CWm

1/CWm

Collision

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 52: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

52/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Stationary Distribution of Chain

bi,0 = p bi-1,0

(i,0) (i,1) (i,2) (i,CWi-2) (i,CWi-1)

(i-1,0)

1 1 1

p/CWi

bm,0 = p bm-1,0 + p bm,0

(m,0) (m,1) (m,2) (m,CWm-2) (m,CWm-1)

(m-1,0)

1 1 1

p

p/CWm

1/CWm

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 53: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

53/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s Model: Solution for p and

After some derivations system of two nonlinear equations with two variables p and :

Can be solved numerically to obtain p and

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 54: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

54/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Bianchi’s model: Throughput Calculation

Throughput of node i:

– Pis: Probability of successful transmission of i during a random time slot

– L: Average packet payload size – Ts: Average time to transmit a packet of size L – Pid: Probability of the channel being idle– Tid: Duration of the idle period– Pc: Probability of collision– Tc: Average time of collision

][

][

timeslotofDurationE

timeslotainiuserbydTransmittePayloadEi ididccss

si

TPTPTP

LP

9.3 Selfish behavior in pure ad hoc networksBianchi’s Model

Page 55: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

55/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

9.3.2 CSMA/CA Game: GCSMA/CA

A single cheater– Selfish– Tends to use the full channel capacity– Does not respect the binary exponential backoff– Keeps her W after a collision unchanged (m=0)

Strategy set:

Payoff function:

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 56: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

56/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

GCSMA/CA : cheaters payoff function

Access probability of cheater i:

Throughput of cheater i:

.

If for all j in P\{i}: – strict inequality, so throughput: strictly decreasing function

of Wi

– by unilaterally decreasing its own Wi: a selfish node can increase its throughput

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 57: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

57/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Model Verification

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 58: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

58/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

NE of the GCSMA/CA

Lemma 9.1:For any strategy profile W that constitutes a NE, such that Wi = 1

Theorem 9.1:GCSMA/CA admits exactly NEs.

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 59: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

59/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

NE of the GCSMA/CA

Define: D = {i: Wi=1, i Є P} Two families of NE:

– |D|=1: only one player receives a non-null throughput and throughput = 0 for all others

– |D|>1: throughput = 0 for all players.

Some NE from the first family are Pareto optimal.– Example: W = (W1=1, W2=W∞, …, W|P|=W∞) is a Pareto

optimal NE

NE of the 2nd family: tragedy of the commons (misuse of the public good).

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 60: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

60/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uniqueness, Fairness and Pareto Optimality

two families of NE:– 1st: great unfairness, a single player gets some positive

payoff– 2nd: highly inefficient NE, zero payoff for every player

none is satisfactory

A desirable solution: – Uniqueness– Pareto optimality– Fairness

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 61: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

61/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Uniqueness, Fairness and Pareto Optimality

Transformation of the Pareto-optimal point to a NE:– Repeated games– Selective jamming

9.3 Selfish behavior in pure ad hoc networks9.3.2 CSMA/CA Game

Page 62: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

62/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

9.3.3 Repeated CSMA/CA Game: G∞CSMA/CA

G∞CSMA/CA = GCSMA/CA played repeatedly T times.

Payoff function:

the cheaters’ per stage payoff function change to

pf: penalty function

)()()( )( ti

tcti pfu

9.3 Selfish behavior in pure ad hoc networks9.3.3 Repeated CSMA/CA Game

Page 63: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

63/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Penalty Function

Penalty function:

if:

Then ui has a unique maximizer . (Lemma 9.2)

9.3 Selfish behavior in pure ad hoc networks9.3.3 Repeated CSMA/CA Game

Page 64: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

64/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Subgame Perfect NE (SPNE) of G∞CSMA/CA

Theorem 9.4: The strategy profile is a SPNE of the G∞

CSMA/CA.

Corollary 9.1: any strategy profile such that can be made a SPNE.

9.3 Selfish behavior in pure ad hoc networks9.3.3 Repeated CSMA/CA Game

Page 65: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

65/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Making W* a NE: practical penalty function

Two players k and i k selectively jams i if

k calculates the penalty to be inflicted on i:

ui has a unique maximizer:

so, , i.e. is a unique NE.

equal payoffs for two players at NE.

)()( ki

),min( ki ),max( ki WWW

ki

9.3 Selfish behavior in pure ad hoc networks9.3.3 Repeated CSMA/CA Game

Page 66: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

66/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Example: Penalization

9.3 Selfish behavior in pure ad hoc networks9.3.3 Repeated CSMA/CA Game

Page 67: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

67/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

9.3.4 Implementation: Detection Mechanism

– each cheating node measures the throughput of all the others.

– cheater j is deviating if for Tobs.

9.3 Selfish behavior in pure ad hoc networks9.3.4 Implementation

Page 68: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

68/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Adaptive Strategy

– When cheater i is jammed (penalized) during Δ: increases her W by steps of size γ.

9.3 Selfish behavior in pure ad hoc networks9.3.4 Implementation

Page 69: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

69/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Reaching the Pareto-optimal Point

– Wi=Winit for all cheaters

– Every cheater sets up a random timer to increase her W by γ.

– X increase her W to Wxinit + γ.

– X detects all other cheaters as deviating: begin penalizing them.

– Penalized cheater: disable the timer and use the adaptive strategy

– system will stabilize, when Wiinit = Wi

init + γ for all.

– Then, every cheater compares her new throughput with previous:

– if a decrease in throughput: terminate the search for W*– Otherwise: increase her W by γ.

9.3 Selfish behavior in pure ad hoc networks9.3.4 Implementation

Page 70: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

70/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Fully Distributed Implementation

– 7 cheaters– step size = 5

9.3 Selfish behavior in pure ad hoc networks9.3.4 Implementation

Page 71: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

71/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Fully Distributed Implementation

9.3 Selfish behavior in pure ad hoc networks9.3.4 Implementation

Page 72: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

72/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Summary of Section 9.3

Addressed the Problem of cheating in single collision domain CSMA/CA networks

Formalism for the systematic study of rational cheating in CSMA/CA ad hoc networks

Single cheater as well as several cheaters acting without restraint

Transformation of the Pareto optimal point into a Subgame Perfect Nash Equilibrium (repeated games)

Smart cheaters can collectively find this point

9.3 Selfish behavior in pure ad hoc networks

Page 73: Statistical detection of MAC layer misbehavior in IEEE 802.11 ...

73/73Security and Cooperation in Wireless NetworksChapter 9: Selfish behavior at the MAC layer of CSMA/CA

Conclusion on Chapter 9

Selfish behavior is relatively easy to implement at the MAC layer

Upcoming technologies such as cognitive radios will further facilitate this kind of misbehavior

In the case of IEEE 802.11, we have shown how to thwart it, both from the engineering and the analytical points of view.