Wireless hacking and security


Published on

This presentation describes the WEP issued in the original IEEE 802.11 and points out it's weakness and how can attacks be executed. Also, it summarizes the best practices to introduce security to the Wireless enviroment.

Published in: Education, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Because I know the plain text for this cipher anc C= P + RC4 (IV || Key) then I can try different Keys and adding to C I will eventually get my Plain Text
  • Wireless hacking and security

    1. 1. Wireless LAN Hacking and Security
    2. 2. Technical Presentation  Page Outline <ul><li>Introduction to WLAN </li></ul><ul><li>Why Wireless Security ? </li></ul><ul><ul><li>Motivation </li></ul></ul><ul><li>Wired Equivalent Privacy (WEP) </li></ul><ul><ul><li>Hacking </li></ul></ul><ul><li>Wi-Fi Security Best Practices </li></ul><ul><li>Summary & Conclusion </li></ul>
    3. 3. Technical Presentation  Page Introduction To Wireless LAN Introduction <ul><li>What is Wireless Networking?! </li></ul><ul><li>A wireless Network refers to a fully connected network that allows users to share resources without using any kind of Wiring. Resources Could be : </li></ul><ul><ul><li>Broadband Interent </li></ul></ul><ul><ul><li>Network Printers </li></ul></ul><ul><ul><li>Data files </li></ul></ul><ul><li>Examples: </li></ul><ul><ul><li>Wireless Personal Area Network (PAN) </li></ul></ul><ul><ul><li>Wireless LAN ( Our Guy ) </li></ul></ul><ul><ul><li>Wireless MAN </li></ul></ul><ul><ul><li>Mobile Networks </li></ul></ul>
    4. 4. Technical Presentation  Page Wireless Advantages And Disadvantages Introduction To Wireless LAN <ul><li>Wireless Advantages </li></ul><ul><ul><li>Easy and Fast Installation Procedures </li></ul></ul><ul><ul><li>No need for costy, Messy wiring. Easier to provide connectivity. </li></ul></ul><ul><ul><li>Access to the Network can be anywhere with the range of the AP. </li></ul></ul><ul><ul><li>Public places offers free or chargable access to wireless network. </li></ul></ul><ul><li>Wireless Disadvantages </li></ul><ul><ul><li>Many users = Bandwidth starvation. </li></ul></ul><ul><ul><li>Unlicensed spectrum, which could lead to interfrence with other services. </li></ul></ul><ul><ul><li>Frequent updates in the standards = replacing hardware = higher cost </li></ul></ul><ul><ul><li>Shared medium introduces security issues. </li></ul></ul>
    5. 5. Technical Presentation  Page IEEE Network Specifications Introduction To Wireless LAN
    6. 6. Technical Presentation  Page Most Important ones: Introduction To Wireless LAN
    7. 7. Technical Presentation  Page Wireless LAN Technologies <ul><li>Narrow Band </li></ul><ul><ul><li>Picking a frequeny and transmitting over it. </li></ul></ul><ul><ul><li>Very vulnerable to multi-path fading and interference. </li></ul></ul><ul><li>Spread Spectrum </li></ul><ul><ul><li>Uses more bandwidth by spreading the signal over a large range of fqs. </li></ul></ul><ul><ul><li>More imune against multi-path fading and interference. </li></ul></ul><ul><ul><li>FHSS </li></ul></ul><ul><ul><ul><li>Hops across Frequencies by a certain rate. </li></ul></ul></ul><ul><ul><ul><li>Synchronizes Hopping pattern at Tx and Rx. </li></ul></ul></ul><ul><ul><li>DSSS </li></ul></ul><ul><ul><ul><li>Breaks data Into chuks. </li></ul></ul></ul><ul><ul><ul><li>Represents each bits with *Chips*. </li></ul></ul></ul>Introduction To Wireless LAN
    8. 8. Technical Presentation  Page WLAN Frequency Usage <ul><li>Wireless Channels in 802.11b As An Example </li></ul><ul><ul><li>The 802.11b standard defines 14 channels. </li></ul></ul><ul><ul><li>Does it use all the 14 channels ?!  this depends on Countries </li></ul></ul><ul><ul><ul><li>North America : 11 channels </li></ul></ul></ul><ul><ul><ul><li>Euope: 13 channels </li></ul></ul></ul><ul><ul><ul><li>Japan: All the 14 channels </li></ul></ul></ul>Introduction To Wireless LAN
    9. 9. Technical Presentation  Page WLAN Modes <ul><li>Ad-hoc Mode </li></ul><ul><ul><li>All workstations can directly communicaticate together. </li></ul></ul><ul><ul><li>Good if you plan to quickly get setup your wireless network when there is </li></ul></ul><ul><ul><li>no access to wired Infrastructure. </li></ul></ul><ul><li> </li></ul><ul><li>Infrastructure </li></ul><ul><ul><li>Communication occurs through an AP. </li></ul></ul><ul><ul><li>A basic wireless Infrastrucutre with a single AP is called a BSS. </li></ul></ul><ul><ul><li>When more than once access point is connected it is called an ESS. </li></ul></ul><ul><ul><li>Roaming is supported from one BSS to another. </li></ul></ul><ul><ul><li>Roaming between APs can occur for many reasons. For examples: </li></ul></ul><ul><ul><ul><li>Stronger signals. </li></ul></ul></ul><ul><ul><ul><li>Load balancing between two APs in the same geographical area. </li></ul></ul></ul>Introduction To Wireless LAN
    10. 10. WLAN Modes Introduction To Wireless LAN
    11. 11. Here comes your footer  Page Why Wireless Security ?! <ul><li>Motivation !! </li></ul><ul><li>Accidental association </li></ul><ul><li>Malicious association </li></ul><ul><li>Ad-hoc networks </li></ul><ul><li>Non-traditional networks </li></ul><ul><li>Identity theft (MAC spoofing) </li></ul><ul><li>Man-in-the-middle attacks </li></ul><ul><li>Denial of service </li></ul><ul><li>Network injection </li></ul><ul><li>Caffe Latte attack </li></ul><ul><li>And many more !!! </li></ul>
    12. 12. Technical Presentation  Page Non Technical Example!! <ul><li> </li></ul>Why Wireless Security ?! [CEH V7 Official Course Material] Example Tools : wefi, jiwire,…
    13. 13. Technical Presentation  Page <ul><li>Most Famous and Commonly Used Cryptos !! </li></ul><ul><li>WEP : An old wireless encryption standard (will be discussed in more details) </li></ul><ul><li>WPA : Uses a 48 IV, 32 bit CRC and TKIP encyption for wireless security. </li></ul><ul><li>WPA2 Personal : Uses AES 128 bits and CCMP for wireless data encryption. </li></ul><ul><li>WPA2 Enterprise : Integrates the standards of EAP with WPA enrption </li></ul><ul><li>WEP -- Wireless Equivalent Privacy </li></ul><ul><li>WPA -- WiFi Protected Access </li></ul><ul><li>CCMP -- Counter Mode With Cipher Block Chaining Message Authentication Code Protocol </li></ul>Why Wireless Security ?!
    14. 14. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>Who am I ? </li></ul><ul><li>Wasn‘t developed by experts. </li></ul><ul><li>Part of the IEEE 802.11 standard. </li></ul><ul><li>Was meant to provide confidentiality for messages on the network. </li></ul><ul><li>Not Considered *The state of the art* any more. </li></ul><ul><li>Was designed to achieve three main security goals: </li></ul><ul><ul><li>Confidentiality : Content is not readable to people outside the network. </li></ul></ul><ul><ul><li>Integrity : A message can‘t be altered without altering detection. </li></ul></ul><ul><ul><li>Access control : only authorized stations can access the network. </li></ul></ul><ul><li>Concept </li></ul>Encryption Decryption M C M K K As If
    15. 15. Here comes your footer  Page Wired Equivalent Privacy (WEP) Sending Side (Encryption Block) <ul><li>Steps: </li></ul><ul><li>Integrity Check sum = Plaintext || CRC 32(Plaintext). </li></ul><ul><li>Chosen IV || shared key (key is 40 or 104 bits). Shorter keys, less privacy </li></ul><ul><li>Output of last step will be input to RC4 to generate the key stream. </li></ul><ul><li>XOR the result of the RC4 with the IC value to get the Cipher text. </li></ul><ul><li>Finally, Cipher text and IV are concatenated and transmitted on the medium. </li></ul>[1] RC4 is a stream-cipher algorithm, this means that it generates an infinite sequence of pseudo random bits.
    16. 16. Here comes your footer  Page Recieving Side (Decryption Block) Wired Equivalent Privacy (WEP) <ul><li>Steps: </li></ul><ul><li>IV is extracted from received data. </li></ul><ul><li>RC4 (IV || Shared key) = same key stream as before. </li></ul><ul><li>RC4(IV || Shared key) XOR C. C is equal { RC4 ( IV || Shared key ) XOR Pc }. </li></ul><ul><li>Finally, we Compare the IC value with the result of the integrity check. </li></ul>[1] Since the original plain text is not known by the receiver, you can’t tell if it is the real thing or not. So, we need to verify that they match.
    17. 17. Here comes your footer  Page Wired Equivalent Privacy (WEP) Summary of Operation (Hawk’s Eye View)
    18. 18. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>On The Run Definitions !! </li></ul><ul><li>Vulnerability : </li></ul><ul><ul><li>A Weakness in design that can Compromise the security of the system. </li></ul></ul><ul><li>Threat: </li></ul><ul><ul><li>An Action or an event that might compromise the secuity of the system. </li></ul></ul><ul><li>Exploit: </li></ul><ul><ul><li>A way to breach through the system security given existing vulnerabilities. </li></ul></ul><ul><li>Symetric Key Cryptography: </li></ul><ul><ul><li>Only one key is used to Encrpyt and Decrypt. The key should be distributed </li></ul></ul><ul><ul><li>before transmission. </li></ul></ul><ul><li>Asymetric Key Cryptography: </li></ul><ul><ul><li>Using two keys (public, private). Public key is for encyption and private key </li></ul></ul><ul><ul><li>for decryption. No need for key distribution </li></ul></ul>
    19. 19. Here comes your footer  Page Wired Equivalent Privacy (WEP) RC4 <ul><li>Inputs and Outputs of the RC4: </li></ul><ul><li>The RC4 algorithm takes as in input the Pre-Shared Key and produced and pseudo random stream. The PSK and the IV and the Generators of the RC4. </li></ul><ul><li>IV || PSK PRN </li></ul><ul><li>The Algorithm Consists Of Two Parts: </li></ul><ul><ul><li>Key Scheduling algorithm (KSA) </li></ul></ul><ul><ul><ul><li>The key scheduling algorithm is to complete the initialization of the RC4 </li></ul></ul></ul><ul><ul><li>Pseudo Random Generator (PSRG) </li></ul></ul><ul><ul><ul><li>The PRGA is to produce the pseudo random number. </li></ul></ul></ul>RC4 Seed The RC4 is a symmetric key cryptography algorithm was developed by Ronald L. Rivest Also the “R” in the RSA Encyption Algorithm. RC4 stands for Ron’s Code 4.
    20. 20. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>Vulnerabilities and Threats in WEP !! </li></ul><ul><li>The master Key is used directly as an input to the RC4 Algorithm </li></ul><ul><ul><li>Once one key is recovered, everything is compromised. </li></ul></ul><ul><ul><li>A good idea is to create sub keys for a certain period of time. </li></ul></ul><ul><li>The Key size </li></ul><ul><ul><li>64 bits -> 24 IV + 40 bit PSK . 40 bits is not enough to avoid Brute Forces. </li></ul></ul><ul><ul><li>Vendors extended the key length to 104 to make the total size 128 bits. </li></ul></ul><ul><li>Key Management </li></ul><ul><ul><li>No algorithm for key exchange. Keys are exchanged manually. </li></ul></ul><ul><ul><li>Small, and easy to remember keys are used  Higher attack probability. </li></ul></ul><ul><ul><li>Use some key exchange algorithms. For example: “Diffie Hellman” </li></ul></ul><ul><li>CRC32 : </li></ul><ul><ul><li>Although it aims to provide message integrity. It doesn’t prevent the whole </li></ul></ul><ul><ul><li>content from being changed. Can we fix that ? </li></ul></ul>
    21. 21. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>Vulnerabilities and Threats in WEP - Continue!! </li></ul><ul><li>The Incorrect Use of RC4 </li></ul><ul><ul><li>Strong correlation between the Input key and resulting stream. </li></ul></ul><ul><ul><li>IV is 3 bytes and is transmitted in plain text. It is easy to sniff weak keys. </li></ul></ul><ul><ul><li>If one bit is lost, the entire data packet is. </li></ul></ul><ul><ul><li>It is not specified how IV’s are generated. So they might be reused. </li></ul></ul><ul><ul><li>Reuse of IV’s is a direct Violation of the RC4 requirements. </li></ul></ul><ul><li>IV is Too Small And In Clear Text </li></ul><ul><ul><li>Only 24 bits and is sent in clear text, will eventually be repeated after 2^24. </li></ul></ul><ul><ul><li>Used as a seed for the RC4 Algorithm. Not practical when used for crypt. </li></ul></ul><ul><li>The above mentioned vulnerabilities are just some good examples. There is still a lot of other vulnerabilities that wasn’t mentioned here. For more information surf to www.nvd.nist.gov and look up “WEP” in the vulnerabilities Search engine. </li></ul>wire shark
    22. 22. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>Exploiting Vulnerabilities and Threats (Attacking)!! </li></ul><ul><li>Active Traffic Injections </li></ul><ul><ul><li>Using cryptanalysis, the attacker knows the exact plain text </li></ul></ul><ul><ul><li>plain text version of an encrypted message. </li></ul></ul><ul><ul><li>Use this information to construct messages </li></ul></ul><ul><ul><ul><li>Calculating CRC 32-values. </li></ul></ul></ul><ul><ul><ul><li>Perform bit-flips on the original message to get the encrypted form. </li></ul></ul></ul><ul><ul><li>Now the attacker can send the packet to AP and will be correctly validated. </li></ul></ul><ul><ul><li>Example of Tools that does this: </li></ul></ul><ul><ul><ul><li>AirePlay : Capture and re-inject </li></ul></ul></ul><ul><ul><ul><li>WEPWedgie: Determines the 802.11 WEP key streams and then </li></ul></ul></ul><ul><ul><ul><li>Injecting traffic with known keystreams. </li></ul></ul></ul>
    23. 23. Here comes your footer  Page <ul><li>Exploiting Vulnerabilities and Threats (Attacking) - Continue!! </li></ul><ul><li>Active attack from both sides </li></ul><ul><ul><li>An extension to the previous attack. </li></ul></ul><ul><ul><li>The attacker make guesses about header content. </li></ul></ul><ul><ul><li>Some bit flipping to change DA to rogue device. </li></ul></ul><ul><ul><li>Resend the packet to AP </li></ul></ul><ul><ul><li>Access point decrypt the message for forward it to gateway un-encyrpted </li></ul></ul><ul><ul><li>Un-encrypted message is then forwarded to attacker’s machine </li></ul></ul><ul><ul><li>A guess about TCP header, would allow the attacker to change current </li></ul></ul><ul><ul><li>port number to port 80 (default port for web traffic) which is allowed almost </li></ul></ul><ul><ul><li>in all firewalls. </li></ul></ul>Wired Equivalent Privacy (WEP)
    24. 24. Here comes your footer  Page Wired Equivalent Privacy (WEP) <ul><li>Exploiting Vulnerabilities and Threats (Attacking) - Continue!! </li></ul><ul><li>Table Based Attack </li></ul><ul><ul><li>IV are repeated after a while due to their small size. </li></ul></ul><ul><ul><li>Use some passive monitoring to know plain text. </li></ul></ul><ul><ul><li>Compute the RC4 key stream by trying out different key values. </li></ul></ul><ul><ul><li>Use this key stream to decrypt all packets with the same IV. </li></ul></ul><ul><ul><li>Over time the attacker can build a complete table of IV’s and corresponding </li></ul></ul><ul><ul><li>key streams. This allows the attacker to decrypt all packets sent. </li></ul></ul><ul><li>Passive attack decryption </li></ul><ul><ul><li>An attacker monitors traffic until an IV is reused. </li></ul></ul><ul><ul><li>When collision is reused, the shared key and the IV results a key stream </li></ul></ul><ul><ul><li>that has been previously used. </li></ul></ul><ul><ul><li>Attacker XORs the cipher text with the keystream and he gets the plain text </li></ul></ul>
    25. 25. Here comes your footer  Page Securtiy Best Practices <ul><li>Counter Measures Against Encryption attacks </li></ul><ul><li>Rotate the Keys </li></ul><ul><ul><li>Rotate the keys after a certain period of time. </li></ul></ul><ul><ul><li>By rotating the key you get a new key. </li></ul></ul><ul><li>Introduce a secure key management methodology </li></ul><ul><ul><li>As previously mention, WEP is a symmetric key crypto. </li></ul></ul><ul><ul><li>Key has to be stored in all machines. A problem in large companies. </li></ul></ul><ul><ul><li>The Original 802.11 standard has no methodology or specification for key </li></ul></ul><ul><ul><li>management </li></ul></ul><ul><ul><li>One way is to use public key cryptography for exchanging keys. This way </li></ul></ul><ul><ul><li>we don’t need to store the key on every singe machine, and thus making </li></ul></ul><ul><ul><li>the scaling process much easier . </li></ul></ul><ul><li>Use Wi-Fi Protected Access (WPA) and WPA2 </li></ul>
    26. 26. Here comes your footer  Page Securtiy Best Practices <ul><li>Wi-Fi Protected Access (WPA) </li></ul><ul><li>Everyone agreed that WEP is not a secure protocol anymore </li></ul><ul><li>IEEE defined the 802.11i </li></ul><ul><ul><li>Only access point s that meets the standard can use this protocol. </li></ul></ul><ul><ul><li>Addresses WEP problems but requires a change in hardware </li></ul></ul><ul><li>WPA saves the day by fixing WEP flows without needing to change hardware </li></ul><ul><li>WPA uses: </li></ul><ul><ul><li>802.1x port-access control to distribute per session keys. Provides a </li></ul></ul><ul><ul><li>framework that allows use of upper layer authentication protocols line EAP. </li></ul></ul><ul><ul><li>Temporal Key Integrity Protocol (TKIP) to provide key mixing and a </li></ul></ul><ul><ul><li>longer initialization vector. It also provides Message Integrity check (MIC) </li></ul></ul><ul><ul><li>that prevents wireless data from being modified in transit. </li></ul></ul>
    27. 27. Here comes your footer  Page Summary & Conclusion <ul><li>Summary </li></ul><ul><li>We have talked about WLAN and it’s Advantages and Dis-Advantages </li></ul><ul><li>Introduced the Wired Encryption Protocol </li></ul><ul><li>We have discusses the vulnerabilities and threats in WEP </li></ul><ul><li>We mentioned how to exploit those vulnerabilities </li></ul><ul><li>Finally, we talked about some of the best practices and counter measures. </li></ul><ul><li>Conclusion </li></ul><ul><li>WEP is not secure anymore </li></ul><ul><li>Many Security parameters should be taken into consideration when designing a </li></ul><ul><li>security protocol. </li></ul><ul><li>There is no Silver bullet. </li></ul><ul><li>Never feel completely safe, always be suspicious  </li></ul>
    28. 28. Here comes your footer  Page References <ul><li>Wired Equivalent Privacy (WEP) Functionality, Weak Points and Attacks: Gutjahr and Ludwigs ; University of Freiburg </li></ul><ul><li>Enhancing RC4 algorithm for WLAN WEP Protocol; Yao, Chong, Xingwei; Northeastern University, Shenyang </li></ul><ul><li>Security of the WEP algorithm; [email_address] . </li></ul><ul><li>Hacking Wireless Networks For Dummies; Beaver and Davis. </li></ul>
    29. 29. Technical Presenation  Page Questions Thank you!!