1 00:00:05,280 --> 00:00:10,260 All right. Thank you very much for being here at 10 a.m. in the morning on a Sunday. Everyone 2 00:00:10,260 --> 00:00:14,020 who had talked to me over the last past days, I always say, like, hey, don't go to the talks, 3 00:00:14,040 --> 00:00:17,840 just watch a live recording, but unfortunately I need to be here. But great that you're here, 4 00:00:17,940 --> 00:00:27,120 so thank you very much. Yeah, so today I will do another vacuum robot talk, and this time we take 5 00:00:27,120 --> 00:00:31,820 a look at robots which have cameras. And I know this is, like, every two years it more or less 6 00:00:31,820 --> 00:00:35,340 sounds like the same talk, but sadly there's always a lot of development, and the vendors are 7 00:00:35,340 --> 00:00:43,100 not the smartest ones, always. So see this as an update. All right. So some information about me, 8 00:00:43,160 --> 00:00:47,260 so that you have some idea what the heck I'm doing. I'm a PhD student in Boston at North 9 00:00:47,260 --> 00:00:53,840 Eastern University, and I primarily do research in wireless and embedded devices, so I'm interested 10 00:00:53,840 --> 00:00:57,100 in security and privacy. I think I could... 11 00:00:57,120 --> 00:01:01,900 I call myself now also a vacuum robot collector because I have many, many, many of them. So some 12 00:01:01,900 --> 00:01:06,800 people collect stamps, I collect vacuum robots. And I'm interested in reverse engineering 13 00:01:06,800 --> 00:01:12,000 interesting devices. Robots, obviously, but right now I'm also looking at smart speakers, 14 00:01:12,200 --> 00:01:16,300 flash memory, everything which is kind of interesting, has internet, and can do interesting 15 00:01:16,300 --> 00:01:23,440 things. Some of my past projects, to give you some idea why I'm doing things, how I do them, 16 00:01:24,060 --> 00:01:26,900 had, like, a paper some time ago about Amazon. 17 00:01:27,120 --> 00:01:31,020 I have a lot of cool devices where I did forensics. I bought, like, 87 or 86 used devices from 18 00:01:31,020 --> 00:01:34,960 eBay and was doing forensics on them. Let's say the outcome was not very good for Amazon. 19 00:01:36,820 --> 00:01:40,440 Some other things which I do right now is, like, flash forensics. So I look at embedded devices 20 00:01:40,440 --> 00:01:45,500 and see what kind of information I can extract from them. But I'm looking also at flash firmware 21 00:01:45,500 --> 00:01:50,340 itself. So flash memory has sometimes firmware onto it, and I'm looking if I can, you know, 22 00:01:50,360 --> 00:01:56,800 use it for something interesting. Another project which I run primarily is robotinfo.dev. 23 00:01:57,120 --> 00:02:02,820 This is, like, a website where you have, like, a systematic, you know, list of robots which I have 24 00:02:03,780 --> 00:02:09,960 sorted by operation system, sensors, vulnerabilities. My primary focus here is, like, security and 25 00:02:09,960 --> 00:02:14,420 privacy, and one of the things which I also do with that is also tracking of firmware changes. 26 00:02:15,060 --> 00:02:18,880 We will see later that tracking of firmware changes can be very, very useful and can save 27 00:02:18,880 --> 00:02:24,600 you a lot of time. Yeah. One of the stories how I get my information is, I mean, I have to 28 00:02:24,600 --> 00:02:26,920 do this myself, and then as soon as it is connected from the device, I have to do it myself. 29 00:02:26,920 --> 00:02:27,100 So I have to do it myself, and then as soon as it is connected from the device, I have to do it myself. 30 00:02:27,120 --> 00:02:27,220 So I have to do it myself, and then as soon as it is connected from the device, I have to do it myself. 31 00:02:27,220 --> 00:02:29,840 In the cloud, I basically emulate them in the cloud, so the vendor thinks they're based 32 00:02:29,840 --> 00:02:34,020 online, but I just use it to scrape the data. And this is also, like, a base for 33 00:02:34,640 --> 00:02:39,420 further research. As you can see in the picture, by the way, this is, like, one of my two or 34 00:02:39,420 --> 00:02:42,960 three shelves which I have. So I have from each of the robots which I root, I have, like, a 35 00:02:42,960 --> 00:02:47,320 reference model. If I need to test something, just go to my shelf, just grab one, test whatever 36 00:02:47,320 --> 00:02:51,540 you want, and just put it back on the shelf. Which means I have no idea which robot cleans the 37 00:02:51,540 --> 00:02:53,460 the best because I'm rude to them, 38 00:02:53,560 --> 00:02:54,780 but I don't actually use them for cleaning, 39 00:02:54,880 --> 00:02:56,800 so I get this question quite often. 40 00:02:56,860 --> 00:02:57,760 I have no idea. 41 00:02:57,880 --> 00:02:59,360 I have one which cleans and it's fine, 42 00:02:59,440 --> 00:03:01,080 so no idea about that. 43 00:03:02,560 --> 00:03:04,440 Alright, so what's the goal of this talk? 44 00:03:04,660 --> 00:03:06,800 I want to give you some overview 45 00:03:06,800 --> 00:03:08,620 of the development of vacuum robot hacking 46 00:03:08,620 --> 00:03:09,780 over the last five years. 47 00:03:10,100 --> 00:03:11,780 I want to give you also some insight 48 00:03:11,780 --> 00:03:13,140 of vulnerabilities and backdoors, 49 00:03:13,300 --> 00:03:15,420 and I want to give you an idea 50 00:03:15,420 --> 00:03:18,280 about the current routing methods for current robots. 51 00:03:19,440 --> 00:03:21,600 The ultimate of the goal which we have typically 52 00:03:21,600 --> 00:03:23,580 is that we have root access at some point 53 00:03:23,580 --> 00:03:25,400 on a robot without disassembling it, 54 00:03:25,480 --> 00:03:27,540 because disassembly is always warranty seals and stuff. 55 00:03:28,700 --> 00:03:29,640 One quick notice. 56 00:03:30,920 --> 00:03:35,100 We don't necessarily hate the robot companies. 57 00:03:35,280 --> 00:03:36,760 I mean, it's more or less like a competition. 58 00:03:37,040 --> 00:03:39,040 Sometimes I visited them and had a nice chat, 59 00:03:39,180 --> 00:03:41,020 and next week I routed their devices, 60 00:03:41,120 --> 00:03:44,460 so it's kind of nice, so it's a nice kind of thing. 61 00:03:45,760 --> 00:03:48,260 So, what kind of devices were covered today? 62 00:03:48,260 --> 00:03:50,820 And there's a kind of long list. 63 00:03:50,960 --> 00:03:52,240 Technically, there's even a longer list, 64 00:03:52,340 --> 00:03:55,060 but primarily, we have the companies Roborock, 65 00:03:55,160 --> 00:03:55,920 we have Dreamy. 66 00:03:56,380 --> 00:03:57,740 A lot of things which I do today 67 00:03:57,740 --> 00:03:59,860 apply also to many, many, many other devices, 68 00:03:59,940 --> 00:04:02,520 not only vacuum robots, but lawn mowers, 69 00:04:02,640 --> 00:04:03,900 smart speakers, and other things. 70 00:04:05,160 --> 00:04:07,180 All the devices which are underlined 71 00:04:07,180 --> 00:04:08,740 are ones which have cameras, 72 00:04:10,740 --> 00:04:13,080 and the ones which are indirectly is like, 73 00:04:13,120 --> 00:04:15,520 technically I have it, but it doesn't make sense for me 74 00:04:15,520 --> 00:04:17,020 to actually route it and develop tooling, 75 00:04:17,120 --> 00:04:18,240 so it's a little bit of a challenge. 76 00:04:18,240 --> 00:04:19,340 If you want to port it, you can do it, 77 00:04:19,380 --> 00:04:21,580 but yeah, just as information. 78 00:04:23,180 --> 00:04:24,400 So, let's talk about this talk. 79 00:04:25,100 --> 00:04:27,080 So, this talk is more or less the result 80 00:04:27,080 --> 00:04:29,200 of like 15 months of research and experiments, 81 00:04:29,380 --> 00:04:30,840 so I do that for a very long time, 82 00:04:30,980 --> 00:04:32,900 and it's a little bit annoying to sit on things 83 00:04:32,900 --> 00:04:34,540 for a very long time, so if you know like, 84 00:04:34,600 --> 00:04:36,020 okay, I can get access on this device, 85 00:04:36,120 --> 00:04:39,440 but I can't tell anyone how, which is very annoying. 86 00:04:40,180 --> 00:04:42,380 And also, this talk is a collaborative effort 87 00:04:42,380 --> 00:04:43,900 between me and Zirin Bayou, 88 00:04:44,280 --> 00:04:47,880 and Zirin is one of the, or is the developer of Valetudo, 89 00:04:48,240 --> 00:04:49,900 which is the cloud replacement for robots. 90 00:04:50,600 --> 00:04:54,320 So, he plays a very, very important role in this endeavor. 91 00:04:55,540 --> 00:04:58,620 The other thing is, all this work wouldn't be possible 92 00:04:58,620 --> 00:04:59,740 if you wouldn't have the community, 93 00:04:59,980 --> 00:05:01,880 so we have thousands of people who are vacuum robots 94 00:05:01,880 --> 00:05:03,480 and who are tinkering around with them. 95 00:05:03,980 --> 00:05:06,220 I cannot have every device so far, 96 00:05:06,320 --> 00:05:08,760 and thankfully, people are testing things, 97 00:05:08,900 --> 00:05:09,820 and this is kind of great. 98 00:05:11,120 --> 00:05:14,200 As a general information, in this talk, 99 00:05:14,900 --> 00:05:17,340 you learn about vulnerabilities the same time 100 00:05:18,240 --> 00:05:20,220 as you do, so right now, I know that some companies 101 00:05:20,220 --> 00:05:21,920 in China are watching this talk live, 102 00:05:22,080 --> 00:05:23,240 and they will get some emails afterwards, 103 00:05:24,580 --> 00:05:27,100 but expect some patches coming in the next days, 104 00:05:27,140 --> 00:05:30,420 so they don't know what we do, so just as information. 105 00:05:31,380 --> 00:05:33,540 All right, so what's the motivation for this talk? 106 00:05:35,480 --> 00:05:37,720 Well, why do we root devices in the first place? 107 00:05:37,880 --> 00:05:39,540 And a lot of people think like, okay, I mean, 108 00:05:39,620 --> 00:05:42,420 you can just use it, why the heck do I need to root it? 109 00:05:42,680 --> 00:05:44,660 Well, these devices are very, very cool hardware. 110 00:05:45,040 --> 00:05:47,280 Think of the Raspberry Pi on tires, 111 00:05:47,280 --> 00:05:49,440 which has tires, like cool sensors, 112 00:05:49,560 --> 00:05:50,540 and can drive around to your apartment. 113 00:05:51,460 --> 00:05:54,220 It's a very compact, nice unit, 114 00:05:54,680 --> 00:05:56,900 which you can do a lot of experiments with. 115 00:05:58,020 --> 00:06:00,580 The other thing is we obviously want to stop devices 116 00:06:00,580 --> 00:06:02,140 from constantly phoning home, 117 00:06:02,640 --> 00:06:04,800 and you will be surprised how much we phone home, 118 00:06:04,940 --> 00:06:06,480 so it's like one device can produce 119 00:06:06,480 --> 00:06:08,380 hundreds of megabytes of log files, maps, whatever, 120 00:06:08,600 --> 00:06:10,400 every month, which is like getting uploaded, 121 00:06:11,060 --> 00:06:16,220 so if you have some internet tariff which has limitations 122 00:06:16,220 --> 00:06:19,260 of like volume, you might think about that. 123 00:06:20,460 --> 00:06:22,680 The other thing is a lot of people like to have 124 00:06:22,680 --> 00:06:24,400 some custom smart home solutions, 125 00:06:24,720 --> 00:06:26,820 so like Home Assistant is one of the examples. 126 00:06:27,180 --> 00:06:29,920 It makes it way easier to obviously connect the device 127 00:06:29,920 --> 00:06:32,720 if you have a rooted device. 128 00:06:33,740 --> 00:06:35,540 A thing which becomes more and more important, 129 00:06:35,720 --> 00:06:38,900 also with the right of repair, by rooting devices 130 00:06:38,900 --> 00:06:41,080 or having the tools at least to be able to do so, 131 00:06:41,160 --> 00:06:43,160 we can diagnose broken devices. 132 00:06:44,180 --> 00:06:46,200 Especially in the US, there's a problem that, you know, 133 00:06:46,200 --> 00:06:47,200 you have a warranty of one year, 134 00:06:47,360 --> 00:06:51,200 and these robots tend to break after one year, 135 00:06:51,320 --> 00:06:54,520 so it's very useful that we can figure out, 136 00:06:54,560 --> 00:06:55,800 okay, what's going on with devices. 137 00:06:57,460 --> 00:06:59,920 And we want to verify our privacy claims. 138 00:07:00,080 --> 00:07:02,780 Companies can say a lot of things if the day is long, 139 00:07:02,860 --> 00:07:04,100 and marketing people can do that too, 140 00:07:04,180 --> 00:07:06,120 but we want to actually know if it's true or not. 141 00:07:08,300 --> 00:07:10,480 So, why don't we trust the nice companies, 142 00:07:10,600 --> 00:07:11,580 and why don't we trust IoT? 143 00:07:12,400 --> 00:07:14,640 Well, imagine this device is connected to your home network 144 00:07:14,640 --> 00:07:16,180 and has access to everything which is in your home, 145 00:07:16,180 --> 00:07:17,560 if it's in the same network. 146 00:07:17,700 --> 00:07:19,340 And it has its own internet connection, 147 00:07:19,980 --> 00:07:21,160 basically, back to the cloud. 148 00:07:21,600 --> 00:07:24,200 Which means, most of the time, 149 00:07:24,260 --> 00:07:25,460 this communication is encrypted, 150 00:07:25,700 --> 00:07:27,380 and you have no idea what it's sending back. 151 00:07:27,800 --> 00:07:29,520 It has cameras, it might have microphones, 152 00:07:29,760 --> 00:07:31,800 it has a map of your home, 153 00:07:31,980 --> 00:07:33,500 it can drive around on its own, 154 00:07:33,580 --> 00:07:35,080 and you have no idea what's running on it. 155 00:07:35,900 --> 00:07:38,060 Also, even if the vendor is not malicious, 156 00:07:38,440 --> 00:07:41,140 developing secure hardware and software is really hard. 157 00:07:41,460 --> 00:07:44,700 And if you remember the Mirai Botnet, 158 00:07:44,700 --> 00:07:47,360 where basically a lot of IP cameras got hacked, 159 00:07:47,460 --> 00:07:49,700 and millions of basically botnets were created. 160 00:07:50,600 --> 00:07:52,880 This is kind of like a thing where we want to just make sure 161 00:07:52,880 --> 00:07:55,100 that there's nothing which the vendor accidentally 162 00:07:55,100 --> 00:07:56,580 left in there and forgot about. 163 00:07:58,280 --> 00:08:01,880 And one of the things is also that a lot of vendor claims 164 00:08:02,340 --> 00:08:03,040 contradict each other, 165 00:08:03,140 --> 00:08:04,980 and I have one perfect example for that, 166 00:08:05,940 --> 00:08:06,900 which I always use. 167 00:08:07,020 --> 00:08:09,540 So, it's like if you were here two years ago, 168 00:08:09,580 --> 00:08:11,940 you probably know it, just for the newcomers. 169 00:08:13,260 --> 00:08:14,600 Roborock. I mean, a shame. 170 00:08:14,600 --> 00:08:15,320 A little bit of Roborock, 171 00:08:15,400 --> 00:08:16,700 but all the companies do that, by the way. 172 00:08:17,300 --> 00:08:19,300 They claim for their robots with cameras, 173 00:08:19,780 --> 00:08:21,020 nothing is ever sent to the cloud. 174 00:08:21,320 --> 00:08:22,860 We will never duplicate data. 175 00:08:23,080 --> 00:08:24,360 The data is not stored on the device, 176 00:08:24,600 --> 00:08:28,380 and we don't send camera pictures to the cloud. 177 00:08:28,560 --> 00:08:29,280 So, you're safe. 178 00:08:29,360 --> 00:08:31,660 The camera is just used to kind of detect objects. 179 00:08:32,780 --> 00:08:34,640 But if you scroll down on a page back then, 180 00:08:34,760 --> 00:08:36,560 you'll find like, oh, by the way, 181 00:08:36,580 --> 00:08:38,840 you can also access the camera remotely to watch your pets. 182 00:08:40,740 --> 00:08:42,740 So, okay, so you're not sending it to the cloud, 183 00:08:42,780 --> 00:08:43,900 but I can still access it remotely. 184 00:08:43,900 --> 00:08:44,940 So, how does it work? 185 00:08:45,740 --> 00:08:48,520 Another thing which came out a couple months ago, 186 00:08:48,640 --> 00:08:50,060 and I was also like a little bit involved in that, 187 00:08:51,180 --> 00:08:54,320 iRobot got caught that they basically upload pictures 188 00:08:54,320 --> 00:08:57,540 of cameras of robots to the cloud, 189 00:08:57,640 --> 00:09:01,040 and then gig workers in Venezuela kind of labeling them. 190 00:09:01,320 --> 00:09:02,660 So, there's an interesting article. 191 00:09:03,260 --> 00:09:05,700 I linked it also like in the foot line. 192 00:09:06,240 --> 00:09:07,660 And so, what happened is basically, 193 00:09:07,800 --> 00:09:09,000 these were development devices, 194 00:09:09,200 --> 00:09:10,420 so people got free devices 195 00:09:10,840 --> 00:09:12,660 and had to sign some terms of service 196 00:09:12,660 --> 00:09:13,800 where we kind of agreed to that, 197 00:09:13,900 --> 00:09:15,700 but no one actually knew that they agreed to that. 198 00:09:16,160 --> 00:09:17,580 And so, people started to kind of, 199 00:09:17,720 --> 00:09:19,560 so these devices started to upload pictures, 200 00:09:19,720 --> 00:09:23,020 and for whatever reason, iRobot was very interested 201 00:09:23,020 --> 00:09:26,340 that you had like a fan and like lights 202 00:09:26,340 --> 00:09:27,720 and whatever in your apartment. 203 00:09:28,000 --> 00:09:29,660 For whatever reason, they wanted to have it labeled. 204 00:09:30,860 --> 00:09:33,320 A fun fact of that is as soon as the article came out, 205 00:09:33,320 --> 00:09:35,680 or shortly before that, a lot of vendors started to panic, 206 00:09:35,800 --> 00:09:37,260 and I saw a lot of firmware changes, 207 00:09:37,360 --> 00:09:39,380 and I saw a lot of changes in like privacy policies 208 00:09:39,380 --> 00:09:40,240 for all the companies. 209 00:09:40,400 --> 00:09:42,460 So, they got really, really spooked by that. 210 00:09:42,660 --> 00:09:44,260 Not that it actually changes a lot, 211 00:09:44,360 --> 00:09:45,920 but I mean, some of the firmers actually started 212 00:09:45,920 --> 00:09:47,860 to doing pictures because we got scared 213 00:09:47,860 --> 00:09:50,860 they get also caught like iRobot. 214 00:09:52,700 --> 00:09:55,700 The other interesting thing which we see nowadays 215 00:09:55,700 --> 00:09:58,000 is devices get more and more sensors, 216 00:09:58,180 --> 00:09:59,720 and I have an example here from EchoVox, 217 00:09:59,780 --> 00:10:01,100 which we don't talk about this talk today, 218 00:10:01,220 --> 00:10:02,740 but just as an example. 219 00:10:03,100 --> 00:10:03,980 They have cameras, 220 00:10:04,020 --> 00:10:05,800 but they started also to introduce microphones. 221 00:10:07,480 --> 00:10:11,600 We made like five years ago with Dania Vegema, 222 00:10:12,660 --> 00:10:14,160 we did some nice research with a joke like, 223 00:10:14,240 --> 00:10:16,180 oh, we can maybe try to use the ultrasonic sensor 224 00:10:16,180 --> 00:10:17,940 as a microphone so we can spy on people, 225 00:10:18,540 --> 00:10:19,760 or we can use some other sensors 226 00:10:19,760 --> 00:10:21,660 to get like some audio information, 227 00:10:21,740 --> 00:10:23,400 or like visual information. 228 00:10:24,160 --> 00:10:26,240 Nowadays, we are here basically like, 229 00:10:26,360 --> 00:10:28,140 oh, we have cameras and microphones already on board, 230 00:10:28,220 --> 00:10:30,240 so we don't need to kind of think of like sketchy ways 231 00:10:30,240 --> 00:10:31,740 to kind of get to the audio stream. 232 00:10:33,300 --> 00:10:33,700 Right. 233 00:10:34,680 --> 00:10:36,260 Another thing which we need to talk about 234 00:10:36,260 --> 00:10:39,000 is what are the risks of devices with cameras. 235 00:10:40,220 --> 00:10:41,720 A lot of devices might store, 236 00:10:42,780 --> 00:10:43,600 pictures indefinitely, 237 00:10:44,420 --> 00:10:47,420 and basically both in the cloud and locally, 238 00:10:47,580 --> 00:10:51,160 and from what I can tell so far is many do so. 239 00:10:51,340 --> 00:10:53,880 So basically, I have like a research project running 240 00:10:53,880 --> 00:10:57,060 where we look at what kind of data is stored where, 241 00:10:57,180 --> 00:11:00,020 and a lot of pictures are staying basically forever. 242 00:11:01,080 --> 00:11:02,720 The other thing which might be problematic is 243 00:11:02,720 --> 00:11:06,140 if you are a shopper at Amazon Marketplace, 244 00:11:06,700 --> 00:11:07,820 and you get like used devices, 245 00:11:08,840 --> 00:11:10,000 I'm not sure if it's a good idea. 246 00:11:11,120 --> 00:11:12,640 Partially because whoever, it happens to me, 247 00:11:12,640 --> 00:11:14,280 had the device before could have installed a rootkit, 248 00:11:14,840 --> 00:11:17,380 and you as a new owner have no idea what's going on there. 249 00:11:17,540 --> 00:11:18,540 So even if you do factory reset, 250 00:11:18,740 --> 00:11:20,180 the malicious firmware might still be on. 251 00:11:20,680 --> 00:11:22,820 With the result that you have a malicious firmware, 252 00:11:23,280 --> 00:11:24,840 sorry, malicious device in your network 253 00:11:24,840 --> 00:11:26,320 which has all the access. 254 00:11:27,280 --> 00:11:28,940 By the way, if you learn today how to root devices, 255 00:11:29,100 --> 00:11:30,240 don't buy Amazon devices. 256 00:11:30,940 --> 00:11:32,080 Root them and send them back. 257 00:11:32,200 --> 00:11:33,440 That's evil, that's bad, that's hopefully, 258 00:11:33,620 --> 00:11:34,540 I think that's illegal. 259 00:11:34,760 --> 00:11:36,220 So, don't do that. 260 00:11:36,360 --> 00:11:36,840 Very bad. 261 00:11:37,200 --> 00:11:37,740 All right. 262 00:11:38,040 --> 00:11:41,040 So, which means rooting is more or less the only way 263 00:11:41,040 --> 00:11:42,620 how you can verify whether the device is good or not. 264 00:11:42,620 --> 00:11:42,720 Exactly. 265 00:11:42,760 --> 00:11:44,900 So there's literally no other way to kind of know that. 266 00:11:46,860 --> 00:11:48,360 By the way, the vendors are kind of aware 267 00:11:48,360 --> 00:11:51,720 that people and cyber security people 268 00:11:52,360 --> 00:11:54,360 are kind of scared of cameras, 269 00:11:55,020 --> 00:11:57,240 so they try to avoid the word camera. 270 00:11:57,520 --> 00:11:59,280 So instead, you know, they say like, 271 00:11:59,380 --> 00:12:00,900 oh, this device doesn't have a camera. 272 00:12:01,120 --> 00:12:02,980 We have optical sensor. 273 00:12:03,540 --> 00:12:05,420 And I have here an article from like a German thing, 274 00:12:05,480 --> 00:12:10,160 but a German page, but there's also English speaking pages 275 00:12:10,160 --> 00:12:11,800 which have like, you know, marketing material 276 00:12:11,800 --> 00:12:12,500 from Roborock. 277 00:12:12,620 --> 00:12:15,000 And I kind of said like, well, we don't have a camera 278 00:12:15,000 --> 00:12:15,860 in the actual sense. 279 00:12:15,960 --> 00:12:17,680 We have an optical sensor which detects a couple things. 280 00:12:19,660 --> 00:12:22,160 Well, on the right you see an output of this optical sensor. 281 00:12:24,380 --> 00:12:26,120 This looks kind of to me like a picture, 282 00:12:26,240 --> 00:12:28,400 but I mean, it must be an optical sensor. 283 00:12:28,700 --> 00:12:32,920 So, yeah, this is from a Roborock S8 Pro Ultra 284 00:12:32,920 --> 00:12:34,120 from the optical sensor. 285 00:12:34,260 --> 00:12:36,200 So, yeah, don't believe marketing material. 286 00:12:37,940 --> 00:12:40,600 The other thing is everyone loves certifications. 287 00:12:40,700 --> 00:12:42,540 So all the devices we're talking about today, 288 00:12:42,540 --> 00:12:44,260 I have some sort of certification 289 00:12:44,800 --> 00:12:47,020 by my favorite company in Germany, TÜV, 290 00:12:47,140 --> 00:12:49,100 which is certifying a lot of things if the day is long. 291 00:12:50,040 --> 00:12:52,260 And all of the devices are certified 292 00:12:52,260 --> 00:12:56,140 by the European cybersecurity standards for IoT products. 293 00:12:56,460 --> 00:12:57,720 So I think because we're certified, 294 00:12:57,860 --> 00:12:59,880 we can stop the talk here because we're secure, I assume. 295 00:13:00,840 --> 00:13:02,980 Yeah, so the takeaway lesson at some point, 296 00:13:03,020 --> 00:13:05,960 just to kind of, you know, give you already like a spoiler, 297 00:13:06,080 --> 00:13:07,360 is don't trust certifications. 298 00:13:07,820 --> 00:13:09,140 They don't necessarily mean anything. 299 00:13:09,800 --> 00:13:10,300 All right. 300 00:13:10,300 --> 00:13:14,760 So what happened so far in the past over the last five years? 301 00:13:15,360 --> 00:13:17,900 Well, one of the general observations which I did 302 00:13:17,900 --> 00:13:21,100 was every time a routing method is presented or released, 303 00:13:21,240 --> 00:13:22,860 the vendors react in one way or the other. 304 00:13:23,940 --> 00:13:25,760 Sometimes we even break things in the process. 305 00:13:26,000 --> 00:13:27,760 So we saw in the past like a vendor 306 00:13:27,760 --> 00:13:29,040 which kind of panicked a little bit 307 00:13:29,040 --> 00:13:30,160 when we released the routing method, 308 00:13:30,760 --> 00:13:32,340 and they created a firmware update 309 00:13:32,340 --> 00:13:34,320 which started to break hundreds of vacant robots, 310 00:13:35,020 --> 00:13:36,460 which we are not recoverable anymore. 311 00:13:36,680 --> 00:13:38,180 So, yeah. 312 00:13:40,300 --> 00:13:41,220 The good news for us, if they fix things, 313 00:13:41,340 --> 00:13:42,900 is that the routing method just fails 314 00:13:42,900 --> 00:13:43,680 when the device says like, 315 00:13:43,720 --> 00:13:45,020 hey, it's invalid, I don't boot. 316 00:13:45,620 --> 00:13:46,760 The worst case which is, 317 00:13:47,360 --> 00:13:48,700 and some vendors do that actually, 318 00:13:48,860 --> 00:13:52,320 the routing succeeds, but the device breaks randomly. 319 00:13:52,620 --> 00:13:55,040 So you let it run, it will stop randomly 320 00:13:55,040 --> 00:13:56,640 after five minutes or 10 minutes or whatever. 321 00:13:56,820 --> 00:14:00,640 We will show an example in the next slides 322 00:14:01,300 --> 00:14:02,200 where we saw that. 323 00:14:02,480 --> 00:14:04,360 Or the device might also destroy it themselves. 324 00:14:04,840 --> 00:14:06,760 So we saw in one case where basically 325 00:14:06,760 --> 00:14:08,840 if the device detects that it has been rooted, 326 00:14:09,040 --> 00:14:10,280 it will just, you know, destroy it. 327 00:14:10,280 --> 00:14:12,400 It will destroy itself, which is bad. 328 00:14:12,880 --> 00:14:15,360 All right, let's look in the past. 329 00:14:15,540 --> 00:14:17,560 So the first work of the vacuum cleaning 330 00:14:17,560 --> 00:14:20,140 which I was doing was in 2017, 331 00:14:20,760 --> 00:14:22,560 and this was together with Danny Wiggum, 332 00:14:22,600 --> 00:14:25,140 who has, by the way, talk at 11 a.m. 333 00:14:25,140 --> 00:14:29,220 So if you're interested in, I think he does 334 00:14:30,340 --> 00:14:31,780 chipsets, like wireless chipsets, 335 00:14:32,260 --> 00:14:33,580 then he has talk in track three. 336 00:14:34,760 --> 00:14:38,160 And the robot which we were back then analyzing 337 00:14:38,160 --> 00:14:40,200 was the first generation of Xiaomi robot. 338 00:14:40,200 --> 00:14:42,120 And the first generation of Roborock robots. 339 00:14:43,160 --> 00:14:44,540 Some of the things which we figured out 340 00:14:44,540 --> 00:14:46,720 is that the firmware updates are unsigned 341 00:14:46,720 --> 00:14:49,820 and encrypted with a very weak key, 342 00:14:49,880 --> 00:14:52,380 which was, I think, the company name, Roborock. 343 00:14:53,280 --> 00:14:55,560 Which wouldn't itself be an issue on its own. 344 00:14:55,700 --> 00:14:57,380 I mean, that's kind of like, not great, 345 00:14:57,480 --> 00:15:00,180 but I mean, the bigger problem was that you could push 346 00:15:00,180 --> 00:15:03,260 a custom firmware from the local network onto the device. 347 00:15:03,880 --> 00:15:06,860 And because, you know, the thing was kind of clear, 348 00:15:07,000 --> 00:15:08,660 so the password was kind of known, 349 00:15:08,780 --> 00:15:10,180 people could do that maliciously, 350 00:15:10,200 --> 00:15:12,380 you cannot only do that from the local network, 351 00:15:12,480 --> 00:15:14,560 but you can do it also for unprovisioned devices. 352 00:15:14,880 --> 00:15:16,500 And I was telling the story like two days ago 353 00:15:16,500 --> 00:15:19,320 in my demo lab where I was in Germany 354 00:15:19,320 --> 00:15:21,480 and I saw one of the neighbors had a Roborock robot, 355 00:15:22,020 --> 00:15:23,020 which was unprovisioned, 356 00:15:23,020 --> 00:15:24,200 so it had an open Wi-Fi point, 357 00:15:24,380 --> 00:15:27,800 and I was like, I didn't do it. 358 00:15:27,920 --> 00:15:30,220 I just want to say I didn't do it, but you can do that. 359 00:15:30,320 --> 00:15:32,700 So make sure that your device is provisioned, 360 00:15:32,700 --> 00:15:34,520 because otherwise someone else can provision it for you. 361 00:15:35,200 --> 00:15:36,000 Just a side note. 362 00:15:36,580 --> 00:15:37,600 Right, so what was the result? 363 00:15:37,960 --> 00:15:40,080 We could easily root devices because we could 364 00:15:40,200 --> 00:15:41,100 just push firmware updates, 365 00:15:41,320 --> 00:15:44,760 and it was great for the development of custom software 366 00:15:44,760 --> 00:15:45,520 and voice packages. 367 00:15:47,340 --> 00:15:51,080 And we published that at the CCC Congress in 2017, 368 00:15:51,580 --> 00:15:53,620 and I was giving a talk exactly five years ago 369 00:15:53,620 --> 00:15:55,080 on the day here at DEF CON. 370 00:15:55,280 --> 00:15:58,520 So it's a very long run of research. 371 00:16:00,000 --> 00:16:02,560 So after that, Roborock was, let's say, 372 00:16:02,580 --> 00:16:03,340 not directly happy. 373 00:16:03,440 --> 00:16:04,680 We started to do a couple things. 374 00:16:04,940 --> 00:16:06,820 For example, we blocked the local updates, 375 00:16:06,920 --> 00:16:08,240 which was not necessarily bad. 376 00:16:08,400 --> 00:16:10,100 I mean, I think from a security perspective, this was good. 377 00:16:11,060 --> 00:16:13,400 Then they started to introduce, with newer models, 378 00:16:13,880 --> 00:16:16,740 firmware signatures and signed also the voice packages. 379 00:16:17,180 --> 00:16:18,960 And they used different keys for different devices, 380 00:16:19,120 --> 00:16:20,860 so we couldn't decrypt devices, 381 00:16:21,260 --> 00:16:22,900 firmwares for different devices, anymore, with one key. 382 00:16:23,960 --> 00:16:25,060 One thing which we didn't like, 383 00:16:25,180 --> 00:16:28,220 they started to sign files for region locks. 384 00:16:28,340 --> 00:16:29,760 So if you buy a device from China, 385 00:16:29,780 --> 00:16:30,620 you couldn't run it in US. 386 00:16:30,820 --> 00:16:32,380 They cracked down on that. 387 00:16:33,100 --> 00:16:35,180 On the other side, all the hardware remained the same. 388 00:16:35,280 --> 00:16:36,760 So if you buy a device from five years ago, 389 00:16:36,860 --> 00:16:38,260 and you buy a device from two years ago, 390 00:16:38,380 --> 00:16:39,840 they have more or less the same board, 391 00:16:39,840 --> 00:16:40,380 the same hardware. 392 00:16:41,240 --> 00:16:44,120 That's kind of a business model of generating revenue. 393 00:16:45,520 --> 00:16:48,840 The bad news after we fixed that was that we had to basically 394 00:16:48,840 --> 00:16:49,740 disassemble the devices. 395 00:16:49,960 --> 00:16:52,100 And this is a little bit of a problem. 396 00:16:53,180 --> 00:16:55,200 So we developed a new routing method, 397 00:16:55,300 --> 00:17:00,960 which worked for Roborock S7, S5 Max, S7, and others. 398 00:17:01,420 --> 00:17:04,020 And the initial idea was, OK, we can just connect over UART 399 00:17:04,020 --> 00:17:05,540 and can do the U-Boot shell thing, 400 00:17:05,680 --> 00:17:09,500 which you can do for many, many devices, to get root access. 401 00:17:10,160 --> 00:17:11,660 However, we blocked that at some point. 402 00:17:11,820 --> 00:17:14,380 And instead, we developed a method 403 00:17:14,380 --> 00:17:16,720 where you can basically bring the device in bootloader mode 404 00:17:16,720 --> 00:17:19,360 and just start to patch the system from there. 405 00:17:20,320 --> 00:17:22,480 The disadvantage here was, obviously, 406 00:17:22,500 --> 00:17:24,860 we need to disassemble it, potentially solder things. 407 00:17:25,020 --> 00:17:26,480 So it's kind of a problem. 408 00:17:27,280 --> 00:17:29,920 One of the interesting facts is this method still works today 409 00:17:29,920 --> 00:17:32,940 for many, many devices which are based on the Allwinner R16 410 00:17:34,120 --> 00:17:34,560 chipset. 411 00:17:35,320 --> 00:17:38,960 So even if you buy today a new Roborock, like the Q7 412 00:17:38,960 --> 00:17:39,380 or something. 413 00:17:39,840 --> 00:17:41,100 It works for whatever reason. 414 00:17:41,160 --> 00:17:43,180 So that's a good thing. 415 00:17:44,020 --> 00:17:46,260 After that, they started to react, obviously. 416 00:17:46,860 --> 00:17:49,000 One of the things is they removed the U-Boot shell. 417 00:17:49,120 --> 00:17:49,960 So they couldn't do that. 418 00:17:50,460 --> 00:17:52,560 And for their flagship models, they 419 00:17:52,560 --> 00:17:54,040 started to introduce a lot of mean things. 420 00:17:54,580 --> 00:17:57,640 CQBoot, S8 Linux, DMVarity, they put that in the firmware. 421 00:17:58,460 --> 00:18:01,840 And newer models started to use encrypted file systems 422 00:18:01,840 --> 00:18:04,860 where the user data application was encrypted. 423 00:18:05,100 --> 00:18:06,660 So you couldn't access machine learning models. 424 00:18:06,860 --> 00:18:08,980 You couldn't access anything which is on the device. 425 00:18:08,980 --> 00:18:12,180 And they started to put these keys into a trust zone. 426 00:18:12,320 --> 00:18:14,700 So you need to boot in secure boot mode 427 00:18:14,700 --> 00:18:16,140 so that you can access the key. 428 00:18:16,260 --> 00:18:18,180 So they put a lot of effort into securing that. 429 00:18:18,820 --> 00:18:21,400 One thing which was very mean is they 430 00:18:21,400 --> 00:18:23,500 started to put custom stuff in the kernel. 431 00:18:23,880 --> 00:18:25,780 For example, they added an elf binary signature 432 00:18:25,780 --> 00:18:26,740 check in the kernel. 433 00:18:26,820 --> 00:18:29,680 So you couldn't run any unsigned binaries, which 434 00:18:29,680 --> 00:18:32,180 is a little bit annoying if you got some way in and tried 435 00:18:32,180 --> 00:18:33,260 to run something you have. 436 00:18:33,400 --> 00:18:35,320 And it's just like, no, it's not signed. 437 00:18:35,340 --> 00:18:36,040 So screw you. 438 00:18:37,120 --> 00:18:38,000 All right. 439 00:18:38,040 --> 00:18:38,960 So in 2018, we had a lot of problems. 440 00:18:38,980 --> 00:18:41,240 And in 2021, again, here at DEF CON, 441 00:18:42,060 --> 00:18:44,740 I figured out a way how to bypass all this stuff. 442 00:18:45,580 --> 00:18:48,620 The initial idea was basically, I 443 00:18:48,620 --> 00:18:51,400 need to disassemble the device and modify the configuration 444 00:18:51,400 --> 00:18:54,680 partition, which requires either eMMC 445 00:18:54,680 --> 00:18:57,220 desoldering or ISP access, which is very, very complicated. 446 00:18:57,420 --> 00:19:00,060 So it's a thing which a very small percentage of people 447 00:19:00,060 --> 00:19:01,520 can do, but it's very tricky. 448 00:19:02,400 --> 00:19:04,920 Also back in 2021, because we got a little bit tired 449 00:19:04,920 --> 00:19:06,540 with Roborock and their counter measurements, 450 00:19:06,800 --> 00:19:08,720 we figured out that there's a new vendor, which 451 00:19:08,720 --> 00:19:09,180 is Dreamy. 452 00:19:09,760 --> 00:19:12,100 And their devices were kind of powerful, 453 00:19:12,660 --> 00:19:14,140 because they had cameras and other things. 454 00:19:14,520 --> 00:19:18,220 They were easy to root just by a connector, by USB. 455 00:19:18,940 --> 00:19:20,800 But the problem was a little bit that the devices 456 00:19:20,800 --> 00:19:22,380 got soft-break from time to time. 457 00:19:22,500 --> 00:19:23,580 But we kind of fixed that. 458 00:19:24,800 --> 00:19:26,420 So what was the Roborock's reaction? 459 00:19:26,820 --> 00:19:29,720 Exactly one day after the DEF CON talk, 460 00:19:29,840 --> 00:19:31,640 I got a nice email from the Roborock CEO. 461 00:19:31,980 --> 00:19:32,780 Thanks for the talk. 462 00:19:32,980 --> 00:19:34,680 Our engineers were watching the talk live, 463 00:19:34,760 --> 00:19:35,860 so I assume they're watching it right now. 464 00:19:35,980 --> 00:19:37,520 And they're fixing right now the vulnerabilities 465 00:19:37,520 --> 00:19:38,320 and pushing out updates. 466 00:19:40,320 --> 00:19:42,420 So now what we do is all the partitions 467 00:19:42,420 --> 00:19:44,600 are encrypted, except for the system partition, which 468 00:19:44,600 --> 00:19:45,960 we can't do for particular reasons. 469 00:19:46,740 --> 00:19:49,520 They started to obfuscate the ALF binary check verification. 470 00:19:50,280 --> 00:19:53,160 So it cost us more time to figure out what they do. 471 00:19:53,500 --> 00:19:56,260 And they added custom code to detect the root devices 472 00:19:56,260 --> 00:19:58,240 and to bypass our traffic. 473 00:19:58,380 --> 00:20:01,020 So typically what we do is when we disconnect a device 474 00:20:01,020 --> 00:20:02,740 from the cloud, we reroute the traffic 475 00:20:02,740 --> 00:20:04,620 so that it ends up in our custom software. 476 00:20:04,980 --> 00:20:08,220 They figured out a way to detect that and basically still send 477 00:20:08,220 --> 00:20:11,040 out the traffic to the real Roborock servers, which 478 00:20:11,040 --> 00:20:11,560 was very mean. 479 00:20:11,620 --> 00:20:13,880 And we figured it out, but it was kind of a little bit weird. 480 00:20:13,900 --> 00:20:15,120 Like, wait, we rooted this device. 481 00:20:15,320 --> 00:20:16,920 Why is it still sending stuff back home? 482 00:20:17,620 --> 00:20:20,500 So they basically put hooks, obfuscated hooks, 483 00:20:20,560 --> 00:20:21,580 in the libcurl library. 484 00:20:22,540 --> 00:20:24,560 So every time HTTP request happening, 485 00:20:24,700 --> 00:20:26,800 they match for, is it the Roborock URL? 486 00:20:27,020 --> 00:20:32,600 If it is, then do a silent DNS check themselves and send it 487 00:20:32,600 --> 00:20:33,020 silently. 488 00:20:33,760 --> 00:20:35,360 And we are big fans of XOR. 489 00:20:35,520 --> 00:20:37,200 So they XORed everything. 490 00:20:37,200 --> 00:20:39,060 They XORed everything out of all the strings 491 00:20:39,060 --> 00:20:40,200 from all the binaries. 492 00:20:40,220 --> 00:20:43,020 So they really want to make it hard for us 493 00:20:43,020 --> 00:20:44,500 that we don't use strings on the thing. 494 00:20:45,720 --> 00:20:47,220 As an example for their creativity, 495 00:20:47,480 --> 00:20:50,060 like I mentioned before, they added elf signature 496 00:20:50,060 --> 00:20:50,760 checks in the kernel. 497 00:20:50,920 --> 00:20:52,180 And what they do is typically they 498 00:20:52,620 --> 00:20:56,420 map the doMMap function, which creates, I think, 499 00:20:56,480 --> 00:20:58,840 the memory area for a binary if you execute it. 500 00:20:58,980 --> 00:21:01,160 So if you execute an unsigned binary, 501 00:21:01,320 --> 00:21:03,360 you get just a segfault that the signature is invalid. 502 00:21:04,000 --> 00:21:05,720 And they got very, very creative with the name. 503 00:21:05,840 --> 00:21:07,180 So I have an example. 504 00:21:07,200 --> 00:21:07,680 Here's an example here. 505 00:21:07,840 --> 00:21:11,420 So the security function can be called like clock set rate 506 00:21:11,420 --> 00:21:15,760 DSP, clock get rate DSP, and all the other names, right? 507 00:21:15,860 --> 00:21:17,760 So it's kind of like if you look at that, you think like, oh, 508 00:21:17,860 --> 00:21:20,200 yeah, I mean, that needs to be there. 509 00:21:20,360 --> 00:21:22,360 But in reality, they try just to kind of be sneaky 510 00:21:22,360 --> 00:21:23,380 and obfuscate things. 511 00:21:23,740 --> 00:21:25,520 They get really, really creative with the names. 512 00:21:26,140 --> 00:21:27,060 But not creative enough. 513 00:21:27,200 --> 00:21:28,300 If you Google for these functions, 514 00:21:28,460 --> 00:21:30,100 you don't find anything except for Roborock. 515 00:21:30,220 --> 00:21:32,800 So well, maybe we should be a little bit more creative. 516 00:21:35,440 --> 00:21:36,760 Dreamy panicked also at this time. 517 00:21:37,200 --> 00:21:37,920 They were kind of new. 518 00:21:38,200 --> 00:21:40,280 They did a lot of changes to the firmware. 519 00:21:40,420 --> 00:21:42,320 So they pushed like one firmware update after another. 520 00:21:42,760 --> 00:21:44,600 They removed our UART login shell, 521 00:21:44,780 --> 00:21:46,000 and they patched the U-Boot shell. 522 00:21:46,960 --> 00:21:48,500 And some of the changes apparently 523 00:21:48,500 --> 00:21:49,680 did break a lot of robots. 524 00:21:50,680 --> 00:21:52,000 There was like some kind of thing 525 00:21:52,000 --> 00:21:52,900 which we didn't test it properly. 526 00:21:53,100 --> 00:21:54,740 They pushed a firmware update, and a lot of robots 527 00:21:54,740 --> 00:21:56,360 were kind of very sad afterwards. 528 00:21:57,440 --> 00:22:01,820 A fun fact is their patches revealed a way easier 529 00:22:01,820 --> 00:22:03,460 method to root the devices which we actually knew. 530 00:22:03,660 --> 00:22:06,440 So one thing which we do is typically we compare all 531 00:22:06,440 --> 00:22:07,000 the firmware updates. 532 00:22:07,200 --> 00:22:08,600 And see like, OK, what did they change? 533 00:22:08,980 --> 00:22:10,020 This happens fully automatic. 534 00:22:10,420 --> 00:22:13,280 And one thing which we noticed like, oh, they 535 00:22:13,700 --> 00:22:14,540 changed this thing. 536 00:22:15,720 --> 00:22:20,320 So typically, we would kind of do like a sketchy way 537 00:22:20,320 --> 00:22:23,060 to like of flashing the robot by USB. 538 00:22:23,240 --> 00:22:24,800 And if the USB cable is kind of janky, 539 00:22:24,800 --> 00:22:25,580 it might break the robot. 540 00:22:25,740 --> 00:22:26,500 So it's very, very dangerous. 541 00:22:26,860 --> 00:22:29,200 Then we saw that they patched a function out, which basically, 542 00:22:29,220 --> 00:22:31,040 if you press the reset button for like one second, 543 00:22:31,620 --> 00:22:32,420 it will pop your shell. 544 00:22:34,540 --> 00:22:36,820 And we saw that, and we were like, great. 545 00:22:37,200 --> 00:22:37,640 This is way safer. 546 00:22:37,700 --> 00:22:40,000 Because you kind of break things that easily. 547 00:22:40,340 --> 00:22:44,180 So thanks, Dreamy, for telling us about this thing. 548 00:22:44,320 --> 00:22:45,700 So we weren't even aware of that. 549 00:22:45,880 --> 00:22:48,220 I mean, I didn't have any idea that this exists in there. 550 00:22:49,300 --> 00:22:52,360 In 2022, when we started to kind of more focus on Dreamy 551 00:22:52,360 --> 00:22:54,480 robots and root these devices, they 552 00:22:54,480 --> 00:22:56,460 introduced more and more countermeasurements. 553 00:22:56,680 --> 00:22:59,180 One of them was that, obviously, they enabled secure boot 554 00:22:59,180 --> 00:23:02,300 and set e-fuses, which was kind of to be expected. 555 00:23:03,140 --> 00:23:06,660 They started to sign the system partition in a weird way, 556 00:23:06,660 --> 00:23:08,140 and verified it in a bootloader. 557 00:23:08,500 --> 00:23:10,760 And they started to pair the kernel 558 00:23:10,760 --> 00:23:15,440 with a particular version of file system, which on itself 559 00:23:15,440 --> 00:23:16,060 is not a problem. 560 00:23:16,160 --> 00:23:18,100 But the next step is kind of the annoying part. 561 00:23:18,260 --> 00:23:22,740 They introduced judge, we call it like that, 562 00:23:22,920 --> 00:23:24,240 countermeasure into the software. 563 00:23:25,020 --> 00:23:26,900 What is this judge doing? 564 00:23:27,140 --> 00:23:30,260 Well, they introduced this in all the firmwares in 2022. 565 00:23:30,720 --> 00:23:32,760 And it will randomly crash the robot 566 00:23:33,160 --> 00:23:34,880 whilst cleaning if it attacks the manipulation 567 00:23:34,880 --> 00:23:35,720 of the firmware. 568 00:23:36,660 --> 00:23:40,320 So what it does is it has like an expected SHA-256 value, 569 00:23:40,440 --> 00:23:41,400 and it baked into the kernel. 570 00:23:41,760 --> 00:23:45,480 And the process, as soon as you start to run it, 571 00:23:45,540 --> 00:23:47,140 it will basically compute a hash of the system partition 572 00:23:47,140 --> 00:23:47,800 and compare them. 573 00:23:48,640 --> 00:23:50,500 If it doesn't match, it will basically 574 00:23:50,500 --> 00:23:52,280 create a thread which will allocate 575 00:23:52,280 --> 00:23:53,300 lots and lots of memory. 576 00:23:53,480 --> 00:23:55,600 So after a random time, it's not even so that it's 577 00:23:55,600 --> 00:23:57,500 like three minutes, it can be 15 minutes, it can be anything. 578 00:23:57,960 --> 00:24:00,460 The robot will just stop and crash and reboot. 579 00:24:01,640 --> 00:24:04,340 And imagine how difficult it is to figure that out. 580 00:24:04,480 --> 00:24:06,640 It took us like weeks to figure that out. 581 00:24:06,640 --> 00:24:08,220 We figured out like, wait, is this like a thing 582 00:24:08,220 --> 00:24:09,520 which is we messed up something? 583 00:24:09,820 --> 00:24:10,900 Is it, what is it? 584 00:24:10,940 --> 00:24:12,820 Because there's no log files, it's not reproducible 585 00:24:12,820 --> 00:24:14,260 like in a very efficient manner. 586 00:24:14,680 --> 00:24:16,100 Until at some point, we figured out like, 587 00:24:16,200 --> 00:24:18,280 oh, wait, this thing is happening. 588 00:24:18,580 --> 00:24:21,480 And so we patch it out nowadays for like firmwares 589 00:24:21,480 --> 00:24:22,540 which we kind of release. 590 00:24:23,100 --> 00:24:24,040 But this is extremely mean. 591 00:24:24,140 --> 00:24:25,560 This is like one of the cases where I'm saying like, 592 00:24:25,620 --> 00:24:27,780 okay, just tell us that we messed up, it's fine. 593 00:24:28,220 --> 00:24:31,000 Don't be sneaky and kind of annoy us with that. 594 00:24:32,780 --> 00:24:35,740 Okay, so what is the current state of robot security today? 595 00:24:36,640 --> 00:24:37,820 And I have an example here, 596 00:24:37,940 --> 00:24:41,720 which is probably one of the most or best protected robots 597 00:24:42,240 --> 00:24:45,220 so far in the market, which is the Roborock S8 Pro Ultra, 598 00:24:45,320 --> 00:24:46,740 which is, I think, the top on the stack. 599 00:24:48,680 --> 00:24:50,200 It's the current flagship model. 600 00:24:50,280 --> 00:24:51,660 It came out a couple months ago. 601 00:24:52,780 --> 00:24:57,680 It has a quad-core all-winner SOC and multiple MCUs. 602 00:24:58,740 --> 00:24:59,740 They got a little bit cheap, 603 00:24:59,780 --> 00:25:02,120 so the initial models came out with one gigabyte of RAM, 604 00:25:02,220 --> 00:25:03,520 but at some point, we figured out like, 605 00:25:03,540 --> 00:25:05,000 oh, hey, we can get away with 512. 606 00:25:05,120 --> 00:25:06,620 So, new, really good models. 607 00:25:06,640 --> 00:25:08,540 Releases have like 512 megabytes of RAM. 608 00:25:09,280 --> 00:25:10,440 They have four gigabyte of flash. 609 00:25:10,580 --> 00:25:14,080 We have two cameras, LiDAR sensor, and two lasers. 610 00:25:14,740 --> 00:25:17,600 Security-wise, we kind of checked everything in the book. 611 00:25:17,700 --> 00:25:20,360 Basically, secure boot, the embedded protected root of S, 612 00:25:20,520 --> 00:25:22,620 look-synchro partitions as ALinux of signatures. 613 00:25:23,440 --> 00:25:25,520 So, the standard stuff, what we have. 614 00:25:26,760 --> 00:25:28,340 Let me give you a quick intro 615 00:25:28,340 --> 00:25:29,860 how the booting process looks like. 616 00:25:29,940 --> 00:25:31,000 And this is a very simplified version. 617 00:25:31,100 --> 00:25:32,200 I know at the end of the day, 618 00:25:32,220 --> 00:25:33,160 it will look very, very complicated, 619 00:25:33,420 --> 00:25:36,340 but just for you to understand, okay, what we, 620 00:25:36,640 --> 00:25:37,720 what are we doing, what is our leverage? 621 00:25:38,820 --> 00:25:41,780 If the device boots up, it boots from a boot ROM, 622 00:25:41,860 --> 00:25:43,220 which is baked into the SOC. 623 00:25:43,840 --> 00:25:46,020 It will then verify the first-stage bootloader, 624 00:25:46,020 --> 00:25:47,140 which initializes also RAM, 625 00:25:47,280 --> 00:25:49,660 and the first-stage bootloader will then check the signature 626 00:25:50,160 --> 00:25:51,620 of like a thing which is called TOC1. 627 00:25:51,740 --> 00:25:53,900 This is just a technical term, ignore that for now. 628 00:25:54,400 --> 00:25:56,220 The TOC1, what it will do is it will start 629 00:25:57,360 --> 00:25:59,820 the trusted components, Opti in this particular case, 630 00:25:59,980 --> 00:26:01,460 which will then verify U-boot 631 00:26:01,460 --> 00:26:04,720 and launch the actual U-boot bootloader. 632 00:26:05,280 --> 00:26:07,280 The U-boot bootloader gets its configuration 633 00:26:07,280 --> 00:26:10,020 and basically, for example, which partition to boot, 634 00:26:10,160 --> 00:26:13,480 and will launch and verify the Linux kernel. 635 00:26:14,060 --> 00:26:17,300 The Linux kernel itself will then verify 636 00:26:17,300 --> 00:26:20,140 the root file system and check if it's correctly signed, 637 00:26:20,760 --> 00:26:22,560 and will start all the software, 638 00:26:22,680 --> 00:26:24,360 which it will also check if it's correctly signed. 639 00:26:24,440 --> 00:26:26,140 So the software itself, the elf binaries are signed. 640 00:26:26,880 --> 00:26:29,380 Then we use Opti again to retrieve the keys 641 00:26:29,380 --> 00:26:31,600 for the system partitions and for the data partition, 642 00:26:31,800 --> 00:26:34,480 and then we'll decrypt the software 643 00:26:34,480 --> 00:26:36,400 for the software partition and user data partition. 644 00:26:36,820 --> 00:26:38,160 So there's a lot of stuff in there, 645 00:26:38,300 --> 00:26:40,600 and it's like, all right, everything checks everything, 646 00:26:40,820 --> 00:26:42,740 so what the heck are we doing here, right? 647 00:26:43,260 --> 00:26:44,840 Well, does it actually? 648 00:26:46,080 --> 00:26:48,880 There's one thing which is maybe not checked 649 00:26:49,520 --> 00:26:50,700 in the way it should be checked. 650 00:26:51,540 --> 00:26:52,720 Let's talk about the bootloader. 651 00:26:53,160 --> 00:26:55,900 So the U-boot bootloader is more or less 652 00:26:55,900 --> 00:26:57,520 the de facto standard thing for embedded devices. 653 00:26:57,700 --> 00:26:58,640 It's a very powerful software. 654 00:26:58,940 --> 00:27:01,640 It set up some hardware at the boot up process. 655 00:27:02,140 --> 00:27:04,460 It sends the command line to the server, and then it sends the command line to the server. 656 00:27:04,480 --> 00:27:05,320 It sends the command line arguments for the kernel. 657 00:27:05,480 --> 00:27:08,320 It verifies the kernel in this particular case and boots it, 658 00:27:08,800 --> 00:27:11,740 and it uses environment partition or configuration 659 00:27:12,240 --> 00:27:13,100 to configure itself. 660 00:27:13,440 --> 00:27:16,580 For example, it's used for if you want to update 661 00:27:16,580 --> 00:27:18,320 like a partition, you have typically two copies 662 00:27:18,320 --> 00:27:18,840 of a partition. 663 00:27:19,380 --> 00:27:20,780 If you want to update copy B, 664 00:27:21,360 --> 00:27:22,660 you can control it over U-boot. 665 00:27:23,600 --> 00:27:25,720 On the other side, U-boot has a very powerful command set. 666 00:27:25,800 --> 00:27:26,640 It can do a lot of things. 667 00:27:27,200 --> 00:27:30,480 For example, allowing to load partitions, 668 00:27:30,600 --> 00:27:31,960 access memory, changing memory, 669 00:27:32,060 --> 00:27:33,380 because sometimes you need that to, 670 00:27:34,500 --> 00:27:35,200 set up hardware. 671 00:27:36,160 --> 00:27:38,100 The thing which I was wondering about was like, 672 00:27:38,120 --> 00:27:40,160 huh, okay, it can access and change memory. 673 00:27:40,640 --> 00:27:42,600 I wonder if we can use that for something. 674 00:27:43,240 --> 00:27:47,320 So the idea was, can we ask U-boot nicely to modify itself? 675 00:27:47,800 --> 00:27:50,300 So the theory is if you have memory reads and writes, 676 00:27:50,460 --> 00:27:52,660 we might be able to overwrite instructions 677 00:27:52,660 --> 00:27:54,680 in the U-boot itself, which, for example, 678 00:27:54,740 --> 00:27:56,380 checks, verifies the kernel signature. 679 00:27:57,120 --> 00:27:58,840 So we had to do a little bit of math, 680 00:27:58,960 --> 00:28:00,100 so we have to figure out basically 681 00:28:00,540 --> 00:28:01,940 where is the actual signature function, 682 00:28:02,120 --> 00:28:03,440 which was a little bit tricky to figure out 683 00:28:03,440 --> 00:28:04,340 if you don't have the source code. 684 00:28:05,300 --> 00:28:07,980 Then we have to figure out the U-boot location offset, 685 00:28:08,220 --> 00:28:09,160 because we, you know, 686 00:28:10,320 --> 00:28:11,660 there's some technical reason behind that. 687 00:28:12,060 --> 00:28:13,320 And so we need to figure out 688 00:28:13,320 --> 00:28:15,100 where is this function in the memory. 689 00:28:15,520 --> 00:28:16,640 And then at the end of the day, 690 00:28:17,120 --> 00:28:18,660 we figured out where it is, 691 00:28:18,800 --> 00:28:20,620 and then we patch, basically, 692 00:28:20,880 --> 00:28:23,940 we set two bytes in one particular memory location, 693 00:28:24,180 --> 00:28:26,000 and this enables all the verifications 694 00:28:27,800 --> 00:28:29,040 forward after U-boot. 695 00:28:29,280 --> 00:28:30,300 The interesting thing is, 696 00:28:30,420 --> 00:28:32,020 the device is still in secure boot mode. 697 00:28:32,340 --> 00:28:32,740 Nothing, 698 00:28:32,740 --> 00:28:34,460 nothing notices that something is going wrong. 699 00:28:34,800 --> 00:28:35,580 Everything is fine. 700 00:28:35,780 --> 00:28:37,220 So, what's the consequence of that? 701 00:28:37,400 --> 00:28:39,760 And if we go back into our original example, 702 00:28:39,940 --> 00:28:41,660 if we have a malicious U-boot configuration, 703 00:28:42,480 --> 00:28:42,680 well, 704 00:28:44,020 --> 00:28:45,140 U-boot patches itself, 705 00:28:45,400 --> 00:28:46,300 so U-boot is compromised, 706 00:28:46,840 --> 00:28:48,180 because we have U-boot compromise, 707 00:28:48,320 --> 00:28:49,940 we compromise the verification check, 708 00:28:50,080 --> 00:28:51,660 then we can compromise the kernel, 709 00:28:51,840 --> 00:28:53,600 because nothing is checking it anymore. 710 00:28:54,220 --> 00:28:55,400 If you compromise the kernel, 711 00:28:55,480 --> 00:28:56,740 then the kernel doesn't check anymore 712 00:28:56,740 --> 00:28:58,160 the root file system or the software, 713 00:28:58,720 --> 00:29:00,920 and because Opti never learns that anything bad happened, 714 00:29:01,140 --> 00:29:02,660 it will happily give us the key, 715 00:29:02,660 --> 00:29:03,860 which we need to look at partitions, 716 00:29:03,900 --> 00:29:05,440 and everything works. 717 00:29:05,720 --> 00:29:07,300 So, this system is more or less screwed. 718 00:29:07,980 --> 00:29:11,540 So, what did we achieve with this small, one-line thing? 719 00:29:11,940 --> 00:29:13,460 We bypassed the secure-boot process, 720 00:29:15,160 --> 00:29:16,340 we modified the kernel, 721 00:29:17,520 --> 00:29:19,360 which means we removed the DMVarity checks, 722 00:29:19,440 --> 00:29:20,500 we removed the ELF binary checks, 723 00:29:20,600 --> 00:29:21,940 and we disabled SELinux, 724 00:29:22,580 --> 00:29:24,940 and this allows us to modify the root file system, 725 00:29:25,120 --> 00:29:26,340 so we're back in the game, basically. 726 00:29:27,680 --> 00:29:30,620 And with that, we can also install custom software 727 00:29:30,620 --> 00:29:32,020 and get SSH access. 728 00:29:32,660 --> 00:29:33,500 The interesting thing is, 729 00:29:33,520 --> 00:29:34,740 when we were playing around with this model, 730 00:29:34,880 --> 00:29:36,180 with this approach, 731 00:29:36,460 --> 00:29:38,840 I mean, it's kind of known that the environment position 732 00:29:38,840 --> 00:29:39,700 is kind of like a problem, 733 00:29:39,880 --> 00:29:40,940 but most of the time, 734 00:29:40,960 --> 00:29:43,500 people use it to kind of boot their own shell scripts, 735 00:29:43,960 --> 00:29:45,140 but in this particular case, 736 00:29:45,240 --> 00:29:47,960 we can just patch the U-boot persistently, 737 00:29:48,580 --> 00:29:50,660 and not only on Rayquem robots, 738 00:29:50,820 --> 00:29:52,220 but we tested this also for smart speakers, 739 00:29:52,700 --> 00:29:55,720 media devices, and many, many other devices. 740 00:29:55,820 --> 00:29:59,060 So, if you happen to have a device which uses U-boot, 741 00:29:59,160 --> 00:30:00,840 and which is kind of locked, 742 00:30:01,020 --> 00:30:02,640 and you might want to try that, 743 00:30:02,640 --> 00:30:05,480 it's a little bit of effort in getting it to run initially, 744 00:30:05,700 --> 00:30:07,140 but it's definitely worth it. 745 00:30:08,020 --> 00:30:09,440 So, we still have a problem. 746 00:30:09,720 --> 00:30:12,620 Well, how do we modify the environment? 747 00:30:12,760 --> 00:30:13,980 Because, I mean, it's like on a flash, 748 00:30:14,060 --> 00:30:15,160 so we don't have access. 749 00:30:15,520 --> 00:30:19,860 Well, without root access, we can't modify it directly. 750 00:30:20,060 --> 00:30:21,720 We cannot also modify the root file system, 751 00:30:21,860 --> 00:30:23,500 so we cannot put our custom software onto it. 752 00:30:23,840 --> 00:30:25,600 And we don't want to disorder the flash. 753 00:30:26,000 --> 00:30:27,700 So, the good news is we found, 754 00:30:27,800 --> 00:30:30,500 for the typical models, different methods. 755 00:30:30,700 --> 00:30:31,500 For the older, 756 00:30:33,740 --> 00:30:34,720 Dreamy Rayquem robots, 757 00:30:35,360 --> 00:30:36,660 we found the USB stick method, 758 00:30:36,800 --> 00:30:39,260 which, again, they left us, thankfully. 759 00:30:40,540 --> 00:30:43,000 For newer models, which came out very, very recently, 760 00:30:43,140 --> 00:30:45,400 we have like an FAL root, like it's bootloader root. 761 00:30:45,760 --> 00:30:49,420 And for the Roborock models, we have a scary FAL root. 762 00:30:49,580 --> 00:30:51,240 I will explain why we call it scary. 763 00:30:51,960 --> 00:30:55,220 So, as a quick recap, if you have been here two years ago, 764 00:30:56,300 --> 00:30:58,100 Dreamy, thankfully, has debug pins, 765 00:30:58,200 --> 00:30:59,120 which are reachable from outside, 766 00:30:59,220 --> 00:31:00,440 so you can just remove like a cover. 767 00:31:00,740 --> 00:31:02,620 It sounds a little bit scary, if you kind of, remove it, but it's okay. 768 00:31:02,620 --> 00:31:04,360 You can pull on it for the first time, 769 00:31:04,380 --> 00:31:05,440 but it's very easily removable. 770 00:31:05,860 --> 00:31:07,660 It gives you UART, it gives you like USB, 771 00:31:07,800 --> 00:31:08,320 it gives you everything. 772 00:31:09,040 --> 00:31:10,980 The same is the case, I mean, we've never changed it, 773 00:31:11,040 --> 00:31:12,720 so even for the new models, for the R models, 774 00:31:12,840 --> 00:31:15,080 which are the ones which came out after 2022, 775 00:31:15,660 --> 00:31:16,820 they still use the same thing. 776 00:31:18,620 --> 00:31:20,800 So, again, a thing which we kind of figured out 777 00:31:20,800 --> 00:31:22,180 by looking at firmware updates, 778 00:31:23,700 --> 00:31:25,560 Dreamy left us a nice backdoor. 779 00:31:26,560 --> 00:31:28,360 Basically, if you connect a USB stick, 780 00:31:28,540 --> 00:31:30,700 an empty USB stick, it doesn't matter what USB stick it is, 781 00:31:31,360 --> 00:31:34,220 to the USB port, it will pop a shell. 782 00:31:34,380 --> 00:31:36,020 And at some point, I think they plan 783 00:31:36,020 --> 00:31:37,760 to have some actual verification there, 784 00:31:38,120 --> 00:31:40,560 but as you see, if the verification fails, 785 00:31:40,660 --> 00:31:41,700 it still gets you a shell. 786 00:31:41,800 --> 00:31:43,500 So, I think this was a work in progress, 787 00:31:43,660 --> 00:31:44,780 and someone forgot about that. 788 00:31:45,920 --> 00:31:49,420 So, that way, as you see, it doesn't matter 789 00:31:49,420 --> 00:31:52,820 if it's doing anything or not, you will always get a shell. 790 00:31:54,840 --> 00:31:57,200 So, after you get access, basically, to the shell, 791 00:31:57,260 --> 00:31:59,340 you can just patch environment, and you're good to go. 792 00:32:00,700 --> 00:32:02,860 Sad news is, for whatever reason, we have two branches, 793 00:32:03,060 --> 00:32:05,540 and for the newer R models in 2022, 794 00:32:05,880 --> 00:32:11,520 they have a better check, so it doesn't work there. 795 00:32:12,360 --> 00:32:14,260 Instead, we developed this method, 796 00:32:14,740 --> 00:32:17,040 where we basically bring the device 797 00:32:17,620 --> 00:32:19,060 into a particular bootloader mode, 798 00:32:19,260 --> 00:32:23,660 and then we have a weird, sketchy firmware package, 799 00:32:23,780 --> 00:32:25,680 which we installed with a very sketchy software, 800 00:32:26,180 --> 00:32:28,380 and it doesn't actually install any firmware, 801 00:32:28,480 --> 00:32:30,620 but it gives you an interface to the flash, 802 00:32:30,620 --> 00:32:32,020 and to use some other system functions, 803 00:32:33,260 --> 00:32:36,820 which, surprisingly, if you connect over USB 804 00:32:36,820 --> 00:32:37,760 in the bootloader mode, 805 00:32:37,840 --> 00:32:39,100 you don't need to have signed firmware. 806 00:32:39,320 --> 00:32:42,400 So, you can execute unsigned codes over USB. 807 00:32:42,680 --> 00:32:45,360 You don't have access to Trust Zone, but that's fine for us. 808 00:32:45,400 --> 00:32:46,900 We just wanna have access to the flash, 809 00:32:47,000 --> 00:32:48,460 and from there, we can just modify the flash. 810 00:32:50,100 --> 00:32:51,620 So, I have a how-to here. 811 00:32:51,740 --> 00:32:53,220 The technical process is a little bit complicated, 812 00:32:53,320 --> 00:32:57,020 but we did lots of pictures, and so, don't worry. 813 00:32:57,200 --> 00:32:59,520 I mean, many people did that already and tested it, 814 00:32:59,560 --> 00:33:00,600 thankfully, and didn't break the code. 815 00:33:00,600 --> 00:33:00,920 They fixed their devices. 816 00:33:01,180 --> 00:33:02,720 Well, one did, but we fixed it, so. 817 00:33:03,220 --> 00:33:04,160 It should be safe. 818 00:33:04,280 --> 00:33:05,240 At this time, it should be safe. 819 00:33:05,340 --> 00:33:06,380 I kind of promise. 820 00:33:06,880 --> 00:33:09,120 If you wanna get an adapter, I have some adapters with me. 821 00:33:09,360 --> 00:33:10,300 You can just grab one. 822 00:33:11,080 --> 00:33:14,340 Sadly, I got rid of 100 adapters two days ago 823 00:33:14,340 --> 00:33:16,040 in my demo session, but I still have some left. 824 00:33:16,840 --> 00:33:19,240 Otherwise, you'll find the Gerber files on this website. 825 00:33:20,340 --> 00:33:22,400 Let's talk about this scary FAL route. 826 00:33:23,660 --> 00:33:25,660 The problem with Roborock is they didn't give us 827 00:33:25,660 --> 00:33:26,780 any exposed debug pins. 828 00:33:26,940 --> 00:33:29,820 So, we have only USB available from outside, 829 00:33:30,600 --> 00:33:30,880 so we don't really use. 830 00:33:31,140 --> 00:33:33,420 So, the first approach, which I typically do is, 831 00:33:33,520 --> 00:33:35,640 all right, I buy the device, I spend $1,000, 832 00:33:35,860 --> 00:33:38,400 and disassemble it, and analyze it. 833 00:33:38,580 --> 00:33:42,040 I remove the SOC, which is like hundreds of pins, 834 00:33:42,540 --> 00:33:45,060 and try to track down which pin is. 835 00:33:45,760 --> 00:33:48,680 I remove also, obviously, the eMMC and read the eMMC out 836 00:33:48,680 --> 00:33:49,740 to kind of figure out what's going on, 837 00:33:50,200 --> 00:33:52,780 and then I start to map all the pins visually, 838 00:33:53,120 --> 00:33:55,840 so I use my favorite hacking software, MS Paint, 839 00:33:56,020 --> 00:33:57,240 and kind of overlay the pictures, 840 00:33:58,500 --> 00:34:00,360 and rotate one so that I can, 841 00:34:00,360 --> 00:34:01,300 I can basically trace down, like, 842 00:34:01,340 --> 00:34:02,900 okay, this is the data line from the eMMC. 843 00:34:03,040 --> 00:34:06,140 It goes in this via, and it comes out on the other side. 844 00:34:06,280 --> 00:34:08,040 As you can see, ah, the picture's a little bit weird. 845 00:34:08,200 --> 00:34:09,600 It comes out from the other side, 846 00:34:09,700 --> 00:34:12,140 and so you can basically connect these pictures. 847 00:34:12,660 --> 00:34:13,720 One thing that you figure out, 848 00:34:13,860 --> 00:34:15,780 and Roborock was very, very great with layouting it, 849 00:34:16,820 --> 00:34:18,600 you can access all the eMMC data pins 850 00:34:18,600 --> 00:34:20,000 from the hole, from the button, 851 00:34:20,480 --> 00:34:22,420 which is you just remove the cover. 852 00:34:22,520 --> 00:34:23,800 There's just some rubber thing. 853 00:34:23,980 --> 00:34:25,280 You don't need to disassemble the robot. 854 00:34:25,480 --> 00:34:26,580 No warranty seals are broken. 855 00:34:26,880 --> 00:34:28,520 You can access the data pins from outside, 856 00:34:28,960 --> 00:34:30,260 which is great for us. 857 00:34:30,260 --> 00:34:32,960 So, as you see, we have data zero, data one, 858 00:34:33,000 --> 00:34:34,120 and all the other pins, the clock. 859 00:34:34,180 --> 00:34:35,920 We have everything, which is very nice. 860 00:34:36,320 --> 00:34:37,780 So, now we come to the scary part. 861 00:34:38,440 --> 00:34:40,080 You can use a needle to basically 862 00:34:42,020 --> 00:34:43,780 ground the data zero pin to, 863 00:34:43,880 --> 00:34:46,480 to, well, connect the data zero pin to ground, 864 00:34:46,980 --> 00:34:49,580 and that will bring the device into the bootloader mode, 865 00:34:49,680 --> 00:34:50,880 and then you can just flash it from USB. 866 00:34:51,460 --> 00:34:52,680 So, without disassembling, 867 00:34:52,680 --> 00:34:53,820 without touching any single screw, 868 00:34:54,040 --> 00:34:55,120 you can just, you know, 869 00:34:55,140 --> 00:34:56,900 just scratch off a little bit of solder mask. 870 00:34:57,020 --> 00:34:58,380 You connect, like, a wire to it. 871 00:34:58,680 --> 00:35:00,080 Just hold it and power it on, 872 00:35:00,260 --> 00:35:02,740 and then it should be in the bootloader mode. 873 00:35:05,160 --> 00:35:07,060 So, it's more or less the same approach for the Dreamy. 874 00:35:07,160 --> 00:35:09,400 So, it's like, just, in this particular case, 875 00:35:09,460 --> 00:35:10,500 you need to be a little bit more scary. 876 00:35:12,760 --> 00:35:13,480 Why is it scary? 877 00:35:13,640 --> 00:35:15,360 Well, it requires removal of solder mask, 878 00:35:15,460 --> 00:35:16,440 so you need to scratch a little bit. 879 00:35:16,680 --> 00:35:18,440 If you don't, if you're comfortable with that, 880 00:35:18,500 --> 00:35:19,360 you still need to tear it down, 881 00:35:19,820 --> 00:35:21,680 but if you're unsure, ask other users. 882 00:35:21,840 --> 00:35:22,780 There's a lot of people who do that. 883 00:35:23,960 --> 00:35:26,560 If you have a different robot from Roborock, 884 00:35:26,700 --> 00:35:29,720 like a G10S, which is very often used in Russia right now, 885 00:35:30,680 --> 00:35:32,380 it's more or less the same process as for the other robots, 886 00:35:32,520 --> 00:35:33,660 but you need to disassemble it 887 00:35:33,660 --> 00:35:35,260 because we don't have any access from outside. 888 00:35:35,400 --> 00:35:37,180 I checked all the, you know, 889 00:35:37,620 --> 00:35:39,340 possibilities of, like, burning holes into the board, 890 00:35:39,760 --> 00:35:40,820 but sadly, that doesn't work. 891 00:35:42,440 --> 00:35:44,240 So, check also my website, robotinfo, 892 00:35:44,260 --> 00:35:46,700 for the pinouts, and ask for help in the community. 893 00:35:48,340 --> 00:35:49,700 Right, what do we do with root access? 894 00:35:52,700 --> 00:35:54,780 So, we have root access now, in some way. 895 00:35:54,980 --> 00:35:55,860 So, what do we do now? 896 00:35:56,060 --> 00:35:57,260 We defeated Secure Boot. 897 00:35:57,420 --> 00:35:58,420 We can run custom software, 898 00:35:58,940 --> 00:36:00,240 but what kind of software can we run? 899 00:36:00,240 --> 00:36:01,820 And can we build our own software 900 00:36:01,820 --> 00:36:02,960 which kind of does everything? 901 00:36:04,300 --> 00:36:05,540 Well, we are a little bit lazy, 902 00:36:05,620 --> 00:36:07,480 so we actually, our main idea is, 903 00:36:07,560 --> 00:36:09,000 well, we just want to disconnect the cloud, 904 00:36:09,080 --> 00:36:11,160 but keep all the vendor cleaning logic in place, 905 00:36:11,260 --> 00:36:13,040 because, I mean, we are not software engineers, 906 00:36:13,180 --> 00:36:15,060 so we're just hackers, so we, you know, 907 00:36:15,500 --> 00:36:17,340 if the world works, then, you know, it's still fine. 908 00:36:18,660 --> 00:36:19,980 So, if we get rid of the cloud, 909 00:36:20,100 --> 00:36:21,060 the robot should still work, 910 00:36:21,160 --> 00:36:23,300 but the problem is, like, well, we don't have live maps, 911 00:36:23,360 --> 00:36:25,460 we don't have advanced features like map editing, 912 00:36:25,660 --> 00:36:27,440 so, you know, why did we even root it 913 00:36:27,440 --> 00:36:28,580 if we just, you know, cut the internet? 914 00:36:30,700 --> 00:36:33,360 Um, and what happens if we need to redirect traffic? 915 00:36:33,580 --> 00:36:36,460 So, the problem is, like, we use, obviously, 916 00:36:36,500 --> 00:36:39,860 secrets or keys, and so we need to extract them 917 00:36:39,860 --> 00:36:42,100 from the robots and point it, like, to, like, 918 00:36:42,100 --> 00:36:43,880 a cloud emulation, so it's a little bit tricky, right? 919 00:36:44,120 --> 00:36:44,920 But we can do that. 920 00:36:45,240 --> 00:36:47,380 So, the initial approach which we had was quite naive, 921 00:36:47,440 --> 00:36:49,720 so we just redirect DNS to our own software, 922 00:36:49,860 --> 00:36:51,500 and, you know, we just use IP tables, 923 00:36:51,940 --> 00:36:55,500 but Xiaomi kind of figured out that, oh, people do that, 924 00:36:55,600 --> 00:36:56,680 so they kind of introduce, like, 925 00:36:56,720 --> 00:36:58,420 hard-coded IP addresses in their binaries. 926 00:36:59,160 --> 00:37:01,500 Our solution was basically to just, you know, 927 00:37:01,560 --> 00:37:03,040 replace their hard-coded IP addresses 928 00:37:03,040 --> 00:37:04,460 with our hard-coded IP addresses, 929 00:37:04,540 --> 00:37:06,160 so it's just an additional step. 930 00:37:06,340 --> 00:37:08,880 So, as you see, we're kind of aware of what we do, 931 00:37:08,980 --> 00:37:11,120 and then we do the same things, basically, in reverse, 932 00:37:12,040 --> 00:37:14,020 which means we can run our own software 933 00:37:14,020 --> 00:37:15,140 and we can redirect the traffic, 934 00:37:15,800 --> 00:37:18,040 and there's a great software, which is Volitudo, 935 00:37:18,200 --> 00:37:19,260 which is developed by Zoom. 936 00:37:19,520 --> 00:37:23,860 It's a complete replacement of the cloud applications 937 00:37:25,120 --> 00:37:26,800 and the API and the app itself. 938 00:37:28,420 --> 00:37:30,080 You can run your vacuum robot completely offline 939 00:37:30,080 --> 00:37:33,180 with all the functionalities which the cloud and the smartphone 940 00:37:33,860 --> 00:37:34,700 app offers you. 941 00:37:34,860 --> 00:37:36,800 You can see live maps, you can edit the maps, 942 00:37:36,900 --> 00:37:37,960 you can change the robot configuration. 943 00:37:38,620 --> 00:37:40,100 It's a very responsive web interface. 944 00:37:40,400 --> 00:37:42,580 It gives you the API for REST, 945 00:37:42,600 --> 00:37:44,260 and it gives you MQTT functionality, 946 00:37:44,760 --> 00:37:47,280 for example, for Home Assistant. 947 00:37:47,960 --> 00:37:49,540 The problem is, I mean, that's not a problem, 948 00:37:49,660 --> 00:37:51,280 but that's not my personal thing, 949 00:37:51,400 --> 00:37:54,660 is zeroing lives to write it in JavaScript instead of Node.js. 950 00:37:54,940 --> 00:37:57,300 I am not sure if that's the most performant thing is, 951 00:37:57,360 --> 00:37:58,100 but, you know, 952 00:37:58,420 --> 00:38:00,000 it works, so it's fine with me. 953 00:38:00,780 --> 00:38:02,360 Some screenshots, just to give you information 954 00:38:02,360 --> 00:38:03,400 on how it looks like. 955 00:38:03,500 --> 00:38:04,760 So you get, actually, the maps. 956 00:38:04,840 --> 00:38:06,680 You can do a lot of interesting things with that. 957 00:38:07,360 --> 00:38:09,400 The question is now, how do you get the custom firmware? 958 00:38:09,900 --> 00:38:11,540 I made something very, very easy, 959 00:38:11,640 --> 00:38:12,760 which is called Dust Builder. 960 00:38:12,940 --> 00:38:16,080 It's basically a website where you can let the website 961 00:38:16,080 --> 00:38:17,400 build the custom firmware for you. 962 00:38:17,480 --> 00:38:19,520 You just, you know, upload SSH key and do some other stuff, 963 00:38:20,000 --> 00:38:22,900 and it will give you the custom firmware 964 00:38:23,340 --> 00:38:25,360 which you can use when you push on your robot. 965 00:38:25,720 --> 00:38:28,300 These scripts are technically public on the GitHub, 966 00:38:28,420 --> 00:38:29,340 so you can just, you know, 967 00:38:29,360 --> 00:38:31,100 if you want to reproduce that, you can do that. 968 00:38:32,680 --> 00:38:33,940 So, last couple minutes. 969 00:38:34,040 --> 00:38:35,860 That's the reason why I'm getting a little bit faster. 970 00:38:36,540 --> 00:38:39,560 What else did we find on the robots 971 00:38:39,560 --> 00:38:41,000 while we were doing this research? 972 00:38:41,260 --> 00:38:43,520 Well, all the cameras are, 973 00:38:43,680 --> 00:38:46,220 I mean, it's a Linux operation system on all the robots. 974 00:38:46,760 --> 00:38:49,440 So all the devices use the video for Linux subsystem, 975 00:38:49,560 --> 00:38:50,660 and you can access the cameras 976 00:38:51,240 --> 00:38:54,620 through their device file, basically. 977 00:38:55,100 --> 00:38:57,060 And some of the vendors were even nice enough 978 00:38:57,060 --> 00:38:58,240 to let some 979 00:38:58,660 --> 00:39:00,240 debugging tools to, you know, 980 00:39:00,260 --> 00:39:01,480 debug the camera on the device. 981 00:39:02,120 --> 00:39:04,380 And I just want to give you some examples here. 982 00:39:04,840 --> 00:39:07,500 This is a G10S from Roborock. 983 00:39:07,780 --> 00:39:10,320 I made, so it's self-aware. 984 00:39:10,380 --> 00:39:11,480 It makes a selfie of itself. 985 00:39:11,860 --> 00:39:13,480 And you see kind of like the quality, again, 986 00:39:13,540 --> 00:39:14,360 from the optical sensors. 987 00:39:17,180 --> 00:39:21,040 For the Altair S Ultra, they gave it a RGB camera, 988 00:39:21,100 --> 00:39:21,640 which is also nice. 989 00:39:21,740 --> 00:39:23,420 So you see, again, a selfie of a robot 990 00:39:24,200 --> 00:39:25,080 with the DEF CON flag. 991 00:39:25,440 --> 00:39:28,100 And on the right, you see like what it typically sees 992 00:39:28,600 --> 00:39:31,040 with the camera if it kind of starts to detect AI, 993 00:39:31,200 --> 00:39:34,860 with the AI objects in your house. 994 00:39:35,780 --> 00:39:39,660 And this is the same example for the Roborock S8. 995 00:39:39,960 --> 00:39:41,440 It has an infrared camera, 996 00:39:41,560 --> 00:39:43,360 so the set thing is on the right, as you see there. 997 00:39:43,880 --> 00:39:45,320 This looks a little bit bland. 998 00:39:47,040 --> 00:39:48,180 This is the blue elephant, 999 00:39:48,280 --> 00:39:49,740 so you cannot see the blue in the picture, 1000 00:39:49,820 --> 00:39:51,820 which is kind of sad, but it's okay. 1001 00:39:51,920 --> 00:39:53,720 I mean, you still see that the optical sensor 1002 00:39:53,720 --> 00:39:54,480 sees something, right? 1003 00:39:58,420 --> 00:39:59,300 So something about the Dreamy. 1004 00:39:59,360 --> 00:40:01,760 The good news is this year, we didn't find any SSH credentials 1005 00:40:01,760 --> 00:40:03,660 to the backend in the firmware, so that's good. 1006 00:40:04,000 --> 00:40:06,240 They made a lot of improvements of the software, 1007 00:40:06,400 --> 00:40:08,880 but the bad news is they started to introduce 1008 00:40:08,880 --> 00:40:10,580 a lot of telemetry and calling home functions, 1009 00:40:10,740 --> 00:40:11,480 which is a little bit sad. 1010 00:40:11,860 --> 00:40:14,160 And they started to enforce geo-blocking by IP address. 1011 00:40:14,300 --> 00:40:16,460 So if you buy a device from China, again, 1012 00:40:16,600 --> 00:40:18,480 you cannot use it anywhere outside of China. 1013 00:40:18,600 --> 00:40:20,260 You need to kind of do some hacking, I guess. 1014 00:40:21,700 --> 00:40:22,680 There were a couple problems. 1015 00:40:24,500 --> 00:40:27,460 So all the vacuum robots, what they do for legal reasons is, 1016 00:40:27,480 --> 00:40:28,120 if you want to use it outside of China, you need to do some hacking, I guess. There were a couple problems. So all the vacuum robots, what they do for legal reasons is, 1017 00:40:28,120 --> 00:40:28,920 if you want to use it outside of China, you need to do some hacking, I guess. There were a couple problems. So all the vacuum robots, what they do for legal reasons is, 1018 00:40:28,920 --> 00:40:30,720 if you access the camera remotely, the robot will say, 1019 00:40:30,780 --> 00:40:34,620 oh, live view is in effect, so be careful, or whatever, 1020 00:40:35,600 --> 00:40:36,980 which is kind of like a legal requirement. 1021 00:40:37,320 --> 00:40:42,280 The problem is these audio files are kind of part of the audio packages, 1022 00:40:42,880 --> 00:40:45,020 and the audio packages are not signed or encrypted. 1023 00:40:45,200 --> 00:40:47,520 So one thing you can do technically, and don't do that, 1024 00:40:47,580 --> 00:40:49,080 because it's probably illegal in your jurisdiction, 1025 00:40:49,520 --> 00:40:52,140 you can just overwrite this prompt, this warning prompt, 1026 00:40:52,240 --> 00:40:54,620 which the robot will kind of blare out every three minutes 1027 00:40:54,620 --> 00:40:57,320 by an empty file, and then you can access the camera 1028 00:40:57,320 --> 00:40:58,100 without any problems. 1029 00:40:58,120 --> 00:40:58,560 Without anyone noticing. 1030 00:40:58,860 --> 00:41:00,140 But it's super illegal, don't do it. 1031 00:41:00,640 --> 00:41:03,320 The thing is, you can do it also for non-routed devices, 1032 00:41:03,460 --> 00:41:04,180 which might be a problem. 1033 00:41:05,500 --> 00:41:08,600 One interesting thing is, Dreamy kind of messed up, 1034 00:41:08,640 --> 00:41:09,440 by the way, their firmware signatures, 1035 00:41:10,040 --> 00:41:12,080 so we didn't really use that, 1036 00:41:12,200 --> 00:41:13,260 but I mean, it's kind of interesting. 1037 00:41:13,480 --> 00:41:14,920 So we use encryption and signing, 1038 00:41:15,080 --> 00:41:16,820 and the way how we do that is very interesting. 1039 00:41:17,400 --> 00:41:19,760 The AutoZip archive is encrypted with a static password, 1040 00:41:19,940 --> 00:41:22,260 then they created a random file, 1041 00:41:22,380 --> 00:41:23,720 which was signed with a private key, 1042 00:41:24,200 --> 00:41:26,420 and then they used the random file as a password 1043 00:41:26,420 --> 00:41:27,420 for another zip archive, 1044 00:41:27,420 --> 00:41:28,880 inside of the whole thing, 1045 00:41:30,940 --> 00:41:32,220 which is basically the firmware. 1046 00:41:32,720 --> 00:41:35,780 The problem is, the actual firmware is not signed. 1047 00:41:35,940 --> 00:41:37,460 The password is signed, but not the firmware. 1048 00:41:37,620 --> 00:41:38,980 So the thing is, if you want to create 1049 00:41:38,980 --> 00:41:40,340 your own custom firmware updates, 1050 00:41:40,820 --> 00:41:42,560 you just reuse the same password, 1051 00:41:42,640 --> 00:41:43,500 because it's already signed. 1052 00:41:43,680 --> 00:41:45,820 So I think someone had a good, 1053 00:41:46,840 --> 00:41:49,980 I don't know, I mean, we were not sure if it was a trick, 1054 00:41:50,060 --> 00:41:51,040 or if they kind of messed up. 1055 00:41:51,140 --> 00:41:52,380 It was kind of a little bit weird. 1056 00:41:53,780 --> 00:41:55,360 Anyway, so, last two slides. 1057 00:41:56,320 --> 00:41:57,000 As a summary, 1058 00:41:57,420 --> 00:41:59,100 we have routing methods for the most current, 1059 00:41:59,320 --> 00:42:03,160 so most of the current released Dreamy and Roborock robots, 1060 00:42:03,320 --> 00:42:04,520 and technically some others too. 1061 00:42:05,140 --> 00:42:06,320 We can bypass secure boots, 1062 00:42:06,400 --> 00:42:08,040 we can bypass any other security mechanisms. 1063 00:42:08,660 --> 00:42:10,980 We even routed devices which came out two weeks ago, 1064 00:42:11,080 --> 00:42:14,180 so basically we are at the cutting edge here. 1065 00:42:14,880 --> 00:42:17,280 We get persistence, and we can run our custom firmware. 1066 00:42:18,680 --> 00:42:21,280 Now we can validate and verify the vendor's claims, 1067 00:42:21,440 --> 00:42:24,640 and the bad news is some of them are tricky. 1068 00:42:25,720 --> 00:42:28,560 But the interesting thing here is the takeaway message. 1069 00:42:28,860 --> 00:42:30,680 Even if you're not doing any robot hacking, 1070 00:42:31,300 --> 00:42:32,720 the bootloader attack is technically applicable 1071 00:42:32,720 --> 00:42:34,300 for many, many different other devices. 1072 00:42:34,660 --> 00:42:37,600 We saw it in, like I said, smart speakers and other things. 1073 00:42:38,740 --> 00:42:41,880 And this routing allows us basically to do further research 1074 00:42:41,880 --> 00:42:44,400 into IOT and AI, because now we have access 1075 00:42:44,400 --> 00:42:45,960 to the AI machine learning models, 1076 00:42:46,180 --> 00:42:48,400 and we can basically take a look at and compare them 1077 00:42:48,400 --> 00:42:51,760 like more, in a more qualitative way. 1078 00:42:52,820 --> 00:42:53,300 So. 1079 00:42:53,300 --> 00:42:54,980 So, the final notes. 1080 00:42:55,740 --> 00:42:58,080 Do not use your knowledge for bad things. 1081 00:42:58,260 --> 00:43:00,920 I mean, I know people like to have the word burn down, 1082 00:43:01,160 --> 00:43:02,660 but please don't do that. 1083 00:43:03,420 --> 00:43:04,620 Help us to help others. 1084 00:43:04,880 --> 00:43:06,300 So if you have a routing PCB, 1085 00:43:07,700 --> 00:43:09,660 share it with other people as soon as you're done. 1086 00:43:10,660 --> 00:43:13,200 We will publish the tools in the next couple years, 1087 00:43:13,300 --> 00:43:15,560 some of, next couple years, next couple days. 1088 00:43:16,480 --> 00:43:17,860 So some of them are already public, 1089 00:43:17,960 --> 00:43:19,800 some of them will be enabled in the next couple hours 1090 00:43:19,800 --> 00:43:21,980 when I'm kind of getting more cool down. 1091 00:43:22,400 --> 00:43:23,280 So please be patient. 1092 00:43:23,300 --> 00:43:25,040 Be patient if some things are not public yet. 1093 00:43:26,000 --> 00:43:28,820 If you happen to be a hardware I.O. in the Netherlands 1094 00:43:29,380 --> 00:43:31,940 in October, or November, in the beginning of November, 1095 00:43:32,140 --> 00:43:33,460 feel free to join me. 1096 00:43:33,580 --> 00:43:36,460 I might be there with some new things about, 1097 00:43:36,480 --> 00:43:38,160 regarding robots, which are not these robots, 1098 00:43:38,300 --> 00:43:39,540 but some completely new company. 1099 00:43:40,240 --> 00:43:40,760 All right. 1100 00:43:42,440 --> 00:43:45,660 Final thing, I would like to thank Danny Wigema, 1101 00:43:45,840 --> 00:43:47,540 with whom I started to research. 1102 00:43:47,960 --> 00:43:49,780 I would also like to thank Kibar Nabiya, 1103 00:43:49,780 --> 00:43:51,480 Zeon Bayer, who is obviously the developer, 1104 00:43:51,680 --> 00:43:53,280 and also Mikael Korch. 1105 00:43:53,300 --> 00:43:55,160 And all the testers in the community. 1106 00:43:55,320 --> 00:43:56,560 There were a lot of people who sacrificed, 1107 00:43:57,400 --> 00:43:59,120 or nearly sacrificed their devices 1108 00:43:59,120 --> 00:44:00,120 to test our routing methods. 1109 00:44:00,780 --> 00:44:02,820 Thankfully, we have no brick devices so far, 1110 00:44:02,960 --> 00:44:04,480 but I mean, it could have happened, 1111 00:44:04,580 --> 00:44:06,240 and this would be kind of sad. 1112 00:44:06,360 --> 00:44:07,800 I got like an email from one of the people, 1113 00:44:07,880 --> 00:44:10,340 like, oh, my wife would kill me if I destroyed this device, 1114 00:44:10,460 --> 00:44:13,800 so let's hope that it doesn't break. 1115 00:44:14,420 --> 00:44:16,400 All right, and that's the end of our presentation. 1116 00:44:16,640 --> 00:44:17,920 Thank you very much for being here again 1117 00:44:17,920 --> 00:44:18,760 at 10 a.m. in the morning. 1118 00:44:23,300 --> 00:44:24,160 We'll see you next time.