/wifi

Virtual WLAN (Wireless Local Area Network)

Primary LanguageC

WiFi

What is it?

  • Everything about wifi:
      1. Documentation.
      1. WiFi client with raw socket in C.
      1. Virtual 802.11 kernel module to emulate wireless (WiFi) network.

Load The kernel module to emulate hw

Using mac80211_hwsim module

sudo modprobe mac80211_hwsim radios=2 dyndbg=+p
  • Enable monitor mode:
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode Monitor
sudo ifconfig wlan0 up
  • (Optional) monitor with tcpdump:
sudo tcpdump -i wlan0
sudo hostapd -i wlan0 hostapd.conf -dd
  • Test connect access point with (wpa_supplicant):
sudo wpa_supplicant -c wpa_supplicant.conf -i wlan1
  • Monitor all wifi network:
sudo ifconfig hwsim0 up
sudo tcpdump -i hwsim0 -v

Using our virtual mac80211 kernel module (TODO)

sudo insmod vwlan.ko