1 00:00:00,000 --> 00:00:00,900 Hello, everyone. 2 00:00:00,900 --> 00:00:03,060 Thanks for being here. 3 00:00:03,060 --> 00:00:08,420 It's actually pretty cool, because Sunday talks are a bit of a catch-22. 4 00:00:09,540 --> 00:00:15,160 Because on one hand, we are not jet-lagged anymore, which is great. 5 00:00:15,160 --> 00:00:20,680 On the other hand, we're all exhausted from all the hacking and partying that's been going on these days. 6 00:00:20,860 --> 00:00:22,140 Which is terrible. 7 00:00:22,400 --> 00:00:27,580 But still, I'm very, very happy to be here and to see so many of you. 8 00:00:27,680 --> 00:00:31,140 This talk is Smart Devices, Dumb Resets. 9 00:00:31,140 --> 00:00:53,540 And it will be a fairly short session about some of my experiments with various retailers and how they approach resetting devices before reselling them as repackaged, pre-owned, or whatever other term they use for labeling stuff that's been, well, used and returned. 10 00:00:53,580 --> 00:00:58,120 The ones that really, really make me giggle is pre-loved. 11 00:00:58,320 --> 00:01:04,260 And I really hope that whoever used my robot vacuum before me didn't use it for love. 12 00:01:05,580 --> 00:01:06,420 Okay. 13 00:01:06,420 --> 00:01:07,960 Just a quick disclaimer. 14 00:01:07,960 --> 00:01:10,960 In this talk, I will not mention any retailers. 15 00:01:11,120 --> 00:01:15,980 My aim here is not to point fingers, but to inform and to entertain. 16 00:01:15,980 --> 00:01:24,900 So, any information which may indicate a potential retailer or vendor is purely coincidental and only used to make a point. 17 00:01:26,020 --> 00:01:29,800 So, before we jump into the fun stuff, let me introduce myself. 18 00:01:29,800 --> 00:01:38,500 I am Matej Anthony-Josephs, a senior penetration tester at HappeningXYZ, where I work with a really cool team of hackers. 19 00:01:39,500 --> 00:01:41,620 I'm a junior husband. 20 00:01:41,720 --> 00:01:45,340 Or does three years of marriage promote me to mid-level? 21 00:01:45,760 --> 00:01:47,040 I don't know. 22 00:01:47,040 --> 00:01:54,300 Anyway, I'm also the founder of Hive Hack, a boutique cybersecurity company built alongside my wife. 23 00:01:54,600 --> 00:01:57,420 And generally speaking, I just love hacking stuff. 24 00:01:57,420 --> 00:02:01,740 Websites, people, devices, pretty much everything. 25 00:02:01,840 --> 00:02:09,640 And I'm not a hardware hacking expert whatsoever, but I enjoy the potential impact of IoT hacking. 26 00:02:10,020 --> 00:02:19,100 The idea that actions done in a virtual environment can have an impact in the physical environment fascinates me to this day. 27 00:02:20,060 --> 00:02:27,800 So, I remember how one time I was at a conference and found that the self-service check-in tablets were not properly configured. 28 00:02:28,000 --> 00:02:34,060 I escaped the kiosk mode pretty easily and went on to discover that the tablet was running Windows. 29 00:02:34,720 --> 00:02:39,620 So, I found the Wi-Fi password and connected my own device to the network. 30 00:02:39,620 --> 00:02:49,960 And after a quick network scan, I found several devices with HTTP and HTTPS ports open. 31 00:02:50,600 --> 00:02:51,900 And guess what those were? 32 00:02:51,900 --> 00:02:54,260 Those were the badge printers. 33 00:02:55,340 --> 00:02:59,740 But they were password protected, so there was nothing I could do about it, right? 34 00:03:00,340 --> 00:03:02,580 Well, yeah, that's wrong. 35 00:03:02,980 --> 00:03:03,760 Well, guess what? 36 00:03:03,760 --> 00:03:05,540 They were using default credentials. 37 00:03:05,540 --> 00:03:08,080 Something as simple as admin, admin. 38 00:03:08,720 --> 00:03:12,480 So, next thing you know, I was printing my own custom badge. 39 00:03:12,680 --> 00:03:15,160 And there were several levels of failure here. 40 00:03:15,600 --> 00:03:18,460 Firstly, the kiosk mode was not properly configured. 41 00:03:18,840 --> 00:03:24,400 Secondly, the tablets were in the same network as the network printers, well, the badge printers. 42 00:03:24,400 --> 00:03:28,260 And thirdly, the web portal of the printers was using default credentials. 43 00:03:28,660 --> 00:03:32,480 Perhaps lastly, no one was attending the tablets. 44 00:03:32,480 --> 00:03:34,300 No one was there to stop me. 45 00:03:34,440 --> 00:03:43,140 Actually, one of the volunteers who was confused about the badge not looking like all the others handed it over to me without asking any questions. 46 00:03:43,900 --> 00:03:49,180 So, this was a full exploitation chain of people, processes, and technology. 47 00:03:49,280 --> 00:03:56,240 And while I absolutely love web application hacking, you don't typically end up with souvenirs from web apps. 48 00:03:56,240 --> 00:03:58,540 Whereas with IoT, you sometimes may. 49 00:03:58,540 --> 00:04:01,840 Like the custom badge which you can see in the picture. 50 00:04:03,020 --> 00:04:04,060 Right. 51 00:04:04,060 --> 00:04:05,800 So a bit of context here. 52 00:04:05,800 --> 00:04:11,120 The idea behind this talk came about seven years ago when I was a broke student. 53 00:04:11,320 --> 00:04:14,180 I used to live two minutes away from the beach. 54 00:04:14,460 --> 00:04:17,660 And I decided to order an inflatable kayak. 55 00:04:17,660 --> 00:04:21,820 It was $150, which was a lot of money for me back then. 56 00:04:21,840 --> 00:04:25,820 So I used it for a week and even lent it to some friends to use it. 57 00:04:25,820 --> 00:04:31,000 But one day, well, it started deflating. 58 00:04:31,880 --> 00:04:33,060 It was punctured. 59 00:04:33,060 --> 00:04:34,820 So I decided to send it back. 60 00:04:35,140 --> 00:04:39,500 And to be honest, I'm not going to lie, I was a bit concerned that they will not accept it. 61 00:04:39,500 --> 00:04:41,400 It was obviously used. 62 00:04:41,480 --> 00:04:43,320 It still had sand in it. 63 00:04:43,500 --> 00:04:45,000 It was packaged horribly. 64 00:04:45,860 --> 00:04:49,900 But a few days later, I was pleasantly surprised to see that I got a refund. 65 00:04:50,360 --> 00:04:52,340 So this got my gears spinning. 66 00:04:52,400 --> 00:04:59,680 I thought, wow, I can really borrow things as long as I use their full price as a deposit. 67 00:05:00,260 --> 00:05:06,960 Actually, a few days later, I noticed that the kayak was reposted as pre-owned for cheaper. 68 00:05:07,080 --> 00:05:15,780 I did not do this, but in theory, one could have bought the item, returned it, and then buy it again from a different account for a bit of a discount. 69 00:05:16,520 --> 00:05:22,040 So I recently asked ChatGPT if this would be considered fraud. 70 00:05:22,380 --> 00:05:25,600 And by the way, don't take legal advice from ChatGPT. 71 00:05:25,780 --> 00:05:27,520 But here's what it said. 72 00:05:27,820 --> 00:05:42,400 This is not fraudulent if you are operating in the return policy, if the price drop is legitimate, so you're not actually getting involved in any sort of savvy shopping. 73 00:05:43,620 --> 00:05:52,000 However, it is potentially fraudulent or unethical if you are trying to game the system or force a price drop. 74 00:05:52,000 --> 00:05:57,340 So long story short, you should not abuse these return policies to get price drops. 75 00:05:57,480 --> 00:06:02,120 But you may be wondering now, where does IoT actually come into play here? 76 00:06:02,120 --> 00:06:06,400 Because we've been talking for five minutes and haven't touched upon IoT yet. 77 00:06:06,400 --> 00:06:07,800 Well, bear with me. 78 00:06:07,800 --> 00:06:16,060 Last year at DEF CON 32, Andrew Bellini delivered a brilliant, beginner-friendly talk about hacking IoT devices. 79 00:06:16,120 --> 00:06:20,200 So I decided to start playing around with some hardware hacking. 80 00:06:20,720 --> 00:06:24,020 And this is when the idea became reality. 81 00:06:24,220 --> 00:06:32,900 Also, Michael Coppola had a great presentation at DEF CON 20 about backdooring stock firmware images for consumer routers. 82 00:06:33,260 --> 00:06:40,420 He even shared a tool he developed, the Router Post-Exploitation Framework, RPEF for short. 83 00:06:40,420 --> 00:06:45,500 Unfortunately, the last commit to that project was in 2013. 84 00:06:45,780 --> 00:06:49,340 So it would be great if someone could revive it. 85 00:06:49,440 --> 00:06:56,100 I also took a lot of inspiration from Matt Brown, who always puts some great hardware hacking content on YouTube. 86 00:06:56,480 --> 00:07:01,200 Also, Dennis Giesa had some great talks at DEF CON in the past few years. 87 00:07:01,220 --> 00:07:06,560 One of my favorite ones being about hacking vacuum robots. 88 00:07:07,540 --> 00:07:16,600 Now, there are many great researchers in the IoT hacking space, and I'm sure you got the chance to meet some of them in these past few days. 89 00:07:17,020 --> 00:07:22,180 So, for this research, I formulated the following hypothesis. 90 00:07:22,440 --> 00:07:28,780 Retailers do not implement enough checks to prevent reselling backdoored devices. 91 00:07:29,400 --> 00:07:34,020 And to verify this, I defined a simple methodology. 92 00:07:34,140 --> 00:07:39,300 First, I'd have to identify devices with firmware which can be overwritten. 93 00:07:39,640 --> 00:07:50,720 Then, I should order those devices, modify their firmware, return them with the modified firmware, and wait for the devices to be resold as pre-owned. 94 00:07:50,720 --> 00:07:56,580 And of course, buy them again to ensure that the firmware modification was persistent. 95 00:07:57,080 --> 00:08:01,660 And the last step is actually the most important one here. 96 00:08:01,720 --> 00:08:05,440 As I do not want my backdoor to spread in the wild. 97 00:08:05,760 --> 00:08:14,440 And to do this, I created a simple web scraper which notified me on Discord every time a device from my list became available as pre-owned. 98 00:08:15,040 --> 00:08:19,700 This way, I could order it immediately, as soon as it was posted. 99 00:08:20,080 --> 00:08:31,620 Moreover, to reduce the risk of any negative impact if I failed to buy the device again, my backdoor was very, very simple and only worked as a proof of concept. 100 00:08:31,860 --> 00:08:45,280 So instead of implementing a full agent, which is communicating with my C2 server, I just created a mechanism whereby a simple request is being made to an EC2 instance owned by me. 101 00:08:45,280 --> 00:08:46,360 Nothing more. 102 00:08:46,360 --> 00:08:54,820 So if the device is plugged in and connected to the internet, all it does is make a simple GET request to my HTTP server. 103 00:08:55,060 --> 00:08:56,500 Simple, right? 104 00:08:58,900 --> 00:09:03,820 So... well, the specific device used for this research is less important. 105 00:09:04,260 --> 00:09:09,500 However, I'll give you enough information to find similar devices yourselves. 106 00:09:10,140 --> 00:09:15,740 In theory, almost all OpenVRT compatible routers can be used for this. 107 00:09:15,840 --> 00:09:23,800 And that is because people have actively installed the OpenVRT firmware on them, and the process is very well documented. 108 00:09:23,880 --> 00:09:29,960 So it is known that these devices support other firmware than the original one, right? 109 00:09:31,760 --> 00:09:36,840 Now people have been looking at updating IoT firmware for ages. 110 00:09:36,980 --> 00:09:48,560 This may be either because they do not trust the vendors with their data, or just because they're not happy with the performance or the customization options for the devices. 111 00:09:48,560 --> 00:09:55,920 So for instance, devices such as vacuum cleaning robots may expose sensitive information about the users. 112 00:09:56,780 --> 00:10:04,180 You could probably get an idea of the structure of the person's home, maybe get an idea of where they live. 113 00:10:04,640 --> 00:10:17,200 Now I'm not sure if this is a feature or a bug, considering that we know that in 2018, the Strava fitness tracking app was used to expose hidden military bases in Afghanistan. 114 00:10:17,790 --> 00:10:28,420 In any case, there are several communities for people who want to create custom firmware for IoT devices. 115 00:10:29,280 --> 00:10:39,520 Now, you can join those communities and easily find hundreds, if not maybe thousands, of good candidates for this type of research. 116 00:10:39,780 --> 00:10:45,640 So for me, one of the most important aspects was that the devices must be cheap. 117 00:10:46,000 --> 00:10:54,100 I expected to break several of them during this research, so I didn't really want to break the bank through it. 118 00:10:54,100 --> 00:11:03,280 Moreover, based on my experience, suppliers of cheap IoT devices typically don't invest too much in security. 119 00:11:03,820 --> 00:11:16,740 Now this may be a misconception, however, because cheap devices are more widely used and tested by users, whereas expensive devices may actually have less real-world security testing. 120 00:11:17,260 --> 00:11:24,660 In any case, I picked up several TP-Link routers, everyone's favorite IoT hacking beginner-friendly devices. 121 00:11:25,980 --> 00:11:37,880 And I ordered them from several reputable retailers, and the reason for this is that I was confident that I could override the firmware, but I expected each retailer to act differently. 122 00:11:38,080 --> 00:11:43,580 So I bought 15 devices from 5 different retailers, 3 from each. 123 00:11:44,400 --> 00:11:48,800 So I attempted a few different techniques for updating the firmware. 124 00:11:48,800 --> 00:11:55,860 First, I opened up, physically opened up one of the devices, and pulled the firmware using SPI. 125 00:11:55,860 --> 00:12:02,600 And in theory, opening up the device would break the seal, preventing the device from being resold. 126 00:12:03,000 --> 00:12:05,280 And, well, we'll see about that. 127 00:12:05,360 --> 00:12:10,940 With the firmware downloaded, I used Binwalk to check out the file system. 128 00:12:10,980 --> 00:12:18,560 So I configured a service to run every 10 minutes and make a request to my IP address with a specific identifier. 129 00:12:19,960 --> 00:12:24,340 Moreover, I added a self-destruct in this service. 130 00:12:24,340 --> 00:12:29,500 So after 3,000 requests, the service was disabled and the script was deleted. 131 00:12:29,700 --> 00:12:35,260 So in theory, after about 21 days of running, the device would return to its initial state. 132 00:12:36,300 --> 00:12:43,840 And here you can actually see a few of my prior experiments, trying to change the TP-Link logo to my own. 133 00:12:45,560 --> 00:12:50,760 So with the modifications, I recreated the binary using MakeSquashFS. 134 00:12:50,760 --> 00:13:05,160 And as you can see in the screenshot in the middle, or maybe you can't because the text is quite small, there was an initial discrepancy between the compression used for the original firmware and the modified one. 135 00:13:05,400 --> 00:13:11,120 The initial firmware was XZ-compressed, whereas my one was ZLib-compressed. 136 00:13:11,120 --> 00:13:18,360 So for this reason, it is important to run MakeSquashFS with the compression flag set to the desired method. 137 00:13:18,380 --> 00:13:27,760 This would prevent any sort of issues which may come further down the road when the firmware is not actually too close to the initial one. 138 00:13:29,200 --> 00:13:41,320 So now in terms of writing the firmware, one can either use SPI to flash the memory, or the web interface potentially, to upload new firmware. 139 00:13:41,640 --> 00:13:48,840 So if you're lucky, you can go straight through the web interface, meaning that you could even conduct this attack remotely. 140 00:13:49,640 --> 00:13:58,060 On some devices, the web interface may check for various signatures, and in that case SPI is most likely the way to go. 141 00:13:58,460 --> 00:14:05,940 And as you can see in the screenshot on the right, I was unable to upload the firmware via the web interface. 142 00:14:06,240 --> 00:14:09,240 Well, it's actually the left, but your right. 143 00:14:10,580 --> 00:14:27,400 So I tried to write the firmware using SPI, and as my IoT hacking setup is rudimentary, to say the least, overwriting the firmware using SPI actually required very steady hands, which unfortunately I don't possess. 144 00:14:27,560 --> 00:14:32,140 And this was frustrating, and I really thought of pivoting to a different device. 145 00:14:32,140 --> 00:14:35,840 And this was all until I found a little workaround. 146 00:14:36,780 --> 00:14:51,120 TFTP, the Trivial File Transfer Protocol, which some devices use for recovery purposes, so where they query a TFTP server on a predefined local IP looking for a specific firmware file. 147 00:14:51,720 --> 00:15:03,660 So my tests seemed to work fine, and in the end, despite pressing and holding the reset button, only configurations were being removed, but my custom backdoored firmware remained. 148 00:15:05,060 --> 00:15:08,860 So now was the time to try and return these devices. 149 00:15:08,860 --> 00:15:15,400 And I mentioned that I changed my mind, I don't need them any longer, and that I was actually looking for different devices. 150 00:15:16,180 --> 00:15:18,940 And this was only one week after ordering. 151 00:15:19,400 --> 00:15:26,940 So a courier came up to pick up the hardware, and within another week, I received my money back. 152 00:15:26,940 --> 00:15:27,840 Great. 153 00:15:27,880 --> 00:15:30,420 No comments, no additional questions asked. 154 00:15:30,540 --> 00:15:33,580 Not even for the device which I opened up. 155 00:15:34,240 --> 00:15:39,100 So none of them have yet connected to my C2 IP up to this point. 156 00:15:39,180 --> 00:15:48,980 So it either means that the technical teams did not check the devices at all, or perhaps that they checked them offline, without connecting them to the internet. 157 00:15:49,400 --> 00:15:55,840 Basically they probably just plugged the devices in, the LEDs blinked, and they thought okay, fair enough, they work. 158 00:15:57,320 --> 00:15:59,660 Right, so now what? 159 00:15:59,920 --> 00:16:07,580 To be honest, I was expecting to get some sort of callback from the devices in the retailer's network. 160 00:16:07,700 --> 00:16:10,900 And this would have proven some interesting impact. 161 00:16:11,040 --> 00:16:15,020 Potentially getting a backdoor within the internal network of retailers. 162 00:16:15,240 --> 00:16:17,860 But this was not the case, unfortunately. 163 00:16:18,620 --> 00:16:24,900 With my scraper constantly running, I was waiting to see if the items were being resold. 164 00:16:24,900 --> 00:16:29,020 And at some point I thought that they will just end up in a landfill. 165 00:16:29,580 --> 00:16:32,960 But a few days later, I got a notification. 166 00:16:33,300 --> 00:16:36,080 And another few days later, another one. 167 00:16:36,520 --> 00:16:41,020 So all tested retailers have reposted the devices as repackaged. 168 00:16:41,120 --> 00:16:43,160 And I tried to buy them all back. 169 00:16:43,800 --> 00:16:49,100 Well, out of the 15 devices I was only able to buy 13 back. 170 00:16:49,100 --> 00:16:52,820 Two of them were sold to someone else who was quicker than me. 171 00:16:53,200 --> 00:16:57,980 So you can see the resealed tape on the outer edges of the box. 172 00:16:58,400 --> 00:17:02,640 And you can probably also see that it says personalized security on the box. 173 00:17:02,640 --> 00:17:04,180 Well, of course it does. 174 00:17:05,440 --> 00:17:14,000 And yes, I got a callback from all 15 devices, even the two which were actively used and which I was unable to get. 175 00:17:14,360 --> 00:17:19,780 And almost a month later, I stopped getting callbacks from the two devices. 176 00:17:19,800 --> 00:17:24,940 And this is most likely thanks to the self-destruct script which I set up. 177 00:17:25,280 --> 00:17:31,180 Actually, it's maybe more of a self-restore script because it actually brings the devices back to normal. 178 00:17:31,940 --> 00:17:42,240 Okay, so going back to the hypothesis that retailers did not implement enough checks to prevent reselling backdoor devices, I can strongly confirm that that is the case. 179 00:17:42,300 --> 00:17:46,960 Or at least it certainly was the case for the five retailers which I tested. 180 00:17:47,500 --> 00:18:02,080 So not only did they resell the devices, but they also did not properly check for the functionalities which was obviously the case as I did not get any requests in my C2 server before they were resold. 181 00:18:02,420 --> 00:18:11,720 So even if they were to check the functionalities of the devices, they would have worked perfectly and probably they would have been resold anyway. 182 00:18:12,340 --> 00:18:14,540 But let's talk about impact here. 183 00:18:14,540 --> 00:18:20,380 I only tested this on routers, but it can be done on almost any type of IoT devices. 184 00:18:20,580 --> 00:18:28,800 Instead of a simple script which sends a simple request to an IP address, a full-scale backdoor could be set up. 185 00:18:29,280 --> 00:18:40,020 Or maybe you could set up a botnet using each router as a proxy for your attacks so you would have access to several clean residential IP addresses for your attacks. 186 00:18:40,820 --> 00:18:51,280 At DEFCON 31, Dennis Giese talked about vacuum robots and even showed a proof of concept of how the camera can be used to transmit visual information. 187 00:18:51,780 --> 00:19:00,060 Now think about this, returning a vacuum cleaning robot after modifying the firmware to provide a live feed from the camera. 188 00:19:00,640 --> 00:19:03,720 You could actually see what's going on inside someone's house. 189 00:19:03,720 --> 00:19:08,760 And I say house here because regular people would be the ones typically buying repackaged devices. 190 00:19:08,760 --> 00:19:17,380 But who knows, maybe the facility manager at the office thought that they can save the company a bit of money by buying a repackaged vacuum robot. 191 00:19:17,660 --> 00:19:21,340 Great, now you could potentially see inside some offices. 192 00:19:21,680 --> 00:19:28,460 Or even worse, the attacker could see that you haven't vacuumed in five weeks and decide to start a cleaning cycle for you out of pity. 193 00:19:29,660 --> 00:19:32,900 Well, surveillance cameras are a great example as well. 194 00:19:32,900 --> 00:19:38,360 Interesting case, we often see live feeds on Shodan from people's homes. 195 00:19:38,560 --> 00:19:44,380 The default configuration should be that the camera is not publicly accessible, right? 196 00:19:44,620 --> 00:19:50,340 But how about modifying the firmware to make the feed public regardless of this configuration? 197 00:19:51,020 --> 00:19:58,060 You can repeat this on pretty much any type of IoT device, washing machines, air conditioning units, you name it. 198 00:19:58,880 --> 00:20:01,090 But is this attack critical? 199 00:20:02,030 --> 00:20:04,270 Well, I honestly don't think so. 200 00:20:04,270 --> 00:20:13,710 And while most of this talk, I showed the shortcomings of retailers, they do have pretty well funded fraud prevention teams. 201 00:20:13,710 --> 00:20:18,090 So it's unlikely that this attack could be done at scale in this context. 202 00:20:18,370 --> 00:20:25,370 So think about it this way, you just bought 500 devices, updated the firmware and decided to return them. 203 00:20:25,450 --> 00:20:31,250 Well, it's unlikely that they will be as passive as they were with my 15 devices. 204 00:20:32,390 --> 00:20:35,650 Thus, it could be quite difficult to do this attack at scale. 205 00:20:35,770 --> 00:20:40,710 And I would argue that it is even more difficult to do this attack in a targeted manner. 206 00:20:40,710 --> 00:20:47,770 So I mean, how could you coerce someone into buying that specific device which you modify the firmware of? 207 00:20:48,270 --> 00:20:53,430 And while it may seem that this talk was mostly about bashing retailers, that's not the case. 208 00:20:53,430 --> 00:20:55,090 It's not their fault here. 209 00:20:55,090 --> 00:21:04,750 If you overwrite the original firmware, while maintaining the expected functionalities, I guarantee that no one will notice. 210 00:21:05,090 --> 00:21:14,490 I would even go even further to say that if we take retailers out of this completely, the severity of this attack vector increases. 211 00:21:14,750 --> 00:21:21,270 Think about it this way, you are a threat actor, and you open your own online store. 212 00:21:21,270 --> 00:21:28,370 You build it up over a few months, invest in advertising, and you sell products below market value. 213 00:21:28,570 --> 00:21:34,850 At a price low enough that it's a great deal, but high enough that it doesn't raise any suspicions. 214 00:21:36,630 --> 00:21:44,490 You buy thousands of devices from a reputable vendor, modify the firmware, package them nicely, and sell them. 215 00:21:44,590 --> 00:21:52,010 And as you sell them, you have information about the buyers, like their names, their addresses, in some cases the company name. 216 00:21:53,290 --> 00:21:56,330 So here, the attack could be done at scale. 217 00:21:56,570 --> 00:22:05,570 It could also be targeted, so you can only activate the backdoor if the device is being bought by someone specifically. 218 00:22:06,550 --> 00:22:12,370 So in terms of solutions, I think that the only sustainable solution here is going open source. 219 00:22:12,370 --> 00:22:21,130 And this may seem counterintuitive, to be honest, because devices which support open source firmware can have their firmware overwritten. 220 00:22:23,760 --> 00:22:35,980 But if it becomes common practice for devices to come blank, and the users to write their own firmware on every device, it will become harder for such an attack vector to be successful. 221 00:22:36,120 --> 00:22:39,780 However, the obvious downside here is usability. 222 00:22:40,240 --> 00:22:46,420 IoT products would not be plug and play, and the technical level of the users would have to increase significantly. 223 00:22:46,580 --> 00:22:55,600 Actually, just wanted to check, how many of you here have proactively updated the firmware or on any of your IoT devices? 224 00:22:56,520 --> 00:22:59,140 Okay, maybe a bit over half. 225 00:22:59,140 --> 00:23:12,020 And well, when I say proactively, I don't mean because you got a notification that you must update it, but just because you went to the vendor's site and thought, oh, look, there's a new version, I should install it. 226 00:23:12,120 --> 00:23:16,560 And think about it this way, we're all security people here, or most of us. 227 00:23:16,740 --> 00:23:19,000 How about the regular consumers? 228 00:23:20,320 --> 00:23:27,020 So no, there's no way right now to make people install their own firmware on blank IoT devices. 229 00:23:27,020 --> 00:23:41,400 But don't worry, there are still some technical solutions like locking the bootloader, signing the firmware, implementing secure boot, and potentially encrypting the firmware. 230 00:23:41,400 --> 00:23:50,360 But still, even with these in place, there are some fantastic researchers out here who found workarounds and ways to break most of these solutions. 231 00:23:50,440 --> 00:23:54,240 Some of them have even presented their research here at DEF CON these days. 232 00:23:55,080 --> 00:24:08,860 So besides technical solutions, one could consider things like tamper-evident seals, tamper-proof screws, one-way plastic clips, and of course, it goes without saying, even these are insufficient. 233 00:24:08,980 --> 00:24:15,460 Actually, people at the tamper-evident village at DEF CON have actively showed how to bypass these measures. 234 00:24:16,080 --> 00:24:22,060 And as you can probably tell, temporary solutions are not aligned with the open source approach. 235 00:24:22,060 --> 00:24:40,660 At the end of the day, there will always be a clash between open and closed source, where most IoT vendors will want to push their own firmware and prevent the possibility of overwriting it, while the open source community will typically look for workarounds and solutions because they do not trust these vendors. 236 00:24:41,200 --> 00:24:44,460 So, what can we actually do? 237 00:24:45,020 --> 00:24:56,880 If you want to avoid falling victim to this, I would suggest avoiding buying repackaged devices, or even new ones, from vendors or retailers which are not reputable. 238 00:24:57,660 --> 00:25:01,680 Well, this does not really protect you if you are targeted. 239 00:25:01,680 --> 00:25:14,240 As far back as 2010, it has been alleged that the NSA's Tailored Access Operation Unit intercepted shipping deliveries to plant back doors in electronic devices ordered by their targets. 240 00:25:14,960 --> 00:25:15,880 So what can you do? 241 00:25:15,880 --> 00:25:17,600 Not buy IoT devices? 242 00:25:17,600 --> 00:25:18,840 Live off the grid? 243 00:25:18,840 --> 00:25:22,380 Now that's not realistic for 90% of us, right? 244 00:25:22,480 --> 00:25:28,660 For non-technical people, I would say that not everything needs to be connected to the internet. 245 00:25:29,000 --> 00:25:35,240 Yes, IoT is about convenience, but now it's just becoming a bit too much. 246 00:25:36,280 --> 00:25:44,240 Also, perhaps stick to reputable vendors, as it's more likely that they are running mature security programs. 247 00:25:44,260 --> 00:25:52,720 And for the technical people in this room, I encourage you to engage in IoT bug bounty and vulnerability disclosure programs. 248 00:25:52,960 --> 00:25:58,200 And if you identify that firmware can be overwritten on devices, report it. 249 00:25:58,200 --> 00:26:06,880 And I'm aware that many programs specifically mention that these attacks, which require physical access, are out of scope. 250 00:26:07,020 --> 00:26:15,620 But I would argue, based on this little talk which I just delivered, that vulnerabilities requiring physical access should also be in scope. 251 00:26:16,680 --> 00:26:29,880 At the end of the day, the more the suppliers of IoT devices are made aware of this potential attack vector, the more likely they are to fix it in the future. 252 00:26:29,900 --> 00:26:31,440 Thank you. 253 00:26:37,070 --> 00:26:37,630 Cool. 254 00:26:37,630 --> 00:26:39,590 Maybe we've got a minute or two for questions. 255 00:26:39,590 --> 00:26:40,510 Yes, please. 256 00:26:50,390 --> 00:26:56,090 So you're asking if buying directly from the manufacturer would be a better option? 257 00:26:57,030 --> 00:26:57,930 Yeah, for sure. 258 00:26:57,930 --> 00:26:58,510 Without a doubt. 259 00:26:58,510 --> 00:27:00,870 That would prevent this specific attack vector. 260 00:27:00,870 --> 00:27:03,150 However, the devices may still be vulnerable. 261 00:27:03,150 --> 00:27:03,650 So who knows? 262 00:27:03,650 --> 00:27:05,830 Maybe people can resell them on. 263 00:27:05,830 --> 00:27:12,330 I think that the issue here is not necessarily the fact that retailers resell these devices. 264 00:27:12,410 --> 00:27:16,730 It's just that anyone can overwrite the firmware on many of these. 265 00:27:17,390 --> 00:27:17,990 Cool. 266 00:27:17,990 --> 00:27:18,910 Yes, please. 267 00:27:30,530 --> 00:27:33,590 Yeah, that was pretty straightforward. 268 00:27:33,710 --> 00:27:37,310 So in this case, the firmware was completely unobfuscated, unencrypted. 269 00:27:37,310 --> 00:27:38,850 So just use binwalk. 270 00:27:39,930 --> 00:27:43,130 Oh, yeah, just SPI. 271 00:27:43,130 --> 00:27:44,710 So reading it with SPI. 272 00:27:44,710 --> 00:27:48,090 But funnily enough, with TP-Link, they also post their firmware online. 273 00:27:48,090 --> 00:27:49,630 So it's publicly available. 274 00:27:50,770 --> 00:27:56,590 So I only took the file system. 275 00:27:56,590 --> 00:27:58,950 That was the only part that actually interested me there. 276 00:27:59,650 --> 00:28:00,750 Yes, exactly. 277 00:28:00,750 --> 00:28:06,350 So I found the SquashFS file system there, took that out, and used it directly. 278 00:28:06,790 --> 00:28:07,090 Cool. 279 00:28:07,090 --> 00:28:07,950 There was another question. 280 00:28:07,950 --> 00:28:08,670 One more question. 281 00:28:08,670 --> 00:28:09,210 Yeah. 282 00:28:45,100 --> 00:28:46,000 That's pretty cool. 283 00:28:46,000 --> 00:28:47,220 I promised it was not me. 284 00:28:49,120 --> 00:28:49,900 Thank you, guys. 285 00:28:49,900 --> 00:28:50,480 Thank you.