First off we need to create a new Wifi (Mini Adapter) interface, ssid and key. Since we can’t create a fake access point without authentication a good strategy is to put the key on ssid so people can connect to it:
C:\windows\system32>netsh wlan set hostednetwork mode=allow ssid="FreeWifi Key:12345678" key=12345678 The hosted network mode has been set to allow. The SSID of the hosted network has been successfully changed. The user key passphrase of the hosted network has been successfully changed.
Then we need to select the interface whence we would like to share our Internet connection. To do that you should go to Control Panel -> Network and Internet -> Network Connections, right click on the WIFI or LAN interface, properties and select the second Wifi Network Connection created right before. For this example I used the LAN interface as in the following picture.
Finally, we need to turn on the new Wifi:
C:\windows\system32>netsh wlan start hostednetwork The hosted network started.
Now to see if a victim is connected to our fake access point we need the following command:
C:\windows\system32>netsh wlan show hostednetwork Hosted network settings ----------------------- Mode : Allowed SSID name : "FreeWifi Key:12345678" Max number of clients : 100 Authentication : WPA2-Personal Cipher : CCMP Hosted network status --------------------- Status : Started BSSID : ac:81:12:6f:eb:46 Radio type : 802.11b Channel : 11 Number of clients : 1 xx:xx:xx:xx:xx:xx Authenticated