Wireless networks are widely used but often vulnerable to attacks due to their inherent nature. Understanding wireless protocols, security mechanisms, and how to inspect wireless networks is crucial for maintaining network security. This chapter covers the tools and techniques to analyze and secure wireless networks.
- Wireless Standards:
- 802.11a/b/g/n/ac/ax: Various IEEE wireless standards.
- Frequencies:
- 2.4 GHz: Longer range, slower speeds.
- 5 GHz: Shorter range, higher speeds.
- SSID: Network name broadcasted by the access point.
- BSSID: Unique MAC address of the access point.
- WEP (Wired Equivalent Privacy): Weak and outdated.
- WPA (Wi-Fi Protected Access): Improved but deprecated.
- WPA2: Common and secure (when used with AES encryption).
- WPA3: Latest standard with enhanced security.
- Displays and configures wireless network interfaces.
iwconfig
- Manage network connections.
- List available networks:
nmcli dev wifi list
- Connect to a network:
nmcli dev wifi connect "SSID" password "password"
- Part of the Aircrack-ng suite, used for wireless monitoring and testing.
sudo airmon-ng start wlan0
- Captures wireless packets and identifies nearby networks.
sudo airodump-ng wlan0mon
- Capture packets for a specific network:
sudo airodump-ng --bssid <BSSID> --channel <channel> -w capture wlan0mon
- GUI tool for analyzing captured packets.
sudo apt install wireshark
- Open Wireshark and select the wireless interface in monitor mode.
- Apply filters (e.g.,
wlan.fc.type_subtype == 0x08
to show beacon frames).
- Analyze network traffic from the terminal.
sudo tcpdump -i wlan0mon -w capture.pcap
- A set of tools for wireless auditing and penetration testing.
- Capture the handshake:
sudo airodump-ng --bssid <BSSID> --channel <channel> -w handshake wlan0mon
- Crack the password:
aircrack-ng -w wordlist.txt -b <BSSID> handshake-01.cap
Note: Use these tools responsibly and only with explicit permission.
- Use Strong Encryption: Enable WPA3 or WPA2 with AES.
- Disable WPS: Prevent brute force attacks on PIN-based setups.
- Change Default SSID and Password: Use unique and strong credentials.
- Enable MAC Filtering: Restrict access to specific devices.
- Reduce Signal Strength: Prevent access from outside your intended area.
- Use tools like
arp-scan
to detect unauthorized devices:sudo arp-scan --localnet
By the end of this chapter, you should be able to:
- Understand wireless networking concepts and security protocols.
- Scan and capture wireless traffic using tools like
airodump-ng
andwireshark
. - Analyze and secure wireless networks using best practices.
- Move to Chapter 15: Managing the Linux Kernel and Loadable Kernel Modules to learn about kernel management and customization.
- Use
iwconfig
to display your wireless interface settings. - Capture packets for a specific network using
airodump-ng
and analyze them in Wireshark. - Test the signal strength of nearby networks using
nmcli
. - Create a secure wireless network configuration with WPA2 and MAC filtering.
- Use
tcpdump
to capture wireless traffic and apply filters to isolate specific frames.