Welcome back to the Wireless Village, like most of you ever left. Contestants, I'm sure you remember by now, but please be quiet. We're all very glad you're here, and quiet, really quiet. Because I don't want to have to take points away, or drop this mic. So, it is my distinct pleasure to introduce two people that, well, if you were playing the dog collar game, you already know. These are two of our newer friends of the village. They've managed to ingratiate themselves in a short time. Tim was one of very few people who said, dog collar challenge, that sounds like fun. When Russ first introduced it. No one else would play. And then after Tim played for about 45 minutes, nobody wanted to play against Tim. So, yeah, that's been a lot of fun. He had no idea how software-defined radios worked right up until then. And then he's been ruined ever since. I'm sure he does nothing else from the look of it. And Woody sent me, I cannot even imagine, the most entertaining email I have ever read for the CFL. So, I'm going to go ahead and read it. Something to the effect of, I'd like to give this talk, but I need to bring my dog. Is that okay? I'm like, just bringing your dog? Is there any particular reason? Well, it's a hearing ear dog. Okay. Sure. So, it's actually a service animal. It's not like a service pony. It's a dog. Yeah. Yeah. Okay. Yeah. You can bring your dog. No problem. So, these are some of our newest friends. And they have done something that the entire Wireless Village team wanted to do. Which is reverse engineer the bloody GoTenna. So, I present GoTenna reverse engineering with our new friends, Woody and Tim. Woo! So, we're glad to be here. Actually, we want to thank Wireless Village. They also gave us a chance last year at DEF CON. We presented Iris for any of you that have heard of infrared and how that might be a way to track cell phones. We did. We did that. They gave us a chance to do that. And they brought us back again. So, pretty happy to be here. A little bit about me. I go by Woody. And I play with Software Defined Radios and RF. And now, Tim. Yeah. I'm Tim. I came here to the DEF CON for the first time about three years back. And got really excited when Russ was, like, playing with dog collars. It's like, man, this is going to be fun. Not only can we shock people with dog collars. Like, we can set them up. We can set this thing up on the Internet. Like, Japan's going to get really excited about it. It was... Anyways. So, we're going to be working on the Gotenna here. This is something that came out a couple of years back out of Hurricane Sandy in New Jersey. There's two people, Daniela and Jorge Perdomo. They're siblings. They thought, you know, it would be kind of neat if we could have some way of communicating when cell networks go down. And so, they made these things. Do you got one on hand, Woody? They're about the size of a pack of six pencils. It's kind of taped together. They're really small. And you pair your phone to it over Bluetooth. And so, once you've got your Bluetooth link up... Got one over there. Pretty sick. Anybody else in the audience got one? Anybody else? All right. Well, we actually have a discount code from them at the end. We don't work for them. But we ended up having to contact them about something, which we'll talk about later. So, anyways, you pair it with your phone or Bluetooth. You send a little text message to your buddy. And it goes out over MERS. Which is sort of similar. It's similar to push-to-talk radio networks for, like, family radio service, things like that. And so, some expectation management for the talk. We're not doing anything with Bluetooth. We're not doing anything with mobile applications. It's just not our skill set. We're going to be focusing on the MERS link and how it communicates. Also, Goten is coming out with new hardware. This is not the new hardware that we're studying. We're studying the older classic hardware, if you will. So. Now. We have ordered the new hardware. And hopefully it will be arriving within the next few weeks. But Goten is a fund-me thing. So we're waiting for the new stuff to come out. So a couple of things we're going to talk about. We've all heard of this OSI model. What became interesting as we did this, a lot of things we do with software-defined radios. Key fobs, entering vehicles, bypassing your home alarm system, being able to open your garage door. I don't need to worry about the OSI model as much. Pretty much, I have the hardware, I'm able to collect some stuff, I can replay, make a couple of changes, make things happen. That wasn't the way that this worked. This actually has networking, this actually has the physical model, this actually has presentations, sessions, and applications. So, I had to read. But fortunately I had Tim and he reads much better than I do. Screen's blank. Okay. So here's how we got started. As he pulls up the presentation. So, this is what we did as we first started out. I got excited because I'm a big fan of using software-defined radios. And let me caveat with saying that if you broadcast on the MERS network without permission, that is an FCC violation. So I'm making sure to tell you, don't ever do it. And if you do it, only do it in the casino with a yogi. But. But. But, with that being said, in my own home, on my own large piece of property, inside of a RF-free Faraday environment, I might have played with this. So, as I did that, one thing I noticed is I could replay a message from a GoTenant device hours later and have another GoTenant device still accept the message. So I was like, oh, that's kind of interesting. That would be something. That would be something that could be of use if I had done that. In a perfectly Faraday cage with no RF environment or anything else. Yeah. My Faraday cage was good to go. So I was fine. So the first thing I did was I started looking at a spectrum analyzer. Because I called Tim. I said, hey, this is pretty cool. We need some really high-end, expensive equipment to be able to move further with this. So we used Osmocon FFT. You're going to find out throughout this talk, we want to promote you to the next level. We want you to use basic tools and be able to use simple tools to do complex tasks. Osmocon FFT. So I invite Tim over, and I'm like, hey, I know that you can do some rebroadcasting with this. So let's figure out how this thing works. And Tim is really good at software-defined radios, and he can write some really cool code. So he said, okay, well, let's start playing. And then, boom, things start hitting. So can anyone tell me what's happening right here? The biggest thing you take out of seeing here? Exactly. There's a command channel, obviously. So you see where it spikes right here? No, hold on. How long did someone, did someone say command channel? That took me like 20 minutes to figure out. I didn't believe him. Yeah, so here's what happens. We sent about that many packs, and I go, hey, Tim, look, they got a command channel. And he's like, no, what is, we're going to have to do some more tests. I said, no, no, that's a command channel. So Tim can write really well, and I can kind of look at weird things and say, hey, this is really cool. And sometimes they pick up. So I was like, I think there's a command channel at the highest end. Because we knew there were five channels. Why? Because FCC is our friend, and we knew there were five channels in the MERS band. You're going to find more out about that later. So Tim doesn't believe me. You'll find out if you talk, if you were here for our Iris talk. Tim's a firm believer that I hunt unicorns. He does. I will tell you, unicorns are real. So what happened after we started testing this out? We realized that they're bouncing around. But one thing stayed consistent. So being a little bit more of a scientific man, I thought, hey, how can we test this and actually prove somehow that there's a command channel? So if there's a command channel, what would that mean? That means there's some sort of trunked radio network. And I said, well, let's do something that I think will help Woody and I understand this problem. So I said, Woody, let's start role playing. And so I put on my robe and wizard hat. All right. I'm going to be, yeah, he's really into this, by the way. He made a character, maxed out the stern in, and I maxed out my wiz. So it's just kind of, yeah, there you go. Lightning bolt. Anyways, so I'm going to pretend like I'm trying to talk to Woody. I'm one Gotenna. I'm the other. I'm going to start on channel four. That's the control channel. I'm going to say, hey, Woody, I want to talk to you. Let's meet on channel two. Now, Tim didn't do this to try to make it prove that I was right. Tim was like, well, I'm going to show you how to do this. I'm going to show you why this doesn't work. So Tim said, we're going to do this. And you'll find out, if it still bounces around, Woody, you're wrong. Because it's FreeCop, and I don't think there's a command channel. I was fortunate enough to be able to say, well, I think there is. So we did it. What happens if you're on channel two? Yeah. So what happens if we start sending it to where one channel, one radio is off, and we send, and that radio doesn't authenticate? If there's truly a command channel, it should only send from one channel over and over and over. So let's reset our control channel. And we're going to shut down all other radios, except the one we want to, except the one who's sending. And if what we're sending, oh, by the way, we're doing this live demo, because if we're not willing to go live, should we really be here? We have backups, but I think there should be some principles. All right. So we're totally, we're all the way off. We've only got, I've got my phone on. And I've got my Gotenna on. And I'm going to try and transmit to a Gotenna that's currently turned off. If Woody was right, and I was wrong. What we should see is on channel four. That's the one all the way on the right. We should see it talking and never hopping over to channel two. To finish off the conversation, what was supposed to happen is, hey, Woody, let's meet on channel two. And Woody was supposed to go, okay, Tim, I'm ready to receive a message. But he never did that. So if it doesn't have a command channel on channel four, it will bounce all over the screen. So, huh, huh, huh. God dang it. I'm sorry, Tim. I'm right. So now I might be right, but he can script. So he wins. But still. So as we started to look at this, we were like, dang it. This could be something to look at. Because remember, if I know where you start, what are you probably going to tell me when you start? Who you want to talk to and where we're going. Woohoo. So we start working. So let's go. Let's go ahead and tell us why the FCC is our good friend. We were able to find the actual board on the FCC. Why? Because they have to be there. Now as we look at this, remember I told, Tim told you we're not doing Bluetooth exploit. Not even going to attempt it. However, in the lower left-hand corner, that is the Wi-Fi antenna. I'm sorry, Bluetooth. We're not using Wi-Fi. Please, okay. Got it. Understood. Now, as we move up on that whole side, we look at the protocol and we realize that we move over all the way to the right. That is going to be the MERS antenna. And if we come just between everything else, that is the actual radio antenna for the Gotenna. Now, this is the antenna, which for MERS is fairly small, but it's one of those things they're working on. So, at this point, we're like, okay, we're looking at this board, we're able to find some information. So, what kind of modulation do you think we're going to use, Tim? So, this is going to be on the MERS channel. So, if you're familiar with push-to-talk radios and that whole plethora of frequencies that the FCC allocated for unlicensed people to use, everyone's using frequency modulations. So, pretty sure about that. It's frequency modulation. And also, on top of that, it's probably going to be within a 12.5 kilohertz channel, because if you're using a 12.5 kilohertz channel, each of the little push-to-talk radios, every time you go to the next channel, 12.5 kilohertz. So, I'll show you the modulation. We should probably go to a live demo at this point. So, while we talk about this a little bit, and we wait for this to pop up, which, oh, there we go. Weight's over. We looked at this, and we're like, okay, it's probably, well, Tim's like, hey, you know what, I bet they're using FM. We'd seen a few things that made us feel that way. And then we looked at the FCC stuff, and he said, hey, let's really sketch this out and see how it works. So, let's go ahead and send something and see what it looks like. Now, there we are. So, we have a good amount of data here. For those of you that are familiar with FM, or, you know, frequency modulation stuff, you realize it's a little different than on-off keying, and it can be a little more difficult to demodulate and see what's going on. So, we need to figure out where all the packets start. There's questions coming at the end, sir, but I appreciate your enthusiasm. That is a great question, and please remember at the end that we're willing to answer those. It's okay. Yep. One of the interesting things about this one is if you look at these bits that are being transmitted, they're not square. If you're looking at a wireless fan remote, they're going to be square because they're pure FM. They're hopping right between two frequencies. As soon as that bit changes, boom, just hops right over the other bit. The problem with that is it makes your frequency content really wide, and if you were here for Balint's excellent talk, when you start increasing your bit rate, you start increasing your bandwidth, and this is something that we're under a constraint from the FCC. So, what you do is instead of hopping instantaneously between frequencies, you slide between frequencies. That lowers your spectral content. As you can see in the bottom, that's only about nine kilohertz wide. Easily fits within 12 kilohertz. So as you look at this, and remember Tim's the person who taught me software-defined radios, so anything I say incorrectly falls on him, but Guzman modulation is what we're looking at, and we're, oh wait, is that, oh, I'm sorry, Gaussian. But the way this works is it helps us know that it's something else that we need. We need that because we need clock recovery. We need to be able to figure out the timing, the sequence of these bits, to be able to turn them into ones and zeros, and then from those ones and zeros, we need to be able to make real information. This part of the packet's called the preamble, and it's something that most radios like to do to start out. It's kind of like, ahem, it kind of gets everybody's attention, but it also lets the clock recovery algorithm sync to each bit. So what you're looking at here, let's see if this is going to break everything, stem plot. Alright, those are the actual samples, so if you had an array inside your programming language, each of those would be a sample. The problem is we've got to figure out which one is the one, which one's the zero. So this is where something that really handy came in from Andy Walls. Andy Walls, the stuff that he did, oh, by the way, this is all GNU radio based, which means everybody has a chance to play with this. You don't have to be high end or anything else. You don't have to be some guru. Everybody has an opportunity to play with every piece of this and it will be released so everyone will be able to do exactly what we do up here. Even noobs. Now, we got bad clock recovery. So Tim, tell us what that means. So if we have bad clock recovery, it means we're not going to know what bits are correct inside our packet. So you can see here we had 10101010 in the preamble. We shouldn't see that sloping. This was the stock clock recovery block in GNU radio. Don't make me say that again. So it didn't do a very good job. The one that Andy, no. The one that Andy Walls wrote was much better. You see how each of those points are pretty much perfectly on plus or minus one? That's great clock recovery. And for these longer packets, these variable length packets, we really needed to have something that would be good on that. So thank you to Andy Walls if you're hearing this. Now one of the other things that needed to be done was a way to actually look at this and spit it out into something that was readable where you could actually start and stop where you wanted to. So Tim came up with this really cool module for GNU radio called GR Revenge. Now let me give you a caveat. You're going to have to use that when we release this. You're going to have to add that to your repositories and everything from GitHub. When you look up GR Revenge, what's going to pop up is girlfriend revenge over and over because that's apparently the number one search for Google under GR. That is not what he wrote. It is GR Revenge without an E. So please find that on GitHub. It will be an issue. I promise you when you search it that's what's going to pop up. Now what we're able to do here is take the information, start with a radio, move it over, and as we set it up, because we know there's five channels in the MERS, right? We break it into five channels. Not we, him. Now we break it into that and we make virtual syncs. The virtual syncs give us the ability to now continue working our progresses that each channel does individually. So if we can look at all five channels individually, we can start figuring out how they work together. And because we've already started to figure out there's a command channel, the command channels tell me where the next place I need to look at anyway. And once that happens, I can ignore the other channels altogether. So just to run through the this really quickly. It looks really complicated until you start doing FMD modulation enough. And once you do it enough, this becomes like this design pattern that you do over and over and over again. On the far left, demodulate it from a radio signal into something that you can plot out on an oscilloscope. After that, you do a low pass filter on it to make sure there's less noise. Clock recovery. Turn it into a bit, one or zero. And then after that, look for the packet. So we had to figure out what the sync word is. This is a stream of information coming through. It's a bit of information. So as far as radios are concerned, they have to know when a packet begins. So what they do is they shift every bit they think they're receiving into a shift register. And they look to see when the shift register equals a magic value. In this case, it was 2DD4. And when we found that, we weren't actually sure if we found that correctly. So we googled it and we found the data sheet for the Silicon Labs radio, which turned out to be really good. Now one thing, as you look at this and realize, spitting the data out and being able to see it, one of the interesting things that really came out that Tim found, which should really go on his counter, but he didn't put it on here, is the fact that as he comes through and he's able to spit this data out and be able to see what's going on, he does a great job because initially we didn't know the full length. Remember, we've got a lot of information. We've got back and forth, back and forth and back and forth. Initially we didn't realize we actually have to be able to segregate the length of the packets for every step of that communication. So now, we start looking at this. And initially we're like, oh, 11, we're good to go. We know how long this packet is, right? Yeah, so we had some issues with that. That may not have been correct. So then we come down here like, oh, well, things are looking a little bit better. Now, I want to start figuring something out. I know that I have a protocol that uses encryption, but I also know that the same protocol can be used without using encryption. What's the first thing we do to start checking ourselves? We send information unencrypted and can we find it inside the packet? Oh, so there's 41, which would be a capital A, 62, which is actually a lower case b, and then 63, which is c. And we had just sent that exact same message. And right next to it in red it actually gave us the length of the message. So if we can transfer this over to the encrypted side, we can start developing how long the packets they're sending are. Now we start looking at everything else and we start realizing we can count how far it goes to start figuring out a little bit more information. Yep. Eat the elephant one bite at a time. Now, you see the one e up there? So as we looked at one e, what we realized when we upped the size of the packet by one it now became one f. And Tim informed me that means it went up by one size. So I was pretty happy. Because we had now done a, b, c, and d. I also watch Sesame Street a lot so I was like this is probably the system we should use because that's what I watch every day. Alright. So, um, I had to tell Woody though that the next thing after one f was not one g. It was actually 20. Alright. Um, alright. This is another one of Woody's wins. I'll have him run the slides for a little bit here. Um, so one of the things he called me up on the phone he was really saying, Tim, Tim, I just found the next channel they're transmitting on. It's this bit right here. It says two. And then the next channel it transmits on is two. And I'm like, they could have put those bits anywhere. This could have been anywhere inside the packet. And he was just so dang sort of, and I'm starting to try and learn from my mistakes of telling Woody he's wrong every time he's actually right. That's how I remember it going. Anyways, if you look at that one that's highlighted right there in green, the two tells you that the next packet is going to go on channel two. And on the second one down here the three says it's going to be on channel three. We turned out, turns out we didn't need to know that. Um, in a single receiver system that can only look at one channel at a time it's really important for it to tell the next radio hey, I'm going to be talking to you over here you need to go there. But we're looking at all five channels simultaneously. So although we found that, it's just a, you know, interesting thing to know. So yeah, I'll give Woody another point for that one. And so once we've, so we found the length of the packet, this is starting to tread into like layer two territory. So an Ethernet frame, a lot of times it has this is who it's going to, it's got a length, it's got a payload, and then the checksum. So we're starting to step into layer two territory. We found, pardon me, we found the synchronization, we found the length byte where it's located in the packet, and then we found out, just about enough to start trying to find checksums. This was really hard. And without a checksum, we're just going to be looking at a bunch of bits on the screen. And this is really hard to look at and figure out who's talking to who. I don't even know which radio it is, we have no checksum, if there's any noise, we're screwed. So that was kind of me. And I came in one day and I found Woody just sitting there with a screen with packets scrolling across them. And I'm like, oh hey, did you dremel the thing apart and solder down onto the debug wires and write some thing to analyze the packets? And he's like, no, I just plugged into the USB port and it showed up as TTYUSB. I mean, I don't even know why I wrote this whole radio thing. It's... Yeah, so he also introduced me to Dumb and Dumber. I'm a nerd, I don't get out, I don't watch movies a lot, so this movie's actually really funny. Yeah. So one point for Woody. We actually got full packets here coming through, which meant we didn't have to worry about the checksum yet. That was just something we pushed off into the back burner while we worked on it later. I'm gonna pass this off and let you talk. Okay. So what was interesting about that is Tim had been working this clock recovery piece and he's like, man, I think I really got this, but I can't confirm it. Well, now we were able to actually from the radio see what it said and then compare his radio to it. And he's pretty good at writing. Tim was right. We're gonna keep that low though because then he'll put it on his column. So as we start looking at this, we start figuring more things out and we keep getting this Gotenna ID when we start getting into the serial port. They call it a GID, which would basically be the equivalent of a unique identifier. Think of anything else. So as we start looking at unique identifiers, we keep having these numbers pop up. Now, as we look at these numbers, up here where it says TRX and you see ODB9, we kept seeing that and we're like, hey, every time I send to somebody, it says that first where it says, hey, you on this channel, I wanna talk to you. Okay. Well, that works. And we start realizing that we start seeing these packets. Oh, and now let me tell you, you know how you start figuring this out when you just have a whole bunch of numbers and letters on the screen? Anyone in here ever heard of a little program called Vim? Yeah, well, I don't know how to use it. So we use Get It. So, Get It, control F. So if you're reverse engineering something and you really wanna have a quick, easy way to do it, and I'm not insulting anyone on Vim because I can't spell Vim. What I use is Get It. I take Get It, I use control F, I highlight what I'm looking for because part of this talk is we wanna help you learn how to use the basic tools to be able to do this for the basic person to be able to do it and for the advanced person then be able to add it to their advanced systems. By doing that, we start searching and seeing where this pops up in all the packets and man, we keep seeing this 58570D fecdb, we keep seeing the hash 16 equals db9 and I keep looking at that and I'm like, damn, I think I know what that is. So we found some other stuff. There's cryptography, so it's public key cryptography public key cryptography as well. So at some point I'm gonna have to exchange my key So I found this in a message, public key and it told me what it is and then I control F for it and lo and behold it's sitting somewhere down here in a transmission message. So we know they're transmitting the Gotenna ID we know they're transmitting public keys and that actually helped us even understand the format of the protocol because this is 49 byte long public key, this is a 49 anyways if you turn 49 into hexadecimal it turns into 31. And so we're understanding even more of this. A pretty common paradigm for sending variable length packets is you say this is what it is, that's the first byte the next byte's the length, then you have your data and maybe a checksum. If you go back to this previous slide you see where it says 0109 and then the Gotenna ID 01 means Gotenna, there's 9 bytes to it and you keep going on to find the end of the packet there. So this helped us really understand having this debug port like the, what's it called? The clock that they found in the desert that helped them understand Greek. Thank you. So I'm also bad with history. So I wrote a script that would let you plug two Gotennas in to the same computer and it would interleave the serial port streams and what this meant is beforehand in the wireless domain I didn't know which radio was transmitting what I just got all these packets I didn't know who was talking but now I know this radio started the transmission and the next radio responded to it. That's Woody's 2. He's really excited about that. And this is kind of a little obtuse to look at. So I translated it into English. So it starts out, the first radio is transmitting it says, hey I'm looking to talk to a guy odb9, that's like the short name for the whole Gotenna ID. It lets them get away with not transmitting so much on the control channel. The next thing that happens, just like Woody and I sort of hypothesized in the beginning it meets over on the message channel this is me, what do you want to say? Well, here's the problem, if I say I'm looking to talk to W, how many people in this room have a name that starts with W? Alright, we got a couple people. Woody included. Everyone's got to meet, I actually have to disambiguate that and say, okay I actually wanted to talk to this guy, is that you? And also, I might need your public key. Further, the radio goes and responds here's your key and then you end up transmitting the data which, here's the data from this user and then finally an acknowledgement so this is a pretty stereotypical paradigm for transmitting stuff over a lossy medium where you're going to lose a packet somewhere or get a byte corrupted and it's like I need you to send this again. Fortunately we're working really close to each other we didn't have to worry about that. So now we start looking at this and we start going wow so we can see using the serial port when each person talks when they want to send something it's almost like a golden egg given by the person that designed the protocol that it goes 1, 0, hold on a second even I can figure this one out remember Sesame Street? 2, 3, 4, 5 4, 5, 6, 7 they start following it into a sequential order as they start working the packets out and that was pretty nice to be able to figure out what's going on. And as we move to the end of it we're actually able to see they start designing out the packets they're going to use how big they're going to be and what sequence they're going to fall into and yeah header versus payload so we're like wow we can work with that and then we come up to one of the funner nights of the entire project this is called the GID which we've already said is the Gotenna identifier who in this room has ever used a Gotenna? Anybody? Can anyone tell me what the default protocol is for using a Gotenna? B for your unique identifier it starts with phone ends with number that's right so so here's the thing but Tim and I aren't those guys like we don't use our phone numbers for stuff because we both have high levels of paranoia so we always use randomized so this actually was a setback for us at first so we start looking at this and we're like man we're never finding this 972210 in any of the data I don't know how they're sending it wait a minute maybe we look into the hex maybe it's some kind of MAC address formula because obviously whoever wrote this is going to make sure it's very secure and a very high end protocol nah that ain't working well let's look at it again maybe there's some kind of sequential ordering that goes back and forth and we start kind of pulling our hair out a little bit and we start going hey what is that anyone here ever use a thing called gnome calculator well hold on before we get to that so let's just talk about gnome calculator so gnome calculator which is in most Linux systems it allows you to take like hexadecimal and transfer it into other protocols but we figured there had to be some high end things being used so this is what we did we just jumped out of presentation mode and said let's just get it on and just throw things on the screen yep oh yeah so what Tim was just saying because again remember he's the guy that helps teach me so any mistakes I make are his so we started noticing you know that whole 9597 sequence that's a fairly high number but then we decided you know what we're going to do we're going to use one of the cell phone numbers just like the default protocol is in Gotenna and when we did that we were like wow that's a really little number that's a little odd gnome calculator again please always use basic tools first because then you can talk to me and I can understand it so we throw the information in there zero one zero zero zero one c three eight nine wait a minute own shites a biscuit that's a phone number your to and from blocks we know have been identified and what we realize is they broadcast if you use your phone number for Gotenna your phone number so if any of you do open source information or technologies we can talk on the side but I'm pretty good with phone numbers and Facebook to be able to figure out who you are but that's another conversation how dangerous could it be oh well and then we're sitting there and I was like man I'm bored and Tim was working on the presentation and he's an engineer so he like works on things like really intensely and I get bored really easy and I got tired of shaking my keys because they weren't shiny enough so I said huh I took a couple phones and I just started saying well if I now there is a fix for this if you use the Gotenna GID random identifier you know what's going to happen you get a random identifier and you don't have to compromise your phone so Gotenna has put this in there I want to add this is not a slam on Gotenna this whole talk I still like Gotenna I will use Gotenna and I think for what it's designed to do I think it's great and I want to make sure I add that in there and I was like man hey Tim do you think I could make two Gotenna IDs that are exactly the same if they're random at some point they'll cross contaminate and they'd have to be identical and he's like what are you stuff doesn't happen like that so I said Tim's poking me again remember he beats me all the time so what I did was I took two phones and at the exact same time I pressed new random identifier on both of them and we realized this is a time sequence now and then I was like well what if we go back to what nineteen I don't know maybe 1970 a certain month a certain day a certain time and see what happens couldn't do it we could go back to a certain date and that's the furthest it led to go back so we could go back to a certain date and try to set it at the exact same time but it actually goes all the way to the milliseconds so we couldn't get the same one I was a little bummed but that's okay what I realized is the year doesn't matter that's what the nine does it stops you from having the year important but the month the day the time all the way down to the millisecond that's how you set these identifiers so you can from someone's identifier at least know some rough information so even if I don't have your phone number I can still pull some rough information out of this and I can still do link analysis Tim those are your words not mine so if you've ever seen a movie where there's like some guy sitting up with like this wall with all this stuff and little red lines going there it's called a crazy wall and we made our own crazy wall sorry if you just give me a second to get it open pulling open my favorite tool here I'm going to actually need to move this to my monitor so I can see what I'm doing so what we ended up doing is one of our primary tools like we mentioned earlier sorry about the disjointedness of this presentation that's kind of the way we work you don't find things in a linear manner that would be really nice but we didn't so this is our crazy wall and I'll just show you a couple of things this is a lot to process and I don't want to spend a lot of time here but what we did first is we started by organizing our packets by the way they happen so each one of these little blocks of text is a communication and what we started doing is we just started to make sure that it made sense to us so remember we had that 0db9 this is what Woody was talking about we control F for it and we found it in another part of the packet and so we used that to create divisions within the packet structure and that helped us break the fields out outside the packet moving on down so these are communications so again 10 was the hello I'd like to talk to you 62 was I'm there 23 was this is the person I actually wanted to talk to remember this was the gif this is the ID coming along here followed by yup that's me here's the packet and I got it thank you very much when you have it in this structure you can see some interesting things but not everything one of the neat ones if I can find it yeah here it is this was a long message that got sent and so if you have a very long message it gives you a high probability of a bit error which means your packet is going to get dropped so you chop your messages up to smaller packets so that you have a better chance of getting through so this is part one and this was part two of the passage but what really helped was when we looked at it from a different perspective let's gather all the transmit announcements on the control channel let's gather all those together and look at them again and that helped us see more things down here in the packet haha alright so once we started finding that type length data paradigm again we saw FBOF oh hey look there's the Gotenna ID that we found we control left and that popped out so within the message FB that means this is the Gotenna ID there's lots of little other things that we didn't particularly understand here's your message 416263 that's ABC and then at the beginning this one here the type 3 wraps the entirety of the packet this is my crazy wall you gotta be careful with crazy walls enough said so to break the packet apart we showed you like all these bytes and your eyes are probably blurry so were ours so to make it simple you've got a packet header at the start of every packet optionally there's a frame that shows up at the end of the packet which is again the type, length and then some checksum at the end of it and the message has the type, length, whatever so if I type a message to you there's several frames that build together to form some sort of message which brings us to this part here so as we look at this what we would like to see versus what we did see versus how things work your broadcast messages are meant for everyone let's say there's an emergency you want someone to know where you are you just send it out, it's not encrypted, everyone can see it there's a protocol again, I'm not slamming Goten I think it's a great thing and I don't discourage anyone from using them I just want you to understand the difference between anonymity and privacy and security they're different elements now, in the broadcast you can see everything from who's sending it to it goes out to everyone you can see the initials of who's sending the message you can see GPS coordinates messages, all that but there's actually a little bit more I can see too not just the sender but I can also see who it's going to so early in the conversation I can see who it's going to and who it's from how does this bother us? well, because maybe some of that could be protected a little bit better you don't have to necessarily give away both ends of the conversation I want you to think a tour do we want everyone to know where we're starting and where we're going? could be dangerous so as we move forward and we start looking at this we start thinking what would our goals be what would we like to see we'd like to see a little less information come out of that and with that initially the name of the program was called GoDump kind of like arrow dump but then we started realizing wow, this is a little bit overseeing it sees everything going on who's sending something who's receiving something what channel they're going to go to next it lets us know how big the packet is so if I know how much information you sent where it started from and where it's going to would that be of any value to anybody? if it is, it is if it isn't, it isn't I'm going to leave it at that so now what we're going to show you is a little bit about how some of the SCAPI plays into this so you can see what does it look like so what we're going to release we want to kind of show you a little bit about what it looks like and how we put this into place going from what we're initially using to SCAPI so I'm sure all of you guys in here are familiar with SCAPI but to explain it a little bit better just in case anyone doesn't know it's a python framework for understanding packets so you give it you give it a block of data so I've got this here I called this variable m and you feed that into an object and SCAPI will pull apart the fields as you've told it and it will let you access them in a really easy programmatic way so one of the things you can do here is packet.show and so what you're looking at it was type 45 packet which if you guys remember here's the data I'm sending to you so it automatically understands that it's a message fragment it pulled apart the the payload down here and it separated that out for us however the payload remember it's a multiple step thing and so you might need more sequences or more fragments to make the complete payload I know for a fact that this one was short so I'm going to pull it out really quickly I'm going to do packet.fragmenter you know what I can't even remember my own code so we're not going to do this we're just going to show you Sauron whatever so we're moving to Sauron alright so you're going to see something similar to this in because what happened was in the beautiful mind he put all this together and he actually has it spit it out so you have to do zero work so do you see where it says press enter to quit that's because right now we're live and we're going to go ahead and just go live with this okay because again you probably want to see it what's that? alright let's just go live then we don't have to remember the code so oh wait a minute what is that so Tim just sent a broadcast message over Gotenna so this would go out to anyone so if you had a Gotenna you'd be able to read and decrypt this too but the simple fact is we now have a listener a packet sniffer that can listen to all of this and make it happen now on top of that can't see it? I'm going to send another broadcast message they can't see it there's nothing up there yeah I know okay Uncheit's a biscuit okay alright sorry I can't good enough spelling errors are okay yeah you're not in any of it oh come on Gotenna you're not there first the demo guy's right okay so why he's putting that back up does anyone in here have a Gotenna if you do send a message go ahead what's the worst that happens let's go live everyone with a Gotenna launch as fast as you can let's go Tim does not want this to happen but I do let's see it oh if you're using your phone number don't do it unless you really want some things to happen so Tim Tim you're not paired with anything no I sent a message out I told you one more time sorry sometimes things crash kids these days so hold on let me get my Gotenna up alright so here's what we're going to do we're going to go ahead and look at a couple things we're going to launch some Gotennas we're going to make some things talk and go live with it okay there we go now so again if you have a Gotenna please feel free to send whatever messages you want and we'll just see what happens randomly oh you're paired that one right there okay we'll send it alright so now he's going to send a message Jared is yours up? alright so we got Jay Boone in the room which by the way if any of you do software defined radio like just amazing work he's just incredible so oh my goodness scientific progress going maybe too many antennas open one more shot and then we're going to move on yeah say again what radio are you using? that one one more shot no it's that's not it is anyone jamming any of the MERS channels? alright one more shot and then we're going to move on with the talk alright so he got the message use the old card this one's not working use the old card we're getting the packets it's just not working alright scientific progress we got more time go again we don't no go try it again okay so what winds up happening is wish we had HDMI go ahead push it here we go so we're going to run off the other radio so when this is working which typically it was up until earlier that's why if anyone is jamming MERS please don't so what'll happen is it'll actually spit out your message so let me tell you what you're going to be able to see who sent the message who's the message going to and how large is the message so oh wait a minute oh shoot what is can you go ahead and pull that up a little bit it pulled up there we go so now we're up again so wait what is 757512 oh a phone number so we're using a burner phone up here and the burner phone's phone number is although it's not quad zeros at the end which we've modified that out you get to see where it came from who it's going to and what it means and you see where it says DEFCON that's the individual name of the individual who has listed that as their name so if you said Jeff Wilson it would say JW what we did is made a very long name that the first initial of each name spelled out DEFCON but that's a live demo right there you're actually able to see it so so sorry that didn't quite work out the way but it's a live environment so the metadata circle this is like a lame thing that I came up with to try and explain metadata so there's like five different things that are being sent out whenever you transmit packets who, when, where, how much and then the actual content with cryptography you can kind of get rid of the content you can hide that and make it so that people can't see what you're saying the who that's a little tricky to hide because at some point my Gotenna has to say to someone else's Gotenna I'm talking to you the cryptographic protocols can compensate for that but it makes it really tough to program and it makes what's supposed to be simple device really complicated but that being said who it's going to we understand why they have that who it's coming from we definitely think that should be encrypted as far as when, where, and how much you're not going to get away from transmitting energy you have to use energy to send a signal there's no getting out of it and especially since we're constrained in frequency we've only got a particular yeah we got it we've only got a particular bandwidth we have to put all of our energy in that tiny narrow channel so we can get a long range and that just shows up like a thumb tack on the waterfall so everyone's going to know when you transmitted they're going to know where you transmitted because they were with you when they caught that waveform and they're also going to know how much got transmitted just by the length so it's understandable that you can't get away from that you can't get away from those things there also it's on a mobile device I'm not particularly sure that mobile devices are the most secure things ever I'm not convinced but that's just me so we did contact Gotenna and we said hey look we'd like to talk to you guys about this we think this was maybe perhaps a mistake in your design and they did come back very they were very responsive to us they were very welcoming of our analysis and our report and they were thankful for it and they said right now what we're promising our users is encryption anonymity so they said it's kind of like an envelope you can look at the inside of the envelope or you can look at the outside of the envelope and get to and from but the inside is encrypted we didn't really study their cryptography protocol very much because we're not cryptographers but as far as we can tell they are encrypting it just to wrap up so as we wrap this up we're going to go ahead and just talk a little bit more about this and we're only going to have a couple questions haha nice I love seeing the Gotenna traffic that's kicking through here right now so what we want to be able to tell people is hey as you go through and do this there's a couple key features that are going to be safe that we want you to think about do not use your phone number why? well that is just going to be a bad day there we go now we got it kicking up so see to and from a couple of things that I want you to realize Gotenna I think is still a great product if I send an encrypted message to somebody a couple of things that are going to wind up happening is that you're going to have issues those issues are if you use your phone number I'm going to see your phone number if you send hold on pull down do you see what that's do you see right there where it says location what's that that just came across somebody just broadcast their actual Latin line we can see that if they're using broadcast even if they're using encrypted we can see who it came from who it's going to and the size of the packet anyone in here that does targeting I think you understand what that means they were very receptive they gave us a code that we can use if anyone wants to buy Gotennas they gave us a discount for Defcon we do not work for Gotenna we are not salesmen for anything else but part of the responsible disclosure was to tell them so they said hey thank you if anyone wants 15% off use this code and you can buy their product I'm a big fan of it but as you can see and we did go live we had some recorded video but we figured live was better because you guys are a pretty impressive crew any time if you're a person that designs a protocol and you're using command channels be careful with exposing where you're going to be next who you're talking to who you are and where it's going to go if you're a protestor if you're a government person if you're anyone that uses this realize if I'm a celebrity and I walk down the street with a protective detail I have security if I'm that same celebrity and I disguise myself and I sit on the corner of the street like a homeless person that no one looks at I now have anonymity but I no longer have security just like the celebrity surrounded by a bodyguard detail doesn't have anonymity the two are not always the same security is not anonymity and anonymity is not security but each can be used to protect in certain and individual ways yeah further work so we have a lot of work that's still not done we haven't found the checksum yet it's kind of embarrassing we don't know how the cryptography works if you're a cryptographer we're going to be putting this online in a couple days so we'd love your input we haven't done anything with group chat or emergency broadcasts any of these millions of unknown fields so we've got a lot of work to do still so I guess we've got about five minutes left some things that we wanted to talk about is just what worked in this project if you're new to the security research field you're coming into this there's some basic skills that are helpful the first is know your tools cut, grep, sort unique, gnome calculator, gedit we can have the fancy tools with the hundred dollar equipment but if you can't use these basic tools what uses your equipment just like Zero was saying earlier on also know your formats integers, chars, shorts, floats hexadecimal, binary, strings know how to convert between the other move it around we're finishing up, we're nearly done automation you can do this with some of the tools D-Spectrum but it's not going to get you too far you need automation so again, in conclusion we appreciate all your time if you want to communicate no human patterns try before you pry sometimes you might get that serial port before you have to solder into something change one thing at a time and if nothing else if you're a new person out there who's never had a chance to speak or be in front of a crowd submit to the Wireless Village because these guys are amazing they'll put you out there and they'll let you do it and they're just good people thank you