1 00:00:00,000 --> 00:00:02,140 Ladies and gentlemen, Hacking Hotspots with Edward. 2 00:00:02,140 --> 00:00:02,920 Here we go! 3 00:00:13,900 --> 00:00:15,420 Good afternoon, everyone. 4 00:00:15,420 --> 00:00:19,240 I want to thank everyone for just taking the time. 5 00:00:19,380 --> 00:00:21,400 I know this has been a long day. 6 00:00:21,660 --> 00:00:23,420 You know, we're about to wrap up DEF CON. 7 00:00:23,420 --> 00:00:26,740 This is my first DEF CON and it's so surreal to even be here. 8 00:00:26,740 --> 00:00:30,740 So I just want to thank the entire community, all the hard working staff and volunteers. 9 00:00:33,160 --> 00:00:41,540 So this talk is about Hacking Hotspots, free auth remote code execution, arbitrary SMS and adjacent attacks on 5G and LTE routers. 10 00:00:41,540 --> 00:00:43,460 I'm going to go ahead and just move forward. 11 00:00:44,140 --> 00:00:46,780 So before I get started, I just want to go over an agenda. 12 00:00:46,840 --> 00:00:49,060 We have the staple, who am I? 13 00:00:49,060 --> 00:00:50,800 I'm going to go over some related work. 14 00:00:51,000 --> 00:01:01,820 When it comes to the devices I'll be referring to, the Wi-Fi routers, we're going to be talking about Tuoshi and Kufi 5G and 4G LTE routers. 15 00:01:01,820 --> 00:01:06,260 It's a good chance I didn't pronounce either of those two correctly but please bear with me here. 16 00:01:06,600 --> 00:01:11,020 We're also going to have some demos and we're going to wrap it up with some conclusions. 17 00:01:11,440 --> 00:01:13,400 Generally speaking, this is going to go from left to right. 18 00:01:13,400 --> 00:01:19,740 There's a few cases where it won't be that linear but we'll get it moving. 19 00:01:20,340 --> 00:01:24,080 So I want to give a quick who am I. 20 00:01:24,080 --> 00:01:33,620 This is pretty compository at this point but I am currently a senior cyber security analyst at a Fortune 500 company. 21 00:01:33,620 --> 00:01:46,120 But my previous job, I worked as an information security analyst at Sedara and honestly it was during that time working in their security operations center that I was really able to cut my teeth by looking into IOT and Android devices. 22 00:01:46,240 --> 00:01:58,000 And it's really during the last six months while I was there that I really started to do more deep dives and you'll see the research that is the fruit of that. 23 00:01:58,300 --> 00:02:00,100 I also gave a couple of other talks. 24 00:02:00,200 --> 00:02:07,580 I gave a talk on that smooth count in regards to Android interapp collusion and I also gave a few talks at B-sides. 25 00:02:10,600 --> 00:02:14,080 So as I get into the work, we're kind of going to just jump into it. 26 00:02:14,080 --> 00:02:18,200 So this particular model is not one of the devices in question. 27 00:02:18,860 --> 00:02:26,480 I just want to reference a previous DEF CON 27 talk, reverse engineering 4G hotspots for fun bugs net financial loss. 28 00:02:26,480 --> 00:02:38,260 I'd really like to put some emphasis on the net financial loss because honestly I bought dozens of devices and this has only been a net loss but I'm very happy to be speaking in front of you tonight. 29 00:02:38,520 --> 00:02:51,720 So one of the crux of this slide specifically is the idea of manufacturers shipping items with just insecure firmware. 30 00:02:51,720 --> 00:02:55,740 In this case he specifically highlights insecure API end points. 31 00:02:55,740 --> 00:03:01,120 Now I want you to look closer at Go form because you're going to see that as a current theme. 32 00:03:01,120 --> 00:03:07,480 Generally speaking, when you see Go form, it's usually one of two things. 33 00:03:07,560 --> 00:03:15,500 It's usually either raw link or real tech SDKs where you'll see like a Go web form embedded. 34 00:03:15,620 --> 00:03:25,360 And as we move forward, you'll see that this particular package has had widespread systematic issues across many manufacturers. 35 00:03:26,540 --> 00:03:30,840 So speaking of the way it works, I'm actually going to be talking about this reverse chronologically. 36 00:03:30,840 --> 00:03:34,200 I'll be talking about 5G, 4G and LC devices. 37 00:03:34,200 --> 00:03:55,460 But I want to start with this post because essentially what happened and the reason why I say I'm going to start reverse chronologically is that there was a point where I had already compromised several devices by this manufacturer but I wanted the impact of my most recent research to show, 38 00:03:55,460 --> 00:03:58,860 to show these kind of errors in more modern 5G equipment. 39 00:03:59,020 --> 00:04:00,360 So I read this post. 40 00:04:00,360 --> 00:04:10,800 It says, the problem that this guy had, this pre, preservo, he basically states that he did find a vulnerability to the device but he liked to have root access. 41 00:04:10,800 --> 00:04:14,640 But there's a fundamental issue with this whole idea of giving the device root access. 42 00:04:14,640 --> 00:04:16,880 It essentially has a restricted shell account. 43 00:04:16,880 --> 00:04:19,980 So I'm like, okay, well, that's kind of interesting. 44 00:04:20,160 --> 00:04:23,500 I, I found one of these devices for about $40 on eBay. 45 00:04:23,520 --> 00:04:26,700 So I'm like, you know, this is a really good opportunity to test it out. 46 00:04:26,700 --> 00:04:32,100 But I want to continue on my OSINT and just get a little more, just to get a little more background. 47 00:04:32,600 --> 00:04:47,660 So it, previously, when, when I mentioned that there was a, there was a, there was a default credentials, another researcher also indicated that in CVE-2024-48442. 48 00:04:48,260 --> 00:04:57,140 And it, it's a little, it doesn't quite specifically state that, that this is a restricted, that this is actually a restricted shell. 49 00:04:57,180 --> 00:04:59,700 But in his write-up he goes over it. 50 00:04:59,720 --> 00:05:08,280 Now, another thing I'd like to bring up here is that he also found a, a command injection vulnerability using the, using AT command. 51 00:05:08,340 --> 00:05:20,680 Essentially AT command are our phone modem commands that, that allow you to do things like send, send SMS messages and, and just provide a lot of configuration things for devices. 52 00:05:21,580 --> 00:05:26,340 We're going to go ahead and move forward because there's a lot of information I'm going to try to squeeze into this 20 minutes here. 53 00:05:27,180 --> 00:05:29,380 Alright, so this is actually the device in question. 54 00:05:29,380 --> 00:05:35,760 Now, at the beginning it starts off, it starts off slightly out of order, but I, things start to smooth over as you move forward. 55 00:05:36,020 --> 00:05:40,580 A lot of people may not have heard this company, but they actually, they actually ship a lot of products. 56 00:05:40,580 --> 00:05:53,700 If you go on AliExpress, you'll see a lot of devices by, by 2HG and yeah, they're, in this case they're, they're shipping with 5G chips and, and I'll be going over why this is a problem. 57 00:05:54,440 --> 00:05:56,320 So, let's take a look at this GoForm here. 58 00:05:56,320 --> 00:06:04,580 Now, if you just go to the MITRE CV website and search for GoForm, when I first did this I got about 743 results. 59 00:06:04,580 --> 00:06:09,560 This is just, you know, GoForm appearing in like the URL or, or affiliated. 60 00:06:09,760 --> 00:06:26,520 And then, you know, as of July 1st I searched again, we're up to 912, so I, I can't imagine by now it's probably over a thousand, but this is definitely a, a systematic issue where manufacturers are just using SDKs, not so responsibly. 61 00:06:27,500 --> 00:06:30,160 And here's just a little breakdown, you know, a little pie chart here. 62 00:06:30,160 --> 00:06:45,200 As you can see here, there's a, there's two, there's one, there's one larger offender, the, the Tenda, but you see D-Link is, is runner up and, and this is just basically a breakdown just based on the, the amount of hits, amount of CVE hits when I would search for GoForm . 63 00:06:46,080 --> 00:06:52,220 Alright, actually, alright, so now we're gonna go ahead and move forward, we're gonna jump, we're gonna jump into a device here. 64 00:06:53,520 --> 00:06:58,740 So, I want, I want you guys to, to take a look at this web request. 65 00:06:58,740 --> 00:07:01,980 Um, this is actually the 5G device that, that I showed previously. 66 00:07:01,980 --> 00:07:06,100 And there's a few things we're gonna spot out to, that you're gonna notice right away, they're a little bit odd . 67 00:07:06,200 --> 00:07:09,920 So, you do see that GoForm, which should just be an IOC all by itself. 68 00:07:09,920 --> 00:07:13,380 There's probably an issue with the device, even if you just see GoForm present. 69 00:07:13,380 --> 00:07:16,120 It's certainly worth, uh, taking a better look. 70 00:07:16,180 --> 00:07:17,800 But, look at the username. 71 00:07:18,120 --> 00:07:19,400 Username equals admin. 72 00:07:19,400 --> 00:07:22,360 Well, that's perfectly fine if there was legitimate authentication. 73 00:07:22,560 --> 00:07:29,000 But if you look on the right where you see, like, ace underscore settings, if you squint, it kinda looks like a session token, but it's not. 74 00:07:29,000 --> 00:07:32,240 It's just UX, um, collapsing the, the menu. 75 00:07:32,240 --> 00:07:36,240 So, so basically, username equals admin is enough to authenticate. 76 00:07:36,240 --> 00:07:37,720 Completely broken access control. 77 00:07:37,720 --> 00:07:39,720 But it still gets a little bit worse than this. 78 00:07:39,720 --> 00:07:43,320 Um, if you look down, you'll see NTP server zero. 79 00:07:43,320 --> 00:07:47,300 That's for a network time, uh, network time protocol server. 80 00:07:47,360 --> 00:07:53,940 In this particular device, I did find a, a command injection, um, with, with that parameter specifically. 81 00:07:54,160 --> 00:07:59,420 And I'm gonna go over why, uh, um, how this manifested and why this is a problem. 82 00:07:59,420 --> 00:08:00,880 And this will be the first example. 83 00:08:00,880 --> 00:08:09,020 Now, because essentially authentication is broken, and this is an, this is an example of command injection, this will be our first pre-auth remote code execution. 84 00:08:09,020 --> 00:08:13,740 Now, sorry, this is not gonna be, like, a sexy binary example, but here's the thing. 85 00:08:13,740 --> 00:08:15,460 It was so easy to do. 86 00:08:15,460 --> 00:08:18,840 And just think how many devices are impacted by this kind of problem. 87 00:08:18,980 --> 00:08:22,940 So, we're gonna move forward to the, the, the ether disassembly. 88 00:08:23,080 --> 00:08:30,140 Um, when it comes to, when it, when it comes to, to OSHI, both the 5G and 4G were essentially running the same binary. 89 00:08:30,320 --> 00:08:32,200 Um, they're, they're, they're, they're almost identical. 90 00:08:32,200 --> 00:08:35,860 There, there's a few differences, but this code is, this code remains the same. 91 00:08:35,860 --> 00:08:44,560 And essentially shows how you can take the, the network time protocols, uh, IP one, and how it's passed directly into a shell command. 92 00:08:44,560 --> 00:08:45,840 Very straightforward. 93 00:08:47,380 --> 00:08:50,180 So, we're gonna go ahead and just take a look and show you that. 94 00:08:50,180 --> 00:08:50,180 Um, 95 00:09:02,850 --> 00:09:05,270 oh , that's one. 96 00:09:05,270 --> 00:09:09,450 I think the, the demo is in a different section here. 97 00:09:09,450 --> 00:09:11,130 As I download the slides. 98 00:09:11,130 --> 00:09:11,910 One second. 99 00:09:11,910 --> 00:09:13,250 I may need some assistance. 100 00:09:13,250 --> 00:09:14,630 If someone can help me out. 101 00:09:14,630 --> 00:09:15,850 Maybe two over there. 102 00:09:17,570 --> 00:09:19,910 Because I, uh, I, I uploaded all the demos. 103 00:09:19,910 --> 00:09:22,210 So, if there's anyone available, just please reach out to me. 104 00:09:22,210 --> 00:09:23,130 One moment. 105 00:09:24,910 --> 00:09:28,230 But I think I'm gonna resolve this before that's necessary. 106 00:09:28,230 --> 00:09:29,890 So, just bear with me here. 107 00:09:31,910 --> 00:09:32,510 Alright. 108 00:09:32,510 --> 00:09:34,170 As long as these hit. 109 00:09:34,170 --> 00:09:34,930 Alright. 110 00:09:35,990 --> 00:09:37,710 Complete execution. 111 00:09:38,070 --> 00:09:38,890 Alright. 112 00:09:38,890 --> 00:09:41,270 Oh, that, that's not cute. 113 00:09:41,270 --> 00:09:42,810 That's not cute. 114 00:09:43,510 --> 00:09:44,330 Okay. 115 00:09:44,350 --> 00:09:45,310 Okay. 116 00:09:46,010 --> 00:09:47,070 Uh, you know what? 117 00:09:47,070 --> 00:09:49,710 If I have to log back into my Google account, I will totally do it. 118 00:09:49,710 --> 00:09:52,550 But I think my demos don't want to open now. 119 00:09:52,610 --> 00:09:53,910 That's cute. 120 00:09:55,250 --> 00:10:00,940 Uh, sorry. 121 00:10:00,940 --> 00:10:03,360 I'm a little distracted here. 122 00:10:04,840 --> 00:10:06,040 Alright. 123 00:10:06,720 --> 00:10:07,820 Yes. 124 00:10:09,060 --> 00:10:10,080 Alright. 125 00:10:17,740 --> 00:10:18,440 Alright. 126 00:10:18,440 --> 00:10:20,800 We're, we're gonna get to demos here soon enough. 127 00:10:22,720 --> 00:10:23,560 What? 128 00:10:23,820 --> 00:10:27,820 I don't understand what's going on here. 129 00:10:31,340 --> 00:10:32,740 Okay. 130 00:10:34,340 --> 00:10:36,200 Here's rename. 131 00:10:36,260 --> 00:10:37,640 Come on. 132 00:10:37,740 --> 00:10:40,020 I'm pretty sure I've right clicked rename. 133 00:10:40,020 --> 00:10:40,720 Here we go. 134 00:10:40,720 --> 00:10:41,640 Okay. 135 00:10:47,960 --> 00:10:49,360 Alright. 136 00:10:56,120 --> 00:10:57,000 Alright. 137 00:10:57,000 --> 00:10:58,000 Definitely gonna edit this out. 138 00:10:58,020 --> 00:10:59,560 Get this part out of the funnel. 139 00:11:07,680 --> 00:11:08,460 Alright. 140 00:11:08,980 --> 00:11:11,140 Thank you for bearing with me here today. 141 00:11:14,060 --> 00:11:14,740 Alright. 142 00:11:14,740 --> 00:11:17,220 So now I'm just gonna go over what you're actually seeing in this demo. 143 00:11:17,220 --> 00:11:19,000 Uh, this demo is pretty straight forward. 144 00:11:19,000 --> 00:11:21,120 It just shows me, uh, getting a reverse shell. 145 00:11:21,120 --> 00:11:26,720 And it, it, and you also see the, the contents of the, the little quick and dirty Python script I ran to do it. 146 00:11:26,720 --> 00:11:29,980 Essentially it's just, uh, it's just copying the request. 147 00:11:29,980 --> 00:11:35,520 Actually all these headers aren't even required, but, um, it was a, it was a quick fix and we'll see it in action here. 148 00:11:36,860 --> 00:11:37,420 Alright. 149 00:11:37,420 --> 00:11:39,480 So I'm gonna go ahead and run the script. 150 00:11:40,060 --> 00:11:42,040 Had my reverse shell and bam. 151 00:11:42,040 --> 00:11:42,820 There you go. 152 00:11:42,820 --> 00:11:43,560 Root. 153 00:11:43,560 --> 00:11:48,720 Very, uh, little anticlimactic here, but this is our first example. 154 00:11:50,920 --> 00:11:51,800 Alright. 155 00:11:52,860 --> 00:11:56,840 And because I lost a little bit of time, I'm gonna go ahead and move forward. 156 00:11:58,020 --> 00:12:00,700 But, uh, this is essentially what you see here. 157 00:12:00,760 --> 00:12:02,720 Um, the contents of the root shell. 158 00:12:02,760 --> 00:12:04,300 Um, I also get the root password. 159 00:12:04,300 --> 00:12:05,700 Oh, I, I, I'm sorry, I did forget. 160 00:12:05,700 --> 00:12:09,300 There's a reason why I wanted to, um, show the entire, the entire POC. 161 00:12:09,320 --> 00:12:15,680 Another issue, uh, with this device is that the root password was not even AES, it was DES. 162 00:12:15,780 --> 00:12:20,260 And the password was essentially, um, admin exclamation point 2. 163 00:12:20,360 --> 00:12:23,860 As a hard shell that can't be turned off, it's pretty bad. 164 00:12:23,860 --> 00:12:27,240 So let's go ahead and get back to the slide deck before I lose you guys here. 165 00:12:42,300 --> 00:12:42,840 Alright. 166 00:12:42,840 --> 00:12:44,860 I'm just gonna keep it simple for right now here. 167 00:12:45,140 --> 00:12:47,720 So as you can see here, there's the, there's the contents. 168 00:12:47,720 --> 00:12:48,780 There's the password. 169 00:12:48,840 --> 00:12:49,460 I cracked it. 170 00:12:49,460 --> 00:12:50,500 Admin exclamation point. 171 00:12:50,500 --> 00:12:53,520 Let's go ahead and move on because I have, I have a lot more to go over here. 172 00:12:53,840 --> 00:13:05,900 Um, and if you were wondering, you know, like the relevance of this, whether or not you could actually access it over the internet, you know, even though these devices are essentially designed to use like 5G as like a backup, um, there were some issues, 173 00:13:05,900 --> 00:13:07,540 it appears, with like APN settings. 174 00:13:07,540 --> 00:13:14,000 You could reach these devices over the internet even though you're supposed to be, supposed to be on essentially a LAN. 175 00:13:14,000 --> 00:13:15,540 They were reachable. 176 00:13:15,800 --> 00:13:19,720 And here's a login portal if you just want to take a better look at. 177 00:13:19,720 --> 00:13:22,120 And essentially this device could be compromised. 178 00:13:22,120 --> 00:13:23,220 This is not my device. 179 00:13:23,220 --> 00:13:29,200 I did not test this device but it is certainly appears to be vulnerable and it's definitely wide open to the LAN. 180 00:13:29,560 --> 00:13:40,200 Alright, now let's go ahead and move forward to the 4G devices because these, uh, these are what, these are part of my motivation for deciding to look at 5G devices because these were honestly quick wins. 181 00:13:40,280 --> 00:13:42,980 It's, uh, it's essentially the same thing here. 182 00:13:42,980 --> 00:13:44,380 So let's show you that. 183 00:13:46,020 --> 00:13:51,280 Alright here, so, I don't, I'm not sure if you notice a difference but, um, this code is, is pretty similar. 184 00:13:51,280 --> 00:14:05,280 The, the only reason why the 4G devices are not impacted by the NTP parameter is, is simply, I'm sorry, the only reason why, yeah, is because they don't expose a field for you to actually in, inject it but the code is still in there. 185 00:14:05,280 --> 00:14:07,340 And, it's essentially the same thing. 186 00:14:07,460 --> 00:14:17,060 Um, unsanitized input, a lot, if you can parse that directly into a shell, then you get, you get RCE and, uh, and both of those devices are vulnerable. 187 00:14:17,060 --> 00:14:23,080 This, uh, POC works on both devices and it's almost universe, universal across that manufacturer. 188 00:14:23,440 --> 00:14:26,440 Let's, uh, let's move forward to the next demo here. 189 00:14:26,780 --> 00:14:30,380 Demo 2, show that in action, alright. 190 00:14:33,000 --> 00:14:44,640 Alright, so, this is, uh, pretty straight forward and it essentially shows, uh, me trying to initially log into the device without knowing the password until I'm able to, to successfully show the command injection. 191 00:14:57,510 --> 00:15:01,410 And, yeah, I'm gonna go ahead and run the script. 192 00:15:01,770 --> 00:15:08,110 Um, it's not super visual, uh, right here I'm just, I'm just showing the contents of the script, uh, just for reference here. 193 00:15:09,310 --> 00:15:13,510 And let's go ahead and just skip a little forward cause I am a little short on time here. 194 00:15:14,210 --> 00:15:18,550 Alright, so what you see here is failed password attempts because I don't have the correct thing. 195 00:15:18,790 --> 00:15:21,950 And then, yeah, we get, we get read access. 196 00:15:22,650 --> 00:15:24,410 So, let's move a little forward here. 197 00:15:24,410 --> 00:15:27,610 I do apologize cause I'm trying to get through all this. 198 00:15:28,150 --> 00:15:37,570 Um, but here I just wanted to show the route just to show that, you know, the, the fact that this was exposed over the internet and, uh, over the wind as well. 199 00:15:37,570 --> 00:15:41,410 So, in my opinion, pretty bad, pretty bad. 200 00:15:41,430 --> 00:15:43,470 Um, like I said, this is a, this is a short talk. 201 00:15:43,470 --> 00:15:49,930 I'm not gonna go super deep into the weeds, but I just wanted to, I wanted to address the, a systematic issue across many, many factors. 202 00:15:52,210 --> 00:15:55,690 Alright, so we're on to our, we're on to the second vendor, KUFI. 203 00:15:55,690 --> 00:15:57,110 They have a few products here. 204 00:15:57,110 --> 00:16:03,170 Um, I'm gonna be showing 3 4G devices and 1 5G device at the very end here. 205 00:16:03,550 --> 00:16:07,530 And, uh, you know, this is a, this is a standard model, uh, GC111. 206 00:16:07,530 --> 00:16:12,170 I've noticed that in terms of industry, a lot of these devices are used in, in vehicles. 207 00:16:12,170 --> 00:16:18,670 Um, I've even heard situations where these devices could be used, um, to power like, uh, like, like motor cameras. 208 00:16:18,670 --> 00:16:23,770 So, um, and, uh, yeah, I had a few issues with this device. 209 00:16:23,770 --> 00:16:30,210 Uh, you know, when you're trying many different paths to exploitation, um, I quickly realized that this device used canaries. 210 00:16:30,310 --> 00:16:34,970 And, you know, I'm not a, I'm not a binary ninja, so had to, had to make do with, with what I could. 211 00:16:34,970 --> 00:16:39,350 But, you know, given enough, given enough opportunity, you'll be surprised what you can find. 212 00:16:39,350 --> 00:16:42,510 Um, there's 3 vulnerabilities I've, I've found here. 213 00:16:42,710 --> 00:16:48,750 And, yeah, in this case, um, cause I said this is very condensed, I'm gonna just explain what's going on here. 214 00:16:48,810 --> 00:16:53,730 Essentially, when I look at most devices, there's usually 2 quick, easy paths for command injection. 215 00:16:53,730 --> 00:16:58,490 When it comes to routers and embedded devices, it's usually ping, trace, or, or Wi-Fi. 216 00:16:58,530 --> 00:17:03,070 It seems really common that both of those 2 things are piped into shell commands in the back end. 217 00:17:03,070 --> 00:17:10,230 And Wi-Fi seems to be just as, I mean, I find devices where, where both the parameter was vulnerable to command injection and like cross site scripting. 218 00:17:10,230 --> 00:17:11,470 So, certainly interesting. 219 00:17:11,470 --> 00:17:17,730 But in this case, you see, if you take the Wi-Fi name, you can direct, you can directly pipe it into a shell command. 220 00:17:17,730 --> 00:17:24,710 And because the whole authentication is, is admin, uh, is username equals admin, well, it's essentially unauthenticated. 221 00:17:24,730 --> 00:17:26,370 That's not authentication to me. 222 00:17:26,370 --> 00:17:27,850 That is certainly broken. 223 00:17:35,820 --> 00:17:37,120 Can, can you see them now? 224 00:17:37,620 --> 00:17:38,500 Okay. 225 00:17:44,460 --> 00:17:46,980 Alright, so this is pretty straight forward. 226 00:17:46,980 --> 00:17:54,040 We see that, we see that vulnerable, they see that vulnerable endpoint, and we see go form essentially in the URL path here. 227 00:17:54,540 --> 00:18:05,620 And, yeah, no, in, in this example, um, because I essentially already had root access device, because this device shipped with hard-coded telnet admin root. 228 00:18:05,620 --> 00:18:10,560 So, it was very easy to get feedback to test to see if my command injection, because I already had root access. 229 00:18:10,620 --> 00:18:18,680 Now, that account was hard-coded, but, um, essentially for this device, the, uh, the, the Wi-Fi parameter was vulnerable to command injection. 230 00:18:18,760 --> 00:18:21,660 And that gives me pre-auth RCE. 231 00:18:21,800 --> 00:18:27,580 Uh, I might re-bore you guys with this whole demo, because I'm kind of short on time here, but we're gonna move forward, because that was pretty straight forward. 232 00:18:28,960 --> 00:18:30,200 Alright, here's the next device. 233 00:18:30,200 --> 00:18:32,360 This device is actually a little bit more interesting. 234 00:18:32,420 --> 00:18:41,160 It's another 4G device, um, but it's a device that I wasn't initially able to get fully pre-auth, but maybe one theoretical one. 235 00:18:41,160 --> 00:18:43,540 So, let's see what I'm talking about here. 236 00:18:43,540 --> 00:18:47,100 So, I did find another vulnerable parameter to command injection. 237 00:18:47,100 --> 00:18:49,180 In this case, it's an APN setting. 238 00:18:49,180 --> 00:18:56,500 Um, it, it's, it's essentially part of the embedded Android package for the device, because it's a, it has an embedded hotspot. 239 00:18:56,500 --> 00:19:00,840 So, when you're setting, to set the, the pin code, allowed command injection. 240 00:19:00,840 --> 00:19:04,840 But this thing was vulnerable to, to both command injection and buffer overflow. 241 00:19:04,840 --> 00:19:09,800 I actually, uh, got the buffer overflow to work after, uh, I realized it was vulnerable to command injection. 242 00:19:09,800 --> 00:19:18,100 But it was certainly interesting to see the parameter vulnerable to both, because essentially, uh, if you see at the bottom, you'll see call shell, AC stack. 243 00:19:18,120 --> 00:19:23,000 You, you'll see that this information is sent to the stack without, um, without verifying the lengths. 244 00:19:23,000 --> 00:19:26,220 And I'm gonna show a demo of how this can be a problem. 245 00:19:26,220 --> 00:19:27,280 Demo four. 246 00:19:27,560 --> 00:19:32,500 So, for this device, although I did find a command injection, the command injection required authentication. 247 00:19:32,500 --> 00:19:39,800 So, this is gonna be exempt of a cross-site request forgery in order to trigger the command injection, which is semi-authenticated. 248 00:19:39,800 --> 00:19:45,180 I guess it really depends on, uh, yeah, so, one second. 249 00:19:47,820 --> 00:19:50,700 Alright, four, wait, make sure I'm on the right slide. 250 00:19:51,920 --> 00:19:53,180 There we go. 251 00:19:54,600 --> 00:19:55,320 Alright. 252 00:19:56,960 --> 00:20:03,620 Alright, so, you see this, uh, see the, the embedded web form in, in the website? 253 00:20:03,620 --> 00:20:06,660 It looks a little bit dated, but, oh, did I, am I showing the right demo? 254 00:20:07,100 --> 00:20:07,840 Okay, yeah. 255 00:20:07,840 --> 00:20:09,460 So, you're, we're gonna do this a little backwards. 256 00:20:09,460 --> 00:20:14,440 In this case, this is gonna be, this is gonna be an example of me breaking the device. 257 00:20:15,880 --> 00:20:21,660 And, uh, I was not able to recover, even after trying to connect to UART, because I over-wrapped too much memory. 258 00:20:21,660 --> 00:20:25,960 But, um, this is an example of a, of, in this case, a buffer overflow. 259 00:20:25,960 --> 00:20:33,360 There's no stack canary, so this, there's, there's, there's theoretical RCE, uh, via, via binary exploitation here. 260 00:20:33,360 --> 00:20:35,420 This is an example of the Nautilus service. 261 00:20:35,440 --> 00:20:43,520 Um, and I have another example of, of chaining the cross-site request forgery with command injection to get, like, quasi-pre-auth RCE. 262 00:20:43,520 --> 00:20:45,160 So, we're gonna just show that. 263 00:20:46,060 --> 00:20:46,940 Alright. 264 00:20:55,150 --> 00:21:02,130 Alright, so, what we see here, essentially, you see here is, uh, the beginning of a Telnet prompt. 265 00:21:02,130 --> 00:21:09,910 Initially, Telnet is disabled on this device, but I'm gonna go ahead and start the, the Telnet daemon, um, by using the, the cross-site request forgery. 266 00:21:15,140 --> 00:21:16,020 Alright. 267 00:21:18,060 --> 00:21:20,440 And I'm gonna speed up here. 268 00:21:26,680 --> 00:21:31,600 Yeah, so, at first, invalid, because I obviously didn't have, uh, the, the Telnet service active. 269 00:21:31,600 --> 00:21:34,460 And now, I'll be able to get in there. 270 00:21:35,220 --> 00:21:39,040 Well, besides a little typo you see on the screen, we're gonna, we're gonna ignore that, guys. 271 00:21:39,040 --> 00:21:40,360 A few more moments. 272 00:21:51,540 --> 00:21:57,060 Alright, and we see the credentials here from the, from an exploited administrator. 273 00:21:57,060 --> 00:21:59,300 So, that's pretty straight forward. 274 00:21:59,300 --> 00:22:02,740 Alright, we're gonna move forward here. 275 00:22:05,930 --> 00:22:12,090 Alright, so, this device, I'm gonna show you the, the arbitrary SMS, which is part of the title here. 276 00:22:12,110 --> 00:22:16,230 Um, once again, uh, Android is essentially baked into this device. 277 00:22:16,430 --> 00:22:18,010 Our CPF 908. 278 00:22:20,410 --> 00:22:25,990 And, uh, you know, just to give a little context when it comes to AT commands, here's some examples of things that you can do. 279 00:22:25,990 --> 00:22:30,750 Um , having this kind of low-level control over a device can certainly lead to, uh, to, to compromise . 280 00:22:30,750 --> 00:22:33,930 You can, like, read messages, send messages, and so forth. 281 00:22:34,310 --> 00:22:38,270 And I'm gonna show an example of how I link all this together. 282 00:22:38,630 --> 00:22:40,870 I think something's out of order. 283 00:22:46,020 --> 00:22:48,320 Okay, let's try demo 6. 284 00:22:48,580 --> 00:22:50,940 I'm gonna show you what's going on here. 285 00:22:51,300 --> 00:22:53,000 Alright, here's my phone. 286 00:22:54,520 --> 00:23:08,900 Alright, so, the problem, the, the problem with this device is that, uh, essentially there's a, there's a vul - there's a vulnerable endpoint, um, that, that allows me to, to have admin privileges without fully authenticating. 287 00:23:08,900 --> 00:23:12,220 Um, and if you see here, it's GoForm. 288 00:23:12,220 --> 00:23:13,540 GoForm again. 289 00:23:13,600 --> 00:23:15,320 So, no authentication required. 290 00:23:15,380 --> 00:23:16,860 GoForm is hit. 291 00:23:16,920 --> 00:23:24,340 And because, because AT commands allow you to do arbitrary things, I, you could force a device to send SMS messages. 292 00:23:24,340 --> 00:23:28,760 It can, it can certainly be problematic, along with information disclosure. 293 00:23:33,300 --> 00:23:36,300 Alright, so this is an example of a 5G device. 294 00:23:36,400 --> 00:23:39,040 Chipset Snapdragon X62. 295 00:23:39,460 --> 00:23:46,160 And these are a little bit more expensive, since a lot of 5G devices usually, usually will, uh, usually will give you a premium over 4G. 296 00:23:46,160 --> 00:23:46,820 But it makes sense. 297 00:23:46,820 --> 00:23:48,360 We're almost at 6G at this point. 298 00:23:48,360 --> 00:23:53,220 I'm gonna show you an example of sending an arbitrary SMS message with this device as well. 299 00:23:53,560 --> 00:23:57,980 We're gonna go over, over to demo 7, and we are almost done here. 300 00:24:01,340 --> 00:24:06,600 Alright, so, now, when it comes to this device, I actually wasn't able to get a root shell on this device. 301 00:24:06,600 --> 00:24:16,380 I did, uh, I did, you know, I did show, uh, um, broken access control and the ability to, to, and the ability to, to exploit these vulnerable endpoints. 302 00:24:16,440 --> 00:24:21,420 Um, I bought dozens of devices, usually single copies. 303 00:24:21,420 --> 00:24:28,480 I don't, you know, I don't have a budget to, to buy multiple devices and break them the proper way that you, you see a lot, you see a lot of researchers do. 304 00:24:28,480 --> 00:24:31,720 So this is all me just kind of winging it on one device only. 305 00:24:31,720 --> 00:24:33,760 And I wasn't willing to break it. 306 00:24:33,780 --> 00:24:47,420 So in this case, uh, just, it just shows information disclosure initially, like you can reveal the admin password and, uh, you know, I think, you know, just showing passwords, allowing me to, to, to text people is just, it's a very bad situation. 307 00:24:47,580 --> 00:24:49,520 Um, and these things aren't, these things aren't cheap. 308 00:24:49,520 --> 00:24:50,960 This, that device is like 400 now. 309 00:24:50,960 --> 00:24:56,520 I bought it at 200, but it went up, like, surprisingly, uh, not, not exactly cheap. 310 00:24:56,600 --> 00:24:59,300 And you see credentials are, are being disposed here. 311 00:24:59,300 --> 00:25:00,480 But you guys can look at this later. 312 00:25:00,480 --> 00:25:04,100 I'm gonna move forward just because we're short on time here. 313 00:25:04,600 --> 00:25:06,820 But I definitely appreciate your patience here. 314 00:25:07,180 --> 00:25:08,800 And we have another demo. 315 00:25:17,710 --> 00:25:18,750 All right. 316 00:25:18,870 --> 00:25:26,790 So, um, it's, uh, I'm just displaying the, the contents of the, the Python script. 317 00:25:26,790 --> 00:25:30,930 I'm just gonna show, without, without being authenticated, just forcing SMS. 318 00:25:30,930 --> 00:25:40,910 And the thing about it is that these devices don't really advertise that you can even send SMSs in the first, so it's, it just seems like a lot of functionality to have essentially no good keys attached to it, so. 319 00:25:42,570 --> 00:25:45,310 And in a few moments here, you're gonna see the, the text message. 320 00:25:45,310 --> 00:25:52,950 What's really interesting is that in order to test these, cause these, these are foreign products and they use, like, they use bands that aren't all, all available in the United States. 321 00:25:53,190 --> 00:25:57,050 Um, I had to get some prepaid, uh, I had to get some prepaid SIM cards. 322 00:25:57,130 --> 00:26:02,310 And they specifically said no data or SMS access, yet I was able to do this. 323 00:26:02,310 --> 00:26:09,470 So, like, I, I thought, I thought it was interesting, like, no SMS, but it still works, like, um, yeah. 324 00:26:09,470 --> 00:26:13,250 So, three, where are we at here? 325 00:26:15,390 --> 00:26:17,130 Bear with me. 326 00:26:17,250 --> 00:26:19,410 When it rains, it pours. 327 00:26:19,810 --> 00:26:20,770 Alright. 328 00:26:21,950 --> 00:26:24,750 Alright, so, I'm just gonna go over the, obviously, conclusions. 329 00:26:24,750 --> 00:26:32,810 We have the improper access control, information disclosure, uh, you know, lack of input sanitization, all sorts of issues. 330 00:26:32,810 --> 00:26:39,250 The, the main thing is that I really feel like vendors, vendors should be required to have a solid software bill of materials. 331 00:26:39,250 --> 00:26:42,730 We simply shouldn't be in a situation in, you know, 2025. 332 00:26:42,790 --> 00:26:46,150 I mean, these devices, like, devices I'm showing you, they're like, they're like post-2020. 333 00:26:46,150 --> 00:26:52,850 So, still relatively new and we're still having systematic issues, uh, across our industry. 334 00:26:52,850 --> 00:26:59,090 So, I'm hoping that, I'm hoping this talk just, if nothing else, showed light on how easy it is to hack out two devices. 335 00:26:59,090 --> 00:27:01,710 And to certainly take a look at GoForm, if you see it. 336 00:27:01,710 --> 00:27:04,930 I want to thank you all for, for bearing with me here and all the hiccups I've had. 337 00:27:04,930 --> 00:27:09,790 And, uh, I just hope you guys enjoy, uh, enjoy the rest of DefCon and have a great day.