1 00:00:00,540 --> 00:00:04,220 Good afternoon, ladies, gentlemen, and hackers all around. 2 00:00:04,220 --> 00:00:07,220 We are very, very excited to be here with you today. 3 00:00:07,220 --> 00:00:10,460 We're excited to share what we've done this year. 4 00:00:10,940 --> 00:00:14,920 The light's a little bright, so I can't see you, but I'm trusting that there's people out there. 5 00:00:14,920 --> 00:00:22,320 So as always, keep your hands and feet inside of the vehicles at all times and enjoy the ride. 6 00:00:22,320 --> 00:00:23,520 We're excited. 7 00:00:25,480 --> 00:00:28,700 Okay, so this is what we're going to go over today. 8 00:00:28,700 --> 00:00:31,880 What I really want to point out is the link at the bottom. 9 00:00:32,060 --> 00:00:33,320 It is a GitHub link. 10 00:00:33,320 --> 00:00:41,000 If you would like to follow along, see more details, actual code, and the firmware of what we've gone through, you can go ahead. 11 00:00:41,000 --> 00:00:44,540 We published it about 30 minutes ago, so you can go in and follow through. 12 00:00:44,600 --> 00:00:52,580 Or if you would just like to listen to the talk, follow along, and then maybe view it at the end, there is a QR code that we have that you can scan. 13 00:00:52,580 --> 00:00:54,280 I promise you it's not a rickroll. 14 00:00:54,440 --> 00:00:56,340 It'll just give you this GitHub link. 15 00:00:58,460 --> 00:01:00,760 Okay, first we'll do some introductions. 16 00:01:00,880 --> 00:01:02,600 My name is Justin Applegate. 17 00:01:02,600 --> 00:01:06,420 I am a rising graduate student at Brigham Young University. 18 00:01:06,620 --> 00:01:08,140 I am an avid CTF-er. 19 00:01:08,140 --> 00:01:10,020 I play for Project Sekai and the U.S. 20 00:01:10,020 --> 00:01:11,100 Cyber Team. 21 00:01:12,120 --> 00:01:13,660 I am Ava Peterson. 22 00:01:13,660 --> 00:01:18,260 I'm also an undergraduate student at BYU, and I go by the handle DeltaBlueJay. 23 00:01:18,880 --> 00:01:20,420 And I am Justin Mott. 24 00:01:20,420 --> 00:01:25,320 I am also a graduate student at BYU, and I go by the handle Kester Burris. 25 00:01:25,500 --> 00:01:25,920 Thank you. 26 00:01:25,920 --> 00:01:29,300 Yes, I go by LegoClones, if you see me around. 27 00:01:29,360 --> 00:01:32,960 The last member of our team for this project, his name is Wyatt Pangirl. 28 00:01:32,960 --> 00:01:34,880 He goes by SpoutingWhale. 29 00:01:35,060 --> 00:01:36,980 He just graduated from BYU. 30 00:01:36,980 --> 00:01:41,780 He was not able to make it today, but he was an invaluable member of our team. 31 00:01:43,780 --> 00:01:46,380 So let's just go over the project real quick. 32 00:01:46,380 --> 00:01:49,780 But first, I want to present to you the router graveyard. 33 00:01:49,780 --> 00:01:54,760 We managed to break not one, but two, but three routers along the way of this journey. 34 00:01:55,060 --> 00:02:05,100 We really wanted to apply some CTF skills to a real-life situation, so we picked a router, a device, and tried to hike into it. 35 00:02:05,100 --> 00:02:06,220 So we formed our team. 36 00:02:06,220 --> 00:02:12,060 We picked a timeline of about a semester long project and saw what we could get from there. 37 00:02:12,300 --> 00:02:17,900 So the device we picked was this Vylo router a home mesh Wi-Fi device. 38 00:02:19,940 --> 00:02:28,080 So as any vulnerability researcher or security researcher does, when you first start against a new target, you want to do reconnaissance. 39 00:02:28,080 --> 00:02:28,860 You want to OSINT. 40 00:02:28,860 --> 00:02:33,520 You want to figure out what has been done before so I don't have to reinvent the wheel. 41 00:02:33,660 --> 00:02:37,400 So this is some of the results of what we went through. 42 00:02:37,400 --> 00:02:41,120 Vylo Living is the company that produced the routers that we went after. 43 00:02:41,120 --> 00:02:49,220 They were a startup founded in 2021, so they're pretty new, pretty recent, and they only have two products as of today. 44 00:02:49,220 --> 00:02:50,660 They are both mesh routers. 45 00:02:50,660 --> 00:02:53,380 One supports Wi-Fi 5, the other Wi-Fi 6. 46 00:02:53,380 --> 00:03:03,960 We searched for CVEs that have been released, any sort of technical deep dive or breakdown, or even a consumer review that might go into some of the features a little bit, and we didn't find anything. 47 00:03:04,000 --> 00:03:12,380 So between the fact that it's a new company, the fact that we didn't see anything, any other research that had been done before, and it was pretty cheap. 48 00:03:12,380 --> 00:03:14,900 It was one of the cheapest routers that we could find on Amazon. 49 00:03:14,900 --> 00:03:24,120 We were thinking, all right, this is perfect for some college students to get our feet wet, get involved, find some CVEs, just get used to the router hacking scene. 50 00:03:24,220 --> 00:03:31,260 A couple of notes, I know a lot of routers, especially the older ones, are administered through a web interface. 51 00:03:31,520 --> 00:03:39,520 You connect to the LAN or to the WAN, you type in 192.168.1.1 in your browser, it pops up, that's how you set it up. 52 00:03:39,520 --> 00:03:42,100 This was not the case with us and with this router. 53 00:03:42,100 --> 00:03:44,660 It was all managed through an app on your phone. 54 00:03:44,660 --> 00:03:45,960 Kind of a new age thing. 55 00:03:46,240 --> 00:03:48,780 They said they have a bug bounty program. 56 00:03:48,780 --> 00:04:02,480 When we did some research, in order to access the bug bounty program, you had to sign an NDA and be a part of their beta testing group, which we didn't know what the NDA looked like, so we reached out and said, hey, we want to join the beta testing group, 57 00:04:02,480 --> 00:04:04,800 can you send us the NDA, and they just never got back to us. 58 00:04:04,800 --> 00:04:08,840 So we were like, well, I guess we'll just risk it for the biscuit, go for it anyway, see what we find. 59 00:04:09,380 --> 00:04:16,900 And last thing, the firmware was not released by the vendor, it's not something that we could just download and go through, we had to go ahead and recover that ourselves. 60 00:04:17,520 --> 00:04:21,620 This led to the three main goals for us today. 61 00:04:22,180 --> 00:04:33,700 First was to acquire the firmware, that way it's a white box test and not a black box test, you can see the code, it makes it a lot easier to actually turn memory corruption vulnerabilities into exploits. 62 00:04:33,700 --> 00:04:42,080 Then we wanted to pop a shell, actually get a shell on the device that makes debugging and extracting the latest version of the firmware much easier. 63 00:04:42,080 --> 00:04:49,020 And our third goal was to find as many pre-authentication remote code execution vulnerabilities as we could. 64 00:04:49,020 --> 00:04:56,540 That's kind of the holy grail, anyone that does not have administrator access to this router that can run whatever code that they want on it. 65 00:04:56,540 --> 00:04:59,120 So those were the goals that we had when we approached it. 66 00:05:00,240 --> 00:05:04,140 So obviously the next step was to start enumerating our attack surface. 67 00:05:04,660 --> 00:05:09,840 So we went and disassembled the router and this is what we ended up with. 68 00:05:09,840 --> 00:05:16,520 And we found some UART pins, so we tried to solder to them and that was the death of router number one. 69 00:05:16,700 --> 00:05:20,680 You may be gone but it will live forever on in our hearts. 70 00:05:22,620 --> 00:05:26,080 The second router had better pins that were easy to solder to. 71 00:05:26,080 --> 00:05:30,980 So then we hooked it up, got a Linux log on screen. 72 00:05:31,300 --> 00:05:34,820 The problem is we didn't know the password and it wasn't an easy one. 73 00:05:35,080 --> 00:05:38,460 And the UART interface died after 30 seconds after boot. 74 00:05:38,460 --> 00:05:44,800 And it was really hard to even try to put in a password because it printed out how much time you had left every second. 75 00:05:45,660 --> 00:05:49,940 As a result, there was no free shell from this interface. 76 00:05:50,100 --> 00:05:51,240 So we moved on. 77 00:05:52,060 --> 00:05:54,340 We went to go and look at the Vilo app. 78 00:05:54,340 --> 00:05:57,580 We pulled the APK from Google Play. 79 00:05:58,420 --> 00:06:02,300 And apparently the other members of our team think that mobile rev sucks. 80 00:06:02,340 --> 00:06:04,380 I thought it was a great time. 81 00:06:05,460 --> 00:06:11,300 We found some Firebase info, various cloud service stuff on the app. 82 00:06:11,300 --> 00:06:18,840 But the biggest important thing that we found was a custom service running on TCP port 5432. 83 00:06:18,840 --> 00:06:26,580 This was used for app to router interactions when the router had not yet gotten internet access. 84 00:06:26,840 --> 00:06:29,000 This was used to do all that set up. 85 00:06:29,000 --> 00:06:29,800 It would spin this up. 86 00:06:29,800 --> 00:06:31,280 They would talk to each other over this. 87 00:06:31,280 --> 00:06:35,820 They had a custom protocol that we reverse engineered to learn how that was working. 88 00:06:37,420 --> 00:06:38,700 Next slide. 89 00:06:39,740 --> 00:06:41,600 So this is kind of the overview. 90 00:06:41,600 --> 00:06:44,420 It had a 15 byte header and a payload. 91 00:06:45,180 --> 00:06:49,040 The header had all the fields that you see there. 92 00:06:49,120 --> 00:06:51,960 Not all op codes had payloads, but many did. 93 00:06:51,960 --> 00:07:00,120 And they were usually encrypted using this weird XXT plus custom obfuscation layer random things. 94 00:07:00,420 --> 00:07:04,780 Basically the app had a hard coded key that obfuscated and sent to the router. 95 00:07:04,780 --> 00:07:07,100 The router encrypted a new key and sent it back. 96 00:07:07,100 --> 00:07:08,580 But it was all reversible. 97 00:07:08,860 --> 00:07:14,700 So we were able to go from the hard coded key and generate our own ones to be able to talk to it. 98 00:07:15,180 --> 00:07:28,360 Which made it really easy to start once we were able to get the source for it, start sending messages back and forth and exploit some of our some of the things we found. 99 00:07:30,540 --> 00:07:34,340 So then we needed still needed to get the firmware off of it. 100 00:07:34,340 --> 00:07:38,740 We saw that there was a flash memory chip of the model on the slide. 101 00:07:39,260 --> 00:07:43,120 We tried some software utilities and they only gave us bad data. 102 00:07:43,120 --> 00:07:47,420 So then we got this Salie logic analyzer and then it just worked. 103 00:07:47,860 --> 00:08:02,920 We just hooked it up, we fired up their software, we turned the router on, we got all of the SPI data straight to their software and then we could just decode it and there was the binary and we extracted the firmware and then we had everything that was on the router just like that. 104 00:08:02,920 --> 00:08:12,920 We spent about a month getting to this point trying all sorts of different stuff and like literally it took us about two hours and then we had everything on it the moment we plugged this in. 105 00:08:15,040 --> 00:08:20,980 So this is just a look at what that SPI data looked like in the software. 106 00:08:20,980 --> 00:08:23,480 It was super easy once we had it. 107 00:08:23,480 --> 00:08:32,620 We have a more technical deep dive on exactly what that is and the Python scripts we use to translate this into the binary on the GitHub. 108 00:08:32,920 --> 00:08:36,400 Yep, so check out the GitHub if you want to see more about how that's done. 109 00:08:36,680 --> 00:08:44,600 At this point we had the firmware, we had accomplished goal number one, now we wanted to look for vulnerabilities and establish a shell. 110 00:08:44,600 --> 00:08:52,340 So before you start looking for vulnerabilities it's usually a good idea to figure out how to emulate the firmware on your own machine. 111 00:08:52,520 --> 00:09:01,820 This specific device had a 32-bit little endian MIPS processor so that's what all the the binaries were compiled to be using. 112 00:09:01,900 --> 00:09:21,580 Most of us have x86 or even ARM machines and so that's not something that we can run natively so we decided to use QEMU which was statically compiled along with chroot and some precise GDB breakpoints that we had figured out after some reverse engineering in Ghidra in order to actually emulate the firmware and get it running on one of our machines. 113 00:09:21,580 --> 00:09:30,640 This makes it significantly easier to fuzz for vulnerabilities, to test things out, to create exploits once you find a vulnerability. 114 00:09:30,820 --> 00:09:45,180 In addition we wanted the ability to compile our own executables that we can place on the device and run them because a lot of these embedded devices do not have the executables that you would like to have on there, for example Netcat or whatnot. 115 00:09:45,540 --> 00:09:50,000 This one didn't even have WhoAmI and so we wanted to be able to create our own stuff. 116 00:09:50,000 --> 00:09:55,440 Now this device used UCLibc as its libc library. 117 00:09:55,960 --> 00:10:12,280 UCLibc was actually pretty much discontinued or unmaintained since 2012 and so someone created a fork called it UCLibc-NG or next generation and so that is what we used along with Buildroot to build a toolchain so that we could compile our own executables. 118 00:10:12,280 --> 00:10:15,620 It worked for the most part, not all the time. 119 00:10:15,700 --> 00:10:20,040 The Bindshell that we had created and used for one of our exploits worked just fine. 120 00:10:20,040 --> 00:10:27,940 We were able to compile GDB server but every time we tried to connect to it remotely it kept segfaulting. 121 00:10:27,940 --> 00:10:30,660 It could be because we're using UCLibc-NG. 122 00:10:30,660 --> 00:10:32,600 It could just be a skill issue on our part. 123 00:10:32,600 --> 00:10:33,440 I'm not sure. 124 00:10:33,440 --> 00:10:34,680 Something happened there. 125 00:10:35,480 --> 00:10:38,640 This is what it looks like when you actually have it emulated. 126 00:10:38,640 --> 00:10:49,760 So like I said we're using chroot to mount the file system so that the executable can find the libraries that it's looking for at the hardcoded path that it has. 127 00:10:49,760 --> 00:10:52,860 Then we have a statically compiled QEMU which runs it. 128 00:10:52,860 --> 00:10:55,620 Now you can see a "-g1234". 129 00:10:55,620 --> 00:11:03,980 If you're not super familiar with QEMU or GDB, this opens up a remote debugging session on the local port 1234. 130 00:11:03,980 --> 00:11:20,400 Which means on a separate terminal than what you see here, you can open up GDB server or GDB multi-arch and then connect to that local port and now you're running the firmware here but you can debug it with your own GDB setup in another terminal. 131 00:11:20,440 --> 00:11:29,060 And then because this one opens up a socket and expects communication, you have to open up a third terminal to actually send data to this service. 132 00:11:29,060 --> 00:11:30,260 We got all that figured out. 133 00:11:30,260 --> 00:11:33,920 Again more details are in the GitHub repo if you would like to see how that's done. 134 00:11:34,920 --> 00:11:43,180 At this point we spent about a month and a half, approximately six weeks, looking for vulnerabilities in the VILO routers. 135 00:11:43,180 --> 00:11:46,260 Like we said the holy grail is pre-authentication RCE. 136 00:11:46,260 --> 00:11:51,540 We found nine vulnerabilities total in the the four months that we had for this project. 137 00:11:51,540 --> 00:11:54,200 Six of them were critical and three of them were medium. 138 00:11:54,200 --> 00:12:00,480 Out of those six critical vulnerabilities, four of them were pre-authentication buffer overflow vulnerabilities. 139 00:12:00,580 --> 00:12:17,460 Now we had only figured out how to exploit one of them because three of them were on a version of the firmware that had canaries enabled for that and so we weren't actually able to overwrite the instruction pointer and execute our own code, except for one of them we were able to. 140 00:12:18,000 --> 00:12:27,020 And while we were working on trying to develop exploits, see if we can get past these mitigations, we accidentally discovered a blind authenticated command injection. 141 00:12:27,080 --> 00:12:32,900 Now we're going to go over three specific vulnerabilities, the ones we found most entertaining for you guys today. 142 00:12:33,120 --> 00:12:41,300 I also want to note most of these bugs are present in the service, the custom service running on port 5432 that we talked a little bit about. 143 00:12:42,360 --> 00:12:44,160 These are the vulnerabilities up here. 144 00:12:44,160 --> 00:12:46,820 So you can see the four buffer overflows are at the top. 145 00:12:46,820 --> 00:12:49,080 They're all 9.6 criticals. 146 00:12:49,080 --> 00:12:51,400 There was an info leak and some lack of authentication. 147 00:12:51,680 --> 00:12:54,380 We have reserved CVE numbers through MITRE. 148 00:12:54,380 --> 00:13:02,240 They're not published yet since we just published our public repo earlier today, but we have reserved the numbers and they're in the same order that you see up here. 149 00:13:04,840 --> 00:13:10,700 Okay, the first vulnerability that I want to talk about today is the lack of authentication in this custom service. 150 00:13:10,740 --> 00:13:23,140 So as my team member said, most of the communications from the app to the router went through AWS, except if you're not connected to the internet, you need some way to set it up. 151 00:13:23,140 --> 00:13:24,900 So that goes through this service. 152 00:13:24,900 --> 00:13:37,660 The thing is, because it has hard-coded keys and there's really no authentication inside of it, anyone that is on the LAN and knows how to speak this protocol can control the router, pretty much. 153 00:13:37,660 --> 00:13:39,700 So anything that you can do, they can do. 154 00:13:39,700 --> 00:13:46,600 For example, you invite a friend over, give them the Wi-Fi password, they're now on the Wi-Fi, they can control the router the same way that you can. 155 00:13:46,600 --> 00:13:55,460 They can see and change your SSID, your password, PPPoE, username and password, they can reboot it, they can even exploit all of these vulnerabilities. 156 00:13:55,780 --> 00:14:05,820 That was very useful for us because then a lot of the buffer overflows that we found became unauthenticated RCE vulnerabilities and not authenticated RCE vulnerabilities. 157 00:14:05,820 --> 00:14:17,920 The other important thing to note is while this service was used for initial setup when the router didn't have internet access, it stayed up the whole time that the router was on, even if it did. 158 00:14:17,920 --> 00:14:21,100 So it was just always available no matter what. 159 00:14:21,440 --> 00:14:28,120 So we first found the first buffer overflow in this local app set router token function. 160 00:14:28,120 --> 00:14:32,620 We talked about how there are different messages that are differentiated by opcodes. 161 00:14:32,620 --> 00:14:39,720 So the opcode 0x3e updates a token and a time zone using an encrypted JSON object. 162 00:14:39,720 --> 00:14:43,860 Encryption coming from this weird XXT and obfuscation that we talked about. 163 00:14:44,040 --> 00:14:58,400 If you are familiar with C and memory corruption, you'll see this sscanf function immediately will stand out to you because it takes the token and pulls it into a fixed length buffer token, but it doesn't check the length of the string. 164 00:14:58,400 --> 00:15:05,240 So if token is, for example, only 16 bytes and you send a token that is 20 bytes, you now have a four byte overflow. 165 00:15:05,240 --> 00:15:06,280 Pretty obvious. 166 00:15:06,300 --> 00:15:09,680 So our next goal was, how can we actually exploit this? 167 00:15:09,700 --> 00:15:11,560 We don't want to just say, oh, this is a vulnerability. 168 00:15:11,560 --> 00:15:12,540 We want to prove impact. 169 00:15:12,540 --> 00:15:14,140 Plus it's kind of fun doing this. 170 00:15:15,280 --> 00:15:18,240 For mitigations, pi and canaries were disabled. 171 00:15:18,480 --> 00:15:20,160 Or at least that's what we thought. 172 00:15:20,160 --> 00:15:30,220 We had later learned that in the latest version of the firmware, canaries were enabled and this ended up not being exploitable, but we didn't know that we were dealing with an older version of the firmware. 173 00:15:30,220 --> 00:15:35,100 It was the newest one that we could get our hands on, but it still wasn't the latest one. 174 00:15:35,460 --> 00:15:38,040 So we were trying to figure out, how can we exploit this? 175 00:15:38,040 --> 00:15:41,140 We just have a generic buffer overflow vulnerability. 176 00:15:41,660 --> 00:15:46,400 If you're into binary exploitation, ROP probably comes to mind. 177 00:15:46,400 --> 00:15:51,300 ROP is a little bit difficult in MIPS because it doesn't have a return instruction. 178 00:15:51,340 --> 00:15:55,240 Yeah, you can still kind of get it, but it makes it significantly more difficult. 179 00:15:55,320 --> 00:16:04,260 As a side note, based off of what we had to do here, I decided to make a CTF challenge with very, very similar conditions that I wrote myself. 180 00:16:04,260 --> 00:16:07,300 We released it as a part of BYU CTF 2024. 181 00:16:07,660 --> 00:16:10,920 If you would like to do that yourself, give yourself a challenge, you can look it up. 182 00:16:10,940 --> 00:16:12,160 It's available on GitHub. 183 00:16:15,060 --> 00:16:18,160 So how do we exploit this? 184 00:16:18,160 --> 00:16:26,060 Well, we wanted to find kind of a one-shot gadget where we could just return there and then it would do everything for us and we didn't have to chain multiple gadgets together. 185 00:16:26,060 --> 00:16:34,340 Because of the overflow, we could control the RA register or the return address register and the S8 register, which is pretty much the stack pointer. 186 00:16:34,380 --> 00:16:45,420 So we figured if we can control S8 and point it to a user-controlled bash command and then set the instruction pointer to go to this gadget, win, right? 187 00:16:45,420 --> 00:16:46,220 You profit. 188 00:16:46,220 --> 00:16:48,800 ASLR is enabled, so we can't use stack values. 189 00:16:48,800 --> 00:16:53,000 But because PI is disabled, we know where all the global variables are. 190 00:16:53,000 --> 00:17:00,940 So we started looking through to see what global variables can we control that we can easily put our own command inside of it. 191 00:17:01,480 --> 00:17:06,100 So us being the intelligent people that we are, decided to put a semicolon reboot semicolon in there. 192 00:17:06,100 --> 00:17:08,000 We ran it and nothing happened. 193 00:17:08,000 --> 00:17:14,480 So we rebooted it just to make sure that we hadn't messed anything up and we ended up messing something up by doing that. 194 00:17:14,480 --> 00:17:18,120 The router just kept rebooting and it never actually got online. 195 00:17:18,120 --> 00:17:24,360 Turns out there's an authenticated command injection vulnerability that Ava will now go over. 196 00:17:25,220 --> 00:17:31,380 So after we found our accidental command injection vulnerability, we went back to find the code that was responsible for this. 197 00:17:31,400 --> 00:17:35,740 So we ended up finding it in the sysconf binary, which is run on boot. 198 00:17:35,900 --> 00:17:42,840 So as you can see here, it formats a UDHCPC bash command with several variables, including the router host name. 199 00:17:42,840 --> 00:17:46,260 And then it pipes that directly into the system function. 200 00:17:47,680 --> 00:17:57,640 And so because we can control the router host name through the viral app, we can get arbitrary RCE by just setting that host name to a bash command. 201 00:17:57,640 --> 00:18:04,000 So we can verify that this command actually has been run by looking at the boot output, which you can see here on the right. 202 00:18:04,000 --> 00:18:06,620 You can see the output of that command right there. 203 00:18:06,880 --> 00:18:10,720 We got this output from the UR interface that we had connected to initially. 204 00:18:11,520 --> 00:18:23,100 So there are a few limitations with this exploit, namely that the injected command is run only once on booting the router, as well as that the router host name is limited to a length of 30 characters. 205 00:18:23,260 --> 00:18:37,080 So as a result, we had to write our payload into several 30-byte sections, which what we ended up doing with that is write a script to the slash folly directory, which is one of the few directories that is both writable and persistent on the router. 206 00:18:37,480 --> 00:18:45,920 And so we wrote a script that itself then downloads a longer script from the using wget and runs that. 207 00:18:45,920 --> 00:18:52,000 Now, we also found that the router does not have an internet connection at the time of running the injected command. 208 00:18:52,060 --> 00:18:58,560 So we had to make our script or our payload wait 20 seconds before running our first script. 209 00:19:00,060 --> 00:19:11,660 So after we wrote our first payload, it then downloads and executes a second payload, which itself then downloads and executes a compiled cbind shell, which we can connect to via netcat. 210 00:19:11,660 --> 00:19:15,320 And so through this bind shell, we were able to gain our first shell on the router. 211 00:19:15,880 --> 00:19:21,740 So as you can see here, we're able to netcat into the router and find that we have gained a shell as the root user. 212 00:19:28,900 --> 00:19:40,600 Okay, so once April had come around, we had reached our four months, it was the end of the semester, we had to wrap up the project and we decided, you know, let's reach out to the vendor, try and get in contact, send them the details for the vulnerabilities, 213 00:19:40,600 --> 00:19:42,220 let's see if we can get this patched. 214 00:19:42,220 --> 00:19:46,560 It was actually pretty much like it was a pretty big pain to get in contact with them. 215 00:19:46,560 --> 00:19:52,260 They had an email address listed in their terms of service, but it didn't exist, it just bounced back. 216 00:19:52,260 --> 00:19:58,100 We reached out to a couple other email addresses on their website, we tried to guess the email addresses, none of that worked. 217 00:19:58,100 --> 00:20:04,300 We reached out over social media, they have YouTube, they have I think Facebook, maybe an Instagram, we didn't hear back from that. 218 00:20:04,300 --> 00:20:09,140 We filed a couple support tickets and eventually we got a response from them. 219 00:20:09,640 --> 00:20:18,420 They put us in contact with the actual developers and the developers said, hey, thank you for sending us this, we'll take a look at it, we'll get back to you on it. 220 00:20:19,340 --> 00:20:34,320 This is the overall timeline of what we did, so we started the project in January, we finished it up in early April, we reached out to them, and it took us a month before we actually got in contact, and we said, hey, here are the details for these nine vulnerabilities, 221 00:20:34,320 --> 00:20:40,620 we are giving you a 90-day deadline, we are happy to help if you have any questions, if you want us to elaborate, et cetera. 222 00:20:40,840 --> 00:20:53,640 We followed up a month later, didn't hear anything, followed up two weeks after that, we didn't hear anything, and as we had told them, we went ahead and filed CVE numbers from MITRE, we followed up two weeks later, and they said, we're working on it, 223 00:20:53,640 --> 00:20:56,560 we'll publish something pretty soon here, we'll get it out to you. 224 00:20:56,820 --> 00:21:09,980 So the 90-day disclosure deadline was a couple days ago, we timed this for our talk today, and the vendors actually reached out to us like the day before we left here for DEF CON and said, hey, we've pushed a new firmware update, can you check that, and we said, 225 00:21:09,980 --> 00:21:11,440 yes, just not right now. 226 00:21:11,440 --> 00:21:18,440 We haven't looked at it yet, we'll take a look at that there, but they have been somewhat responsive after we finally got in contact with them. 227 00:21:20,160 --> 00:21:39,040 Just a quick conclusion, we expected it to be a lot easier to get started, to get the firmware to find the initial vulnerability and get that initial root shell, it took us two months to get to that point, so we were a little surprised about that, that's also probably attributed to the lack of experience on our part, 228 00:21:39,040 --> 00:21:50,860 but then once we got in and we got the firmware, we were able to find a lot of bugs and not a lot of time, and we only looked at a very, very small portion of the attack surface, there is still a lot more space for bugs. 229 00:21:50,860 --> 00:22:05,040 If that's something that you're interested in looking for, go to the GitHub repo, you'll notice that there are holes in the documentation that we just didn't have time to fill in, and we've hacked into a couple other devices since then, and we found that the cheaper, 230 00:22:05,040 --> 00:22:09,120 lower quality devices, hacking them is very, very similar. 231 00:22:09,180 --> 00:22:15,300 IoT and embedded products still have a long, long way to go when it comes to security. 232 00:22:15,900 --> 00:22:28,780 So this is the QR code, if you want to go ahead and go to the GitHub repo and look at the details, if you would like to connect with us on LinkedIn, we also have our links up here, what time are we at? 233 00:22:28,780 --> 00:22:29,200 53. 234 00:22:29,200 --> 00:22:30,900 Are there any questions? 235 00:22:34,220 --> 00:22:35,340 Yes. 236 00:22:39,820 --> 00:22:41,640 Yeah, feel free, come on up. 237 00:22:44,330 --> 00:22:49,570 I did not expect that. 238 00:22:58,470 --> 00:23:03,070 Sorry, can you repeat that? 239 00:23:04,330 --> 00:23:07,130 He said, like, what method do we use to find the vulnerabilities? 240 00:23:07,130 --> 00:23:12,270 Okay, so the question was, what method did you use to find the vulnerabilities? 241 00:23:12,270 --> 00:23:13,150 Was it fuzzing? 242 00:23:13,150 --> 00:23:15,670 Was it manual code analysis? 243 00:23:16,390 --> 00:23:18,110 We did not use any fuzzing. 244 00:23:18,150 --> 00:23:23,750 Fuzzing is a little bit more difficult, it's not impossible, but it's a little bit more difficult when you have a closed source binary. 245 00:23:23,930 --> 00:23:33,870 Normally you would compile source code with some sort of sanitizer and then fuzz it from there, but because it was closed source, and it was MIPS, and we're not super experienced with fuzzing, we went the manual route. 246 00:23:33,870 --> 00:23:39,190 So we just searched through the code by hand in Ghidra, decompiling it to find it. 247 00:23:39,190 --> 00:23:39,990 Thank you. 248 00:23:40,690 --> 00:23:41,850 Other questions? 249 00:23:45,220 --> 00:23:47,580 Going once, going twice. 250 00:23:48,380 --> 00:23:49,400 Yes, right here. 251 00:23:51,020 --> 00:23:52,300 Yeah, feel free to come up. 252 00:23:58,600 --> 00:24:02,880 And if you could speak that protocol, you could do basically any router administration. 253 00:24:02,960 --> 00:24:15,140 Could you not set the hostname of the router from there and trigger a reboot and make that authenticated hostname injection, hostname command injection to an unauthenticated injection because there's no credentials from that path? 254 00:24:15,140 --> 00:24:15,580 Perfect. 255 00:24:15,580 --> 00:24:21,660 So the question was, like, since that... 256 00:24:21,660 --> 00:24:23,520 how would you say that? 257 00:24:23,520 --> 00:24:33,420 Since the local service is unauthenticated, the question was about, can we use that to turn the router hostname injection to an unauthenticated command injection? 258 00:24:33,620 --> 00:24:36,300 I think the answer to that is no, kind of. 259 00:24:36,300 --> 00:24:37,340 At least not that we know of. 260 00:24:37,340 --> 00:24:42,480 Not that we know of, because the router hostname, the process of setting that actually goes through AWS. 261 00:24:42,800 --> 00:24:46,400 And so that was one area that we didn't have a lot of time to explore. 262 00:24:46,400 --> 00:24:57,840 There are some keys associated with logging into that AWS service, which it's possible that those itself are vulnerable in some way, but simply having access to the local service is not enough to set the router hostname. 263 00:24:58,160 --> 00:25:02,880 Yeah, so a large part of the mobile app was just dealing with the AWS API. 264 00:25:02,960 --> 00:25:04,620 We didn't have a whole lot of time to go through that. 265 00:25:04,620 --> 00:25:11,320 So it may be possible, but from what we had seen, we could only do that if you were authenticated, if you already had the app set up with the router. 266 00:25:11,440 --> 00:25:12,220 Thank you. 267 00:25:12,380 --> 00:25:13,800 I think we got one back there. 268 00:25:38,210 --> 00:25:52,190 So the question was, for someone who is new to hardware hacking and new to vulnerability research, do you think following these steps would be good to learn some hardware hacking and do you think springboarding off of the research that we've done would be a good way to get started? 269 00:25:52,430 --> 00:26:02,330 First off, I'm still kind of a noob, so I don't know that I have the best advice, but I would say this is something that you definitely can do for hardware hacking. 270 00:26:02,330 --> 00:26:04,530 This was kind of my first exposure to it. 271 00:26:04,790 --> 00:26:05,650 And I learned a lot. 272 00:26:05,650 --> 00:26:07,550 There's a lot of resources out there. 273 00:26:07,550 --> 00:26:09,490 DEF CON has their hardware hacking village. 274 00:26:09,790 --> 00:26:14,270 I think reproducing these steps and going through it would be very, very helpful. 275 00:26:14,570 --> 00:26:18,010 We do have some extensive write-ups specifically on the hardware part. 276 00:26:18,010 --> 00:26:22,870 We spent more time documenting that because it was newer for us, so hopefully it's helpful. 277 00:26:23,090 --> 00:26:29,990 As for finding CVEs, if you want to find CVEs and IoT devices, this is probably the easiest way to do it. 278 00:26:29,990 --> 00:26:40,590 It does take a little bit of knowledge when it comes to memory corruption and whatnot, but if you have an introduction to C and assembly and memory corruption and you want to find your own, it's just a matter of looking through the code. 279 00:26:40,590 --> 00:26:43,770 There is just so much code that we haven't even gone through. 280 00:26:43,850 --> 00:26:45,310 So I would absolutely recommend that. 281 00:26:45,310 --> 00:26:45,770 Yes. 282 00:26:46,350 --> 00:26:47,810 Any other questions? 283 00:26:48,430 --> 00:26:49,170 Yes. 284 00:26:57,980 --> 00:27:01,620 Okay, so the question is, how do you get future firmware updates? 285 00:27:01,620 --> 00:27:03,160 So this is kind of a tricky question. 286 00:27:03,160 --> 00:27:05,020 We looked into it a little bit. 287 00:27:05,940 --> 00:27:12,640 Initially, there was an API endpoint, just an HTTP web server, where you were able to say, hey, what is the latest firmware? 288 00:27:12,640 --> 00:27:14,020 Can you give me a link to it? 289 00:27:14,020 --> 00:27:17,820 The thing is, it didn't actually give you the latest firmware. 290 00:27:17,820 --> 00:27:22,620 We talked about one of the buffer overflows that we tried to exploit that did not have stack canaries. 291 00:27:22,640 --> 00:27:28,720 We thought that was the latest firmware version because we got it from that endpoint pretty early on in the process. 292 00:27:28,900 --> 00:27:36,980 But the actual device had later firmware that I think it gets through the AWS IoT. 293 00:27:36,980 --> 00:27:43,740 It uses encrypted MQTT communications, and so somehow it gets the update from that. 294 00:27:43,740 --> 00:27:46,460 We have not fully reverse engineered that process. 295 00:27:46,460 --> 00:27:52,800 We don't know how it is, but it is somewhere within the AWS MQTT sort of set up in there. 296 00:27:53,420 --> 00:27:54,860 Other questions? 297 00:27:57,280 --> 00:27:58,760 Going once. 298 00:27:59,040 --> 00:28:00,260 Going twice. 299 00:28:00,640 --> 00:28:01,000 All right. 300 00:28:01,000 --> 00:28:02,360 Thank you for coming to our talk. 301 00:28:02,360 --> 00:28:03,620 We appreciate it.