My name is Vlad Gostomelski. The presentation I have for you today is attacking Gotenna networks. Quick disclaimer, you should definitely try to not violate federal laws, FCC regulations, applicable laws in your state and country, all the good stuff. Anything I say is my personal opinion and not the opinion of my employer, so don't blame them. Little bit of background. I've been doing this professionally for 18 years, doing vulnerability research, attacking various wireless systems, medical devices, life-critical devices, and infrastructure. For those of you not familiar with Gotenna mesh, this is what we're talking about. We're not talking about the first generation Gotennas. We're talking about the second generation Gotenna meshes. This is what's inside that lovely little plastic case. For those of you in the wireless hacking village, something should jump right at you. First of all, is that really amazing antenna that you could swap out, which actually doesn't exist because it's a regulated device. It does not require licensing, so it's severely limited by its power output. You're not supposed to be able to add on an auxiliary antenna. Of course, some folks have been modifying them. Second thing you should notice is that amazing tiny little battery, which supposedly lasts 24 hours, but it's not going to last 24 hours. It's not going to last 24 hours. So from the testing you've done here at DEFCON, you're getting about three and a half hours, especially with the people that have been spamming the network. This is built as a device that you could use when networks go down, when everything else fails. So something you should notice is the waterproof seal on this case, which also doesn't exist. It's basically ultrasonic welded together, which means if there's pouring rain and flooding, it's going to go down. Again, these devices don't seem to survive very well. So why are we doing a talk about attacking something that's supposed to be the backup network when everything fails? Well, first of all, the only way to see if something really has any business being an emergency communication device is to see whether or not their claims are true. And they're touted as an emergency infrastructure. They received quite a bit of FEMA funding. They're being deployed at some of the large ski resorts to help people. They're being deployed at some of the large ski resorts to help people find their families in the mountain, but also to be used during emergency communications. New York City actually is giving away quite a few of these to businesses that were previously impacted by Sandy. So again, a large metropolitan area, eight-plus million people who are going to be relying on it as critical infrastructure when there is no cell phone service. So Gotenna has had an opportunity to become emergency infrastructure in Puerto Rico. We have not actually seen and are not going to see any emergency infrastructure. There's been a lot of items lost. Some of theiger things are still scattered. About how well it's working, it's kind of been scattered, because, well, right now, things are still mostly down. But, from what I've been able to find online, it has not been very encouraging. We're going to go through some of those things. Quick specs. Interesting things of note. You'll see the amazing output of one watt. Not exactly what you want to see in emergency infrastructure. Now, I have some radio band, And 900 megahertz, roughly, ISM covers both region 1 and 2. It can work with cellular interlink if you pay for the premium subscription. We're going to get into that. Again, if this is emergency infrastructure and the cellular goes down, then so does your cellular interlink. So, again, not very helpful. Compare that with a typical handheld walkie-talkie that covers VHF, UHF bands, somewhere in 5-watt range. In some cases, a lot more if you buy from certain shady Chinese manufacturers. You're able to have APRS, which is an automatic position reporting system. Makes the radio quite a bit more expensive, but, again, it gives you actual digital radio that you can connect to a computer. You can send messages. You can send positioning data. You actually have a GPS that's built into the radio. It's an open standard, so you're not locked into a dinky little plastic device. It's an open standard, so you have interoperability. You can use multiple manufacturers, multiple different components that you can pooch together, even just doing plain radios and open source software in a Raspberry Pi. And, of course, again, if you buy radios from certain shady manufacturers, you could do out-of-band operations covering MERS bands, ISM bands, in some cases even police frequencies, which you should definitely not transmit on, but receiving is obviously fine, depending where you are. Cost of entry. This morning, the Otena mesh was $179. Bay of Fang radios were still $22 in Amazon Prime delivered to your door. Okay, sorry, yes. So it's $179 for two Gotenas, correct, but you need two of them to work. If I have one Gotena, then I can't call this gentleman because he may not have a Gotena, so... Same thing with the radio. Correct, yes. You have a wide community of ham radio users as opposed to people who just bought into the disclosed ecosystem. And, of course, all the police officers who are not linked to the repeater at the moment. Looking at the Kenwood radios, you have an actual digital modem, again, built-in GPS, something that you could use without a cell phone being connected. Basic operations. First thing you need to install the Goten application. You need to install the Gotena phone, which becomes rather difficult if the internet is down. So even if you were to airdrop a Gotena somewhere, the instructions start out with fully charge your Gotena. Well, power is down. Then you download the application from where internet is down. You connect your phone to the Gotena, and you turn on the Gotena, essentially, and then you could connect with other users, and your messages can travel hop to hop. For a while. The reason I put down this X number of hops, up until a few weeks ago, it was three hops. Last update, they pushed it out to six hops. Again, because of propagation issues, because you're only getting a few city blocks if you're really lucky with these radios. Looking at the FEMA website, this is what they demand from emergency infrastructure. It needs to be resilient, meaning it'll stay up even if there's flooding, if there's monsoon rains, earthquakes. It needs to be robust. It needs to be secure, reliable, and that last one, open standard. I haven't seen any other radios that work with Gotena Mesh, so again, it fails on that point alone before we even examine the secure portion a little bit deeper. Encryption. Encryption is handled in a cell phone application, not on a device. That means it opens standard. It opens up the iPhone and Android devices to attacks. There's been two major updates to the Gotena application, so we had to scramble to do a kind of a source code review while we were here at the conference. So we're going to be publishing updates of slides with actual issues to be found in there. What I can tell you is that we have initialization vector issues in the open source script that they're using. There's key storage issues. Once the key is actually generated, it's stored in a way that's exact. It's essentially accessible to many of their applications on the device. So if you have a malicious application or if you don't fully trust the government in the area where you're running the application, the key could be extracted and moved to another device. And we have implementation issues. The algorithms that they're using are sound and peer-reviewed. However, their implementation is flawed. One of the big features they tout for connectivity, again, is Gotena Plus SMS Relay. So if somebody is paying for a premium subscription, they're using. They're using somebody else's device for backhaul and using cellular connectivity, which is really great if you're in the middle of a city and everything's working fine. Not so useful if cell phone towers are down. When somebody's doing a default install, the GID, which is the Global Unique Identifier, by default is set to be your cell phone number. Again, not really great for anonymity. It is possible to set the GID manually, but it's not very straightforward. You essentially have to know the user. You want to do this and go back and do it. So if you're in a large network such as here at DEF CON, if you've been harvesting quite a few phone numbers, so even the audience here has been using phone numbers, if you haven't called up those people to verify if they're indeed the Gotena users, but in large cities they typically are. Public shouts. Again, the phone numbers go out in clear text. And emergency broadcasts include the GID as well as somebody's GPS location, or somebody's laptop. you want to make sure that you have the best known GPS location so your cell phone application is leaking data. There's been a really fun application released in the iOS store, which is the Mesh Developer Toolkit. So we've been able to do open source recon on developers who are working on the Gotena mesh devices and essentially locating them physically on a map and their Gotenas. So we have a nice comprehensive map of where they are located in New York City, where they go out to lunch with their phones, and still running the application. We're going to see if you want to release the full list or not. So we took the default screenshots from California, but I think we're going to release the New York map. We mentioned the GID briefly. By default it's the phone number. It's totally non-alphanumeric. It is user configurable. So that decreases the attack surface if you want to iterate through all the cell phone numbers. The Gotena Mesh application, the official one, does limit how many direct messages you can send. But since it's an open SDK, you can go out there and be an asshole and grab 500 API keys and just start spamming the whole network for hours and hours. There's absolutely nothing that anybody can do to stop you. And of course there's no authentication, so it's not like you can kick me off the network. One of the most fun GID attacks to be implemented. By the way, if you're in this room, you may have noticed that your Gotena connection is not working. I think it has dropped significantly. It's the GID attack. The way it works is it bases the hop count on the GID of the device, the Global Unique Identifier. However, you can pair multiple antennas to have the same GID. So, for example, I have a device with GID of 1, 2, 3, 4, 5, 6, 7, 8, 9. And I'm a good citizen. I'm helping you broadcast on the network. But wait, this device has the same GID. And this device. And possibly his device. Now all of a sudden you have messages essentially round robbing in the same network. Their packet count is dropping. So I receive a message and the repeat hop count is 6. And if we broadcast it drops the packet count to 5. Then this radio gets in and says, it repeats it with the same GID, drops the packet count to 4. This radio receives it, drops the packet count to 3. So now the distance your message can propagate has been dropped to essentially half of what it was before. It would have been with the distance of what's in my cargo pocket. Again, not resilient infrastructure. And just to reemphasize, emergency situations, it could be a nation state level attack. It could be a bunch of Saudi citizens that got on a plane and intentionally caused a grid down situation. So if you can implement an attack that drops your emergency infrastructure for the cost of under $200, that is not robust. If you want to play with this attack, what you need to do is you need to set up one Gotenna with your friend's GID. So essentially find out somebody who's using Gotenna. Set up their phone number. Pair the Gotenna. Turn off the Gotenna you've been using. And pair a new Gotenna. So essentially you're telling the app that you dropped off the old Gotenna without deleting the GID from the actual radio. So this lets you bypass the controls within the application. That prevents the GID attack. If they ever do fix an application, what you do is you stop by and pick up a few burner phones, $20, $30 phones. And you set up the application with the custom GID being exactly the same. Another really funny thing is if you program your friend's GID, because these devices are meant to work offline, it doesn't do proper certificate validation. So if you know that your friend is supposed to do a secret rendezvous with somebody else, and you set up their GID and you go there in their place, you will receive the direct messages that are meant for them that are supposed to be encrypted. And your device will successfully decrypt them. Because as I mentioned, there's an initialization vector issue with how Gotenna does encryption. There's been a major... There's been a major firmware update on August 7th. They finally pushed the fix for version 1. Last time you heard, vulnerabilities for version 1 released over a year ago. Right here in Wireless Hacking Village last year. So if you're talking about robust infrastructure, over a year to fix serious security vulnerabilities is not really what you want to see from critical infrastructure. They pushed both an app and firmware update. The new firmware has been over 32 megabytes. So we have not had a chance to fully sink our teeth into it. Which is why we're going to be pushing the updated version of the slides in the forums. As I mentioned, they are using known good ciphers. The ciphers themselves have been peer reviewed. However, the implementation that the Gotenna is using has not been peer reviewed. I've let them know about this as far back as October 17th. So I don't feel really too bad about it. But we're releasing information here or publishing exploits. The response basically has been, well, if you don't like it, why don't you write something better? And my response is, you are the guys who are pushing out robust architecture and saying that this is secure and this is what people should be using. The attack factors that we have are the phone application itself. If you have other malicious applications on the phone, they can actually interact with the application. We have not found any malicious application on third party app stores yet. But that doesn't mean there won't be by the time this talk is done. We have Bluetooth attacks. There's been a really cool Bluetooth rebinding attack. Which means if somebody is sitting here and has their Gotenna with them, you can force their phone to unbind the Bluetooth connection and essentially take over their Gotenna. You have USB access. USB debug is actually still turned on on these Gotennas. So if you have physical access and you find somebody's repeater node that's been placed in a strategic high location, you can actually reprogram it and leave it there and nobody will be the visor. You actually can mess with other Gotenna nodes. We've been playing with fuzzing over the Gotenna protocol. And the Gotenna meshes have not been robust at all. We've had numerous antennas lock up. And we've been able to save them with a firmware update over there. But you could certainly go around and crash other Gotennas over the Gotenna mesh protocol. You can also push malicious firmware updates over there because these devices are not doing proper certificate validation. Who here has seen zombies? I'm talking about real life zombies. This is what zombies look like when the power goes down. People just mindlessly stare at their screen. Hoping the bar will show up. Even if they see that the cell phone tower is pulled over in half. When you see zombies, you tell your dog to get her gun. And then you start building infrastructure. This is what keeps communications up. This is what helps hospitals communicate. This is what helps emergency services actually respond even in a grid down situation. This is a toy. This does not. Again, backup infrastructure. Toy. In an emergency situation, I can hand you a radio even though you may not have a ham radio license. And now all of a sudden you can connect to emergency services. You can communicate with other ham radio users, with police officers. If I were to hand you a Gotenna, if you did not previously have the application installed in your store and don't have all the firmware updates, the Gotenna is completely useless. Any questions? Any questions? . Do you have that in F-Droid? We have not found it in F-Droid. So they've pushed a number of updates recently. So the Gotenna app for version one is up in F-Droid. But not the latest updates. The F-Droid store is about three versions behind me. I'm going to show you the version one right now. . . . They're very significant. So they use different frequencies. Version one did not include any kind of a meshing. They had a better robust antenna. Physically speaking. However, the antenna was less efficient. So the new devices, even though they're using less power, actually do have better range. As I mentioned, they have meshing. Right now, if everything works correctly, they can do six hops. Versus the old version was direct point-to-point communication. . They've updated their API twice since then. So yes, they're able to push more data between it. . And that's how they were able to add the tal phone backhaul. . . . So because they changed the protocol, it's been both a change in the application and the firmware. I still have not had a chance to dig into what they're doing with the version one that they pushed four days ago. . . . . . . slides for the version 2. Any other questions? Essentially use the GID for the private key. Correct. But neither does the other user. So essentially when you're operating offline, if I walk up to you and it looks like I have the correct GID, since your phone doesn't already have my certificate, it will just automatically trust it. Correct, yes. Thank you everyone for coming. Thank you.