Wireless Network Monitoring & MAC Address Spoofing

Published on October 16, 2023 • Updated: October 16, 2023 • 15 min read

In today's ethical hacking session, I explored wireless network monitoring techniques, including MAC address spoofing and putting wireless interfaces into monitor mode. These are fundamental skills for any network security professional, allowing for legitimate network testing and vulnerability assessment.

Understanding Monitor Mode

Monitor mode is a special mode for wireless network interfaces that allows the card to capture all wireless traffic within range, regardless of the network it's intended for. This differs from the default managed mode, where the interface only receives packets addressed to it.

Key Uses of Monitor Mode:

  • Network analysis: Capturing packets for troubleshooting
  • Security assessment: Identifying vulnerabilities in wireless networks
  • Penetration testing: Testing the security of wireless infrastructure
  • Research: Studying wireless protocols and behaviors

MAC Address Spoofing

MAC address spoofing involves changing the Media Access Control address of a network interface. This technique serves several purposes in ethical hacking:

Purpose Description Ethical Consideration
Anonymity Hiding the real hardware identity during testing Essential for privacy during security assessments
Bypassing Filters Evading MAC address filtering on networks Legitimate for testing network access controls
Testing Simulating different devices on a network Useful for compatibility and security testing

My Practical Session

In today's hands-on practice, I performed several operations to prepare my Kali Linux system for wireless network monitoring:

1. Changing the MAC Address

The first step was to change my wireless interface's MAC address to anonymize my testing activities:

root@kali:~# ifconfig wlan0 hw ether 00:33:33:22:33:00
root@kali:~# ifconfig wlan0 up

These commands changed the MAC address of my wlan0 interface to 00:33:33:22:33:00 and then brought the interface back up. The hw ether parameter specifies the new hardware address.

2. Checking Interface Status

After changing the MAC address, I verified the interface status:

root@kali:~# ifconfig
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
       ether 00:33:33:22:33:00 txqueuelen 1000 (Ethernet)
       inet6 fe80::2233:33ff:fe22:3300 prefixlen 64 scopeid 0x20<link>
       unspec 00-33-33-22-33-00-30-30-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)

The output confirmed that the MAC address was successfully changed to the new value.

3. Checking Wireless Configuration

I then checked the wireless-specific configuration using iwconfig:

root@kali:~# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11 ESSID:off/any
          Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Encryption key:off
          Power Management:off

This showed that wlan0 was in managed mode (the default mode for connecting to access points) and not currently associated with any network.

4. Preparing for Monitor Mode

To switch to monitor mode, I first needed to kill processes that might interfere with the wireless interface:

root@kali:~# airmon-ng check kill

Killing these processes:
  PID Name
  543 wpa_supplicant
  619 dhclient

The airmon-ng check kill command identifies and terminates processes that could interfere with monitor mode operation.

5. Switching to Monitor Mode

Initially, I tried to enable monitor mode while the interface was up, which resulted in an error:

root@kali:~# iwconfig wlan0 mode monitor
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Device or resource busy.

This error occurred because the interface was active. The solution was to bring the interface down first:

root@kali:~# ifconfig wlan0 down
root@kali:~# iwconfig wlan0 mode monitor
root@kali:~# ifconfig wlan0 up

After bringing the interface down, I successfully switched it to monitor mode and brought it back up.

6. Verifying Monitor Mode

I verified that the interface was now in monitor mode:

root@kali:~# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11 Mode:Monitor Frequency:2.412 GHz Tx-Power=20 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Power Management:off

The output confirmed that wlan0 was now in Monitor mode and listening on frequency 2.412 GHz.

Wireless Network Discovery

With the interface in monitor mode, I could now scan for nearby wireless networks. Using tools like airodump-ng, I discovered several networks:

BSSID                    PWR  Beacons    #Data, #/s  CH  MB  ENC CIPHER AUTH ESSID

0A:1B:2C:3D:4E:5F  -42     103      45   2   6  540 WPA2 CCMP  PSK Home_Network
12:34:56:78:90:AB  -58     87       22   1   1  270 WPA2 CCMP  PSK Office_WiFi
AA:BB:CC:DD:EE:FF  -65     120      89   3  11  130 WPA TKIP   PSK CoffeeShop
DE:AD:BE:EF:12:34  -72     56       12   0   6  130 WPA2 CCMP  PSK SecureNet
FF:EE:DD:CC:BB:AA  -81     34       5    0   3  270 WEP WEP    OPEN Old_Router

The scan revealed important information about each network:

Ethical Considerations

While these techniques are powerful for network analysis, they must be used responsibly:

Important Ethical Guidelines:

  • Only test networks you own or have explicit permission to test
  • Understand applicable laws in your jurisdiction
  • Never intercept or examine others' traffic without authorization
  • Use these skills to improve security, not compromise it
  • Document your activities and findings for legitimate purposes

Practical Applications

The skills practiced in this session have several real-world applications:

Application Description Tools
Network Auditing Assessing the security of organizational wireless networks airodump-ng, Wireshark
Vulnerability Assessment Identifying weak encryption or misconfigured access points aircrack-ng, Kismet
Incident Response Detecting rogue access points or unauthorized devices airodump-ng, Kismet
Digital Forensics Capturing wireless traffic for investigation Wireshark, tcpdump

Key Takeaways

What I Learned Today:

  • How to change MAC addresses for anonymity
  • The difference between managed and monitor modes
  • How to identify and kill processes interfering with monitor mode
  • The process of putting wireless interfaces into monitor mode
  • How to scan for and analyze nearby wireless networks
  • Important ethical considerations for wireless testing

Next Steps

In future sessions, I plan to build on these fundamentals by exploring:

  1. Packet capture and analysis with Wireshark
  2. Wireless encryption cracking techniques (on my own test networks)
  3. Rogue access point detection and prevention
  4. Advanced wireless attack methodologies
  5. Wireless intrusion detection systems

Conclusion

Today's session provided hands-on experience with essential wireless network monitoring techniques. By changing my MAC address and putting my wireless interface into monitor mode, I gained the foundation needed for more advanced wireless security assessments. These skills are invaluable for any ethical hacker or network security professional.

Remember: with great power comes great responsibility. Always use these techniques ethically and legally, focusing on improving security rather than compromising it.