Welcome to DEF CON. First speaker is up. Let's give him a big hand. Thank all of you for being here. Really appreciate it. So, the first thing we want to talk about is this whole talk has really been pushed because of how much the technology out there is moving to mesh technology. Everything's meshed. From cellular, we have mesh-tastic, LoRa, all these different creations. But one of the creations that has been around for quite a while that we're going to talk about is Gotenna. And we're going to talk about all three stages that we've seen it go through. My name's Woody. This is Erwin. Yeah, I'm Erwin Korenczyk. I go by Dollar Hyde. And we also want to make sure that we gave credit to Clayton Smith, who really did a ton of work on the second generation and made this talk possible. So, thank you very much for that. Awesome. Yeah, thank you, Clayton. So, mobile mesh networks, the way that they typically work is one device will talk to another. You're able to go through and pivot. And that way you can get extended range. You can have multiple people communicate at the same time. There's a lot of things that you can do. Now, one of the things with a traditional network is the way that your data and your controls are handled versus the way that Gotenna mesh does it. So, the Gotenna's capability of meshing is actually really efficient. And that's one of the things that makes it fairly unique is because they've combined that and made it pretty controllable. So, some of you seven years ago may have seen the talk that I did in the RF Hacker Sanctuary. It was on the Gotenna version one. This one right here. So, what you're seeing on the screen right now is as he goes through and does the Gotenna or his script, this was our original exploit. And what we figured out was the Gotenna is designed over Bluetooth to communicate with a phone, at least the gen one and two were. Once that happens, then you can send a message that can be either open in a broadcast or person to person or in a group, but you can encrypt it. And that's what you're seeing here on the screen. But we were able to see seven years ago that it was broadcasting some things plain text. And when it broadcasted things plain text, the things that you could see even in encrypted mode were the unique identifier. Which for the unique identifier for the gen one and two by default, can anyone tell me what it was? Your cell phone number. So, this script is demonstrating how we could run against a Gotenna version one and pull your phone number out of the air. Even if you were using encrypted mode. Now, they fixed that since, well, they've evolved since then. Um, and the new management has really made an effort to try to fix some of the issues that have happened in the past. But this on the screen is actually what it looks like when we're able to come in here and pull this data. Yeah, and you can see the phone number, call sign, and the message in unencrypted mode. In encrypted mode, payload is not visible. But the phone number still is. So this was gen one. And if you want to see a live demo of this, come to RF Hackers. We're showing just the video here. So, gen one, we see how it communicates. Now, gen two, they changed some things. Instead of using two FSK, they moved to four FSK. But by default, there were still a couple things that were the same that we were able to start exploiting. Uh, Clayton specifically found some really great things that were vulnerable here. A lot of them were similar to version one, but you needed a four FSK demodulator to do it. But you could still find the phone number. You could still find some of those unique identifiers. And as we're gonna discuss, those unique identifiers, even if they're not your phone number, can be a bad day. So this is an example of exactly what we could pull while you think you're doing encrypted messages. And we start getting your phone number, we can start seeing some of your messages depending on how you're using it. And we're gonna talk how that can be effective for other things as well. Now, the current version of Gotenna, the Gotenna Pro, we started working with, one of the things that I do is I'm staffed in the RF Hacker Sanctuary, the RF village, so please come and try some of our challenges out later. That's actually how a lot of these things get discovered is people trying them in challenges. Some things that were fixed. You did not have to connect via Bluetooth because we all know that Bluetooth by itself can be a unique identifier that can be used to find somebody or come after them. They improved it so you could use either Bluetooth or you could actually hardline to your phone with the device. And then the only thing that was communicating was either at, you know, the 140 to 170 megahertz band or 445 to 480. They also improved the channels you could use, you had some bandwidth things you could control. So, on initial viewing of this, it looked like it was a much more secure device. But this is what we're going to be talking about. This is basically the Gen 3. Why is it important for us to worry about what we give out? Well, we have some representatives from Wiggle here and I'm sure that they can tell you how important it is to protect your MAC addresses. In fact, the industry has already started making sure that unique identifiers start rolling and that it's much more difficult to track them because you can be tracked over space and time, geographical location, and it can be used to fingerprint. So, that's why we're worried about this. It also gives out unique identifiers about you. What if I couldn't just tell that you were using that MAC book, but I could tell you whether Tim was using it or whether Jeff was using it, right? That's even more refined and that's what we're going to start getting into in here and that is why to us it was so important. Both of us, our primary jobs, when we're not doing this stuff for fun, is to actually help people protect their RF signature and to help people have good cyber security in vehicles, in equipment that they use, and global travels. So, some of the problems that we started wondering about, is there any chance that we can find some of the same vulnerabilities in a Gen 3 that we find in a Gen 1? Yeah, so basically we're looking for those GIDs for the call signs. We're looking, are they present? Have they fixed it? Yeah, because it's been seven years, we wanted to see whether or not all those things had been fixed or not. And some things had and some things we found were still somewhat vulnerable. But, having that base is what we moved from to be able to do all the rest of this. So, having a good foothold and then from there, pushing out and finding new things. So, who are we? Erwin? Yeah, so I'm Erwin. I'm a security researcher. I'm experienced in hardware and software reverse engineering as well as RF exploitation. My mission is essentially what's shown on the screen as well as the overall mission to protect this nation and citizens by identifying and mitigating threats before those threats are even known to these people. So, this is one example of that mission to protect the people that serve us. My name's Woody. I'm staff for the RF Hacker Sanctuary or the RF Village. I was one of the co-authors of the original Gotenna attack, Raptor Captor, some other vehicle exploits and some things like that. I spent 20 years in special operations before I started playing in this world. And the reason that this is so important to both of us is we work with law enforcement. We work with government. We work with corporations. And we educate them on how to control and understand all the different aspects, not just the physical but also the digital and even the light aspects of what happens in your life and why it's important. So, that's what got us to this point. So, just having encryption is not enough. Configurations matter. Imagine having an amazing router with WPA3, an incredible password, and everything's good to go, but you just leave it as an open network. You still have encryption, but does it matter? Not at that point. Configurations, and that's what we're gonna talk about. Yeah, so this is our testing setup. So, we were testing in an anechoic chamber at the university where I'm pursuing my PhD in electrical and computer engineering. We used a representative sample of both iPhones and Androids connected with Gotenna Pros. And then we used just open source hardware and software. So, HackRF1 connected with open source software running on an Ubuntu laptop. So, very simple. So, the first step of any sort of RF analysis starts by identifying the frequency and capturing the signal. This can be done either by analyzing FCC documentation, by scanning the whole spectrum. In this case, it was configurable. Like, we figured out where it was configurable, so we set those frequencies and then we appropriately captured it in GQRX as seen on the waterfall on the right. And this doesn't take expensive equipment. $30 TV dongle, some $100 radios, you can really start moving along very quickly. 100%. So then, we started analyzing the signal and figured out that Gotenna Pro was using 4FSK. That is four-level frequency shift keying. That's where the carrier shifted between four discrete frequencies. As we can see on the screen, it goes between negative 1.5 and positive 1.5. We implemented a custom GNU radio flow graph that can decode this exact type of 4FSK that Gotenna was using. Once we were confident that our demodulation was successful, we started analyzing raw bytes and their ASCII representation. In this case, in Gen 1 and Gen 2, we were able to see the GID, the call sign, and the payload all unencrypted. So this was sort of, like we're seeing here, it is encrypted somehow because we cannot see any of the data. It's more of an obfuscation, really. So then, we sent two identical messages and we compared them. So we see that in yellow color, they're mostly the same. They only differ in the red color. And red only is the one that changes from if the same packet is being sent. So this is very commonly some form of static encryption in use. This observation is actually data whitening, not to be confused with white shadowing. So... data whitening is a technique that ensures that there are no long sequences of zeros that can cause drops in communication. It uses XOR with a static set of bytes. Those bytes are typically generated by something called linear feedback shift register, and we're gonna talk about it later. It's important to note that while this is similar to XOR encryption, it is not cryptographically secure, as we will demonstrate in the next few slides. So our de-whitening process is shown in this algorithm. We transmit a handful of A's followed by a handful of B's. So for those who are not familiar with ASCII representation in hex, capital A is 41, so you'll see that a lot throughout our presentation, and B will be 42. So we transmit a handful of number of A's, we extract a byte from that transmission, and we XOR it with 0x41, which is capital A, and then that will give us our potential key stream. We then use that key stream against the second message, which is with B's, and then we repeat that for the length of the entire message. And then we only keep the bytes that produce the accurate result, i.e. we receive the B's. At that point, we found our offset at 42. This means that Gotenna is offsetting this, like the entire, probably the header, because we've seen in the beginning that the header and data are combined. So in this case, the payload was started off at 42, and we found all of the green bytes in the first green line, and when we apply that against the message, we get 42's, and we translate that to ASCII, those are B's. So we have a partial whitening key. Then we can use this against a different message. So here, we have the payload between 0 and 71. We can de-whiten everything after 42, so all part in orange, we de-whiten, and then we can receive that, okay, we have seen 10 A's. So we have 10 41's, and also the 0 A that's also represented as the lengths. However, Gotenna is using a custom header, so we do not know what the 0 to 41 is. And the only way to find a whitening key for something is you have to know what's there. So we keep looking. So we're investigating special conditions, so we reiterate that we cannot, we don't know what's below 42. So we observe a special condition when we said 100 A's. What happens there is that the message splits. As you can see here, our capture received two different messages. So then, let's investigate that. So we run the same exact script that was shown in that algorithm against the second message, and we see a potential XOR starting at byte 2 instead of 42. So this means this is a fragment split, the message split, and the payload started at offset 42. So we now have extra 40 bytes shown in green, we combine them with the already existing key that we found earlier between 42 and 96. And then that gives us a key between 2 and 96. Now we use that, we use that key, so we take our packet, we apply the key between 2 and 96, and now we're seeing the payload, but we're not only seeing the payload, we're also seeing the call sign. So my call sign is $hide, and we can see that in blue. That is very critical. So another part that Gotenna was using was Gotenna identifier, or GID. So in this case, we could not easily identify there. It was not, like, easily seen. So, but we do have a known value, and this is very important against known values. If we have a known value, i.e. in the app, it told us the very bottom part at 1029, that's our GID. So we're looking for that. So eventually, we discover it in the green, in the orange part in the packet. It is encoded in a very special way. So first, the 7 bits that are containing the actual number, and then the most significant bit indicates where another byte is following. So that's how they avoid the use of essentially, for example, as you can see, the 0A in both the payload and the call sign, that's the length. That's how they can sort of avoid, like, be more efficient of the use of the data stream within the radio. So that's simple enough. We can write this Python decode script to decode the GID, and then we can take the orange bytes at the top and get the orange bytes at the bottom. Relatively simple. So now, our next part was like, OK, let's discover the byte 0. So FCC comes to the rescue. They have a lot of useful information. I highly recommend FCC documentation. So that says, the FCC essentially says that GoTenna is using SI4460 radio, and that radio, based on its documentation, adds length as byte 0. So that means that we can find our node. We take our packet, we take the length, we get that 69. So then we have to subtract 1, because that is the length byte. So we get 68. We convert decimal 68 to hex, and we get 44. And then the ciphertext was 47. We extorted 2, and we get 3. So that is our whitening byte at byte 0. For byte 1, we did a lot of testing, and eventually we figured out it was 96. So we'll kind of skip all the detail there, because it's a short presentation. So in our current de-whitening status, we have pretty much everything from byte 0 to 96. We do not, unfortunately, know what last 10 are. So, of course, we do more investigation. We find that the two bytes immediately following the message are a result of CRC16 CCITT variant. CRC16 stands for Cyclered Redundancy Check. It's used as error correcting code that is capable of determining whether or not the payload has been corrupted in the transmission. So that's a very quick way to determine that. So we also do more analysis. We figure out that this CRC is initialized with 0s, and it uses 1021 as the polynomial. So then we take the entire packet up to those 10 bytes, and we compute the CRC16. So here on this slide, you can see the Python script that we implemented. So it's using 0s and 1021 as the polynomial. So then we run it through that function, we put the packet that we saw earlier through that function, and then we get the CRC16 value is DCD2. And then our whitened message, the ciphertext, was BCAA. So then we take, we XOR the two, and we get that the key at that offset is 6078. Okay, pretty great. So then the last 8 bytes are a result of Reed-Solomon error correcting scheme. So Gotenna is using both CRC and Reed-Solomon for error detection and correction. So a very powerful part about Reed-Solomon is that it can not only detect the errors, it can also correct them. So they are using 8 error correction symbols and first consecutive root set to 1. So we're using Reed-Solomon library and these four lines to essentially compute the Reed-Solomon against the packet we found earlier. Once we do that, we get the line in the first bullet. So those are those 8 bytes. We get the whitened message, the ciphertext, we XOR the two, and we have the entire key. We have now the entire sequence from zero to the end. So that's pretty awesome, right? So now a big part here that we want to note is that this entire sequence has been generated by something called linear feedback shift register or LFSR polynomial. A very powerful thing about this algorithm called Berlikamp-Massey. So we can use this sequence within Berlikamp-Massey to retrieve this polynomial. The polynomial is shown at the bottom. But there is more to here. So in case that we could not determine something like byte 1 or any other part, like we could have a very partial sequence, we could use Berlikamp-Massey and mathematical techniques to determine this polynomial and the associated sequence even if we don't know things. So we could technically wait enough time and enough brute force using Berlikamp-Massey, only knowing the payload, figure out the header, even if they were not being split. So math is pretty awesome thing. So we can do that. So yeah, so this is the polynomial. So they're using x to the 23. So you know that, you know, and this is not, this is just meant to ensure that the receiver and the transmitter do not lose connection. So this is not meant as encryption. Yeah, this is really acting almost like a form of two party authentication to make sure yes, they received the message. Yes, I've received the message and using that as a way to almost have a packet count. So in our current decoding process, so this is done in green radio and we're doing this essentially live. And this is just a screen capture of my console. So we get the raw bytes and we automatically extract the GID. We apply the function. We can translate that to ASCII. We get the call sign, the payload, including multi-fragmented messages. So even in multi-fragmented we can still extract the payload. So what Gotenna chose to encrypt. So we played a bit with encryption and we see that it's only the payload. So what does it mean essentially once we can read all of the other signs? Because in encrypted, unencrypted mode, all of these are visible. So everything you see in red here means that at this point where we currently are, we are able to see the message length. That can be pretty valuable. That can definitely add up to things in the future, especially with long term collection techniques. The GID, the GID is going to be your unique identifier, which used to be your cell phone number and you had to pick for it to be a randomized one, which we found out was just actually epoch. But you now can still, with this, they don't do the phone number. So that's a much better improvement there. But that GID tells me that is that exact same device. And you can change it, but understand that that GID is a unique identifier like a MAC address that follows you. Now the call sign's a little bit different. This goes back to my former community. When you have call signs involved that can be read in the clear, now I possibly know how many people are in an organization because typically they have a numerical sequence after it and I can start telling more about that individual organization. So by having the equipment and the call sign, I can now start linking equipment to not only organizations, but individuals to who was using the equipment at what time. Payload length, again, much like message length. That gives us really valuable things to know what is it that we need to focus on and what are they saying. Is it short messages? Long messages? Are they using brevity? And the CRC and the Reed-Solomon, we're gonna look and see that those become fairly valuable in the end. But these are the reasons this really concerned me. 100%. So now in this case, we've shown what we discovered so far. So we go more in our analysis, right? So that's what happens, right? So we analyze the remaining fields. We see the highlighted in blue. We decode that and figure out that's the time stamp. So you see here January 12th, that's we did the very initial capture. So that's pretty awesome. So, um, we also discovered these tags. So, ha ha. Ha ha. There we go. And we knew we were on our way to something great at this point. Yeah. So an additional thing with this presentation that we want to do is we want to teach you how we do reverse engineering. So we discovered that this protocol is using tags. So they're using tag 57, tag 24, and others. So this is important to note. So we'll use this in the rest of the presentation, but it's important to note how we discovered that, okay, so 57 or 39 hex, after that, there is the, um, UTC time stamp. So then we use this in tag-based identification in our script. So, uh, we take the tag is equal to 57 and then we appropriately, uh, apply, uh, the Python code to decode that. So that's what we're doing. So at this point we're a bit stuck, right? So we could keep going the same things over and over again and like eventually we'll, we'll get everything. Maybe we won't, but we're, you know, what happened in the B1 here? So this is where I kind of fell back to the version 1 when I worked with Tim Kerster on that. And he and I had kind of a light bulb moment. He's an engineer, I'm a knuckle dragger. So we looked at it two totally different ways. So he went home that night to start working on an automatic, um, demodulator for the FSK and I started seeing what I could find so we could try to compare knowledge and he comes back the next day and goes, Woody, I really hope that, you know, this demodulator that I made is working. I wish there was some way that I could check against what the actual code that's coming out is to make sure that everything's correct. And I said, well, hey, we can just compare it to the stuff that I've been looking at through the UART and then we'll just know, right? At which point he said, what do you mean you have UART? I just assumed he'd check. Yeah, so we don't have UART in this case with GoTenna Pro, but we have something better. So Clayton just casually mentions, um, why don't you read from the app? It was useful when I did Mesh. Um, wait, what? We had code the entire time? Like, what? I go online and like, I'm supposedly this like reverse engineer, right? And like, I didn't look at the app. What? So everything in the app is plain text. Yeah. Look at this. So we go in, decompile it. Boom. We can see the firmware in there. We can see the source code. Like I was looking for this, but like, it's right there. Wow. Yeah. So companies really don't think it's like hackers. So like hackers, like, like the guys in these pictures, they can find full source code and firmware available completely unencrypted and unobfuscated. It exists. Yeah. And this is where we said, oh, I think things are going to be a little bit better now because in version one, we just had to kind of bare knuckle through it and hope we were close. We just knew that our demodulation was working. We didn't have tags yet, which I think we're going to get to. Yeah. So we go back and we'll look through a source code. We find these tags. Remember that we were talking about reverse engineering tags. We see 57 right here. So we were spot on. Our reverse engineering, like methodology was very spot on. So that's what we want to show you. We find more tags, right? PB broadcast, we see key data coordinates. So, you know, we have a bunch of tags, right? So you're assuming that we use this Java source code, essentially slowly update our script. This may take like a couple of months and eventually we'll have a better product. Well, not quite. Ain't nobody got time for that. So we find an interesting observation. There's a file descriptor and we find something called Proto 3. Some of you are familiar with that already. But we weren't, right? So we look this up and it's a protocol buffer. It's used as an open source library developed by Google to help companies and other people to develop custom protocols. And they're supported by all kinds of languages. Python, Java, C. All kinds of things. Right? So we go online and we kind of take the string, the binary string, and we kind of figure out, okay, these may be the fields, right? The sender, the call sign. And then let's try it. So we put in the hex at the bottom. And then, wow, the whole thing is there. But literally, you just put it in the program on one side, push a button, and it gives you everything on the other. It's automatic. Like, this did not happen in V1 or Mesh. This is way easier. So, yeah. So we then go in and then let's do this for real. So we go through all of the decompiled stuff. We take the file extractors. We put in our own custom file called Proto extraction. And that will generate a binary file. And then we use PBTK. This is an open source tool. We use this against this binary file. And that gives us all of these things at the bottom. Like, all the proto files. So the base header essentially sets up the message. This imports the header protobuf. The header protobuf was what we were doing in reverse engineering in Blackbox. What's important here is this data type, right? This enum would be very difficult to reverse engineer. Like, we would have to take so many samples and then hope that we can maybe figure out the text is 3 and then ping is 5. That would be very difficult. So let's go back full circle. What were those tags, right? So if we compile this protobuf in Java, because that's what Gotenna is using, we can see these cases. So these cases are used as different parts of the protocol to essentially define different things. So we were spot on, right? These tags were cases. That's pretty awesome. And we got 57 and the rest of them. And you also noticed that you could see things like when they requested, I don't know, keys. You could see the code of how to request a key. 100%. So yeah, so a cool part about protobuf is they can be compiled for Python. What else is using Python? I believe there's a little thing called GNU radio. Yeah, that might be cool. It's so easy, even I can do it. Yeah. So we go in and we import a base message data type and we make a statement to associate everything and perfect decode! Victory! But wait, we haven't found a single vulnerability yet. We just decoded the thing. There's 30 more slides of actual vulnerabilities. So, you know, stay seated. So with this decode, now that we can read things, we get the we can do frequency decoding, shared location, we can do emergency messages, all kinds of things. The only thing where we received a challenge was in, um, coordinate decoding. So in the app, we can make, for example, like around this island, we can make coordinates and then when we're capturing it, we see binary data represented as base64 and JSON and in this case, there, there isn't much, right? So like, like we can't see here. So we go back to proto, they're defined as bytes, so that means that decoding on our side has not been added. So that's very simple. We just use decode as little nd and double double and then boom, we get the coordinates. So that's fixed. So now we found our true first vulnerability, right? It's like, like we encrypt the message and we're just kind of looking at things. So, so what can you do when somebody can capture yes or no and tell the differences? When you start dealing with organizations that are using brevity for communication, simple things like the length of a message become very easy, even without going into advanced steps to be able to tell what kind of communication may be happening. Are they only sending coordinates? Are they sending commands? Are they just sending comms checks? So this starts becoming really important, being able to understand these message lengths. Yeah, so it's crucial. So then let's go look at how they're doing encryption. So one of, one form of encryption is encrypting the broadcast. So this is the process how it works in the app. So we generate the new key, we put in the name, it can be either broadcast or QR code, and we're going to get to that, right? That's not important, but what we go in is the validation thing. It's kind of interesting, right? We do this a bunch of times, like they're kind of short. So, and it's all lowercase or numbers, and that's it. But there is a space, so I guess we have nine, but the space is consistent, so nope, really just eight. So you have lowercase numbers, or I'm sorry, lowercase letters and numbers, and that's all you have to figure out. And you only have to figure out eight of them, put a space in the middle for your dictionary. Yeah, so very interesting. So then we go in, okay, we capture this QR broadcast, right? QR broadcast gets sent unencrypted over the air, so this key data is actually encrypted, right? So what we have here is encrypted, but you know, we do some of our analysis, and then long story short, to make the fit in the presentation, we were able to decrypt it. And the nice thing too is it told us where the IV and the salt was, because we were able to find where they were, so it made it much easier because we knew which was which. So then essentially the key data is fed into the PBKDF HMAC with 10,000 orations. This is a very good hashing, but it's protected by state character password. So let's say password is known, it's going to give us the encryption key, and encryption key along with the IV and the GID can decrypt the cipher text. AES-GCM will give us the plain text and HMAC. We also, you know, to be good communications people, we can compute our own HMAC and verify the message was correct, right? So now one may ask, like, how complex, how complicated is it to get this password? So in MD5 this will be very quick. PBKDF2 is pretty strong. So we do hashcat and we essentially analyze. This is an actual engineering analysis. So with RTX4090 one card, one can figure this out in 15.33 days. A very common commercial cracking rig can have 12 of these, so in 1.27 days, one can determine this password. Now we look at more well-funded adversaries. A100 is used by chat GPT, neural nets, AI, that's the whole thing now, right? This one card is actually worse, right? But if you have 10,000 of them, you can figure out in 5.31 seconds. It's important to know that all of these times here... It's important to know that all of these are kind of worst case scenarios. That means that your script found the password the very last time. So it's likely it's going to be like about half the time. So we go in and we can essentially, if we know the key, we wrote our little script and then we can decode it. We can get the hex key and now we can add this to our automatic decoding script and now we can decrypt live. Awesome. And we can also decrypt everything that happened in the past. So now we have it all. Yeah, but there's more. So another form of communication is point-to-point and that uses public key encryption. So public key encryption on its own is a lot more secure. It uses PKI, or public key encryption, to share the symmetric key. It doesn't require any of this manual key sharing. However, in our code, we, the message receiver class was not, did not cleanly decompile. So we could spend some time, do that, but in help with some Craigslist, eBay and Freedom, maybe we can figure it out without it. So initial conversation starts with public key sharing. So here we get the GIDs and the public keys. Pretty cool. So then we get to the source code. Uh, we figured out that the, uh, public key and the private key are, uh, generated using ECDH384R1 curve to generate the share key. The share key is used as first input to HMAC SHA-256. The second input is not known here. So we could not figure out what are the parameters here. So using Freedom, uh, we can essentially intercept this Cryptomagdo final. So we, we essentially instrument this phone right here, which is an Android phone. We, this is connected with Gotenna and then, uh, we cap, we send a P2P and then we capture this. And then from this kind of hex string, we can figure out, okay, the second parameter is actually concatenated GID public key and the private, uh, and the share key. We do know the public key and the GID. We just found that earlier in the slide earlier. We don't know the share key. So let's look for that. We go in the device and we find the Gotenna folder in that same phone and we find something called Gotenna key encryption. I wonder if that's used for encryption. So we go in and okay, it's using private keys, share keys, but now to, you know, the best luck, this, all of this is encrypted, right? Fully encrypted, we, we can't read it. But let, let's verify. Okay. So we go in and we find the file that's using Gotenna key encryption. We see at the top something called as an IV. But we can't tell from that function. So we track this over two different functions and figure out it's not only used as a static hi- as an IV, it's used as a static IV to AES-GCM. So, keys are AES-GCM encrypted, but static IV allows complete encryption bypass. This is when AES is doing what not, what, what AES is not meant to do, right? And then using the public key as a known plain text and the encrypted, uh, public key, we can XOR them to get the key stream and then we can decrypt essentially everything else. And, and what's stored in a database are public keys, shared keys, broadcast keys, the top two, the pin, pretty much everything. So we have a lot of stuff here. So then, yeah, there is AES. There is. However, there's also AES sitting here and then implementation or configuration sitting here. This is kinda like having a really nice blast proof, bullet proof door at your house and then realizing that when the bad guys come, they just cut a hole through the siding and the dry wall right next to it. Yeah. So, let's now summarize this just so kinda everybody can be on the same page. We get the public key and the public key cipher text in the XML. We XOR them to get the key stream and then we take the key stream and XOR that with the private key cipher text to get the private key. Then, when we have the p- public key and the private key, we use ZCDH to get the shared key. Shared key is used within HMAC SHA-256 along with GID public key and the shared key to get the encryption key. That along with the IV and the GID can decrypt the cipher text of P2P encryption. Group encryption is another form of encryption. It's the last one that we'll talk about. Uh, or the last one supported really. Um, so it's using the very same method, so same exact attack against P2P works against this and we can show here that we have done it. So this are, this are true vulnerability summary, right, of encryption summary findings. So broadcast is vulnerable and allows unauthorized decryption. Using set up QR message, which is captured over the air, and brute force password, we can decrypt it. We can also get it if the phone is compromised and we get the, the key from there. P2P and group are both vulnerable to unauthorized decryption if, again, the phone is compromised and we get some of these. Um, so if you want to know the feasibility, you can check out our DEF CON talks and things like that to sort of really know that. There's no authentication public key, so man in the building is possible. Short messages, less than one fragment used, less secure AES CTR, so less than 35, 45 characters, depending on the message. Uh, are using CTR, so that has integrity concerns, even though it is encrypted. And then longer messages use more secure ACM, uh, GCM, but you need to be sending like 50 characters to get to that. So we also, you know, we could also transmit directly from the GNU radio, uh, from, from our GNU radio. We can spoof GID call sign the message. We can get into the existing... So I could take a HackRF or an NES or a Blade and I can actually make my own Gotenna out of it and just start using my computer. We also added support for Wireshark. So we have, um, essentially that, so, so, so all the messages are fed into Wireshark. We don't have the decode there currently, but we'll add it eventually. Um, so now let's get to live demos. So if you want to, if you have a Gotenna Pro, then you can get the frequency on the left and the encryption in the middle and validation on the right. So we have six minutes, so let's be quick. I wouldn't scan it because we're both sketchy guys, but still. So it's firing up live right now. He's just turning the program on. You can see it's already starting to sniff and listen. We'd like to have a little waterfall so we can see when we are or not capturing. Now he's going to send a message and there you go. There we go. We have enough time, so let's see if we can decrypt something. So now being able to do the same type of process for an encrypted message. So that was a broadcast. Now broadcast means it's sent out so that anyone that has one of these devices is able to catch it. It's meant for an emergency situation or you're just looking for other people around you. But the next step is all those things we talked about by combining that information, can you take an encrypted message for a group or a person to person and actually decrypt and see it? So when you think about this, this is where everyone feels safe. So while we're going through this, he's going to set the demo up, you're going to be able to see it. And we'll go ahead, are there any questions right now while he's setting this up? We have a minute or so. Any questions over anything that we've seen so far? Okay. Here we go. Now one of the things that I want to make sure that we cover in this is that when we reached out to Gotenna for the version one exploit, they were, had zero response. Other than the fact that they said, that's fine, we don't care. Under the new management, Gotenna was extremely receptive. We got a call back within one day. Uh, they were happy to take the advice that we gave them and they are actively working to try to fix these issues. That's why we are going to make sure we wait at least two months from today before we release the full code publicly, but then we will. Now for gen one and two, the code's already out there. Okay, so now we're ready. So I'm going to, we're going to send something encrypted just so we can see that messages are indeed encrypted. So we can see they're, they're encrypted now. Now this part here decrypted. So this was added to our local database. So we're going to run our script again. So this is going to now pull the keys from there immediately. And then we will transmit again. Boom, this was encrypted. So now it's full circle. So, you know, live demos are something that I'm a big fan of. So Irwin did an amazing job of writing all this crazy code. I don't want anyone to misconstrue that. The big thing that we want to make sure that everyone takes away from this is it is up to everyone in this community to test equipment. Just because something says it's secure, don't believe it. Challenge it. And when you find it, see if the manufacturer's willing to listen. Occasionally they are. Gotenna was. Most of the ones I've dealt with aren't. So if something's been done in the past, don't be afraid to try to recreate it when something new comes out. You might find that they didn't change a lot of the things and then you can move forward and do well with it. Yep, so let's talk about, I mean you already mentioned this, so they were very receptive. And yeah, the conclusion. Yeah, so the big things we wanted to say about this is, you know, we reached out to industry. We were able to have a good relationship with them doing this. They took away key points. Acknowledgements of what we want to make sure we talk about here. So we want to reach out to White Shadow, who unfortunately couldn't be here because he's actually doing some responsible things for his family, but he is going to be here later. But don't tell him I said anything nice. What the Freak, which is the wireless CTF team that... Let's do a shout. We got a win today. Which I'm glad they're here because now all the other teams are jumping ahead of them. Yep, so we also want to thank EFF and CISA. Both of them were amazing organizations and very easy to work with. The RF Hacker Sanctuary, please go there, try some challenges. It's everything from Wi-Fi, Bluetooth, tire pressure sensors, go tennis. All of these challenges will be there as well for you to solve for all the go tennis stuff. We want to make sure that, you know... Yeah, Jason Rojas and Cisco Systems. I want to thank them for making my trip here possible and Potify Media for making this team for this presentation. And Buffalo Trace, because without them, I probably wouldn't get done as much work as I do. Thank you for your time. Are there any questions? Well, thank you and enjoy the con!