1 00:00:00,000 --> 00:00:03,000 Are you guys ready? 2 00:00:03,200 --> 00:00:06,100 How was party last night? 3 00:00:06,400 --> 00:00:08,820 Did anyone party? 4 00:00:08,960 --> 00:00:11,100 Anyone hangover? 5 00:00:11,520 --> 00:00:13,520 Anyone still drunk? 6 00:00:13,640 --> 00:00:14,420 No? 7 00:00:14,420 --> 00:00:15,580 Okay. 8 00:00:16,040 --> 00:00:37,340 So today I'm going to talk about a cheap doorbell device I tested recently, an Ecovacs vacuum robot cleaner, a cheap Android smart TV box, a Zyxel NAS vulnerability, and how I believe IoT should work. 9 00:00:37,820 --> 00:00:39,860 So why did I create this talk? 10 00:00:39,860 --> 00:00:43,720 I think it's important to learn from the past mistakes. 11 00:00:45,340 --> 00:01:03,400 You are all aware of IoT devices, so I should not tell this to you, but still I think it's an important message, and beware of IoT developers, if you are an IoT developer, sorry, and know your IoT devices if you have at home. 12 00:01:04,520 --> 00:01:08,900 Who here does not have any smart device at home? 13 00:01:08,900 --> 00:01:09,840 Hands up. 14 00:01:11,100 --> 00:01:11,840 Okay. 15 00:01:11,840 --> 00:01:12,580 Okay. 16 00:01:12,580 --> 00:01:15,600 You are getting fewer and fewer every year. 17 00:01:15,740 --> 00:01:17,680 So this is how it is. 18 00:01:17,860 --> 00:01:27,740 So my name is Zoltan Balazs, and I'm usually enjoying creating offensive tools. 19 00:01:27,740 --> 00:01:32,460 For example, I'm really proud of the hardware firewall bypass tool. 20 00:01:32,460 --> 00:01:38,400 I presented it here at DEF CON 11 years ago, which means I'm old. 21 00:01:39,440 --> 00:01:50,360 Yeah, I'm also kind of proud that a piece of code I wrote, it ended up running on 600,000 IP cameras. 22 00:01:50,560 --> 00:02:04,600 The way it happened is that I found an authenticated command injection vulnerability, and I published it, and it turned out that there was a very easy authentication bypass also in the IP camera. 23 00:02:04,600 --> 00:02:10,220 So a botnet picked up my code and used it to hack IP cameras. 24 00:02:10,240 --> 00:02:11,880 Yeah, such is life. 25 00:02:14,440 --> 00:02:18,500 So I was never a fan of smart home set. 26 00:02:18,500 --> 00:02:19,300 Sorry. 27 00:02:22,440 --> 00:02:23,480 Okay. 28 00:02:23,480 --> 00:02:24,560 Yes. 29 00:02:39,530 --> 00:02:40,210 All right. 30 00:02:40,210 --> 00:02:41,130 Cool. 31 00:02:41,430 --> 00:02:54,350 So I did not write this tweet that tech enthusiasts use all of smart devices, but tech workers, they only have a printer and they keep a shotgun next to it. 32 00:02:54,350 --> 00:02:57,470 But this could be me, actually. 33 00:02:57,470 --> 00:03:05,910 And I was especially never a fan of home automation until I found this one. 34 00:03:05,950 --> 00:03:09,430 So it's an Alexa playbook. 35 00:03:09,430 --> 00:03:24,410 Alexa, intruder alert, turn off all the lights, turn volume on, say so you have chosen death, play Doom Eternal Official Soundtrack 22, the only thing they fear is you, and release every Roomba. 36 00:03:24,410 --> 00:03:30,650 So I really like this one, except Alexa, but that's a different story. 37 00:03:31,370 --> 00:03:36,190 So let's start with this cheap doorbell. 38 00:03:36,310 --> 00:03:41,550 You may not have heard about this vendor, but that's okay. 39 00:03:41,550 --> 00:03:49,070 So the reason I started to look into this one, because there was a huge story around this doorbell. 40 00:03:49,590 --> 00:03:56,330 And when I looked into it, I was like, I really don't get why this is a huge story. 41 00:03:56,690 --> 00:04:14,290 It actually ended up that if you have physical access to the doorbell, which is outside of your house, where people should be there, anyway, so then an attacker can factory reset the device, and add his account as master. 42 00:04:14,530 --> 00:04:25,130 So yeah, I believe the vulnerability is that it was very easy to do this, but still it's, I don't know, not that interesting. 43 00:04:25,490 --> 00:04:41,530 But when I started to test this device, I found out that it has a very chatty debug log, and it's sending these debug logs over HTTP to some cloud servers. 44 00:04:41,770 --> 00:04:47,050 And I immediately found this part very interesting. 45 00:04:47,050 --> 00:04:48,810 It's blanked out. 46 00:04:49,190 --> 00:04:51,230 Guess what it was. 47 00:04:53,740 --> 00:04:55,460 Yes, what password? 48 00:04:55,540 --> 00:04:57,560 Yes, Wi-Fi password. 49 00:04:57,760 --> 00:05:06,120 So it was sending my own Wi-Fi password through HTTP to an unknown cloud server. 50 00:05:07,300 --> 00:05:09,780 Great job, right? 51 00:05:09,980 --> 00:05:12,740 I tried to contact the vendor. 52 00:05:12,960 --> 00:05:14,440 I could not. 53 00:05:14,540 --> 00:05:17,720 I was trying it multiple times, multiple ways. 54 00:05:17,780 --> 00:05:20,180 So I published it. 55 00:05:20,180 --> 00:05:28,340 I also sent it to Mitre for a CVE, but they are terrible slow nowadays, so no CVE so far for this one. 56 00:05:29,180 --> 00:05:31,420 Actually, I believe they have no idea. 57 00:05:31,420 --> 00:05:33,380 They have all of this data. 58 00:05:33,400 --> 00:05:41,460 Maybe some hackers know, who already hacked the cloud servers, but whoever operates this, I think they have no idea they have all this data. 59 00:05:42,140 --> 00:05:43,700 All right, next one. 60 00:05:44,140 --> 00:05:45,180 EcovacsDBot. 61 00:05:47,360 --> 00:05:56,900 The way I started, the way this story started is a guy last year here in DEF CON was hacking these Ecovacs vacuum cleaners. 62 00:05:57,160 --> 00:06:02,680 So I was like, okay, maybe there is another interesting thing to find here. 63 00:06:03,020 --> 00:06:10,660 And when I bought the device and I was trying to set it up, it was a horrible user experience. 64 00:06:10,660 --> 00:06:15,440 Like, I have no idea what sane home user would do this. 65 00:06:16,180 --> 00:06:21,500 I will read this to you and you will be bored to death while I finish it. 66 00:06:21,500 --> 00:06:25,060 But I promise you that doing this is even worse. 67 00:06:25,200 --> 00:06:44,660 So first you have to find your app in the app store, install their app, open the app, ask app not to track, set region, set language, accept user agreement, accept privacy policy, accept notifications, accept user agreement, privacy policy, again, register new user with email password, 68 00:06:44,660 --> 00:07:02,620 refuse newsletter subscribe, allow disabled location, name your home, search for device, enable Bluetooth search, Bluetooth will fail, use QR code, enable camera, type your Wi-Fi password, push button on vacuum cleaner, click I have heard the beep, beep, 69 00:07:02,620 --> 00:07:10,520 join the vacuum robot Wi-Fi, do not send the apps to the background, name your robot, update firmware version, ready to start. 70 00:07:10,520 --> 00:07:15,100 Like, it was really, really, really horrible experience. 71 00:07:15,100 --> 00:07:19,900 I have created a screen recording of this whole process. 72 00:07:19,900 --> 00:07:24,320 And what you will see, I think I sped it up 20 times. 73 00:07:24,320 --> 00:07:26,180 So you can see it. 74 00:07:26,300 --> 00:07:29,060 Download will be a bit slow. 75 00:07:30,080 --> 00:07:31,800 Is it playing? 76 00:07:31,820 --> 00:07:32,820 Not yet. 77 00:07:33,060 --> 00:07:33,980 Sorry. 78 00:07:34,460 --> 00:07:35,160 Okay. 79 00:07:35,160 --> 00:07:37,640 So it's 80 00:07:42,460 --> 00:07:43,200 very easy. 81 00:07:43,200 --> 00:07:44,780 Everyone can do this, right? 82 00:07:45,960 --> 00:07:46,740 Okay. 83 00:07:46,740 --> 00:07:47,820 That's it. 84 00:07:49,180 --> 00:07:54,020 Now, what was the issue with this whole story? 85 00:07:54,360 --> 00:08:00,280 So the way the pairing works, like, it's using Wi-Fi for communication. 86 00:08:00,280 --> 00:08:04,480 So somehow it has to receive your Wi-Fi password, right? 87 00:08:04,480 --> 00:08:12,760 And the way developers created this device is that it creates an open Wi-Fi access point. 88 00:08:13,240 --> 00:08:26,820 Your phone connects to this open Wi-Fi access point and sends the Wi-Fi password to the device through HTTP, through open Wi-Fi. 89 00:08:27,000 --> 00:08:29,460 So again, not great. 90 00:08:29,520 --> 00:08:40,200 I mean, it's a bit better than sending it to the cloud over the Internet so only other local hackers can find out your Wi-Fi password, but still not great. 91 00:08:40,680 --> 00:08:48,560 Actually, I was able to contact the vendor on this one and they confirmed that this is an issue. 92 00:08:48,940 --> 00:08:54,300 And it took them like five months to claim that they fixed it. 93 00:08:54,320 --> 00:08:56,940 And when I tested it, I could not find a fix. 94 00:08:57,040 --> 00:08:58,740 So I don't know. 95 00:08:58,740 --> 00:09:02,540 I had no time to recheck it, but maybe it's fixed. 96 00:09:02,540 --> 00:09:03,360 It's not. 97 00:09:03,440 --> 00:09:04,140 I don't know. 98 00:09:04,140 --> 00:09:08,800 It's a Schrödinger's security vulnerability. 99 00:09:08,800 --> 00:09:11,380 But I got a CV for this one. 100 00:09:13,880 --> 00:09:24,560 And I believe this is a very universal problem with all of these smart devices that how do you pair the device using the mobile app. 101 00:09:25,360 --> 00:09:33,240 And actually, using Bluetooth would be nice, but not everyone is doing that. 102 00:09:33,520 --> 00:09:40,260 And the other interesting solution is to, for example, use a camera on a device. 103 00:09:40,320 --> 00:09:52,840 I found this on a very cheap IP camera that the mobile app generated a QR code and I had to show the QR code to the camera so it was able to decrypt my Wi-Fi credentials. 104 00:09:52,940 --> 00:09:56,840 I think it's a lot better than sending it over the clear text. 105 00:09:56,840 --> 00:10:01,820 And actually, this Ecovacs robot cleaner, it had a camera. 106 00:10:01,820 --> 00:10:06,780 So there was this option to do this one, but no, they did not do this. 107 00:10:07,800 --> 00:10:08,700 All right. 108 00:10:09,640 --> 00:10:14,520 Just some quick fun before you all are too bored. 109 00:10:14,580 --> 00:10:17,740 This is the evolution of smart products. 110 00:10:17,780 --> 00:10:19,540 First, it makes toast. 111 00:10:19,540 --> 00:10:23,460 And at the end of the day, it will tell you toast. 112 00:10:23,460 --> 00:10:25,680 I'm afraid I can't do that, Dave. 113 00:10:25,940 --> 00:10:32,560 So I don't know, is there any toast which is subscription-based yet? 114 00:10:33,360 --> 00:10:37,960 Maybe someone will figure this out and do it. 115 00:10:37,960 --> 00:10:39,420 It will be great. 116 00:10:39,820 --> 00:10:40,380 All right. 117 00:10:40,380 --> 00:10:42,180 Let's do this next one. 118 00:10:42,180 --> 00:10:46,180 It's a very cheap Android smart TV box. 119 00:10:46,360 --> 00:10:50,320 And I actually ordered this from AliExpress. 120 00:10:50,420 --> 00:10:55,300 And it's good that now you can see the very bottom of the slides. 121 00:10:55,560 --> 00:11:01,460 It claimed that it has Android OS version 11.1. 122 00:11:01,460 --> 00:11:04,300 And I'm not highlighting it with red. 123 00:11:04,300 --> 00:11:11,120 On the website, it was highlighted with red, because they are very proud that they are having this version. 124 00:11:11,120 --> 00:11:12,660 I mean, back then, it was okay. 125 00:11:12,660 --> 00:11:14,500 Like, it's an older box. 126 00:11:15,100 --> 00:11:19,120 The problem is that there is no Android version 11.1. 127 00:11:19,120 --> 00:11:21,200 There is no such Android version. 128 00:11:22,420 --> 00:11:34,540 And the other problem is, so there is this property file which Android uses to get the information it advertises from itself. 129 00:11:34,540 --> 00:11:41,100 And here I highlighted that, yeah, they did set the Android version to this string. 130 00:11:41,100 --> 00:11:48,100 But what's interesting is that they kept the old security patch date, 2017. 131 00:11:48,520 --> 00:11:57,340 And Android 11, which is allegedly older than 11.1, was released in 2020. 132 00:11:57,560 --> 00:12:05,820 So I'm not very good at math, but I can even calculate that something is very fishy here, right? 133 00:12:07,560 --> 00:12:16,580 So I don't know whether it was just the developer lying or the whole company knew what they were doing. 134 00:12:17,480 --> 00:12:37,700 But actually it turned out that this smart TV box has bigger issues than lying about its Android version, because after it's operating for a while, it will get some firmware updates and it will install some malware in your Android smart TV box. 135 00:12:37,700 --> 00:12:44,860 And actually it's a really clever idea to sell cheap IoT devices to people. 136 00:12:44,860 --> 00:12:54,060 And a smart TV box is especially a good idea because it's always on and no one really checks how much power it draws. 137 00:12:54,060 --> 00:12:57,800 So it's a really nice place to hide your malware. 138 00:13:02,780 --> 00:13:08,300 I have not seen this functionality yet, but who knows? 139 00:13:08,300 --> 00:13:11,900 We are always heading to the great future, right? 140 00:13:12,640 --> 00:13:22,020 Okay, so this is one of my love stories with IoT and IP camera. 141 00:13:22,460 --> 00:13:27,820 This is the camera which got me started in IoT hacking. 142 00:13:28,040 --> 00:13:30,840 It was like 10 years ago. 143 00:13:31,140 --> 00:13:38,260 And what's really great about this device is that there are so many ways you can hack it. 144 00:13:38,280 --> 00:13:53,180 Like, you know, there are these projects like OWASP web code where you can practice your hacking skills because OWASP created a purposefully vulnerable device. 145 00:13:53,180 --> 00:14:03,020 This device can be already an IoT code because it has all the vulnerabilities what you have to test for if you are looking for IoT vulnerabilities. 146 00:14:03,180 --> 00:14:11,320 So first of all, it has a telnet port enabled with default username and password because why not? 147 00:14:11,500 --> 00:14:24,660 Luckily, by default, telnet will not be accessible from the internet if this IP camera is put on your network behind a net router. 148 00:14:24,860 --> 00:14:28,800 So that's good, only local attackers can hack it. 149 00:14:28,920 --> 00:14:33,660 It also had a web port on port 81. 150 00:14:34,000 --> 00:14:49,600 Unfortunately, this was using UPnP, which means that if on your router UPnP was enabled, then the camera could tell your router to open its port to the internet. 151 00:14:49,600 --> 00:14:51,920 So now it's accessible to everyone. 152 00:14:51,920 --> 00:15:02,000 And yeah, it was full of vulnerabilities, some which can do authentication bypass, some which can do command injection. 153 00:15:03,220 --> 00:15:24,320 For example, the best one is that you can get the configuration file of this IP camera without authentication and all the passwords are clear text in the configuration file like the admin password for the device, the Wi-Fi password if you have configured it, 154 00:15:24,320 --> 00:15:30,200 or if you have configured FTP or SMTP or whatever to forward the screen captures. 155 00:15:30,300 --> 00:15:31,560 So yeah, everything. 156 00:15:31,680 --> 00:15:38,860 So as you can see, it has a very long history of how people were hacking this one. 157 00:15:39,180 --> 00:15:53,680 And last but not least, it's really nice because it also has a cloud connection because someone told the developer that it should work even if UPnP is turned off. 158 00:15:53,680 --> 00:15:57,580 So they added cloud connection to the device as everyone. 159 00:15:58,380 --> 00:16:01,320 You cannot turn it off, the cloud connection. 160 00:16:01,320 --> 00:16:12,140 The only way to turn it off is to log in via Telnet and create some IP table rules so you can block the communication. 161 00:16:13,360 --> 00:16:23,600 What's great about the cloud connection that it's just a wrapper over the web port, so practically all the vulnerabilities are also available through the cloud. 162 00:16:24,100 --> 00:16:34,220 And a guy also figured out how you can figure out the device IDs and enumerate all the devices which were sold. 163 00:16:34,660 --> 00:16:37,020 So this is great. 164 00:16:37,020 --> 00:16:42,140 I really want to highlight this go-ahead vulnerability. 165 00:16:42,180 --> 00:16:59,280 You might not see it, but the date when this was published was 2004 and I bought this device in 2015 and I told them that they have some horrible security vulnerabilities. 166 00:16:59,980 --> 00:17:07,140 They told me that thank you, they have received this information and they will work on a patch. 167 00:17:07,140 --> 00:17:10,860 Ten years later, still no patch to this device. 168 00:17:10,920 --> 00:17:11,740 No. 169 00:17:11,740 --> 00:17:12,760 Nada. 170 00:17:12,880 --> 00:17:13,900 Zero. 171 00:17:14,380 --> 00:17:33,280 So this go-ahead web server, it also had some authentication bypass vulnerabilities like if you delete the forward slash from the GET request or if you change the forward slash to a backslash or if you encode the slash. 172 00:17:33,280 --> 00:17:36,100 So these are really, really fun vulnerabilities. 173 00:17:36,760 --> 00:17:41,020 And on the right you can see my communication with the vendor. 174 00:17:41,080 --> 00:17:48,140 So I checked with them in 2016 and that was the last communication we had. 175 00:17:49,600 --> 00:17:50,400 Yeah. 176 00:17:50,400 --> 00:17:51,500 Not great. 177 00:17:51,500 --> 00:18:08,940 I was trying to find out why is it that all the IP camera vendors have Telnet enabled and I think I have found one of the reasons why they have Telnet. 178 00:18:08,940 --> 00:18:28,360 So there is this SDK called RawLink which is very popular with IP camera vendors and it has some config settings where you can very easily turn on Telnet access. 179 00:18:29,220 --> 00:18:36,540 And probably it was turned on by default and no one ever bothered to turn it off. 180 00:18:36,600 --> 00:18:37,440 So yeah. 181 00:18:37,440 --> 00:18:38,380 Very great. 182 00:18:41,380 --> 00:18:47,920 What do you think, when was the last time I bought an IP camera which had an open Telnet access? 183 00:18:48,400 --> 00:18:49,560 When was this? 184 00:18:52,430 --> 00:18:54,530 Okay, so it was last year. 185 00:18:55,770 --> 00:18:57,410 But it's still available. 186 00:18:57,410 --> 00:18:58,970 So you can still buy this one. 187 00:18:58,970 --> 00:19:08,550 So even though some might think that this is old news, you can still buy these very, very bad devices. 188 00:19:10,750 --> 00:19:12,230 So yeah. 189 00:19:12,230 --> 00:19:14,710 Here are the go-ahead vulnerabilities. 190 00:19:15,010 --> 00:19:22,970 And this last one is how you can... System.ini is the configuration file I mentioned. 191 00:19:23,050 --> 00:19:28,390 And the login use parameter is the username and the login pass parameter is the password. 192 00:19:28,630 --> 00:19:32,110 And I will show you the logic, how they implemented it. 193 00:19:32,110 --> 00:19:43,350 But practically what happens here is that if you don't give any value to these parameters, it will give you the config file. 194 00:19:43,950 --> 00:19:48,510 Yeah, and you just send a lot of data to it and it will crash. 195 00:19:48,510 --> 00:19:49,930 Why not? 196 00:19:49,930 --> 00:19:54,390 I believe it's actually exploitable stack overflow. 197 00:19:55,390 --> 00:20:04,910 And here I have a quick demo of how you can, for example, hack these devices. 198 00:20:05,350 --> 00:20:15,170 So first I'm using Metasploit to generate a Metapreter file, a reverse TCP one. 199 00:20:15,170 --> 00:20:20,930 And this camera is using the MIPS architecture and a little NDN. 200 00:20:20,930 --> 00:20:28,850 Now I'm starting Metasploit because it's a little bit slow. 201 00:20:35,980 --> 00:20:39,120 Yeah, this is just the usual stuff. 202 00:20:39,120 --> 00:20:45,360 So I create a Metasploit listener so I can get the connections. 203 00:20:45,880 --> 00:20:53,560 Here I am using the exploit to get the admin username and password. 204 00:20:56,540 --> 00:21:17,840 And now I'm using an authenticated command injection and I'm starting the Telnet daemon on a different port, which I can log in without username and password if I'm too lazy to figure out the other Telnet port, what's the password to that. 205 00:21:17,840 --> 00:21:36,180 And actually this is where I was a little bit stuck because it's very challenging to bring your own binary through Telnet to this device because it doesn't have wget or curl or netcat or whatever. 206 00:21:36,180 --> 00:21:49,100 So here I'm using some magic with echo and hexa and whatever to copy-paste the malware there. 207 00:21:49,100 --> 00:21:56,120 And there you can see Metapreter session is open and I was able to hack the device. 208 00:21:56,120 --> 00:21:57,920 Nothing fancy here. 209 00:21:58,340 --> 00:22:00,360 Yeah, that's it. 210 00:22:06,580 --> 00:22:14,240 So I think the first reports about these exploitable devices are from 2015. 211 00:22:15,640 --> 00:22:25,220 And I have checked recently and I could still find more than 600 devices which were vulnerable and were online. 212 00:22:25,860 --> 00:22:31,140 And I have found some evidence of exploitation attempts on those. 213 00:22:32,080 --> 00:22:40,440 And another researcher, Paul Marapace, checked recently how many devices are available through the cloud. 214 00:22:40,440 --> 00:22:46,920 It's 2.2 million of these devices are still online, which is really great. 215 00:22:48,000 --> 00:23:02,920 This is a very recent and for me a very interesting part of the research that I found the source code, which is very similar to the source code running on the device. 216 00:23:03,040 --> 00:23:10,100 This is a doorbell source code, but doorbells and IP cameras are practically the same. 217 00:23:10,100 --> 00:23:19,800 So on the left, you can see how you can implement stack overflow vulnerability in as few lines as possible. 218 00:23:19,800 --> 00:23:23,120 So it's really, really bad. 219 00:23:23,120 --> 00:23:28,300 They never check the user, the length of the username or password. 220 00:23:28,300 --> 00:23:32,360 They just copy it with string copy and that's it. 221 00:23:32,500 --> 00:24:00,900 On the right, you can see the authenticated command injection vulnerability, which is practically, you can do Unix commands and it will be copied into an SH file, which gets executed every second or whatever the schedule is. 222 00:24:01,740 --> 00:24:12,420 First, when I hacked this device, I was looking for a very short command that I can do and test and verify whether there's a command injection vulnerability here. 223 00:24:12,420 --> 00:24:19,880 And I used reboot and that was a really bad idea because every time the device starts, the script starts. 224 00:24:19,880 --> 00:24:27,820 So I ended up in a reboot loop and it was such a shitty device that the factory reset button was not working on it. 225 00:24:29,380 --> 00:24:36,300 It was hard to recover this, but finally I was able to do that. 226 00:24:36,300 --> 00:24:44,100 So yeah, maybe don't use reboot as your first command injection test string. 227 00:24:44,540 --> 00:24:57,280 So I asked a friend of mine what he would think that if he checks these hacked devices, what could be the values. 228 00:24:57,820 --> 00:24:59,320 You know what I mean. 229 00:24:59,320 --> 00:25:07,440 So anyway, these were the exploitation attempts on hacked devices. 230 00:25:07,840 --> 00:25:12,640 Clearly I have not hacked these devices to get these strings. 231 00:25:13,340 --> 00:25:29,860 But some of these exploitation attempts are quite interesting because they are using something like NATGAT or WGAT or FTPGAT or other stuff. 232 00:25:30,620 --> 00:25:36,540 Some of these devices, or I would say most of the devices, don't have these tools. 233 00:25:36,740 --> 00:25:45,390 So hackers are just trying to hack it, but then they just abandon the hack because they were not able to really hack it. 234 00:25:47,270 --> 00:25:56,590 So as you have seen in my screen recording, the initial foothold can be still challenging. 235 00:25:57,150 --> 00:26:11,590 And even I was cheating a little bit on that video because when I opened telnet on port 4444, that would not be available to you as a hacker through the internet. 236 00:26:11,590 --> 00:26:26,130 And luckily there is a solution to solve this, because with the command injection you can also use the UPNPC binary, which you can find on the device. 237 00:26:26,130 --> 00:26:33,290 So you can just ask the router to, hey, please open port 4444 to me. 238 00:26:33,290 --> 00:26:38,430 It's very important functionality for the camera that I have this port open. 239 00:26:38,430 --> 00:26:45,630 What's interesting is that I have not seen this trick anywhere, but it works, so I don't know. 240 00:26:47,210 --> 00:27:03,970 So when people ask me what is my recommendation regarding these devices, previously I recommended them to put them into the trash, but that's not the best solution because someone might find it and use it again. 241 00:27:05,110 --> 00:27:08,870 So it's better just to burn these in hell. 242 00:27:11,150 --> 00:27:15,290 This is also a nice and long joke. 243 00:27:15,290 --> 00:27:26,130 I really like the one in the middle where the IP camera is saying that excuse us while we participate in a DDoS attack, because that's the reality. 244 00:27:26,130 --> 00:27:31,150 And, yeah, which one was good? 245 00:27:35,410 --> 00:27:39,770 Yeah, I think all of them are really good ideas. 246 00:27:39,770 --> 00:27:49,470 So if you are an IoT product manager, you can implement all of these features into the future devices. 247 00:27:49,850 --> 00:27:55,630 All right, so let's go into the Zyxel network-attached storage device. 248 00:27:55,630 --> 00:28:07,750 Again, the way this research started, I read on the internet that there is a zero-day on these devices and people are already exploiting it. 249 00:28:07,750 --> 00:28:13,850 So I was like, cool, let's buy this device and find out what went wrong here. 250 00:28:13,850 --> 00:28:29,290 And I was able to find a piece of code in the authentication library, and it just amazed me how people in 2020 are doing authentication. 251 00:28:29,290 --> 00:28:52,110 So they are reading out the ETC password and another file content, then piping it through cut and grab, and they're concatenating this with the user-supplied string, which is clearly not checked anywhere and not sanitized anywhere. 252 00:28:52,110 --> 00:28:57,790 So this is a very plain vanilla command injection in the login page. 253 00:28:57,790 --> 00:29:01,790 And I was like, you only had one job. 254 00:29:01,930 --> 00:29:05,890 I understand command injection after authentication. 255 00:29:05,890 --> 00:29:14,570 It's a lot of functionality, many things can go wrong, but on the login page, please, please don't. 256 00:29:17,980 --> 00:29:20,240 Yeah, that's a great story. 257 00:29:20,860 --> 00:29:23,200 I really hope it's true. 258 00:29:26,600 --> 00:29:28,780 The future is awesome. 259 00:29:30,100 --> 00:29:36,020 This one is a work in progress, but I wanted to show it anyway. 260 00:29:36,020 --> 00:29:51,840 So I have an alarm system at home, and I have used all of my patience trying not to hack it, because it's in production, so if I hack it, then, yeah, that's a problem. 261 00:29:51,840 --> 00:30:00,640 So I started with documentation, and checking the documentation after five minutes, I already found some gems inside. 262 00:30:00,640 --> 00:30:09,760 Like, the way they are doing encryption is that the first initial handshake is using the encryption keys, which you can find there. 263 00:30:09,760 --> 00:30:23,320 So this is clearly a very great way of rolling your own encryption, because who knows about TLS and SSL in 2025, right? 264 00:30:23,320 --> 00:30:28,760 So I'm pretty sure that there will be some other gems here. 265 00:30:31,300 --> 00:30:50,020 So I mentioned command injection a lot of times, and my colleagues checked all the IoT botnets, what kind of vulnerabilities they are exploiting, and as you can see, it's almost always command injection. 266 00:30:50,400 --> 00:30:56,760 And there's a reason for that, because it's easy, and it works. 267 00:30:57,560 --> 00:31:04,260 And you might ask that, OK, but memory corruption is not that hard on IoT devices, right? 268 00:31:04,320 --> 00:31:17,640 Because usually there are no stack canaries, there is no execute bit, no ASLR, everything runs as root, so it's very easy. 269 00:31:17,800 --> 00:31:19,900 What could be hard? 270 00:31:19,900 --> 00:31:26,000 Actually, I have a better version of this screenshot. 271 00:31:26,000 --> 00:31:27,980 Give me a second. 272 00:31:30,280 --> 00:31:31,420 Yeah. 273 00:31:31,540 --> 00:31:33,460 OK. 274 00:31:33,500 --> 00:31:34,340 No. 275 00:31:34,340 --> 00:31:36,200 Give me a second. 276 00:31:36,200 --> 00:31:37,600 Escape. 277 00:31:38,040 --> 00:31:38,880 Yeah. 278 00:31:38,880 --> 00:31:43,500 So this is a Netgear 1 exploit. 279 00:31:43,500 --> 00:31:59,740 And what's really great about exploiting IoT devices is that you have to know where your gadgets are in the memory, and every version will have a different memory layout. 280 00:31:59,740 --> 00:32:06,420 So this is how the authors of this Netgear exploit created their exploit. 281 00:32:06,420 --> 00:32:09,900 They list all the different gadgets. 282 00:32:09,900 --> 00:32:18,400 Like, they can query the version first, and then they hard-code the gadgets they can use for the different versions. 283 00:32:20,000 --> 00:32:22,800 So it's a lot of work. 284 00:32:22,800 --> 00:32:27,280 And they don't cover all the versions or all the models. 285 00:32:27,940 --> 00:32:29,760 And I'm still scrolling. 286 00:32:29,760 --> 00:32:31,380 And I'm still scrolling. 287 00:32:32,980 --> 00:32:34,380 Right? 288 00:32:34,380 --> 00:32:40,480 So this is how memory corruption on IoT looks like. 289 00:32:40,480 --> 00:32:46,260 It's very hard to create a stable exploit. 290 00:32:48,580 --> 00:32:51,560 Let me go back to the slides. 291 00:32:54,860 --> 00:33:04,400 I really don't want to get into the details of how return-oriented programming works when it comes to exploitation. 292 00:33:04,400 --> 00:33:15,440 But what you have to know to understand the next slides is that it's always using instructions from the code which is already in the memory. 293 00:33:17,380 --> 00:33:23,740 And there is this idea or technique called blind drop. 294 00:33:24,760 --> 00:33:35,700 The promise is that you can exploit a service through memory corruption without knowing where all of these gadgets are. 295 00:33:35,700 --> 00:33:40,660 And there was a Stanford research around this in 2016. 296 00:33:41,620 --> 00:33:45,900 And multiple people tried to replicate the research. 297 00:33:45,980 --> 00:33:53,620 And long story short, it turns out Stanford researchers were lying here and there in their paper. 298 00:33:53,620 --> 00:33:58,640 And it does not work as they described, unfortunately. 299 00:33:58,660 --> 00:34:06,580 So there is no universal way to do memory corruption exploits on these devices. 300 00:34:06,580 --> 00:34:13,880 And there's also a newer research called signal-enhanced blind return-oriented programming. 301 00:34:13,880 --> 00:34:23,420 But I have not found anyone who did any public research whether this works or not. 302 00:34:23,420 --> 00:34:24,960 So I don't know. 303 00:34:24,960 --> 00:34:27,480 I did not have the time to check this one. 304 00:34:27,480 --> 00:34:29,460 So maybe it works, maybe not. 305 00:34:29,460 --> 00:34:37,660 But as of today, it's really hard to hack IoT devices through memory corruption exploits. 306 00:34:40,340 --> 00:34:49,520 Another problem I have with IoT devices is that whenever I buy a new device for research, I have to install a new app. 307 00:34:49,640 --> 00:34:58,740 And what is even worse is that sometimes the app name does not match the vendor name. 308 00:34:58,740 --> 00:35:05,780 So sometimes I can't find which app I have to use to control this device. 309 00:35:06,840 --> 00:35:11,300 And I really hate that I have to register all the time. 310 00:35:11,300 --> 00:35:22,520 And once I was using Lightbulb, and it told me that, sorry, for security reasons, we have logged you out. 311 00:35:22,520 --> 00:35:30,240 And when I was trying to log in, it told me, for security reasons, I have to update my password. 312 00:35:30,400 --> 00:35:33,540 And I was like, I just wanted to turn on the bulb. 313 00:35:33,540 --> 00:35:34,260 Come on. 314 00:35:34,500 --> 00:35:36,120 Give me a break. 315 00:35:36,700 --> 00:35:42,720 And they also gave me a new end-user license agreement, which I really carefully read through. 316 00:35:42,720 --> 00:35:54,160 So what I'm trying to say is that my ideal IoT device is fully functional without cloud or internet connectivity. 317 00:35:54,280 --> 00:35:57,600 It has a seamless auto-update. 318 00:35:57,600 --> 00:36:02,060 There are no undocumented backdoor ports or accounts. 319 00:36:02,780 --> 00:36:04,680 And no documented ones. 320 00:36:04,960 --> 00:36:10,120 I don't need any vendor-specific mobile app to control these. 321 00:36:10,120 --> 00:36:12,960 It's open source, secure, and private. 322 00:36:13,120 --> 00:36:18,340 And for a long time, it looked like that I'm asking a lot. 323 00:36:18,700 --> 00:36:22,600 And this is something which does not exist. 324 00:36:23,640 --> 00:36:33,520 But now I can tell you that I think there's a combination of things which is good. 325 00:36:33,520 --> 00:36:36,120 That's just my opinion. 326 00:36:36,380 --> 00:36:38,320 You don't have to accept it. 327 00:36:38,320 --> 00:36:44,720 But for example, on the operating system layer, I believe that the Zephyr RTOS is really good. 328 00:36:44,720 --> 00:36:47,460 For example, they are using Secure Boot. 329 00:36:47,460 --> 00:36:55,580 It's really nice because it's not a Linux, and there's no busy box inside, which means there's no shell, which means there's no command injection. 330 00:36:55,580 --> 00:36:56,900 So that's great. 331 00:36:57,860 --> 00:37:01,960 I also really like this new standard called Matter. 332 00:37:01,960 --> 00:37:06,900 It's an application layer protocol, which means... 333 00:37:06,900 --> 00:37:14,320 And the promise of Matter is that you can control your Matter-compatible devices from different ecosystems. 334 00:37:14,320 --> 00:37:21,740 So you can control it from Android or iOS or Home Assistant or whatever you want. 335 00:37:21,740 --> 00:37:25,840 So you don't have to stick with one ecosystem anymore. 336 00:37:27,460 --> 00:37:35,380 When it comes to devices which operate on battery, I believe Thread is a great option. 337 00:37:35,380 --> 00:37:39,360 It's like ZigBee or ZigBee++ or the new ZigBee. 338 00:37:39,360 --> 00:37:45,120 Actually, it's using the same radio chips as ZigBee, but with a different firmware. 339 00:37:45,120 --> 00:37:55,140 It's a bit more modern, faster, uses less energy, and it's really great with the mesh networks, for example. 340 00:37:56,120 --> 00:38:06,330 On the server layer, I really like the Home Assistant, because it's open source and it's private, so there's no cloud feedback. 341 00:38:06,680 --> 00:38:10,380 And no one knows that I turned on my light bulb. 342 00:38:10,640 --> 00:38:23,200 And last but not least, I added recently that I believe that on the CPU layer, it's really great if it's a RISC-V CPU. 343 00:38:23,200 --> 00:38:32,120 Because it's a free and open instruction set architecture and it's cost-effective and it can get really great performance as well. 344 00:38:32,120 --> 00:38:45,400 So if an IoT device or ecosystem has these modules, I truly believe that light hears better than what we had in the past. 345 00:38:45,400 --> 00:38:54,540 And just a disclaimer, the company I work for is the member of the alliance who created Matter and Thread. 346 00:38:54,820 --> 00:39:03,300 But the previous slide is still my personal and professional opinion, so you do what you want with this information. 347 00:39:05,440 --> 00:39:11,400 There's a great conference ongoing right now in the Netherlands. 348 00:39:11,400 --> 00:39:15,500 It's called Y2025. 349 00:39:15,500 --> 00:39:20,160 It's every four years and they are changing the name every year. 350 00:39:20,160 --> 00:39:26,550 And I really like their latest badge, because it also has Thread and Matter support. 351 00:39:26,550 --> 00:39:36,470 And the reason I put this here, because they are kind of this underground type of hackers. 352 00:39:36,730 --> 00:39:42,810 And if they are using Thread and Matter in their badge, then I believe it's not that bad. 353 00:39:43,390 --> 00:39:47,010 And they also have LoRa in the badge. 354 00:39:47,010 --> 00:39:51,150 I really hope that I can get my hands on one of these badges. 355 00:39:51,150 --> 00:39:52,350 It's really cool. 356 00:39:53,250 --> 00:40:04,690 And last but not least, I would like to show you some GitHub statistics on how huge these projects are. 357 00:40:04,690 --> 00:40:14,470 So, for example, Matter has 26,000 closed pull requests and more than 11,000 closed issues. 358 00:40:15,470 --> 00:40:22,670 Zephyr RTOS, it had almost 120,000 commits. 359 00:40:23,610 --> 00:40:29,710 Home Assistant, 86,000 closed pull requests. 360 00:40:29,710 --> 00:40:39,250 So, these are very huge projects and it needed collaboration from many people to get here. 361 00:40:39,250 --> 00:40:46,030 So, I believe this also shows that developing IoT devices is not easy. 362 00:40:46,110 --> 00:40:55,050 So, there's a reason why IoT devices in the past had such horrible user and security experience. 363 00:40:55,050 --> 00:40:56,650 So, as you can see, it's hard. 364 00:40:56,650 --> 00:40:59,090 But I believe that we are getting there. 365 00:40:59,530 --> 00:41:07,490 In the past, when people asked me, okay, what do I recommend for IoT use at home, I was like, don't use it. 366 00:41:07,490 --> 00:41:14,390 But now, if these components are used, I believe they are good. 367 00:41:15,210 --> 00:41:22,370 And I also have a Matter workshop running in the Embedded Systems Village. 368 00:41:22,370 --> 00:41:33,830 So, if you have time, find me and you can also play with that train and you can control it through Wi-Fi using Matter. 369 00:41:33,830 --> 00:41:36,570 Yeah, and that's it. 370 00:41:36,690 --> 00:41:39,570 Thank you for your attention. 371 00:41:39,570 --> 00:41:47,230 And if you want to find me, you can read about all of my research on my blog. 372 00:41:47,230 --> 00:41:52,350 And that's the correct valid domain name for my blog. 373 00:41:52,350 --> 00:42:03,130 It's https://www.zoltanbalazs.com.com Why not? 374 00:42:03,550 --> 00:42:05,130 Because I can. 375 00:42:06,890 --> 00:42:07,590 All right. 376 00:42:07,590 --> 00:42:08,690 Thank you. 377 00:42:17,560 --> 00:42:23,500 We still have time, so if you have any questions, I'll try to answer those. 378 00:42:23,740 --> 00:42:24,600 Yes? 379 00:42:24,600 --> 00:42:24,940 ... 380 00:42:34,470 --> 00:42:36,350 Into dynamic? 381 00:42:38,230 --> 00:42:38,910 ... 382 00:42:43,370 --> 00:42:50,090 But in order to use the Gadget Finder, you already need access to the binary, right? 383 00:42:50,110 --> 00:42:52,390 So, and that's the problem. 384 00:42:52,390 --> 00:43:02,670 I believe that people creating this Netgear exploit I was showing to you, they use Gadget Finder to create this database. 385 00:43:02,930 --> 00:43:10,870 But the problem is that if it's an unknown device, then you can't know where the gadgets are before hacking it. 386 00:43:11,590 --> 00:43:12,350 Yeah. 387 00:43:12,950 --> 00:43:15,850 So you have to hack it to hack it. 388 00:43:15,850 --> 00:43:18,270 That's the chicken and egg problem. 389 00:43:24,660 --> 00:43:25,480 All right. 390 00:43:25,480 --> 00:43:26,100 Thank you.