Archive for February, 2016

Raspberry Pi monitor wlan probe request

February 13, 2016

Just want to get in what is a Raspberrypi all about , so I thought what about a simple device that capture mac address of a phones or any wlan devices which enter my home . Ordered a raspberrypi at Amazon including W-Lan USB Stick and addition a case with touchscreen display ( used a Tontec display) .
To capture W-Lan devices is easy , as W-Lan devices send probe request to see if there are WLAN/WIFI Hotspots out there . In order to capture this requests you need to put your Wifi port at Raspberry pi in monitor mode , be aware not every plan stick support this , or have different setup commands .
command : lsusb show you the devices , just like below . where I have 2 adapters .
pi@raspberrypi:~ $ lsusb
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

I use the Realtek RTL8188CUS chip Adapter , to bring it in Monitor mode I use the following commands , please check which wlan interface (wlan0 here) you have .
sudo ifconfig wlan0 down
sudo iw phy phy0 interface add mon0 type monitor
sudo ifconfig wlan0 up
sudo ifconfig mon0 up

then to monitor for probe requests I use tshark , below the command :
sudo tshark -i mon0 -f ‘broadcast’ -T fields -e frame.time_epoch -e wlan.sa -e radiotap.dbm_antsignal -e wlan.fc.type -e wlan.fc.subtype

Install shark apt-get install tshark