WEP
How to hack WEP wifi Passwords
Last updated
How to hack WEP wifi Passwords
Last updated
Get wifi-old password. FLAG: Pass in hex
In the following screenshot we can see how the AP has a client connected with traffic.
The network is a WEP with a client, so we can use besside-ng to get the password automatically.
sudo
(Run as Root)besside-ng
requires root privileges to access wireless interfaces, so sudo
is needed.
besside-ng
(Automated WEP/WPA Attack Tool)A tool that automatically captures handshakes for WPA/WPA2 networks and cracks WEP encryption.
-c 3
(Target Channel 3)This forces besside-ng
to only scan and attack Wi-Fi networks on channel 3.
Useful for faster attack execution instead of scanning all channels.
-b F0:9F:C2:71:22:11
(Target Specific BSSID)F0:9F:C2:71:22:11 is the BSSID (MAC address of the target router/AP).
Ensures besside-ng
attacks only this specific access point rather than scanning for all available networks.
wlan2
(Wireless Interface)Specifies that wlan2
is the wireless adapter being used.
-v
(Verbose Mode)Enables detailed output for better tracking of the attack progress.
11:bb:33:cd:55
In case we want to do it manually:
There is a client active on this WEP network. This makes it easier to capture enough data to crack the password.
Capture data into a file, this file is input for aircrack-ng to crack the password.
To generate some extra data to the AP we can launch a fake authentication to the AP (at the same time)
sudo
(Run as Root)Required because aireplay-ng
needs administrative privileges to interact with the network card.
aireplay-ng
(Packet Injection Tool)Part of the Aircrack-ng suite, used to inject packets into a wireless network.
-1
(Fake Authentication Mode)Used to authenticate with a WEP-protected access point (AP).
Needed when the AP requires client authentication before allowing traffic.
3600
(Keep Connection for 3600 Seconds)Sets the fake authentication timeout to 3600 seconds (1 hour).
Ensures the attack stays authenticated for a longer period.
-q 10
(Quiet Mode, Sends Authentication Every 10 Seconds)Sends keep-alive authentication requests every 10 seconds to stay connected.
Prevents the AP from disconnecting the fake client.
-a F0:9F:C2:71:22:11
(Target BSSID)Specifies the MAC address of the target access point (AP).
wlan0mon
(Monitor Mode Interface)The wireless interface in monitor mode (previously enabled using airmon-ng
).
And generate some traffic by launching an ARP-request replay attack (at the same time)
sudo
(Run as Root)Executes the command with root privileges, which is necessary for packet injection and monitoring.
aireplay-ng
(Packet Injection Tool)Part of the Aircrack-ng suite, this tool is used to inject packets into the wireless network.
--arpreplay
(ARP Replay Attack)This option injects captured ARP (Address Resolution Protocol) packets into the network.
The goal is to force the target access point (AP) to generate more initialization vectors (IVs).
The injected ARP packets trigger responses from the AP, which helps in speeding up the process of collecting enough IVs to crack WEP encryption.
-b F0:9F:C2:71:22:11
(Target BSSID)The BSSID (MAC address) of the target access point (AP). This is the AP that you are attacking, and you want to inject ARP packets towards this specific AP.
-h 02:00:00:00:00:00
(Source MAC Address)The source MAC address you are using in the attack.
It represents the fake client MAC address. If the AP checks for authentication, this address should either match a legitimate client’s MAC or be a spoofed MAC address to bypass security.
wlan0mon
(Monitor Mode Interface)The monitor mode interface used to perform the attack. This interface allows you to capture and inject packets on the network. Make sure wlan0mon
is in monitor mode (you can verify this with iwconfig
).
While this is running we could try crack the password Crack the password with the data captured in a command earlier. (at the same time)
Once we have the password we can connect to the WEP network:
Create a configuration file to connect to the WEP network.
The content should look like this.
Now we can connect to the WEP network with our configuration file.
We should try to retrieve an IP address from the DHCP server.
And now we can access http://192.168.1.1
to verify that we are connected.
flag{c342fe657870020a1b164f2075f447564fdd1c3d}