Hi, this is Wayne again with a topic “10 Wifi Projects with Raspberry Pi – Andrew Naylor”.
Hello, everyone, my name is andrew naylor and i love raspberry pi. I love wi-fi and over the last year it’s been a baptism of fire just diving in trying to learn as much as i can about uh wi-fi as well as raspberry pi. I was a little late to the game, i’m sure everyone here got a raspberry pi before i did. I got mine like nine months ago and i’ve been playing ketchup so uh. Hopefully, you guys can learn from some of the things i’ve done in the last year and um uh afterwards feel free to uh come up and talk and i’d be happy to answer questions.
So the important thing uh about setting up wi-fi with raspberry pi is the operating system, because, depending on what project, you’re going to be working on different operating systems come with a lot of pre-installed software. So, for example, raspbian linux is um. It’S kind of the go-to for most hobbyists, especially if they’re doing uh, automation or any sort of systems, control or temperature stuff, because it has all the the packages and software like pearl and other scripting languages installed now. Kali linux, on the other hand, has a lot of tools that are custom made for wi-fi. That includes a monitor mode. Software such as aerodom, as well as some great products like kismet, which not only track the wi-fi packets, but they also categorize sort them and analyze them on the fly, and then it saves them to a pcap file that you can later analyze. In a you know, network analyzer or packet analyzer. Now next, i’m going to talk about hardware. Raspberry pi has two options: model a model b model b uses more power than model a. So if you’re going to be using a mobile setup, the a might be a better option for you. It just has fewer ports, so there’s some power issues um when you try to plug in a whole bunch of wi-fi uh antennas as well as keyboards and other things like that. Um the recommended input from when plugging it into a wall or battery is 1.2 amps, and you can max out the usb, in other words, plugging in a wi-fi antenna into the usb port on a raspberry pi. Maximum output is one amp. If you’re going to go above one amp, you need to use a powered hub and, for example, in my mobile setup right up here i have um my raspberry pi with a gps, and then i also have the wi-fi antenna and both of these combined use, pretty Close to one amp, so i can’t plug in a keyboard or else the the device won’t load.
So if, if you have any issues, just try unplugging things and that might solve some of your problems um but understand the limitations uh and doing the calculations for what your devices are going to use will help you avoid um issues later on in the project. Um yeah, so you can calculate the other thing is uh the power cord, so the power cord between the battery and the raspberry pi. You can get those in as long as 25 feet, but they won’t work the longer it is the more uh power loss. You have so use a shorter cable and you’ll have fewer power issues now, depending on the project you’re going to want a wall board or a battery for my mobile stuff. I have a battery it’s easy to find the batteries you just search on amazon for a usb battery or cell phone battery um and for the most part they supply the the five volts and um uh, let’s say: 800 milliamps or a thousand lamps. So i’m going to start talking about uh the 10 different projects that i did so there’s wi-fi snooper uh. Basically, you install kali linux and then you use uh kismet, which i talked about earlier, which tracks the packets and then categorizes them.
This is great because you can see all of the access points that are near you, as well as the clients that are connecting to them the controls. The control mechanism for wi-fi is not encrypted, so even if you’re, using wpa2 or whatever you will still be able to see the clients connect to the access point um. It also does historical analysis.
So if you leave it on for 24 hours and someone connects, you know for just a minute, then disconnects it’ll see that in the log and that’s where the pcap file comes in handy, because you can actually go down and look at the individual packets and see What it is they were trying to do uh next, i’m going to talk about wi-fi and honeypot uh this. This was a lot of fun because it gives you an idea of how many people are willing to connect to an unknown access point that they’ve never seen before, and the number i’ve gotten so far is like 20 or 30 and that’s about two a day. I guess um, i i don’t do anything malicious. I just like to see who’s looking for access points, and i think that that’s a very educational experience, because some cell phones, i’ve identified, will just connect automatically to certain um access point names so make sure your cell phone isn’t one of those and by setting this Up at home, you could probably find that out the software i used to do this is host apd, um, nginx and dns mask what it does is. Host apd allows the uh the wi-fi antenna to act as an access point and then the engine x-axis web server, dns mask, says: hey, send everything to the web server. So it’s it’s not a it’s, not uh too too complicated uh. The next project i like is sleep on the snipers um. Is that my feedback, or is that someone else’s? Hopefully it’s someone else’s stupid snoopers, uh, certain wi-fi clients and software will pretend to be a client and connecting to different access points and when it does that it sends out certain packets, depending on the software application and those packets are like red flags for uh kismet And various software programs for analyzing the packets and then what you can do is you can set this up at your house and you can set like an led or a flashing light on top of it as soon as it sees one of those packets.
It’S like hey, look, someone near you is trying to do something malicious. You should be careful and you know lock down your your access points. Of course you should lock down your access points anyway, but a lot of these tools led me to the same conclusion.
Over and over again, which is uh, there’s a lot of malicious stuff going on out there. The the great thing about kismet is that you can add additional packet types. So, for example, let’s say you set up a home lab for testing various wi-fi uh projects, and you say: oh my gosh.
This one is creating a this specific packet. When i do this malicious thing or when my neighbor does this malicious thing, you can set up an alert for that packet and you can say text me anytime, this specific device does this specific packet, so kismet’s, very customizable, um, wi-fi repeater, i like to say, spend 60 for a 30 device uh, you can find the repeaters online very cheap. But if you have extra hardware, it’s fun to play with uh.
The great thing is, you can also layer things, so you can set up a wi-fi, repeater and um honeypot or wi-fi repeater, and a monitoring mode, and that’s a good way to to do. Multiple things with a single raspberry, pi uh mesh networking is, is really fun. Um, because if you have a lot of raspberry pi’s like i do, you can put one in every room and set up a mesh network and even if you pull one they’ll, still be connected to all the others.
There’S a great software program called air mesh and you can add leds for fun. So, for example, add an led any time it receives a packet and then you send something and all of them light up at once. It’S kind of fun, uh tour proxy uh. This is one i haven’t done yet, but uh all my friends recommend it’s a great way to browse the web anonymously and it automatically connects to the the wi-fi adapter and sets it up in access point mode, and then that way you can kind of have anonymous. Internet wherever you go and you just kind of plug in your raspberry pi and connect your access point, you know that wherever you go, it’s going to be anonymous um. So i have squirrels anybody else here have squirrels.
You know that guy um, so we we planted some corn in our backyard and i don’t know why squirrels import so much, but they sure do uh and they’ve been just destroying our plants. So i set up a raspberry pi webcam using the raspberry pi camera and um. Now i know that it was squirrels and not my neighbors that were eating our corn covert listeners.
This is something i was sort of alluding to before, which is uh, setting up a monitoring node but doing it outside your house. So i don’t have any pictures because i don’t have any pictures, but what you can do is you can you can hide it inside? A cardboard box you can hide it under a pile of leaves, you can, you know, put it anywhere then, like put it next to a train station, see how many access points go through that train station every day. I live right by the caltrain station and, as soon as i started doing all this wi-fi analysis.
I noticed that you know during certain times the number of people would just explode. I was like what is there a bus going by with uh? You know wi-fi tourists, but it turns out it was just caltrain um. Now this thing blew me away. Uh there are spectrum analyzers for wi-fi and they’re generally expensive, like a thousand dollars.
They used to be really cheap or free. They were built upon um. Some of the uh wi-fi antennas that were more common but as they uh made more money, they raised the price. So now it’s hard to buy a spectrum analyzer! That’S where ubertooth comes in in handy it’s, this great product that was made for listening and manipulating bluetooth traffic, it’s about a hundred dollars or 120 dollars. Uh and what’s great, is that the um, the bluetooth and wi-fi uh spectrum overlaps.
So um you could do the this complete, spread from analysis on the 802.11 wi-fi space using the ubertooth. I like it because you can see the peaks of where the your neighbors are using it. So if you want to switch your channel to the least used channel, this is a good way to find it.
Also, if you have a microwave in your house, you can watch this and then start the microwave and everything just explodes. It goes crazy and that’s that’s a really fun tool and then there’s remote sensors. This is the last project because it really is infinite right. Anything you connect to the raspberry pi, whether it’s temperature, whether it’s humidity, any environmental sensors.
This. What i did here was i added some temperature or thermometers to a board so that i could monitor the uh the temperature in my closet, because i keep my wine in my closet, and i was, i wasn’t sure if it was getting too hot on the hot Days i figured my closet was the coldest place, but after some analysis i found out it was just as hot as the rest of the house. But what was cool was. I was able to set it up three temperature sensors to the breadboard i used wi-fi.
So i could put it in my closet because i don’t have my closet wired for ethernet yet, and then it was reporting the uh, the temperature every five minutes. So this was my uh. This was my my favorite project of the ones i did uh. Lastly, i’d like to talk about chipsets uh before you run out there and buy a usb wi-fi adapter for your raspberry pi um. I would do a lot of research on the chipsets first, because not every chipset has a driver that supports everything. I’Ve talked about today. So um ap mode mesh mode monitor mode, not every wi-fi adapter does that so um do go search for something like you know: uh wi-fi adapter that supports ap mode, raspberry pi. You know and there’s this great uh resource uh from the linux uh foundation, to be searched for linux, uh wi-fi they have a a full table on that and uh. If you get pushed from later be happy to point out links to that sort of thing, um, but understanding the chipset understanding, um, the limitations of various wi-fi will save you. Spending money on amazon of you know, buying wi-fi adapters that don’t work.
So that’s all. I have today uh thank you very much for coming out and i’ll be standing over there later. If you have any questions, .