hacking is not just a crime its a survival trick...
Friday, 5 October 2012
Backtrack Wireless: Packet Sniffing and Injecting
Packet Sniffing and Packet Injecting
Management frames: Management frames are responsible for maintaining communication between the access points and wireless clients.
Control frames: Control frames are responsible for ensuring a proper exchange of data between the access point and wireless clients.
Data frames: Data frames carry the actual data sent on the wireless network. There are no sub-types for data frames.
Packet Sniffing with Wireshark
Open wireshark by navigating the application menu or by typing “wireshark” in the console.
Once WireShark is open, Click Interface List (1). A second window will open with a list of interfaces that can capture packets. Notice our monitor device mon0 is there from when we set it earlier. Click on start (2) and WireShark will begin to capture packets and display them in the window. These are wireless packets which your wireless card (in my case the Alfa One Adapter), are sniffing out of the air.
Now lets sniff packets from our own access point. To do this, we are going to use airodump-ng. Airodump-ng is used to capture wireless packets which have WEP encryption with the idea that you will use aircrack-ng (don’t worry, we’ll get to that soon). But for this time around, lets turn off the encryption on our wireless access point.
Now open up the terminal and type: airodump-ng --bssid 5C:D9:98:6A:64:8A mon0
Note: 5C:D9:98:6A:64:8A is the MAC address of my wireless access point. To find yours, go to your wireless routerweb interface and look for status. There you should find the wireless mac address of your router.
After airodump-ng finishes, you will see your access point with the channel it is running on.
Now we have to lock on to our access point by setting our wireless card to the channel of our access point. To do this, type:
iwconfig mon0 channel 6 (Where “6″ is the channel of your access point.)
Now fire up wireshark, sniff for packet with your mon0 interface. Now type in the filter box:
(wlan.bssid == MAC ADDRESS HERE) && (wlan.fc.type_subtype == 0×20)
Now we will be sniffing only data packets from our access point.
First we want to see only non-beacon packets in wireshark. So open wireshark and type in your filter box: