ITCS 310 · Network Security · Week 13
Wireless & Wireless Network Security
الشبكات اللاسلكية وأمنها — Wi-Fi Security
IEEE 802.11 Standard WEP · WPA · WPA2 · WPA3 KRACK Attack ملزمة ثنائية اللغة
ACADEZI.COM
College of Information Technology
Detailed Teaching Guide · دليل تدريس مفصّل
ما هي الشبكات اللاسلكية؟ — الدوافع What are Wireless Networks? – Motivation §1
معايير الشبكات اللاسلكية تُتيح إرسال حزم البيانات عبر الهواء دون أسلاك. توجد أنواع متعددة منها: شبكات الجيل الخلوي (Cellular)، Wi-Fi، واتصالات المنخفضة السرعة مثل Zigbee. البيانات كلها تُرسل عبر موجات راديوية، والعملاء يتصلون بنقطة وصول (AP) لإرسال واستقبال البيانات.
Wireless networking standards allow sending network packets wirelessly through the air. Types include: cellular networks, Wi-Fi, low-speed serial (Zigbee), etc. All data is transmitted using radio waves, and clients send/receive traffic from a wireless access point (AP).
💻
Endpoint / Station
الجهاز الطرفي
أي جهاز عميل يتصل بالشبكة اللاسلكية (لابتوب، هاتف...).
Any client device connecting to the wireless network (laptop, phone...).
📡
Wireless Medium
الوسط اللاسلكي
موجات الراديو التي تحمل البيانات عبر الهواء بين الأجهزة ونقطة الوصول.
Radio waves carrying data through the air between devices and the access point.
📶
Access Point (AP)
نقطة الوصول
الجهاز الذي تتصل به المحطات، ويوصلها بالشبكة السلكية والإنترنت.
The hardware device stations connect to, linking them to the wired network and Internet.
معيار Wi-Fi — IEEE 802.11 Wi-Fi Standard – IEEE 802.11 §2
Wi-Fi يستخدم معيار 802.11 الصادر عن IEEE. يُعدّ النسخة اللاسلكية من Ethernet. يُحدّد هذا المعيار مجموعة البروتوكولات لشبكات WLAN المحلية اللاسلكية، بروتوكولات التحكم في الوصول للوسط (MAC)، وبروتوكولات الطبقة المادية (PHY). الحزم لا تزال تُعنوَن باستخدام عنوان MAC.
Wi-Fi uses the 802.11 standard from IEEE. Think of it as a wireless form of Ethernet. It specifies protocols for WLAN communication, MAC (Medium Access Control), and PHY (Physical Layer). Packets are still addressed using MAC addresses — functionally very similar to Ethernet.
أجيال معيار IEEE 802.11 — الجدول الكامل IEEE 802.11 Generations – Complete Table §3
تحقيقات السرعة القصوى هي نظرية ولن تُحقَّق عملياً بسبب التشويش وفقدان الحزم. معظم نقاط الوصول تدعم أجيالاً متعددة في وقت واحد، مما يُتيح لأجهزة مختلفة التوافق معاً.
Max throughput values are theoretical — never achievable in practice due to interference and packet loss. Most APs support multiple standards simultaneously, allowing different-generation devices to connect to the same AP.
المعيارStandard اسم Wi-FiWi-Fi Name أقصى سرعةMax Data Rate الترددFrequency
802.11b11 Mbps2.4 GHz
802.11g54 Mbps2.4 GHz
802.11nWi-Fi 4600 Mbps2.4 / 5 GHz
802.11acWi-Fi 56,933 Mbps5 GHz
802.11axWi-Fi 623,059 Mbps2.4 / 5 GHz
802.11beWi-Fi 723,059 Mbps2.4 / 5 / 6 GHz
802.11bnWi-Fi 823,059 Mbps2.4 / 5 / 6 GHz
القنوات في Wi-Fi وحزمة الحارس (Guard Band) Wi-Fi Channels & The 5 MHz Guard Band §4
داخل كل نطاق تردد توجد قنوات مختلفة. نطاق 2.4 GHz مثلاً يحتوي على 14 قناة. كل نقطة وصول تختار قناة محددة. باستخدام قنوات مختلفة، يمكن لنقاط وصول متعددة في نفس المنطقة تجنّب التشويش مع بعضها.
Within each frequency band there are different channels. The 2.4 GHz band, for example, has 14 channels. APs choose specific channels to use. By using different channels, multiple APs in the same area can avoid interfering with each other.
حزمة الحارس (Guard Band): معياري 802.11b وg يُحددان فصلاً بمقدار 25 MHz بين الترددات المركزية للقنوات المتجاورة. هذا يُوفّر فجوة تردد مقدارها 5 MHz تُعرف بحزمة الحارس لمنع التشويش بين القنوات. لهذا السبب لا يمكن استخدام جميع القنوات الـ14 في نفس الوقت وفي نفس المنطقة الجغرافية.
Guard Band: 802.11b and g specify a 25 MHz separation between center frequencies of collocated channels. This provides a 5 MHz frequency gap known as a guard band to prevent inter-channel interference. This is why not all 14 channels can be used simultaneously in the same vicinity.
المصطلحات الأساسية في Wi-Fi Essential Wi-Fi Terminology §5
المصطلحTermالتعريفDefinitionمثالExample
SSIDاسم الشبكة اللاسلكيةService Set Identifier – Name of the wireless network"Lu_Student"
BSSIDعنوان MAC لنقطة الوصولBasic Service Set Identifier – MAC address of the APAA:BB:CC:DD:EE:FF
Endpoint/Stationجهاز العميل المتصل بالشبكةClient device connecting to the wireless networkلابتوب، هاتف ذكي
WNICبطاقة الشبكة اللاسلكية في الجهازWireless Network Interface Card – the hardware in the deviceIntel Wi-Fi 6 Card
Access Point (AP)جهاز الوصول الذي تتصل به المحطاتHardware device that stations connect toراوتر Wi-Fi
ما هي إطارات الإدارة ولماذا تهمنا أمنياً؟ What are Management Frames & Why Do They Matter for Security? §6
إطارات الإدارة هي أنواع محددة من الحزم تُستخدم لإدارة اتصال 802.11 — لإنشاء الاتصال وصيانته وإنهائه. تُرسل بين نقطة الوصول والمحطات. المشكلة الأمنية الجوهرية: لا يوجد أي مصادقة لهذه الإطارات. يمكن لأي جهاز في النطاق تزويرها.
Management frames are specific packet types used to manage an 802.11 connection — to set up, maintain, or discontinue communication. Sent between the AP and stations. Critical Security Issue: By default, none of them are authenticated in any way. Any device in range can forge them.
⚠ ثغرة أمنية أصيلة: الطريقة الوحيدة المفيدة للتحقق من صحة هذه الإطارات ستكون تشفيرياً (Cryptographic Authentication)، لكن هذا غير مُطبَّق افتراضياً. هذا هو المصدر الرئيسي لهجمات مثل Forced Disassociation.
⚠ Fundamental Vulnerability: The only useful way to authenticate these frames would be cryptographically, but this is not implemented by default. This is the main source of attacks like Forced Disassociation.
الإطار 1 — إطار النداء (Beacon Frame) Frame 1 – Beacon Frame §7
يُرسَل دورياً من نقطة الوصول لتُعرّف بنفسها للمحطات المحتملة في نطاقها. يتضمن: الطابع الزمني، إعدادات الأمان، SSID، معدلات البيانات المدعومة، ومعلومات أخرى. يُرسَل عادةً مرة كل ثانية. المحطات تبحث عن هذه الإطارات للحصول على قائمة نقاط الوصول المتاحة.
Sent periodically by the AP to identify itself to prospective stations in range. Contains: timestamp, security capabilities, SSID, supported data rates, and other parameters. Typically sent once per second. Stations scan for these frames to get the list of available APs.
⚠ خرافة أمنية — إخفاء SSID: يمكن ضبط نقطة الوصول لعدم بث SSID في إطارات النداء. لكن هذا لا يوفر أماناً حقيقياً لأن الشبكة لا تزال مكشوفة عبر إطارات Probe عند اتصال الأجهزة بها باستخدام اسمها.
⚠ Security Myth – Hiding SSID: You can configure the AP not to advertise the SSID in beacon frames. But this provides no real security — the network is still discoverable via probe frames when devices connect to it by name.
الإطار 2 — إطارات الاستطلاع (Probe Frames) Frame 2 – Probe Frames (Request & Response) §8
Probe Request Frame
📤 طلب الاستطلاع (من المحطة)
تُرسله المحطة للبحث عن شبكات لاسلكية. يمكن أن يكون "مُسمّى" أي يطلب SSID محدداً. مثال: "هل يوجد شبكة باسم Lu_Student؟"
Sent by station to look for wireless networks. Can be "named" — requests a specific SSID. Example: "Can I connect to Lu_Student?"
Probe Response Frame
📥 استجابة الاستطلاع (من نقطة الوصول)
تُرسلها نقطة الوصول رداً على طلب الاستطلاع. تحتوي على معلومات القدرة ومعدلات البيانات. شبه مطابقة لإطار النداء.
Sent by AP after receiving a probe request. Contains capability information and supported data rates. Almost identical to a Beacon Frame.
الإطار 3 — إطار المصادقة (Authentication Frame) Frame 3 – Authentication Frame §9
المحطة تطلب إذناً للاتصال بنقطة الوصول مُرسِلةً هويتها. نقطة الوصول ترد بالقبول أو الرفض. سلوكه يختلف حسب نوع التشفير المستخدم.
Station asks for permission to connect to the AP, sending its identity. AP replies with acceptance or rejection. Behavior differs depending on the encryption type used.
نوع التشفيرEncryption Typeآلية المصادقةAuthentication Mechanism
Openنقطة الوصول ترد بإطار مصادقة يُشير للقبول أو الرفض ببساطةAP responds with authentication frame indicating simple acceptance or rejection
WEPتبادل تشفيري: AP يرسل نصاً تحدياً → المحطة تُشفّره بالمفتاح → AP يتحقق من التشفيرCrypto exchange: AP sends challenge text → Station encrypts with key → AP verifies decryption
WPA/WPA2/WPA3المصادقة الفعلية تحدث لاحقاً (في 4-Way Handshake) وليس هناActual security authentication occurs later (4-Way Handshake), not at this stage
الإطار 4 — إطار طلب الارتباط  |  الإطار 5 — إطار إلغاء الارتباط Frame 4 – Association Request  |  Frame 5 – Disassociation §10
Disassociation Frame
🔌 إطار إلغاء الارتباط
يُرسَل من المحطة التي تريد إنهاء الاتصال بشكل مهذّب. أي طرف (محطة أو AP) يمكنه إرساله. يُتيح لنقطة الوصول تحرير الموارد المخصصة وحذف المحطة من جدول الارتباط. مشابه لحزمة FIN في TCP.
Sent by station wishing to terminate connection politely. Either side (AP or station) can send it. Allows AP to release resources and remove station from association table. Similar to FIN packet in TCP.
سيناريو الاتصال العام — 9 خطوات General Connection Scenario – 9 Steps §11
Station (WNIC)
Messages
Access Point
Step 1 – Discovery
← 1. Beacon Frame: "I am Lu_Student"
Beacon
Probe Req
2. Probe Request: "Is there Lu_Student?" →
← 3. Probe Response: "Yes"
Probe Res
Step 2 – Authentication
Auth Req
4. Auth Frame Request: "Am I allowed to connect?" →
← 5. Auth Frame Response: "Yes"
Auth Res
Step 3 – Association
Assoc Req
6. Association Request: "I want to connect" →
← 7. Association Response: "OK"
Assoc Res
Step 4 – Data & Teardown
Data
8. Exchange Data Packets for Session ↔
Data
Disassoc
9. Disassociation Frame: "I'm done" →
لماذا التشفير ضروري؟ — واقع الشبكات اللاسلكية Why Encryption is Essential – The Reality of Wireless §12
تشفير حركة Wi-Fi اختياري، لكن بدونه جميع الحزم تُرسَل بنص واضح. أي شخص ضمن نطاق الراديو يمكنه الاستماع لتلك الحزم. يمكنك إعادة ضبط بطاقتك اللاسلكية لتستمع لجميع الحزم على قناة Wi-Fi معينة — يُسمى هذا Monitor Mode.
Encryption of Wi-Fi traffic is optional, but without it all packets are sent in the clear. Anyone within radio range can listen to those packets. You can reconfigure your wireless card to listen to all packets on a given channel — this is called Monitor Mode.
الواقع المُرّ: الشبكات اللاسلكية تبث إلى كل الاتجاهات. أي شخص في النطاق — حتى خارج المبنى — يمكنه رؤية الحزم غير المشفرة. على عكس الشبكات السلكية التي تتطلب وصولاً فيزيائياً لاعتراض البيانات.
The Harsh Reality: Wireless networks broadcast in all directions. Anyone in range — even outside the building — can see unencrypted packets. Unlike wired networks that require physical access to intercept data.
أنماط التشفير الخمسة في Wi-Fi — نظرة عامة Five Wi-Fi Encryption Modes – Overview §13
Mode 1
🔓 Open
بدون تشفير — للأماكن العامة
Mode 2
🔐 WEP
أول بروتوكول — مكسور تماماً
Mode 3
🔒 WPA
أفضل من WEP — لم يعد مستخدماً
Mode 4
🔒 WPA2
يستخدم AES — الأكثر شيوعاً
Mode 5
🔒 WPA3
الأحدث 2018 — الأكثر أماناً
WEP — Wired Equivalent Privacy (البروتوكول المكسور) WEP – Wired Equivalent Privacy (The Broken Protocol) §14
WEP كان أول بروتوكول أمان لاسلكي. يستخدم نفس مفتاح التشفير لجميع العملاء. نظام التشفير يعتمد على RC4 (Stream Cipher). المفتاح يُضبط في نقطة الوصول والعملاء يُدخلونه يدوياً. الوضع الحالي: مكسور تماماً ولم يعد مستخدماً.
WEP was the earliest wireless security protocol. Uses the same encryption key for all clients. Uses RC4 stream cipher for encryption. Key is configured in the AP; clients manually enter it. Current status: Completely broken, no longer used.
Why WEP is Broken
⚠ لماذا WEP مكسور؟
① يُعيد استخدام متجهات التهيئة (IV Reuse) → نفس مجرى المفتاح
② RC4 يحتوي على مشاكل رياضية
③ مفاتيح قصيرة جداً (64 أو 128 bit)
④ يمكن كسره بأقل من 5 دقائق بالأدوات الصحيحة
① Reuses Initialization Vectors → same keystream
② RC4 has mathematical weaknesses
③ Short keys (64 or 128 bit)
④ Can be broken in under 5 minutes with right tools
WPA — Wi-Fi Protected Access WPA – Wi-Fi Protected Access §15
WPA جاء خلفاً لـ WEP لمعالجة ضعفه. المفتاح الفعلي لتشفير حركة كل عميل مختلف (per-client). لا يزال يستخدم RC4 لكن تحت اسم TKIP. مفتاح 256-bit. وضعان: PSK (كلمة مرور مشتركة) وEnterprise (خادم مصادقة). لم يعد مستخدماً.
WPA followed WEP to address its weaknesses. The actual encryption key is different per client. Still uses RC4 but renamed as TKIP. 256-bit key. Two modes: PSK (pre-shared password) and Enterprise (authentication server). No longer in use.
WPA-Personal (PSK)
🏠 WPA شخصي
كلمة مرور مشتركة (Pre-Shared Key). المستخدم يُدخل كلمة المرور للاتصال. مناسب للمنازل والشبكات الصغيرة.
Pre-Shared Key — user enters password to connect. Suitable for homes and small networks.
WPA2 — Wi-Fi Protected Access 2 WPA2 – Wi-Fi Protected Access 2 §16
WPA2 هو خلف WPA. يستخدم AES (يُسميه CCMP) بدلاً من RC4. مفتاح 256-bit. متوافق مع الأنظمة القديمة — يدعم TKIP كاحتياطي. وضعان: WPA2-Personal وWPA2-Enterprise. ثغرته الشهيرة: هجوم KRACK (2017).
WPA2 follows WPA. Uses AES (called CCMP) instead of RC4. 256-bit key. Backward-compatible — supports TKIP as fallback. Two modes: WPA2-Personal and WPA2-Enterprise. Famous vulnerability: KRACK Attack (2017).
الجانبAspectWPAWPA2
خوارزمية التشفيرCipherRC4 / TKIPAES / CCMP ✔
طول المفتاحKey Length256-bit256-bit
التوافق العكسيBackward CompatibilityلاNoنعم (TKIP كاحتياطي)Yes (TKIP fallback)
WPA3 — Wi-Fi Protected Access 3 (الأحدث والأكثر أماناً) WPA3 – The Most Up-to-Date Protocol (2018) §17
WPA3 صدر عام 2018 ليكون أحدث وأقوى بروتوكول تشفير لاسلكي. طوّر لمعالجة ثغرات WPA2 وهجوم KRACK. يدعم وضعاً انتقالياً يُتيح للراوتر دعم WPA3 وWPA2 في آن واحد.
WPA3 released in 2018 as the most up-to-date wireless encryption protocol. Developed to address WPA2 flaws and the KRACK attack. Supports Transition Mode allowing routers to support both WPA3 and WPA2 devices simultaneously.
WPA3-Personal
🏠 WPA3 شخصي
مثالي للشبكات المنزلية. يستخدم AES-128. يعتمد على SAE (Simultaneous Authentication of Equals) بدلاً من PSK — يمنع هجمات القوة الغاشمة offline.
Ideal for home networks. Uses AES-128. Uses SAE (Simultaneous Authentication of Equals) instead of PSK — prevents offline brute-force attacks.
تصفية عناوين MAC على نقطة الوصول MAC Address Filtering on the Access Point §18
إنشاء قائمة بالأجهزة المعروفة فقط. تُضاف عناوين MAC للمحطات/الأجهزة المصرح لها إلى نقطة الوصول. تمنح نقطة الوصول الوصول فقط للأجهزة الموجودة في القائمة حتى لو عرف المهاجم كلمة المرور.
Create a known-only devices list. Add MAC addresses of authorized endpoints/stations to the AP. AP grants access only to devices on the list — even if an attacker knows the key, they still can't connect.
⚠ ثغرة MAC Filtering: يمكن للمهاجم تجاوز هذه الحماية عبر خطوتين: ① يراقب (Sniffing) حركة الشبكة لمعرفة عنوان MAC لجهاز مصرح له. ② يُغيّر (Spoof) عنوان MAC لبطاقته الشبكية ليطابق الجهاز المصرح له.

