a key recovery attack on the 802.11b wired equivalent privacy protocol (wep)

24
A Key Recovery Attack on the 802.11b Wired Equivalent Privacy Protocol (WEP) A Stubblefield, J. Ioannidis, Aviel D. Rubin (May 2004) Presented by : SHELEF ROXANA ) [email protected] (

Upload: luann

Post on 12-Jan-2016

50 views

Category:

Documents


0 download

DESCRIPTION

A Key Recovery Attack on the 802.11b Wired Equivalent Privacy Protocol (WEP). A Stubblefield, J. Ioannidis, Aviel D. Rubin (May 2004) Presented by : SHELEF ROXANA ([email protected]). נושאים. מבוא אלגוריתם WEP התקפה הקריפטוגרפית על RC4 התקפה על WEP המלצות ומסקנות. מבוא. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

A Key Recovery Attack on the 802.11b

Wired Equivalent Privacy Protocol (WEP)

A Stubblefield, J. Ioannidis, Aviel D. Rubin

(May 2004)

Presented by : SHELEF ROXANA

)[email protected](

Page 2: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

נושאים

מבוא•

WEPאלגוריתם •

RC4התקפה הקריפטוגרפית על •

WEPהתקפה על •

המלצות ומסקנות•

Page 3: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

מבוא

הצגת שיטה מעשית למימוש "התקפה" עלWEP ,לצורך שחזור מפתח ההצפנה

•WEP פרוטוקול מתוכנן לספק פרטיות עבור : המידע שעובר על רשתות אל חוטיות, המבוססות על

802.11סטנדרט

לתקשורת בטווחים קצרים IEEE : תקן 802.11•)בסביבה עירונית(

קל לשימוש, מספק גישה מהירה.–

Page 4: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

:WEPעבודות בנושא התקפות על

• BORISOV N., GOLDBERG I. and WAGNER [2001]

Intercepting mobile communications. The insecurity of 802.11

)MOBICOM,2001(

• NEWSHAM T. [2001] – Cracking WEP keys )http://www.lava.net/ wlan(

• ARBAUGH, SHANKAR, and WAN [2001]- Your 802.11 wireless network has no clothes )IEEE international Conference on Wireless LAN’s and Home Networks(

• ARBAUGH [2001] – An inductive chosen plaintext attack against WEP/WEP2

)IEEE Document 802.11-02/230(

• FLUHRER S., MANTIN I. and SHAMIR A. [2001] – weaknesses in the key scheduling algorithm of RC4 (Eighth Annual Workshop on selected areas in Criptography)

Page 5: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

WEPאלגוריתם

WEP :שומר על פרטיות המידע סודיות התוכן•מונע את שינוי תוכן החבילות על ידי תוקפים •

אקטיבייםמאפשר גישה למשתמשים מורשים בלבד•

תכונות שלWEPקל ליישום •נוח לניהול •

Page 6: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

:WEP frameחישוב • כל חבילה מוצפנת באופן עצמאי, ללא תלות בהסטוריה

1. M.c)M(2. IV.k3. Initialize RC4 )IV.k(4. Encrypt data : WEP data : IV.C

k – secret key )mobile node, access point( M – plaintext frame datac)M( – checksum of M

).(4))(.( kIVRCMcMC

Page 7: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

ההתקפה הקריפטוגרפית על RC4

RC4 - תאור 1. Key Setup

Algorithm (KSA)Given : K[0…l-1) , N=256Identity Permutation

for i =0…N-1 S[i] = i j = 0

Scrambling for i =0…N-1 j = j + S[i] +K[i mod l] swap( S[i] , S[j] )

2. Pseudo Random Generator Algorithm (PRGA)

i =j =0Forever i =i+1 j = j +S[i] swap( S[i] , S[j] )

Output :

Zi = S[ S[i] +S[j] ]

iii PZC

Page 8: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

עקרונות ההתקפה-

למצב KSA-ים שמביאים את IVהתוקף מחפש את ה-•(resolved cases)שבו מודלף מידע על המפתח

plaintext הראשון של ה-byteידוע ה-•

Page 9: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

KSAPRGA : i=j=0

i=1 j = S[1] swap (S[1] , S[S[1] ] )

Z1 = S[S[1] + S[S[1] ] ]

•Z1 -ערכים:3תלוי רק ב S[1], S[S[1] ] ,S[S[1] + S[S[1] ]])IV = )3,255,Xנניח •תנאי להצלחת הפענוח :•

(, אין שינוי 3-255)איטרציות KSA עד סוף ריצת ה-בערכים

S[1], S[S[1] ] ,S[S[1] + S[S[1] ] ] •C1, P1 >- ידועיםZ1 >- ידועK0

Page 10: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

נתון :

IV – באורךIבתים

נדרש : : Kהבתים הראשונים של B, כאשר נתגלו K[B]לגלות את

K[0],…,K[B-1]

)K[0], K[1],..,K[l-1]) החלק הסודי של המפתח –

תאור הבעיה

Page 11: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

פתרון

: צעדים יתקייםI , כך שלאחר IVחיפוש ערכי •

1. SI[1] < I

2. SI[1] + SI[SI[1] ] = I+B: K[B]שחזור •

כאשר

Yשבו מופיע הערך Stמיקום בתוך הפרמוטציה

B][ISj[Out]SK[B] 1BI1BI1

1BI

][Y-1tS

Page 12: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

WEPהפעלת ההתקפה על :RC4בנית סימולציה להתקפה על •

IV = )B+3, 255, X(resolved cases 60שחזור בית אחד – –resolved cases 256שחזור כל המפתח – –

802.11 של packets"ללכוד" את ה-•Intersil Prism II chipset מבוסס על Linksys wirelessכרטיס –

?packet הראשון בכל byteמה ה-•–IP, ARP : 0xAA–IPx : 0xFF, 0xE0

128שחזור מפתח של bits: 4000000-6000000 דרש packets

Page 13: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

ההתקפה הבסיסיתRecover WEP Key( ) Key [0... KeySize] = 0

for KeyByte =0…KeySize Counts[0…255]=0

for each packet -> P if Counts [SimulateResolved (P, Key, Key Byte)] +=1

Key [Key Byte] = Index Of Maximum Element (Counts)

return Key

xFFxXXxFFKeyByteIVP 0...000|,0,3.

Page 14: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

SimulateResolved (P , Key, Key Byte) N=256

K = P.IV.Key

for i =0…N-1

S[i] = i

j = 0

for i =0…KeyByte

j = j + S[i] +K[i mod l]

swap( S[i] , S[j] )

return 3][BSj[P.Out]S 2B2B

12B

Page 15: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

שיפור המתקפה

resolving הם IVלבדוק איזה •(, לכן לצורך hashing )אין ASCII ב- passwordה-•

, נותנים עדיפות next most likely key byteגילוי ה-לאותיות קטנות ,גדולות, מספרים וסימנים.

בדיקת המועמדים למפתח בעזרת חישוב ה- •checksum

אינם S[1], S[S[1] ], S[S[1] + S[S[1] ] ]ההסתברות ש: • עבור שני ערכים KSA : 13%משתנים עד סוף ה-

כאשר שלושתם שונים.5%שונים, לעומת

1000000תוצאת השיפור : מספר החבילות שנדרש -

Page 16: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

Testing if a particular IV is resolvingResolved? (IV, Current Key Guess) N=256 K = IV.Current Key Guess for i =0…N-1 S[i] = i j = 0

for i =0 …|Current Key Guess| j = j + S[i] +K[i mod l] swap( S[i] , S[j] ) if (S[1] <|Current Key Guess| +1 and S[1] + S[S[1]] = |Current Key Guess| +1) return true else return false

Page 17: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

Check the checksum received by key guess

Check checksum (Guess , P)

K =P.IV.Guess

return c(plaintext) ==checksum

xtP.cipherteRC4(K) checksum) , (plaintext

Page 18: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

פרמטרים שמשפיעים על שחזור המפתח

-יםIVבחירת ה-• IV איננו קובע את בחירת ה-WEPסטנדרט

:802.11 עבור כרטיסי IVשיטות בחירת –Counters–Random selection–Value flipping

Page 19: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

בחירת המפתח•

.WEPאין "ניהול מפתחות" ב- base station שימוש במפתח יחיד, משותף ל- –

mobile nodesולכל ה-human memorable passwordשימוש ב- – WEP ל- passwordאין דרך סטנדרטית להפוך את ה-–

key

:פתרונות –non memorable WEP keyשימוש ב•hashשימוש בפונקציות ••WEP key נפרד לכל mobile node לכל ,user לכל ,session

•Rekeying כל user 10000 אחרי packets

Page 20: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

•RC4

המלצות:RC4 הבתים הראשונים של תוצאת 256לזרוק את –יישום נכון של אלגוריתמים קריפטוגרפיים בשלב –

תכנון הפרוטוקול

מונע את ההתקפה של SSL ב- RC4) יישום נכון של Fluhrer)

Page 21: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

?WEPאיך לתקן את

מנגנון הסודיות• תזרוק את הבתים הראשונים המוצפנים אוWEPחמרת ה-– חזקה : hashלכל חבילה יהיה שימוש בפונקצית –

K =hash )IV. WEP key(–Rekeying לעתים קרובות bad IV’sלא להשתמש ב-–

Page 22: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

(Integrity)מנגנון השלמות •keyed universal hash functionשימוש ב- –

Authenticationמנגנון ה- • עבור פונקציות הסודיות rekeyingנדרש לספק מנגנון ל- –

והשלמות( לבחור base station, mobile nodeלאפשר לשני הצדדים )–

הכי טובה ששניהם תומכיםWEPבגרסת ה-

Page 23: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

:WEPכלים נוספים לשבירת מפתחות •

Airsnort

WEPcrack

מסקנה :

“802.11b WEP standard is completely insecure”

Page 24: A Key Recovery Attack  on the 802.11b  Wired Equivalent Privacy Protocol (WEP)

תרגילי בית

.WEPמנה את החולשות של 1.

.resolving caseהגדר את המושג 2.

הראשון byteהראה איך אפשר למצוא את ה-3. = IVבמקרה של (K0 )של המפתח הסודי

)3,255,X( בהינתן , P1 -ה( byte הראשון של (.dataה-

?WEPמה אפשר להמליץ למשתמשים ב- 4.

)[email protected](