Thursday, April 5, 2012

Live Monitoring and Writing Raw 802.11 Packets

This is an excerpt from a complete article I found online. Interesting:
The madwifi driver can be used in a live "monitor" mode, by creating a monitor VAP and sending packets to it. All packets sent to a monitor mode VAP will bypass any state machine.  

To create a monitor VAP, use:  
wlanconfig ath1 create wlandev wifi0 wlanmode monitor  ifconfig ath1 up  
Finally, you can choose to receive packets on ath1 in several different packet formats:  
echo '801' > /proc/sys/net/ath1/dev_type # only 802.11 headers  
echo '802' > /proc/sys/net/ath1/dev_type # prism2 headers  
echo '803' > /proc/sys/net/ath1/dev_type # radiotap headers  
echo '804' > /proc/sys/net/ath1/dev_type # atheros descriptors

0 comments:

Post a Comment