مثال واقعي — المطارات: عندما يدفع العميل مقابل الإنترنت، تُضاف MAC address جهازه للقائمة ويُسمح له للوصول لمدة 24 ساعة.
⚠ MAC Filtering Bypass: Attacker can bypass this in two steps: ① Sniff network traffic to identify an authorized device's MAC address. ② Spoof their wireless card's MAC address to match the authorized device.

Real-world example – Airports: When a client pays for internet, their MAC is added to the list and marked as allowed for 24 hours.
الهجمات البسيطة على 802.11 — الهجوم 1 و2 و3 Simple Attacks on 802.11 – Attacks 1, 2 & 3 §19
Attack 1
⚡ الفصل القسري (Forced Disassociation)
Forced Disassociation / Deauthentication Attack
السبب الجذري: إطارات التحكم غير مُصادق عليها بأي طريقة (لا نزاهة). أي شخص في النطاق ببطاقة شبكة لاسلكية يمكنه تزوير إطارات التحكم مدّعياً أنه أي طرف.
الهجوم: المهاجم يُرسل كميات كبيرة من إطارات Disassociation لعميل على الشبكة. العميل يُفصل باستمرار من الشبكة دون أن يعلم بالهجوم. يُعد نوعاً من هجمات رفض الخدمة (DoS).
Root Cause: Management frames are not authenticated in any way (no integrity). Any device in range can forge control frames claiming to be from anyone.
Attack: Attacker sends lots of disassociation frames to a client on the network. Client gets constantly disconnected without knowing about the attack. A form of Denial of Service (DoS).
Attack 2
👁 استنشاق الحركة (Traffic Sniffing)
Traffic Sniffing / Passive Eavesdropping
الشرط: الشبكة غير مشفرة (Open Mode).
الهجوم: المهاجم يضبط بطاقته على Monitor Mode ويستمع لجميع الحزم. يبحث عن معلومات ذات قيمة مثل كلمات المرور والبريد الإلكتروني وبيانات الجلسات.
ملاحظة مهمة: حتى لو لم تكن الشبكة مشفرة، بعض الحركة تكون مشفرة على مستوى التطبيق (HTTPS/TLS). لكن البيانات غير المحمية بـ TLS تُكشف بالكامل.
Condition: Network uses no encryption (Open Mode).
Attack: Attacker sets card to Monitor Mode and listens to all traffic. Looks for valuable info like passwords, emails, session data.
Important Note: Even if Wi-Fi isn't encrypted, some traffic is encrypted at app level (HTTPS/TLS). But non-TLS protected data is fully exposed.
Attack 3
🔓 مفتاح WEP المشترك (WEP Shared Key Attack)
WEP Shared Key Decryption
الشرط: الشبكة تستخدم WEP وجميع العملاء يستخدمون نفس المفتاح.
الهجوم: إذا عرفت المفتاح، يمكنك فك تشفير حركة مرور أشخاص آخرين على نفس الشبكة. المهاجم (مستخدم شرعي للشبكة) يستطيع قراءة بيانات المستخدمين الآخرين.
Condition: Network uses WEP where all clients share the same encryption key.
Attack: If you know the key, you can use it to decrypt other people's traffic. An attacker (legitimate network user) can read other users' data.
الهجوم 4 — ثغرات تشفير WEP (كسر المفتاح) Attack 4 – WEP Encryption Problems (Breaking the Key) §20
WEP يعاني من ثلاث مشاكل رئيسية تجعله عرضة للكسر الكامل. يمكن كسر مفتاح WEP بأقل من 5 دقائق باستخدام الأدوات الصحيحة المتاحة مجاناً.
WEP suffers from three main problems making it completely breakable. WEP key can be broken in less than 5 minutes using the right (freely available) tools.
1
إعادة استخدام متجهات التهيئة (IV Reuse)
Problem 1 – Initialization Vector Reuse
WEP يُعيد استخدام متجهات التهيئة (IV) عند تشفير الحزم. إذا حصلت على حزمتين مشفرتين بنفس IV → مشفرتان بنفس مجرى المفتاح (Keystream). هذا يُتيح للمهاجم استخراج معلومات قيّمة عن المفتاح.
WEP reuses Initialization Vectors when encrypting packets. Two packets encrypted with the same IV means they're encrypted with the same keystream (KS). This allows an attacker to extract valuable key information.
2
مشاكل رياضية في RC4
Problem 2 – RC4 Mathematical Weaknesses
خوارزمية RC4 نفسها تحتوي على ضعف رياضي أصيل يجعل بعض الحزم تُفرز معلومات عن المفتاح بصورة إحصائية قابلة للاستغلال.
The RC4 algorithm itself has inherent mathematical weaknesses — some packets statistically leak information about the key in an exploitable way.
3
مفاتيح قصيرة جداً
Problem 3 – Short Key Lengths
WEP يستخدم مفاتيح 64-bit أو 128-bit فقط. هذه المفاتيح قصيرة جداً مقارنة بالمعايير الحديثة، مما يُسهّل عمليات البحث الشامل (Brute Force).
WEP uses only 64-bit or 128-bit keys — far too short by modern standards, making brute-force attacks feasible alongside the other weaknesses.
الهجوم الفعلي: المهاجم يلتقط كميات كافية من الحزم المشفرة (passive sniffing أو بحث الحزم) ثم يستخدم أدوات مثل Aircrack-ng لاستخراج مفتاح WEP. العملية تستغرق أقل من 5 دقائق.
Actual Attack: Attacker captures enough encrypted packets (passive sniffing or packet injection) then uses tools like Aircrack-ng to extract the WEP key. The process takes less than 5 minutes.
الهجوم 5 — اختيار كلمة مرور WPA الضعيفة Attack 5 – WPA/WPA2 Weak Password (Brute Force) §21
وضع WPA-PSK يُتيح للمستخدم اختيار كلمة مرور لشبكته. المشكلة: المستخدمون يختارون كلمات مرور ضعيفة وسهلة التخمين. هذا الهجوم يعمل على WPA وWPA2 معاً.
WPA pre-shared key mode lets users pick a password for their AP. Problem: users tend to pick bad, easily guessable passwords. This attack works for both WPA and WPA2.
How the Attack Works
⚙ آلية الهجوم
① المهاجم يلتقط مصافحة WPA (4-Way Handshake).
② يُجري هجوم قاموس (Dictionary Attack) أو قوة غاشمة (Brute Force) على المصافحة.
③ يُجرّب كلمات مرور حتى يجد الصحيحة.
④ أدوات مثل Aircrack-ng وHashcat تُسرّع العملية.
① Attacker captures the WPA 4-Way Handshake.
② Runs a dictionary or brute-force attack on the handshake.
③ Tries passwords until the correct one is found.
④ Tools like Aircrack-ng and Hashcat speed up the process.
Defense: Strong Passwords
🛡 الدفاع: كلمة مرور قوية
الهجوم أقل احتمالاً للنجاح ضد كلمات مرور طويلة تجمع: حروف كبيرة وصغيرة + أرقام + رموز خاصة. مثال قوي: T7h!q@2kL#9p. احتفظ بكلمة مرور بطول 12 حرفاً على الأقل.
Far less likely to succeed against long passwords combining: uppercase + lowercase + numbers + special characters. Strong example: T7h!q@2kL#9p. Use at least 12 characters.
مقارنة شاملة لبروتوكولات التشفير اللاسلكي Comprehensive Wireless Encryption Comparison §22
البروتوكولProtocolالخوارزميةCipherطول المفتاحKey Lengthالحالة الأمنيةSecurity Status
Openلا يوجدNone❌ معرّض تماماً
WEPRC464/128-bit❌ مكسور / Broken
WPARC4 / TKIP256-bit⚠ ضعيف / Deprecated
WPA2AES / CCMP256-bit⚠ جيد / KRACK Vulnerability
WPA3AES-128/192128/192-bit✔ الأفضل / Recommended
WPA2 — سيناريو الاتصال الكامل مع 4-Way Handshake WPA2 Full Connection Scenario with 4-Way Handshake §23
Station (WNIC)
WPA2 Full Flow
Access Point (AP)
Phase 1 – Discovery
← 1. Beacon Frame
Beacon
Probe Req
2. Probe Request →
← 3. Probe Response
Probe Res
Phase 2 – Authentication (Not Actual Auth)
Auth Req
4. Auth Frame Request (Open) →
← 5. Auth Frame Response: Yes
Auth Res
Phase 3 – Association
Assoc Req
6. Association Request →
← 7. Association Response: OK
Assoc Res
Phase 4 – 4-Way Handshake (Real WPA2 Security — KRACK Target at Step 3)
← 8.1 Message 1 (ANonce)
Step 1
Step 2
8.2 Message 2 (SNonce + MIC) →
← 8.3 Message 3 (PTK Install) ⬅ KRACK TARGET
Step 3 ⚠
Step 4
8.4 Message 4 (ACK) →
Phase 5 – Data Exchange & Teardown
Data
9. Data Exchange ↔
Data
Done
10. Disassociation Frame →
هجوم KRACK — التفاصيل الكاملة KRACK Attack – Full Technical Details §24
KRACK (Key Reinstallation Attack) اكتُشف عام 2017. يستغل ثغرة في بروتوكول WPA2 الـ4-Way Handshake. الهجوم يُجرى كـ MITM (Man-in-the-Middle) ويستهدف الخطوة الثالثة تحديداً.
KRACK (Key Reinstallation Attack) discovered in 2017. Exploits a flaw in WPA2's 4-Way Handshake protocol. The attack is performed as a MITM (Man-in-the-Middle) and specifically targets Message 3.
1
الثغرة الأصلية في البروتوكول
The Original Protocol Vulnerability
حسب البروتوكول، الاتصال الأول يتطلب الـ4-Way Handshake الكامل. الاتصالات اللاحقة تحتاج فقط لإعادة إرسال الخطوة 3. لضمان نجاح الاتصال، يمكن إعادة إرسال الخطوة 3 أكثر من مرة. هذا هو الباب الذي يستغله KRACK.
Per protocol, first connection requires full 4-Way Handshake. Subsequent connections only need Message 3 retransmission. To ensure connection success, Step 3 can be retransmitted multiple times. This is the door KRACK exploits.
2
المهاجم يضع نفسه كـ MITM
Attacker Positions as MITM
المهاجم يضع نفسه بين المحطة ونقطة الوصول ويعترض الاتصال. يسمح لرسائل 1 و2 و3 بالمرور لكنه يحجب رسالة 4 (ACK من العميل). هذا يُجبر نقطة الوصول على إعادة إرسال رسالة 3.
Attacker places themselves between station and AP, intercepting communication. Allows Messages 1, 2, 3 to pass but blocks Message 4 (ACK from client). This forces the AP to retransmit Message 3.
3
إعادة تثبيت المفتاح (Key Reinstallation)
Key Reinstallation
الجهاز الطرفي يستلم رسالة 3 أكثر من مرة. وفق البروتوكول، يُعيد تثبيت نفس مفتاح الجلسة (PTK) في كل مرة. هذا يُعيد تصفير عدّادات Nonce إلى الصفر، مما يكسر الضمانات التشفيرية الجوهرية.
Client receives Message 3 multiple times. Per protocol, it reinstalls the same session key (PTK) each time. This resets Nonce counters to zero, breaking fundamental cryptographic guarantees.
4
استغلال إعادة استخدام Nonce
Nonce Reuse Exploitation
المهاجم يستغل إعادة استخدام Nonce لفك تشفير بعض الحزم و/أو إعادة تشغيلها (Replay) أو حقنها (Inject). لكن لا يسترد مفتاح التشفير نفسه. التأثير يعتمد على وجود حماية طبقة أعلى مثل TLS.
Attacker exploits nonce reuse to decrypt some packets and/or replay/inject them. However, the encryption key itself is NOT recovered. Impact depends on the presence of higher-layer protections like TLS.
✔ الحماية من KRACK: استخدام TLS على مستوى التطبيق (HTTPS) يحمي البيانات المتبادلة حتى في حالة نجاح KRACK. WPA3 يعالج هذه الثغرة بالكامل بآلية SAE الجديدة.
✔ KRACK Protection: Using TLS at the application level (HTTPS) protects exchanged data even if KRACK succeeds. WPA3 completely addresses this vulnerability with the new SAE mechanism.
التهديدات اللاسلكية الأخرى (الهجوم 7) Attack 7 – Other Wireless Threats §25
7a
🎭 الارتباط الخبيث (Malicious Association / Rogue AP)
Malicious Association / Evil Twin / Rogue Access Point
جهاز لاسلكي يُهيَّأ ليبدو وكأنه نقطة وصول شرعية. يسرق كلمات المرور من المستخدمين الشرعيين الذين يتصلون به خطأً. ثم ينفذ اختراق للشبكة السلكية عبر نقطة الوصول الشرعية الفعلية.
A wireless device configured to appear as a legitimate AP. Steals passwords from legitimate users who mistakenly connect to it. Then penetrates the wired network through a legitimate wireless AP.
7b
🔗 الشبكات الخصصية (Ad Hoc Networks)
Ad Hoc Networks – Peer-to-Peer Wireless
شبكات نظير إلى نظير بين أجهزة لاسلكية بدون نقطة وصول وسيطة. تُشكّل تهديداً أمنياً بسبب غياب نقطة تحكم مركزية — لا يوجد جدار حماية أو تصفية مركزية.
Peer-to-peer networks between wireless devices with no AP. Pose security threats due to lack of a central control point — no central firewall or traffic filtering.
7c
🕵 هجمات الوسيط (Man-in-the-Middle)
Man-in-the-Middle (MITM) Attacks
المهاجم يُقنع كلاً من المستخدم ونقطة الوصول بأنهما يتحدثان مباشرة لبعضهما. في الواقع، الاتصال يمر عبر جهاز المهاجم الوسيط. يمكن المهاجم من قراءة وتعديل البيانات المتبادلة.
Attacker convinces both user and AP they're talking directly to each other. In reality, communication passes through the attacker's intermediate device. Allows attacker to read and modify exchanged data.
7d
💥 رفض الخدمة (Denial of Service - DoS)
Denial of Service (DoS)
المهاجم يُغرق نقطة الوصول أو منفذ لاسلكي برسائل بروتوكولية متنوعة مُصممة لاستنزاف موارد النظام. يمنع المستخدمين الشرعيين من الاتصال أو يُتلف أداء الشبكة بالكامل.
Attacker continually bombards an AP or wireless port with protocol messages designed to consume system resources. Prevents legitimate users from connecting or degrades network performance.
7e
💉 حقن الشبكة (Network Injection)
Network Injection
يستهدف نقاط الوصول المعرّضة لحركة شبكة غير مُصفّاة (رسائل بروتوكول التوجيه، رسائل إدارة الشبكة). الحركة المحقونة يمكن أن تتضمن أوامر إعادة تكوين تُدهور أداء الشبكة.
Targets APs exposed to non-filtered network traffic (routing protocol messages, network management messages). Injected traffic can include reconfiguration commands to degrade network performance.
7f
🎭 انتحال الهوية / تزوير MAC (MAC Spoofing)
Identity Theft / MAC Spoofing
المهاجم يستمع لحركة الشبكة ويُحدد عنوان MAC لجهاز يمتلك صلاحيات شبكية. ثم يُغيّر عنوان MAC الخاص به ليطابق الجهاز المستهدف ويتظاهر بهويته.
Attacker eavesdrops on network traffic and identifies the MAC address of a computer with network privileges. Then changes their own MAC address to match the target device and impersonates it.
ملخص المحاضرة — النقاط الرئيسية للمراجعة Chapter Summary – Key Takeaways for Review §26
  • 802.11 هو المعيار الرئيسي للاتصالات اللاسلكية، بإصدارات مختلفة (b/g/n/ac/ax) تختلف في السرعة والتردد.802.11 is the main wireless standard with varying sub-standards (b/g/n/ac/ax) differing in speed and frequency.
  • يحتوي على 5 إطارات إدارة: Beacon, Probe, Authentication, Association, Disassociation — لا يوجد مصادقة لأي منها افتراضياً.5 management frames: Beacon, Probe, Authentication, Association, Disassociation — none authenticated by default.
  • 5 أنماط تشفير: Open (لا تشفير) → WEP (مكسور) → WPA (ضعيف) → WPA2 (جيد / KRACK) → WPA3 (الأفضل).5 encryption modes: Open → WEP (broken) → WPA (deprecated) → WPA2 (good/KRACK) → WPA3 (best).
  • WEP مكسور بسبب إعادة استخدام IV + ضعف RC4 + مفاتيح قصيرة. يُكسر بأقل من 5 دقائق.WEP broken due to IV reuse + RC4 weaknesses + short keys. Breakable in under 5 minutes.
  • KRACK يستغل ثغرة في الـ4-Way Handshake لـ WPA2 عبر إعادة إرسال Message 3 وإعادة تثبيت المفتاح. لا يسترد المفتاح لكن يُعيد استخدام Nonce.KRACK exploits WPA2 4-Way Handshake by retransmitting Message 3 → key reinstallation → nonce reuse.
  • تصفية MAC قابلة للتجاوز بسهولة عبر Sniffing + MAC Spoofing. ليست حماية كافية وحدها.MAC Filtering is easily bypassed via sniffing + MAC spoofing. Not sufficient protection alone.
  • التهديدات الأخرى: Rogue AP + Ad Hoc Networks + MITM + DoS + Network Injection + MAC Spoofing.Other threats: Rogue AP, Ad Hoc Networks, MITM, DoS, Network Injection, MAC Spoofing.
  • الدفاع الأفضل: استخدام WPA3 + كلمات مرور قوية + TLS على مستوى التطبيق (HTTPS) + تحديث الفيرموير دوماً.Best defense: Use WPA3 + strong passwords + application-level TLS (HTTPS) + always update firmware.