Close

Successful Packet sniffing!

A project log for Wifi Door Unlocker

Why carry a key when I always carry my phone?

matthew-carlsonMatthew Carlson 07/27/2014 at 20:340 Comments

So, I figured out what was happening last time. It turns out when you start a monitor interface from the wlan0 it defaults to channel 1. So, you have to start it with

sudo airmon-ng start wlan0 4 

Oh course, replacing the four with whatever channel your access point is on (most wifi points are on auto so it might be wise to set it on a specific channel). 

Anyway, so I found the right command to use which is 

sudo tcpdump -i mon1 -elnq "type mgt subtype auth and wlan host 00:11:22:33:44:55" |sed s/^/\\a/

Oh course once again replacing the mac address with the mac address of the device you want to filter on. The line will output a success at the end which is important to check for as if someone were to use a mac spoofer and try to authenticate then they could get in if we didn't check if the authentication wasn't successful. 

I have some python code to run this in the background- it's in the github repo. I didn't include the settings file that includes the MAC address for my phone. Not a huge security problem, but you can never be too careful. 

I ordered a new part. A little sensor-  HC-SR501 Human Sensor Module Pyroelectric Infrared to detect if someone is at the door. It's got it's own control circuit and can be easily attached to an interrupt.

Discussions