Hello boys and girls. Welcome to the wireless village and welcome to the talk that Dominic and I are about to give. I'm Russ. I'm Dominic. Yes. And it's been 13 hours since my last shell. Sorry, I was playing with the microphone switch and I was really hoping it was going to work. And it very smoothly worked and then I spoiled it by going, yes, after getting my name out. I'm Dominic. This is Russ. We're going to talk about It's Not Wi-Fi, which is largely about wireless reverse engineering and what you do with signals you might find that are kind of non-standard and things like that. And there are some pictures of us on the slides. And provocative poses because, I mean, we still can do this through erotic interpretive dance. We can. I really can't. I can't. Do you want to move on? No, I was just going to say I can't bend that way. At this point in the weekend. So this talk idea came out a few weeks ago when Russ emailed me to say, happy It's Not Wi-Fi day, which is celebrating the second anniversary of a very, very, very long email thread the two of us had with someone who we'd met via a mailing list who was really, really keen to show us captures of these weird signals they were seeing. And these weird signals were kind of like... Fairly common. They were relatively strong no matter where he went. It's stuff that we have all seen and recognized over and over. And part of the frustration was the stubbornness of the individual who was seeking not just advice from us, but from a lot of other people to include some of the other wizards in the space like Dragorn and Mike Osman. And it just went on and on. So in other words, he was like shopping for an answer. That placated his particular narrative. Right. He was looking for someone to confirm his assumption that he'd discovered something nefarious from the government. And what happened on this given day is at some point he just sends this giant capture file through and audio decodings of it. Like, audio's not going to work. It's Wi-Fi. Okay, okay. But it's not Wi-Fi. Can you help me with the analysis? Let's get past the It's Wi-Fi thing. But it's not Wi-Fi. Yeah. What do you mean, let's get past the It's Wi-Fi thing? And he's like, well, because it's not Wi-Fi. It's not Wi-Fi. Well, why can't it be Wi-Fi? I don't think we can get past this, mate. And like, yeah, anyway. So Russ emails me to celebrate this every year. But he did once send me a 51-page PDF of his analysis of the signal, some screenshots of which appear in this talk. And also that was a risky click of a PDF to open because if Travis Goodspeed has taught us anything, that PDFs can be very dangerous. Type of document to send around to just random people. Yeah, I mean, this is a great phishing attack, actually. Like, get me so invested in proving to you that you're wrong on the Internet. And then, yeah, and then send me a PDF and I'll click on that. So at the end of the day, we both felt that there was this common narrative about people seeking assistance on signals and things that they were trying to decode. I saw this thing and what do I do with it? So this is essentially. This is actually going to be our advice to everyone else in the room when you do come across something that you don't necessarily recognize and how to approach it and what I'm probably going to suggest that you do with it other than beating yourself into the wall headfirst. Yeah, and this also kind of sets down some ideas of what you can do before you ask for help. And that's not to say we or other people aren't super willing to help you. But if you send me screenshots of a weird signal, I can't decode it from the screenshot. Well, actually, that's not true. We're about to. We're about to do that. But I can't really decode it from the screenshot. Like, there are a lot of things you can do to help yourself before you ask for help. And there are a lot of extra information. Like, when I provide support for open source software, my first question to a lot of users is, what are you trying to achieve? Because usually what they're trying to solve is problem X. And they come and ask me about problem X. And I solve problem X for them. And they say, well, but that solution to problem X doesn't solve problem Y. And I was like, well, no. And they say, but originally. Originally, I was trying to solve problem Y. And I'm like, why didn't you ask me about problem Y in the first place? Because here's the, like, two-minute, one-line solution to that. But we spent three days going around to solve problem X because you thought it would solve problem Y. It's called the XY problem. There's a website about it. And it's just frustrating because it's a waste of everybody's time, including the person looking for help. Exactly. So when it comes to all things wireless, radio, and so on and so forth, it starts with your antenna. And it starts with your. And it starts with how you're going to start observing the signals. Many folks try, in my experience, approach wireless communications because Wi-Fi is wireless. Well, there's actually a whole bunch of abstraction layers between when you receive that packet on the wire or via the kernel space from what's actually happening in the radio interface. So when people start using their RTLs or any one of the other permutations and capabilities that are out there, to start receiving signals, there's some very basic things that they have to get sorted out in the first place. And this is an old picture from a talk that Dragorn and Zero and myself had given many years ago. And it was with the RTL-SDRs, like the little things that you could buy on Amazon. When you popped open the magnetic bottom of them, there was a high probability that the actual antenna feed line was not actually connected to the antenna itself. So when people would plug it in, like, I don't see anything except for noise and clocks or whatever. And it was because the physical interface was disconnected. There's other things to consider as well. Some things that would become readily apparent to you if you got a ham radio operator's license. So I strongly suggest that you consider that if you haven't before. But things along the lines of harmonics to attenuation to a mismatched antenna system. And more importantly, grounding noise and static. And every single time. I've watched the Reddit threads of RTL-SDR, like, what's this signal? And I see a lot of other forums where it's like, what's this signal? And a lot of the times it comes back to these last few points where there's either a bad grounding issue or there's some noise from a clock source that's on there. It could be a random harmonic that comes up there. Or just general static and static-based discharges that just causes a spike in your interface. So what I promote. To people is to read these various resources. There's two of them there. You can search these terms and find these free publications that talk about how to properly build a radio receiving station. And this is a ham radio 101 sort of thing. Like if you've ever built a ham shack, you need to make sure that your grounds are good and you have lightning suppression because lightning wants to be your friend. Don't be lightning's friend. We'll get to that in a moment. But the Navy put out a RFI handbook that is absolutely fantastic. Because it also comes with some really poignant and direct examples. Such as common noise sources. Just one sec. We'll upload the slides somewhere afterwards for everyone who failed to get a picture of those URLs. I'll make a tweet on the Twitter account for the wireless village. We'll put it up somewhere so that you can get hold of this information. So one of the more common ones is the actual computer that you're using to observe the signals from. So who has a power supply on the computer that kind of looks like this? Where you have a metal case and then the power plug itself is a plastic plug. That's a noise source. That plug should actually be metal. In order to make sure that all your grounds are tied together. This is called BFG. Not like in the game Quake. It's a barrier feed and ground. And the other component for people who build ham shacks and such. They don't typically pay attention to the problems associated with mismatched metals. So you have a ground rod outside. Copper or steel. I've seen zinc as well. And people mismatch the metal types. And what you end up having over a period of time is, well, weather gets to it. Starts to rust. Starts to fall apart. And this is a great picture of a grounding rod at a cell phone tower site. That was throwing all kinds of wonky harmonics and noise just from that. Everything else about the radio equipment was fine and functional. It was the ground to the earth ground. That a little bit of water and weather got into it. And separated the cap. And it turned out that they had mismatched metals that created some rust and that particular fracture. So you've got to pay attention to some really interesting details. And it typically always comes back to your physical capture source. Your physical layer. As I mentioned, lightning wants to be your friend. Do not be lightning's friend. Proper ground suppression for lightning strikes for any long-term equipment that you're going to put in is absolutely critical for the safety of yourself. As well as everyone around you. To your left is the Ethernet cable for a Wi-Fi antenna for a system that I managed that got struck by lightning. The radio system survived and the suppression system took the brunt of the strike. But it turned that Ethernet cable into this small little brittle twig. And when I went back to replace everything, it snapped. It was kind of freaky. To the right is a picture shared to me from a couple of days ago from a friend of ours whose house got struck by lightning and had catastrophic severe damage to their house. They haven't lived in their house for a couple of months because they're still having to replace and repair all the wiring damage associated with a lightning strike to the house. So lightning may find you. It may not find you. If it does find you, be ready for it. Is ultimately what I'm trying to get at. So when a lightning strike comes down, you have these feelers that come up. A strike that can happen a mile away from you can create so much energy inside the wiring infrastructure in your house as well as your radio systems that it can cause damage. And still be life-threatening. So you still need to be very, very careful with your grounding systems and infrastructure when it comes to Thor and his angry farts. All right. Let's... Do you want to swap microphones? I spat on it. It's okay. That was... All right. So we're going to look at some signals. You've set up your SDR. You've set up your receiver. You've been kind of pulling down data. You've been looking at spectrum plots, waterfalls, whatever. So the first question is, is it Wi-Fi? Are you absolutely sure it's not Wi-Fi? Are you sure it's not Bluetooth? Are you really sure? How about something else that's really, really common in homes? Smart meters? Weather stations? Some of the... Are you absolutely sure it's none of those things that someone else has already reverse engineered so that you don't have to do it? Go back through this list a second time and make sure. Specifically, like, point number seven. Are you sure you're the first person trying to reverse engineer this? And this happens to us all. Mike Ostman and I reverse engineered the control protocol for some tiny little, like, 10-inch devices. 10, $15 quadcopters a couple years ago. And as we were doing that, we looked up the, like, a code from the packet, like a whitening sequence. And we Googled it to see if it was common for a given radio system. And we found a project where some people had already reverse engineered that very system. So we managed to find someone else who had already done this thing. We'd Googled the name of the system. We'd looked up, like, various other details about it. But as soon as we put in, like, a 10 bytes of hex string, it was a unique enough search term that we just found their code. And they were kind of halfway through the project. And we were halfway through the project. And we were able to combine our efforts. And we managed to publish a spec for them to go and implement it. But it's really likely that somewhere, someone on GitHub has, like, some half-assed code to do the thing that you're trying to do. But let's assume that you have found something unusual. You've bought a new device specifically for this. Someone's built a transmitter. Someone is taking part in a wireless CTF. There we go. So you're looking at what's... Did I jump two slides? No, I thought I had as well. Let's start to look at how we identify things, what we're looking at in the plot. What frequency are we on right now? Someone shout it out. Who was that? All right. Don't lose an eye. Did you just throw a piece of plastic at them? Yeah, that's just gone. Oh, okay. Yep, it's plastic. Yeah, it's a black badge to a con that you've got to find. So this is 2.4 gigahertz. And, like, this is one of the screenshots from that document. And so, obviously, I've been told repeatedly this is not Wi-Fi. Okay. But if you look at that little yellow dip in the middle of the bright red horizontal lines, that's really common in Wi-Fi. What happens when you look at a waterfall plot of Wi-Fi is it's 20 megahertz wide. It is high powered. And in the middle, there is a little dip in power. This is really common for OFDM Wi-Fi, which is pretty much anything you're going to be seeing these days. And that's really common. But also, you can use that little dip in the middle to work out where the center of it is. And the center of it is at about 2412 megahertz, which is the middle of a Wi-Fi channel. It's 2.4 gigahertz. It's noisy. It's high powered. It's a... Anyway... It's bursty. It is definitely Wi-Fi. But that's not Wi-Fi. Dominic, that's not Wi-Fi. Oh, I'm sorry, yeah. That's not Wi-Fi. So our next one, also from the same document. What you'll note is... Oh, note on this one. Your gain stages are set too high. It is. You're getting less information out of that waterfall because you cannot differentiate between noisy and quiet signals. Everyone searches for more and more and more dynamic range. And then they get their gain settings incorrect and completely destroy their ability to differentiate between loud and quiet signals. So play around with your gain settings. Make it look a little bit more like this one. In this one, this guy actually got his gain settings quite right. Maybe a little low. But they're fine. And you can see those big, wide, wide things across. Hopefully you might be able to see my cursor. There are some very wide... And a permission request in that screenshot. That's the first time I noticed that. Oh, yeah, yeah. That's not my laptop. That is... Johnny Long's no-tech hacking thing is like triggering in my head right now. So for these very wide, wide band things, they're also Wi-Fi. It's not Wi-Fi. But if you see these little ones, these little shorter, like narrow ones, very quick packets. All over the place. That's Bluetooth. I told you it's not Wi-Fi. That is Bluetooth. And I can tell you categorically that's Bluetooth. I mean, it looks like Bluetooth. It hops around like Bluetooth. I've spent so long looking at Bluetooth signals in these things. That's a Bluetooth signal. Don't bother trying to reverse it. I mean, feel free. They have a group meeting on Wednesdays for people who have dealt with Bluetooth so long. But it's not something unusual that you need to go and reverse engineer. You need to go to Bluetooth.org, download the spec, and read the spec of how it's put together. And if you want to reverse engineer it. Don't try and reverse engineer a thing like that. And I know because that's where my master's thesis came from. This one. That's not Wi-Fi. There's a small parade of mobility scooters. And I'm pretty sure they're here for me. Oh, jeez. Anyway. Champ. Oakley doakley. Thank you kindly. So this screenshot is the person who put this in to claim. I think this is how Bitcoin works. How stuck on the stage are you? Okay. Okay. I'm just going to keep going. Welcome to DEF CON, folks. Everyone stay frosty. Do you know the worst thing? The worst thing is like this is really solid now. This is shaken up. So this is getting thrown out. No, no. The one on the floor is getting winged. So this one is getting thrown out to whoever gets the next question, right? Okay. So this was. Shake your beer, not a baby. Wow. This is. I have no idea what this is. So this is. This was sent to us as part of that same 51-page report. And they said this is a microwave oven. And they're probably not wrong that it is a microwave oven. But I can tell you from this screenshot someone has grabbed the frequency slider and just been wiggling it around. Because this is not a radio system. They don't do this. It's not efficient. Took the tuner and went back and forth, back and forth. Yeah. Or they've been wiggling their antenna around, moving it around. Something's moving. Yeah. Something is moving around. Like it is really obvious from all of these screenshots that this person is like either unsure of what they're looking at or actively lying to us. Now. It's not Wi-Fi. The problem is this individual chose both paths. They chose to. They chose to be unsure about what they're looking at but be so overconfident about what they were looking at that they actively lied to us. Lied to us when they're asking for help. So if you see something like this, think about what might be causing it. Have you just been playing with the game stages? Have you just been playing with the tuner? Let it settle for a bit. Is this radio system something that's periodic? Is this radio system something that's caused because you just put a bag of popcorn in the microwave? Is this? Have you all heard of this guy named Nikola Tesla? He made all these kind of crazy things. And one of them was like a ghost voice box. Sort of a passive. A passive radio system. When you put your hand near it, it would make different sounds and all that stuff and it would pick up other atmospheric radio conditions as well. Well, if you mess with your game settings incorrectly and you put your hand right up near the antenna, you can also just as easily see something like that. So if your laptop's in your lap and your dongle is off to your lap, what you may end up seeing just from like shifting yourself a little bit is some variance in the sound. You can see some amplitude in some of the signals that come by or even some frequency offsets that kick around. Because you are a body of water, last I knew. Oh yeah. Especially at 2.4 GHz. I mean, so our friend Dragon sets up Wi-Fi networks for various cons and he talks about how the Wi-Fi works perfectly until the people arrive. And he refers to them as big Wi-Fi absorbing sacks of meat. And like, you are going to throw off 2.4 GHz. I mean, there's a lot of noise. There's a reason it's not a chunk of the frequency spectrum that the FCC and various other organizations around the world want to charge people extortionate amounts for licenses in. Because it's terrible. That's why we get to use it for Wi-Fi. But the unlicensed bands are awesome because we get to do amazing things with them. Yeah, absolutely. How are we doing for time? We're a quarter of the way in. Oh. Well, we're not a quarter of the way into the slides. No, but we're around the wrong. Okay. So if you definitely, definitely want to use Wi-Fi. If you want to reverse engineer signals. Like, if we've got to the point where I've convinced you that you know what Wi-Fi looks like and you know what Bluetooth looks like and you know what a microwave oven looks like and FM broadcast radio and all these things. Then we're at the point where we need to start looking at the tools we can use. So $20, you can pick up an RTL-SDR dongle. Almost anyone here will show you how to use it. If you want a bit more high performance SDR, you've got Hacker F1, BladeRF, USRP. If you want a bit more high performance SDR, you've got Hacker F1, BladeRF, USRP. If you want a radio dongle that's not an SDR so you don't have to think about that messy analog section, Yardstick One, RFCAT. There are various radio dongles. There's a crazy fly radio dongle for 2.4 gigahertz. Sometimes Hacker Con badges can be modified to do it as well. Yeah. Oh, there's Ubertooth. I should remember that one because I work on it. I think you deleted that. Yeah, I probably did. And then on the right-hand side of this slide, we've got some tools. Various different tools for looking at signals either in real time or offline. For identifying signals. There are the two URLs. FCC.io is a little hacky script thing I wrote once. If you want to see horrible JavaScript, look at how it's written. But it allows you to take the FCC ID you find on the back of a device. FCC.io forward slash that FCC ID will show you the FCC filings for that device. So immediately you will know what frequency it's on. Probably if you read the test report what its bandwidth is or what its modulation is. Or any of that sort of stuff. And SigID Wiki is a group of people who put together signals on a Wiki and identify them. And they say, I found this at 4.3 gigahertz. It's this wide. Here's a screenshot. Here's a capture. Whatever. There's an audio sample. Yeah. They have a waterfall screenshot of it. And they go as far as identifying where it is and where they've observed it from. It's a very powerful resource. So if you're just like looking for something, you could go there first to see if anyone has it. If no one else has seen the exact same thing, which is going to save you a ton of effort. And this also goes back to that, are you sure someone hasn't tried to reverse engineer it before you? And maybe if you find it on there, you'll find someone else who's got a little bit further than you. Or they've got some ideas. Or they've got a better capture than you have. Or they had a cleaner capture. Or they have had ideas. Or they can say, well, I saw it in the U.S. But no one's ever seen it outside of the U.S. Okay. Well, maybe it's something that's licensed within the United States or so on and so forth. So like an example of some of the software decoders that are out there. Everyone has seen the program RTL 433. You have this number better in your head than I do. But how many different devices has it got in it approximately? So RTL 433, I actually looked this up about 15 minutes ago. If you look at their GitHub page, RTL 433 has decoders built into it for 107 different devices. Tire pressure sensors. Calculus entry systems for cars. Weather stations. X10 home automation and other home automation. Temperature sensors. So you have a wireless thermostat in your house that connects back to your boiler. That thing's probably using 433 megahertz if it's older. And Wi-Fi if it's modern. And so depending on who you get it from. So there's a fair chance this thing already understands it. Smart meters. These sorts of things. It has code in there for a whole bunch of these things. And there's a fair chance if someone implements a radio system. If I'm building a temperature sensor that I want to be wireless, I'm not going to invent my own radio protocol. I'm going to buy an off-the-shelf RF solution. And therefore it's probably going to be an almost identical packet format to something that RTL 433 already supports. So you may not, no one may have reverse engineered the thing you're trying to reverse engineer before. But they may have reverse engineered something with an almost identical packet format. Or identical. Or similar style of communication. Same modulation. Same checksum. All that sort of thing. And you don't have to worry about that stuff. You've just got to find something that RTL 433 supports. And then just modify it. And then the other stuff on the other side is RTL FM. Which is an FM broadcast decoder for it. There's like analyzers to get those waterfall plots. There's software out there. I mean RTLSTR.com. Has a list of software that supports the RTLSTR dongle. And it is huge. And there's stuff to do with satellites. Weather satellites as I put on the screen. There's stuff to do with, there's tools for aircraft location. ADSB. ADSB. All that stuff. So if you step up from, so you can do that for 20 bucks. 20 bucks and all that, everything we talked about was free software. You can just go download it. And it's a good test to just start with. To see if that thing hasn't been reversed already for yourself. Right. It's a no effort sort of first step. Yeah, actually I don't know that we mentioned this at the start. I work for one of the, I work for Grayscale Gadgets who manufacture the HackerF. But I would generally prefer if you're unsure about which SDR to buy. You should buy the $20 RTL SDR and work out what you need. Because until you know whether you need a wide frequency range. Whether you need high dynamic range. Whether you need. High sampling. High sampling rate. Transmit and receive or just receive. Until you can work out what it is you want from an SDR. I don't want you to come and buy. I don't necessarily always want you to come and buy our product. I mean I'd love you all to buy our product. But I don't necessarily want you to buy our product if it's wrong for you. Because it actually doesn't gain you anything in terms of achieving what you want to achieve. So I changed the slide to be general SDR rather than say HackerF. Fair enough. But you can use GNU Radio. And loads and loads of people have written really cool tools for GNU Radio. And they wrote them with like. Really powerful expensive SDRs years ago. And now you get to pick up a like $300 SDR. And you get to implement like a pager system. An entire pager network. Or like GSM systems on a blade RF. Things like this. You can implement it. And again it's software you can go and download. Pie Bombs for GNU Radio has a huge number of packages in it. That mostly just work out of the box. With a fair amount of reading. A lot of documentation. A lot of reading. A lot of reading. The other thing is like Osmicom FFT. It's even better with phosphor mode. It's even better if you then record the captures from there. And open them up in Spectrum. Hey Mike. Hi Mike. Don't worry. You get mentioned again. In a minute. Oh yeah. Don't go anywhere. Do you want to do Universal Radio Hacker? So Universal Radio Hacker is a tool that I've used a couple of times. In order to start working on like. I've got a sample of stuff. And I want to start looking at it. You know there's a lot of documentation out there that says. Hey store it as a wave file. And you know open it up in Audacity. And then pull out a ruler. And put scotch tape on your display. Anyways. Universal Radio Hacker has really broken down the process. For me into the main three steps. In one tool. Which is fantastic. And your three steps are. You've got to be able to get that signal in. And start figuring out what the different types of waveforms you're dealing with. Are you dealing with Manchester encoding? And if you are. It's going to be fun. But then once you start getting that byte stream. Or bit stream out. Being able to turn that bit stream into meaningful data. You can still do it inside that same tool. And if you are working with a system. In which you're lawfully able to communicate with. You're able to then generate data back. In order to test to make sure. That what it is you're working on. Is actually really and truly working. It has taken. I remember getting into this stuff many, many years ago. And one of the tools that I used. Was Bodline. And this tool was suggested by many, many folks. And Bodline is an interesting first time experience. It's like being a three year old. And getting on a mountain bike for the first time. And your parents saying go. And shoving you downhill. I have a very dark childhood. Anyways. The first time I used it. I figured out how to start navigating the tool. And pulling the data in. And I'll show you in a minute. As a refresher. But I was talking to Mike Ostman. Before Grayscott Gadgets with the HackRF. Started getting really, really crazy. It was back with the Jawbreaker. And I was looking at my alarm system. Like what am I looking at? And started going through the exact same experience. That we're sharing with you. As to how we got to figure out what we're doing. So Bodline. It's useful. I still use it. The thing about it is it has quirks. I've never updated. I'm told it has a greater than 50 meg capacity. Anyone correct me? Say yes now. Is it true? Okay. Beta version does work better. So I don't have the beta version. So what I do is I still take the capture file. And use DD to break it up into 50 megabyte segments. Because it won't process anything beyond that. And at least the version that I have. And the example that I have for you is already quite small. So the other things that you have to do with it. Is make sure that you select quadrature. It's two channels. Because you've got your I and Q components to it. And it's an 8-bit unsigned data stream. And then when you open it up. You get this. And then when you open it up. You get this as a screen shot. For your 50 meg sample. And clicking on it is a little funny. You'll get used to that. But this is a fantastic screen shot. Of a nuke signal. From a car key chain. And as you zoom in. The old way of doing it. Was to take that. And put your laptop on the side. Or take a screen shot. And rotate the image. And pull out some graph paper. Or some other really, really painful thing. That you really recommend. Using other tools. But it's still a very useful one. To be able to use. In order to try to determine. Where certain nuances are with the signal. If the other ones are kind of being a little bit. Difficult with you. And some of those nuances can be. The clear start and end of a transmission. For certain things. And so on and so forth. So. Yeah. So for a while. I'm actually going to need my hands in a second. So I'm going to have. Wow. That was smooth. Okay. This is. I don't know if anyone saw me speak yesterday. But at some point. Someone else had to use me as a mic stand. I'm good. Thank you. Hold it for now. I'll see you later in the men's room. So in Spectrum. Spectrum was a tool written. Kind of. To address some of the shortcomings in Boardline. It is free and open source. It was written by Mike Walters. I mean you can see it. Come on Mike stand up. Yeah. Thank you sir. And so for years. And years. Everyone in the wireless village has done that sort of thing to me. And everyone else who's ever written any software. And it's just really nice to be able to do it to Mike. Because he's actually. A lovely lovely guy. But he's also a little bit shy about this. So you should go to him later. And ask him all about Spectrum. Give him a hug. He's happy to talk about. I'm saying this because I genuinely believe it's true. But he's happy to talk about it. And things like that. Also if you have issues with it. Raise them on GitHub. Oh wait. I'm going to do a live demo of this. Yep. Live demo. Okay. So this is the talk that you might care about most. Once you're done with all our ranting about. Someone else has already done this before you. So you can hold that for me. Okay. This is a capture file I took from Gnu Radio Con last year. Where there was a wireless CTF. It's a capture of a pager. You'll have to lean closer to the screen in a minute. So I've loaded it up in Spectrum. Unlike Boardline. Which was. Ross was saying. You have to kind of turn your laptop on the side. This thing puts frequency on the vertical axis. And time on the horizontal axis. Which is. Turns out. Handy. Somewhere. I'm struggling. Actually unnerving me. Okay. All right. Here is some data. This looks really promising. Brightly colored data. In a sea of background noise. I can play with my power settings on the side. So that it kind of. Pops out nicely. And we get rid of some of the blur around the edges. Because radio transmitters aren't. Like cheap radio transmitters. And this thing is. The cheapest of the cheap radio transmitters. I mean you can buy this thing on Amazon. But it is not FCC certified. It is. And I took it apart. And it's not great. But so you want to kind of get rid of. I don't know why I'm pointing at my screens. You want to sort of. Diminish some of these lobes a bit. By turning up the max power. And this should be fine. And then what we should be able to do. Is add a derived plot. It's an amplitude plot. Pull it down to the center frequency. Tune this in a little bit. And come. Scroll all the way down to the bottom here. Because it appears beneath it. Now that's. There it goes. There it goes. That does not look that much better. Why did this work when we tested it five minutes ago. And not now. Because it didn't sacrifice anything. Okay. Amplitude plot. Now that is what I added. Hey. Mike. I'm using your tool wrong. And I feel bad about this. Because you and I. You sat me down and taught me how to do this a minute ago. Anyway. So I've got this derived plot at the bottom. And this is the amplitude of the signal. And it just looks significantly worse than it did ten minutes ago. But. Will still work. Let's add cursors. And. You know. That looks like it's a thing. So let's add some more cursors. And it's not quite lining up. So it's. I've probably got my cursor width wrong. So let's assume it's a bit more narrow. That looks good. If I could use a mouse. That would look good. There you go. So what I've done is I've lined up a lot of these vertical lines. In here. With the symbols at the bottom. And then I can just keep increasing my number of cursors. And seeing if it lines up with the transitions every time. That means I've probably found where we change between ones and zeros. Where we switch bits. In the signal. And I can just keep going. I wish I hadn't done that. There you go. There we go. I can just keep going. And it kind of keeps going. Once you get a bit further into it. You can kind of adjust it. So it's a bit more correct across the whole thing. And that looks pretty good. So what I can now do is I can right click on this again. And I can add a threshold plot. And all that does is it says. We'll set a minimum value. We'll set a value. And we'll threshold it to binary. One or zero. And yeah. There we go. I am not good at computers. There we go. Okay. So what we've ended up with here is. If I go over this way. We've got an amplitude plot. And then at the bottom we've got a binary plot. And that looks very similar to the amplitude plot. Because we've got such a clean signal. But really it's just a threshold of the amplitude plot anyway. And then I right click on this one more time. And I do extract symbols. To stand it out. And I minimize this. And what you'll notice on the screen right here. I've got. Make it bigger. I don't remember how to do this. There you go. What you'll notice is. It dumped the binary of those symbols. Cutting it at the cursor points. To stand it out. So I've gone from a signal that was. Just an arbitrary capture. That I grabbed. And in a couple of minutes. I've got binary output for one of the packets. Now I can repeat that for. Every packet that I find in that file. I can look to see if they're the same. If it's repeating transmissions. If it's modifying. If it's changing them. I can look to see if there are code numbers. Does it look like. If we have different transmissions over time. Does it look like they've got different CRCs at a section. So a lot of analysis I can do. And this was a pager system. And there was a number written on the pager. And I was able to just pull that out. Of the appropriate field in the binary. Modify it. Retransmit and make one of the other pages buzz. And that one points in the CTF. And it was a super simple. It was a super simple challenge. Once you knew how to use the tools. But I mean I've just gone through it in. Two or three minutes. I mean it probably took me a couple of hours. To get it right. And to make sure that I was receiving the right thing. And all sorts of other things. But once you learn how to use the tools. That's an SDR challenge. That you might find in wireless CTF. Or that's something you might find. When you buy a device. And it takes minutes with a tool like InSpectrum. So it's a fantastic piece of software. And I highly recommend it. Which one of these is actually. There we go. The rest of this is mostly you mate. And then what we do. Is we take the same data. So now we know I've received it. What frequency it was on. I've. I've determined that it was amplitude modulated. If it had been frequency modulated. I just would have seen. Two levels in that plot. And I could have just done exactly the same thing. But applied a derived plot. For frequency modulation. So it. And you can eyeball it. There's no kind of magic automated method. For determining what it is. You just eyeball that. And you learn it over time. And you get the data rate out of it. If I tab over to InSpectrum. At the side here. I have my symbol period. I have my data rate. I have my bit period. And I can use that. To then program. Damn it. I can use that to program a dongle. This is the yardstick one. This is RF cat. This is the yardstick one transmission code. And so. Or receiving code sorry. And so this will just configure those values. I've just determined from InSpectrum. Into the yardstick one dongle. I will then. Use that. Like set that going. I will leave that python script running. And it will just dump every packet it sees to the screen for me. I've just automated the process that I took. Three minutes to complete manually. And it's just going to happen for me. And it's going to dump those things to the screen. And this is it. This is all the python code in that file. This is all you need. Well I guess there's an include at the top. But set the values of the. Into the modem for what you're trying to receive. And then it will just give them to you. And at that point you can leave it running overnight. As people play around with this thing. Or whenever you need to. Come back to it and do your analysis on it later. Easy peasy lemon squeezy. Yeah. But sometimes you want to do even more with it after that. Sometimes you want to potentially keep track of devices that are coming on. Coming around everywhere. Yeah exactly. So there was a. In the wonderful world that is inside my head. In the dark creature corners. Of fun bags and unicorns. There a project. Came out of my head. That I started a couple years ago. And I call it Sohos again. And the purpose of it was. My wife and I had just moved to a new house. It's pretty far back in the property line. And I wanted to know. Who and what was coming up in my property. To ascertain whether or not. I needed to put pants on or not. And if my mother in law was coming. To visit. Then pants off. So on and so forth. So the purpose of it. Was to start off with Wi-Fi. And this is during the time period in which. Devices when they probed for wireless networks. They would still mostly use. Their true MAC address. So some of this still works. But isn't entirely true. But the wireless network IDs that are there. That they are probing for. Over and over and over. Can still be used to be unique enough. In order to determine whose device it is. If you know who is physically at your house. The other cool thing. That I eventually added to it over time. Was some Bluetooth stuff. Some TPMS stuff. I'm working on a mass and alternator thing. With RTL SDRs. And what has now allowed me to determine. Is not just who is coming. But even mail services. Like did FedEx just show up. Is it the same FedEx guy. That's not creepy. So my wife Beth. Made me build in a time period. In which this information would decay. Just from organic capture. Until I flagged it as someone who I wanted. To track and identify. And that part is important in a moment. So it's. The term is based upon two words. Soho. Small home. Small office. Signals intelligence. With a SIG ID wiki. That was very very important for me. To be able to use. In order to help interpret some of the signals. That I was getting from the RTL SDR. To determine whether or not it was worth my time. To put in. To try to record that particular. Transmission. First steps first. You got to collect your baseline. Of everything that you have going around you. This is some of the things about the antenna farm. That I have in my attic and garage. And other places. You have a festive. Collinear coaxial antenna. On your right. And that used to live in a window for a long time. And Beth said get that out of here. And I said but it's festive. And lost that argument. So the. I finally got a rudimentary system in place. That was doing wifi and bluetooth. And a little bit of TPMS. And it was really really interesting. For a couple of reasons. From the bluetooth side. I had no idea there were so many. Tickle me Elmo's in my neighborhood. And that was fun. The other thing was. When Halloween came around. I noticed that. I had a lot of neighbors. Who had their SSIDs of their home address. So you think about it. You set your SSID of your home address. Well is that your home. Well we know your address. But now I know it's you with your device. And where you live. Based upon the network that you're probing for. And I was tracking a neighbor. Whose dog was defecating in our yard. So that was a. Fun interaction. But what was really important. Was a problem that my neighbors were having. And they were noticing. So I live in one of those neighborhoods. Where people leave their cars unlocked. And their houses unlocked. And it's like I won't be the lower hanging fruit. I'm obviously not the lower hanging fruit. But they are. And that's a lifestyle. And I'm not going to try to argue or change that. But it made sense to. What ultimately ended up being $180 overnight. Stolen from their car. They leave their wallet, their phone, their laptops. And all that sort of stuff. And what I later determined out of it. Was that criminals know that when things are stolen. That are electronic. They can be disabled and tracked. But cash is king. And we had the question of like. Did you talk to your kids. Do you need to have the scare talk with your kids. Are your kids stealing. I think it's your kids. It's not Wi-Fi. So anyways. I created Operation Catch the Fucker. And originally it was just. Let's stand up a surveillance camera. I do a lot of hunting. So people when they work at night. They kind of act like deer in some regards. So I set up a camera. Had to move his car over in the driveway. And I put some blind spots in the area. So the guy would. At the time I didn't know it was a guy. But when he came through. He would you know. Feel that it was a little bit more comfortable to hit the car. Well I set the camera up on like. Friday evening. And well he showed up that evening. And this is not the identifying photo. There's better ones of him. But he's coming up to the car. And he's like. Got a flashlight in his hand that you see. But he's like strobing it. Because he now sees this thing. There that he hasn't seen before. And in the first day we got him on the car. And looking at it. That was kind of cool. So we showed it to the detectives. They recognized who he was. Because he was a frequent customer. And during the interview process. I suggested to the detectives. That you get a warrant for the phone. To get the bluetooth and mac address. Off of the phone. Because I happened to have this weird data set. That I've been running for. Like over a year. And it's totally not creepy. It's fine. And let's see what happens. And they go okay. Well the guy consented. They didn't need a warrant. And sure enough. He gave me the mac address. I ran it in the data set. And ding. I got hits every single night. That there was a reported theft. In my neighborhood. And that was awesome. This thing augmented my normal surveillance camera system. So that was cool. And I was also. The purpose of the project for me. Was to get back into writing packet decoders. And sniffers and C. And all that stuff. And Dragorn. This was the other thing that Dominic and I were reflecting upon. There's a lot of Mikes. Who work in the radio space. There's Mike Kershaw. Mike Osman. It just keeps going on and on and on. So anyone know what Mike Osman looks like? Not Osman. Sorry. Only one person. This is old man Wi-Fi. And old man Wi-Fi. A couple years ago. And I were talking about my project. And that I had written a whole web UI to it. And you know. Databasing system. And then he reached out to me and goes. I may have killed your project. By revamping all of Kismet. And a new data aggregation service. And functionality with a web UI. Which is awesome. I'm okay with this. That's his Patreon. Please. If you never get a chance to see him. At least support his beer fund. By signing up for that. All right. So Kismet RC1. I believe just went out. Yeah like last week. He put out a release candidate for this new version. It's a complete rewrite. Mostly rewrite. It's got a web UI now. Instead of that. And curses. UI. It's a bunch. It's got a whole bunch of nonsense. Yeah. Goodness. Come on. It's okay. But it's really, really fantastic. Because now you can run it on any kind of hardware. So like the demonstration over there. Is running on a Raspberry Pi zero. That is monitoring everything in this room. In a way that you just plug it into a device. Without actually having to configure it. You're off to the races. But there's also some other things about Kismet. In conversation with the Soho SIG and stuff. And I haven't totally started putting in sensor code into it yet. Because you know. Time. Money. Energy. And sleep. And it wasn't until recently that I reached out to Mike and said. Hey. Just how hard is it to. You know. Do this. And all these other sort of projects. And see that you're wrapping it in Python. And just firing it at it. That looks awesome and easy. He goes. Nope. So. We're going to kind of step through that process. As to why it's a no. But it makes a lot of sense. So the other modules that are in there. That you may not necessarily know. Are things about Zigbee. There's RTL 433. Weather stations and all that stuff. Are going to be ingested in Kismet. UAV drone systems are in there. There's Z wave. And that's just what's there right now. Just you know. Pull it down out of Git. Compile it. You're easy and good to go. The other thing that Mike wanted to relate to everyone. Is that he is a writer. A fantastic writer. A fantastic documenter. Of his code and instructions. And the link on the bottom. Is the link to. The developer source information. That explains all the different data types. That you could ever want to know about it. In great detail. And some folks will say. Hey just look at the code. There's your example. He provides additional examples inside of it as well. It's just the guy is overly thoughtful. In a very good way. For everyone to be able to pick it up and run with it. So you should. Yeah. Having developed code for Kismet before. For the Uber tooth project. Sorry I've gone for a more casual relaxed stance. So having. Having developed Kismet. Code for the Uber tooth project. Historically. It's really really easy with his documentation and things. So like don't be. If you do get to the stage where you are. You found something that you want to monitor. You think Kismet might be a great back end. To monitor this thing. And you need to get your code into it. I'm afraid of adding code to Kismet. It's super straight forward with his kind of help and documentation. So with that. Writing code for Kismet. Is for the next few slides. Is going to be a little bit like. How you draw this damn owl. You know you draw two concentric circles. And the next thing you know. You got a freaking owl. Staring you in the face. But there's some things I'm going to talk to you about. That are the important things. To consider. The code is already there. That you're able to fill in the blanks with. But these are the parallels. And the things to consider. When you decide to go into writing your own sensors. And telemetry. So the background. The importance of me doing this. Is that for the wireless village. Hopefully by ShmooCon. I'll have an electronic badge. Either finished in this prototyping. Or available. Where you'll be able to play most of our CTF. From the badge. For both wifi, bluetooth and software defined radio. So that's my goal. Don't hold me to it. So first step. You have to define a physical interface. You have to define a physical layer. Kismet doesn't know what you're giving it. And it's written in C++. So you're going to have to define something. So it can ingest that data. And know where to take the square peg. And all that sort of stuff. And once you've. You know. Mentally got that construct around your head. The next few steps start. Falling into place. The other thing that is absolutely important. Is to take a look at the demo code. For dealing with tracking of the packets. As they're coming in. And tracking of the devices. This is easily done. It's just a couple of lines of code. That you can just copy and paste. And rename to fit for the device. That you're looking to try to monitor. But those are absolutely critical. In order for Kismet to know. What has just been given to it. Step two. Oh wait. Sorry I got ahead of myself. So thoughts for the constructs in C++. So when I was like. You know you have a byte stream. And Kismet doesn't know what to do with that. If you've ever written a packet sniffer before in C. You may remember lid PCAP. And you have the struct for a packet. Alright I just got a packet. What part of the packet is the IP address? Is this TCP or UDP? And then. Well you have those variously. Various defined structs. Same sort of concept. So on the right of the screen. Is the radio tap header. That defines everything that goes into that particular interface. You'll have to define something very very similar. So you give it a name. A type. And then you know. Kind of a bit of an offset. So step two. Then you can even write some Python. And the Python piece is going to be the glue. That goes from the output of the tool. And shoves it into Kismet. And the closer to JSON that you make your tool. The easier this will be for you. So let's quickly talk about RTL 433. When you run it from the command line. This is the JSON that it barfs out at you in the console. You got the time. The brand. OS model. So on and so forth. And then the actual values. From the C++ side. You can take a look at the header file. And you see inside of it. That there's pretty much the exact same things. The different types of devices. That are coming in via JSON. And then the components of that code. Are all identical amongst all those different things. It's just shoving it into a different bucket. So you know which bucket to then later pull it from. All right. So that's the header side. And these are exactly. Like each one of those functions. Are pretty much exactly the same from each other. But if you remember the JSON. You can have multiple different types of values for them. All righty. Now on the C++ side. Kismet just got a packet. It just got this blob of data that just came in. What is it going to do with it? So it's going to take that JSON field. Split it up. And then follow whichever object class. That it is going to need to execute code on. In order to just shove it into. Whatever container it needs to run in. It's pretty much that simple. To do the RTL 433 code. In C++ for both the header. And the source code itself. Is almost. Because of tabs. And you know. Beautifully formatted things. And all that sort of stuff. It's probably about 120 lines of code. It's not that complex. Now on the Python side. Specifically with RTL 433. There's this function. For message queuing. That is unique to that particular application. So Mike wrapped that into it as well. And that. You know. From the Python side. You define your Python source. Am I going to use this particular message transport medium. In order to shove it across or not. And if you are. Then it has it's other known code base. In order to execute against that. And then finally you just say. I want to open a device. And then it just takes the output from standard in. And then just shoves it into Kismet for you. And life is peachy. So it's pretty much. Easy peasy lemon squeezy. Like that looks a little bit scary. And a little bit difficult. The documentation is way more verbose. But those are the main concepts and constructs. You've got this data stream coming in. Kismet needs to know how to compartmentalize it. Into the different types of objects. The objects are very well documented. And identified for you in your classes. For both public and private components. And then you just shove the data around. And it's a copy paste for the most part. Of that particular function. And that's that. I was going to say. If you're playing around with home automation. Or you find something at home. And you're using RTL 433. Where you're expanding the existing tool. If you can get it into the RTL 433 tool. You have to write zero code. To get it into Kismet. Because it's been done for you. If you can leverage an existing tool. It's mostly done for you. And if you ever want to get stuff into Kismet. To get that kind of logging going. I regularly ask Dragoon questions over IRC. I'll ask him a casual question. About some variable. Like, what is this? And he'll go away and make breakfast. And come back. And there'll be a 30 line response. Which is now being integrated into the docs. There'll be a code snippet. He's so helpful. And he's like, oh yeah. That is a bit confusing. I fixed my documentation. I fixed my code. I fixed your code. And you're an idiot. But without being like that. Yeah. Well, you feel like an idiot. But he never says that. Can I buy you a beer? Like, yeah. I'm not really sure what to do. But yeah. So he's super helpful if you ever do want to get stuff into Kismet. But if you want to do just kind of the reverse engineering thing. Go down the spectrum. Mike Walters has run away. So he doesn't have to answer your questions. But he will be around. And he'll be around tomorrow. And he's super good at reverse engineering things as well. And we have some experience in it. So if you have anything they're kind of hacking on or working on at the moment. Let us know. And I'll be happy to talk to you about it. And remember, it's not Wi-Fi. Yeah. Very rarely Wi-Fi. Very rarely Wi-Fi. That's our talk. That's our talk. We're done. Is there a talk after us? Yes. There is a talk after us. I wonder why it suddenly got busy.