Breaking News
Loading...
Friday 3 January 2014

Backtrack Wireless: Packet Sniffing and Injecting

22:07

Packet Sniffing and Packet Injecting

WLAN Frames:
  1. Management frames: Management frames are responsible for maintaining
    communication between the access points and wireless clients.
  2. Control frames: Control frames are responsible for ensuring a proper exchange of
    data between the access point and wireless clients.
  3. 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.
Free BackTrack 5 Lessons - WireShark 

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.
Free BackTrack 5 Lessons - WireShark Interfaces

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.

backtrack tutorials airodump-ng 

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)
'0x20' means data field only 

backtrack tutorials: Wireshark sniffing packets 

Now we will be sniffing only data packets from our access point.
Packet Injecting
First we want to see only non-beacon packets in wireshark. So open wireshark and type in your filter box:
bssid == 5C:D9:98:6A:64:8A) && !(wlan.fc.type_subtype == 0×08).
Note:'0x08' is Beacon field. Beacon is a periodic frame sent by the AP (or stations in case of IBSS) and giving information about the BSS
 
Note: Replace 5C:D9:98:6A:64:8A with your own mac address.
Then open the terminal and type:
aireplay-ng -9 -e "Hack Lab" -a 5C:D9:98:6A:64:8A mon0
Note: Replace Hack Lab with the name of your SSID and 5C:D9:98:6A:64:8A with your own mac address.
Backtrack Tutorials: Packet Injecting 
If you go back to wireshark, you should see some packets that were injected. These are just random packets that do not have any real effect.

For details on 802.11 wireless frames, go to link below:
https://supportforums.cisco.com/docs/DOC-13664

0 comments:

Post a Comment

 
Toggle Footer