© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
A. SheikhCertified Ethical Hacker (CEH) Preparation Guidehttps://doi.org/10.1007/978-1-4842-7258-9_12

12. Hacking Wireless Networks

Ahmed Sheikh1  
(1)
Miami, FL, USA
 

As organizations move away from cabled networks in favor of communicating wirelessly, a host of security concerns need to be addressed. Wireless LANs using radio waves are easier to intercept than LANs that use physical wires. Go to a hotel, an airport, or the local McDonald’s. Many organizations now provide wireless connectivity to their customers. Unfortunately, the ease of use provided also come with increased risks. An attacker can be outside of an organization compromising a wireless network. In this chapter, you will learn about different types of wireless networks, authentication methods, and the importance of wireless encryption.

By the end of this chapter, you will be able to
  1. 1.

    Identify various types of wireless networks.

     
  2. 2.

    Identify authentication methods and types of wireless encryption.

     
  3. 3.

    Explain the methodology of wireless hacking.

     
  4. 4.

    Apply wireless commands and tools.

     
  5. 5.

    Examine plaintext wireless traffic, wired equivalent privacy (WEP) traffic, and Wi-Fi protected access (WPA) traffic.

     

Types of Wireless Networks

There are four types of wireless networks that you should be aware of. Review each network listed below for details.
  • Peer-to-peer network : In a peer-to-peer network, every computer can communicate directly with other computers on the same network without going through an access point. They may not be able to access the wired LAN, though.

  • Extension to a wired network : If an access point is placed between the wired network and the wireless devices, the wired network is extended. The access point connects the wireless LAN to the wired LAN, so wireless devices can access LAN resources.

  • Multiple access points : Multiple access points can be used to cover a larger area, enabling a user to seamlessly move throughout the coverage.

  • LAN-to-LAN wireless network: LAN-to-LAN wireless networks use access points to provide wireless connectivity between local computers on one network to computers on a different network.

Wireless Standards

In addition to the 802.11 standard, there is 802.15.1, which is the IEEE standard covering Bluetooth, and 802.16, which covers WiMAX, a long distance wireless infrastructure. Review Table 12-1 to become familiar with the range of wireless standards available.
Table 12-1

Range of Wireless Standards Available

Specification

Speed

Frequency Range

802.11a

54 Mbps

5.2 GHz

802.11b

11 Mbps

2.4 GHz

802.11g

11 Mbps/54 Mbps

2.4 GHz

802.11i

11 Mbps/54 Mbps

2.4 GHz

802.11n

124-248 Mbps

2.4 GHz/5.2 GHz

Service Set Identifier

An SSID is a unique name given to the wireless local area network (WLAN) that can be up to 32 characters long. All devices and access points that are part of the wireless LAN must use the same SSID. SSIDs do not provide security for the WLAN since it can be sniffed in plaintext. Many devices are shipped with default SSIDs.

802.1x Authentication Process

The IEEE 802.1x standard defines ways used to authenticate a user prior to granting access to network and the authentication server, for example a RADIUS server. 802.1X acts through an intermediate device, like an edge switch, allowing ports to transmit normal traffic if the connection is appropriately authenticated. This avoids unauthorized clients from accessing the publicly available ports on a switch, keeping unauthorized users out of a LAN.

Remote Authentication Dial in User Service, or RADIUS, is a client/server protocol that uses port 1813 to offer centralized authentication, authorization, and accounting for computers to connect and use the available network services.

After the RADIUS server has authenticated the client and sends an encrypted authentication key to the access point (AP), the AP generates a multicast/global authentication key encrypted with a per-station unicast session key before transmitting to the client (in step 7). The following steps outline the authentication process (also shown in Figure 12-1).
  1. 1.

    The AP issues a challenge to a wireless client.

     
  2. 2.

    The wireless client responds with its identity.

     
  3. 3.

    The AP forwards the identity to the RADIUS server.

     
  4. 4.

    The RADIUS server sends a request to the client via the AP.

     
  5. 5.

    The client responds to the RADIUS server with its credentials via the AP.

     
  6. 6.

    The RADIUS server sends an encrypted authentication key if the credentials are good.

     
  7. 7.

    The AP transmits to the client.

     
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig1_HTML.jpg
Figure 12-1

The 802.1x authentication process

802.11 Vulnerabilities

Beacon frames broadcast the SSID so that users can locate the network. Any station can impersonate another station or access point. An attacker can interfere with the authentication and association, which can force the stations to redo the authentication and association process.

Access points have capabilities for MAC address filtering. However, the MAC address doesn’t provide a strong security mechanism since it can be observed and replicated. MAC addresses appear in plaintext. There is a specific MAC address on each network card and that address can be modified via the ifconfig command.

Wired Equivalent Privacy

A wired equivalent privacy is designed to provide a WLAN with a level of security comparable with that of a wired LAN and is a stream cipher that uses RC4 (www.geeksforgeeks.org/rc4-encryption-algorithm/). The input to the stream cipher algorithm is an initialization vector (IV) sent in plaintext and a secret key. The total length for the IV and the secret key is either 64 or 128 bits. A busy access point can use all available IV values (224) within hours, and then the IV values are reused. There are two issues to consider: a cyclic redundancy check 32 bit (CRC32) is not sufficient to ensure the cryptographic integrity of a packet, and it is vulnerable to dictionary attacks.

Wi-Fi Protected Access 2

Wi-Fi Protected Access 2 (WPA2) utilizes a 256-bit preshared key from 8 to 63 bytes long. When users have passphrases that are less than 20 characters, they are vulnerable to an offline dictionary attack. WPA2 offers two modes of operation: WPA2-Personal and WPA2-Enterprise. WPA2-Personal uses a setup password while WPA2-Enterprise uses a server to confirm the user. WPA2 access implements the AES encryption algorithm to provide government-grade security.

Temporal Key Integrity Protocol

Temporal Key Integrity Protocol (TKIP) is an element of the IEEE 802.11i encryption standard. It is the designated successor to WEP and eliminates the drawbacks that WEP had without requiring the replacement of equipment. TKIP implements key mixing, which means that the secret key is combined with the initialization vector before passing it on to the stream cipher.

Changes from WEP to TKIP include adding a message integrity protocol to prevent tampering. TKIP changed the rules of IV selection so it now changes the encryption key for every time frame. Other changes are an increase in the size of IV to 48 bits and a new mechanism to distribute and change broadcast keys.

Four-Way Handshake

The MIC is a message integrity code, including authentication. The GTK is the Group Temporal Key used to decrypt multicast and broadcast traffic. The sequence number will be used in the next multicast or broadcast frame. Figure 12-2 illustrates this process.
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig2_HTML.jpg
Figure 12-2

Four-way handshake

Hacking Wireless Networks

A laptop running Network Stumbler, passive scanners (Kismet or KisMAC), or active beacon scanners (MacStumbler or iStumbler) can be used to hack a wireless network. Network Stumbler or Kismet will tell an attacker how a network is encrypted.

Rogue Access Points

Unauthorized access points can allow anyone with a wireless device onto the network. Access points can be cloaked by putting them in stealth mode. Cloaked access points are not detected by active scanners like Network Stumbler. A passive scanner is required to detect a cloaked access point. The methods used to locate access points include requesting a beacon and sniffing the air. Tools that can be used to cloak access points include Fakeap, Network Stumbler, and MiniStumbler.

Iwconfig Command

The wireless network card is most likely in managed mode, which is the standard mode of operation for wireless cards. Using iwconfig, the card can be placed into monitor mode. If you operate a wireless network card in monitor mode, you can capture all wireless traffic within your card’s range. See Figures 12-3 and 12-4.
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig3_HTML.jpg
Figure 12-3

Managed mode

../images/505537_1_En_12_Chapter/505537_1_En_12_Fig4_HTML.jpg
Figure 12-4

Monitor mode

Airodump -ng Command

If the program is running, the MAC addresses and AP names are displayed in the top pane (Figure 12-5). The bottom pane displays the MAC address of the AP and the MAC of the stations (Figure 12-6).
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig5_HTML.jpg
Figure 12-5

MAC addresses and AP names

../images/505537_1_En_12_Chapter/505537_1_En_12_Fig6_HTML.jpg
Figure 12-6

MAC address of the AP and the MAC

Aireplay -ng Command

Aireplay-ng is another command used for wireless purposes. This command is used to execute replay attacks for WEP cracking or deauthentication attacks. During WEP and WPA attacks, a deauthentication attack could be used to knock a client off the network. Not all cards have support for the deauthentication functionality. See Figures 12-7 and 12-8.
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig7_HTML.jpg
Figure 12-7

Aireplay-ng command

../images/505537_1_En_12_Chapter/505537_1_En_12_Fig8_HTML.jpg
Figure 12-8

The aireplay–ng command used in a deauthentication attack

Monitoring an Unsecured WLAN

The use of an unsecured wireless network poses significant security risks. If anyone has a wireless card operating in monitor mode, all traffic to and from the access point can be captured. This includes the capability to view DNS requests, view HTTP traffic, and retrieve images from wireless capture traffic. See Figures 12-9 and 12-10. For this very reason, it’s a good practice to use a wireless network with encryption, such as WEP, WPA, OR WPA2.
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig9_HTML.jpg
Figure 12-9

FTP traffic capture

../images/505537_1_En_12_Chapter/505537_1_En_12_Fig10_HTML.jpg
Figure 12-10

Following the TCP stream

Using Aircrack –ng

After the WEP key is obtained (Figures 12-11a and 12-11b), you can decrypt the network traffic with aridecap-ng.
../images/505537_1_En_12_Chapter/505537_1_En_12_Fig11_HTML.jpg
Figure 12-11a

Decrypting using aircrack-ng

../images/505537_1_En_12_Chapter/505537_1_En_12_Fig12_HTML.jpg
Figure 12-11b

Decrypting using aircrack-ng

Summary

As the number of organizations using wireless LANs increases, so too do the risks that can compromise a network. In this chapter, you reviewed the various types of wireless networks, authentication methods, and wireless encryption. You learned the importance of increasing security to protect systems due to the concerns associated with the use of wireless LANS.

Resource

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.104.109