WIFI Security Testing Handbook Getting Started
Preparation
External network card: netcore NW392
Chip Information
This device currently requires manual driver installation
Code:
1 | apt install realtek-rtl88xxau-dkms // need to enter y to continue installation |
Note: Due to the network speed, 69% and 85% of the progress may need to wait for some time
Installation is complete, reboot
Wireless network card status query
iwconfig //View wireless information
Mode:Monitor can listen to the accessory wireless device communication
Mode:Managed can connect to attached wireless devices
Change the working mode of the NIC: iwconfig NIC name mode Working mode.
Examples of common modes for testing are as follows
Code:
1 | iwconfig wlan0 mode Managed |
Practical explanation
Cracking WIFI password, using wifite tool for testing
New version of wifite: https://github.com/kimocoder/wifite2
Installation and startup method.
Code:
1 | $ git clone https://github.com/kimocoder/wifite2.git |
Note: The current kali built-in wifite version is not new to GitHub (root privileges are required to run the wifite command for attack operations)
Run with the -h argument to display wifite help information
Enter the -h -v parameter to run to display more help information
This output allows you to view the default password package save path
GitHub —- current path wordlist-probable.txt
Kali —-usr/share/dict/wordlist-probable.txt
- Default attack method.
Run wifite with root privileges without parameters
Detect the wireless card of the running device and change the mode of the wireless card to monitor (to detect nearby WIFI communication)
Start automatic scanning of attached WIFI devices, until you enter Ctrl+c to pause
Enter Ctrl+c to pause the scan and enter the corresponding parameters according to the purpose of the test to start WIFI password cracking
Crack the specified device: enter the corresponding serial number of WiFi
All devices: input “all” parameter
- Attack the specified device.
You can use the -e parameter plus the device essid information to specify the operation
- Commonly used combination of parameters explained.
Note: Here is the command executed under the path of wifite folder
sudo . /wifite.py —kill -i wlan0 -mac -pow 50 —dict /password.txt
Kill conflicting processes using the wlan0 NIC with mac address randomization enabled and then attacking WIFI devices with signal strength greater than or equal to 50 using the specified dictionary
Spoofing attack, use wifipumpkin3 tool for testing
GitHub: https://github.com/P0cL4bs/wifipumpkin3
Online installation manual: https://wifipumpkin3.github.io/docs/getting-started#installation
Example installation on a kali system
Code:
1 | sudo apt install libssl-dev libffi-dev build-essential |
Note: scapy warning issue
Update scapy version
https://github.com/secdev/scapy
- Create a WiFi
Code:
1 | set interface wlan0 |
Search for the created wifi
Visit the test URL and enter the account password to log in and test
http://testphp.vulnweb.com/login.php
- Convenient startup script
Save the commands from the previous test to a file with the pulp suffix
Load with the —pulp parameter
- Proxy mode settings
Default pumpkinproxy // proxy available for intercept mode
Turn on the proxy plugin
Turn off the proxy plugin
captiveflask proxy mode //specific page that pops up after connecting to WIFI
Captured submissions
- DNS hijacking
Code:
1 | set interface wlan0 |
- Other common command parameters
show //Show available attack modules
jobs //Display the attack module running in the background
ap //Display information about the created WIFI
proxies //show available proxy modes and functions
security //WIFI security mode, you can set the password and protection method
Change password
Phishing attack, use Wifiphisher tool to test
GitHub: https://github.com/wifiphisher/wifiphisher
Note: Two wireless devices are required
Automatically scan for attached WIFI devices
Select the target you want to test Enter to confirm, here select verify spoofing mode for demonstration
1 - Network Manager Connect
Generate the WIFI that needs to be authenticated
Interfere with the normal WIFI and automatically connect to the generated WIFI
Display the attack
ESC exits and the captured input is displayed in the terminal