[00:00.000 --> 00:06.700] I want to introduce a good friend of the village, Jay Ballon. He works at Bitdefender. They do a [00:06.700 --> 00:12.460] lot of great research. And he's going to expand upon a series of talks he's been doing and [00:12.460 --> 00:20.220] research he's been doing about hacking massive exploits across, you know, 500,000 devices. [00:20.220 --> 00:32.800] Maybe 450,000. A million devices. Okay. Seems legit. A million devices. Next gen. Botnets. [00:32.800 --> 00:38.260] Sounds cool? Without any other delays that I might be doing right now for people to be [00:38.260 --> 00:43.080] sitting down in the back and having a good time. Make sure to speak very loudly and clearly [00:43.080 --> 00:47.440] into the mic. And enjoy the talk. Thank you, everyone, for being here. [00:47.440 --> 00:59.610] Next call. Hello, everyone. Uh, thanks so much for coming to see this talk. Uh, my name is Alex [00:59.610 --> 01:05.130] Ballon, aka Jay. I work for this nice company called Bitdefender. Probably none of you, most [01:05.130 --> 01:11.130] of you have heard of it. Um, and this is the team that kind of put together just this [01:11.130 --> 01:17.550] research. We've been doing it, IoT, uh, research as of 2013, I would say. Something like [01:17.550 --> 01:23.530] that. Um, this talk is going to be focused on a specific particular topic and that is [01:24.250 --> 01:32.830] leveraging the cloud implementations to get unauthorized access, uh, root access on as many [01:32.830 --> 01:39.230] devices as possible. And we've actually focused on, on cloud implementations or actually bad [01:39.230 --> 01:45.870] cloud implementations for, for a while now. And this is kind of, I've prepared this small [01:45.870 --> 01:52.010] montage about what vendors talk about when they receive a report from us. Because we've been [01:52.010 --> 01:57.230] sending reports on bad cloud implementations to a number of vendors and every so often we [01:57.230 --> 02:01.790] actually get replies saying, yeah, that's cool stuff. Uh, unfortunately many times we get no [02:01.790 --> 02:07.330] replies because that's how responsible disclosure unfortunately works. But just, you know, [02:07.330 --> 02:12.490] for laughs and gigs, this is what, kind of what we imagine happens on the vendor side when we [02:12.490 --> 02:23.330] send our, our kind of, our reports through them. And you see, the sound doesn't work. It worked. [02:23.870 --> 02:51.560] Hang on. We hacked stuff. Uh, do, do, do, do, do. So. This microphone, oh, again. You know, the [02:51.560 --> 03:03.440] cloud. Nobody understands the cloud. Yeah, well pretty much, actually that was kind of the vibe [03:03.440 --> 03:09.800] that we got from, from most of the company that we sent our, our, our reports to. Um, [03:09.800 --> 03:15.280] essentially, yeah, none of them or at least most of them don't really understand how to, how to [03:15.280 --> 03:21.140] implement cloud for, for IoT. So with that in mind, I'm just going to stop, start, kind of move [03:21.140 --> 03:29.720] into it. So IoT, we kind of see it as a, this stack of hardware, operating system and, and cloud. [03:30.720 --> 03:37.600] So, it's, it's an analogy that I like to do. What if I told you that IoT is pretty much like a [03:37.600 --> 03:44.940] WordPress website? Can, no, just out of curiosity, show of hands who sees the analogy between IoT [03:44.940 --> 03:51.000] and WordPress? Cool, right? I mean, you, you look at this stack, you have like, for those [03:51.000 --> 03:58.620] older, as old as I am, you have like hardware, Red Hat 6.2 and VFTPD. Uh, this FTPD server that [03:58.620 --> 04:05.260] was known to provide root access to, to, to Red Hat servers back in the, I guess 1998, 1999 and [04:05.260 --> 04:13.380] the likes. Uh, then you had like, um, hardware, Windows operating system, IS 5.0. Um, and, and [04:13.380 --> 04:19.160] the stack goes on, right? So essentially, IoT is like hardware, a busy box environment, mostly [04:19.160 --> 04:24.120] Linux or whatever. And then there's an application layer which is in, in, in most parts like this [04:24.120 --> 04:29.940] web app, right? And being a web app is like susceptible to most of the vulnerabilities [04:29.940 --> 04:35.160] specific to a web app. But here's, here's the magic thing about this. You have like this huge [04:35.160 --> 04:39.840] threat landscape, huge attack surface because of that web app, right? So it's like command [04:39.840 --> 04:44.660] injection, all types of injection like cross-site scripting, all that stuff, right? And then you [04:44.660 --> 04:50.380] have another layer added on top of it by the manufacturer for IoT functionality and they have [04:50.380 --> 04:57.840] like this new whole set of binaries stuck inside that IoT that get input from the cloud and this [04:57.840 --> 05:01.680] is you, you're going to see what I'm getting with this because the cloud is going to send input to [05:01.680 --> 05:06.560] those binaries, these new binaries on top, in, in, in that operating system and you're going to be [05:06.560 --> 05:12.720] able to do stuff like cool stuff with it. So essentially, IoTs are just websites running on [05:12.720 --> 05:18.840] Linux but with a significantly bigger attack surface due to mobile apps and cloud. If you [05:18.840 --> 05:23.680] want to get into IoT hacking, this is going to be like just a quick crash course on stuff to [05:23.680 --> 05:28.880] look for. Obviously look for software, there's still Telnet in 2019, like 6 million Telnet [05:28.880 --> 05:34.240] servers open in the internet. Uh, definitely the first thing that you look for is the, the way [05:34.240 --> 05:39.600] the mobile app communicates with the cloud. That's, that's the golden nugget right there. If [05:39.600 --> 05:42.580] you look at the way the mobile app communicates with the cloud and start impersonating the [05:42.580 --> 05:47.920] mobile app and start fuzzing those requests, you're going to see like a number of very [05:47.920 --> 05:52.580] interesting things that the cloud replies back to you. Um, as we, as you're going to actually [05:52.580 --> 06:02.200] see later on. Uh, fun thing, um, who here is familiar with the flag pi in, in compilers? Right, [06:02.200 --> 06:08.600] so pi is, pi is not used in, in IoT. So essentially if you get a buffer overflow in a binary on an [06:08.600 --> 06:14.740] IoT, you get a shell. You get a command execution, a connect back shell actually because a lot of [06:14.740 --> 06:20.680] them are behind NAT these days. So if you get any kind of buffer overflow on, on an IoT in any [06:20.680 --> 06:26.120] binary on an IoT, then you get almost a guaranteed remote command execution on that IoT. [06:26.120 --> 06:31.920] And that command is going to be a connect back shell to you and there you go, boom, shell. Um, [06:31.920 --> 06:36.480] the reason why they're not implementing pi, so ASLR is enabled on most operating systems [06:36.480 --> 06:42.220] running on IoT, but enabling pi, pi for those of you who don't know, uh, it stands for [06:42.220 --> 06:47.520] position independent executable. It's a, it's a flag at compile time which enables an [06:47.520 --> 06:53.200] executable to be moved in memory at random memory addresses in order to not have a predictable [06:53.200 --> 06:59.500] memory address to get code execution. So you can just crash it, so ASLR says where you just [06:59.500 --> 07:06.220] crash it, you don't get RC, right? But you need to compile your executables with the pi flag [07:06.220 --> 07:12.520] in order to allow it to be moved at different memory addresses to be able to benefit from [07:12.520 --> 07:20.880] ASLR. Uh, literally none of the IOTs that we've investigated had any binaries compiled with pi. [07:20.920 --> 07:28.440] So if you get a buffer overflow, again, full RC, full compromise. Um, arguably good old stuff, [07:28.440 --> 07:34.300] you know, back doors, traditional reuse and look for cloud chatter. If you want to dump the [07:34.300 --> 07:39.920] file system of an IOT, the easiest way to do it and the most popular way to do it is via [07:39.920 --> 07:45.360] serial interface and for those of you who didn't know, now you know, you can hijack the [07:45.360 --> 07:51.420] bootloader of an IOT much like you would hijack the bootloader, uh, of your Linux machine. [07:51.580 --> 07:56.980] So for those of you who sometimes forget your root password, right? And you like pause, [07:56.980 --> 08:03.660] grab and like init equals, BNSH and all that stuff, well you can do the same thing with IOTs [08:03.660 --> 08:09.440] and, uh, that's kind of the string over there, just serenv, bootargs, that's the memory, [08:09.440 --> 08:14.880] blah, blah, blah, init equals BNSH at the end of the bootloader. And you can just pause the [08:14.880 --> 08:21.900] bootloader via the serial interface and bam, you get root access. And from that point [08:21.900 --> 08:26.040] onwards you just plant a small, let's call it a back door or whatever you want to call it, to [08:26.040 --> 08:31.340] be able to access the system after the next boot and you dump the file system. Now we come to [08:31.340 --> 08:35.660] the cool part, the first cool part of the presentation. Let's look at traditional IOT [08:35.660 --> 08:41.560] botnets. The way it used to be done and the way it's currently being done, we're tracking a lot [08:41.560 --> 08:48.000] of them with our honeypots, is they iterate IP addresses, check if there's telnet enabled, if [08:48.000 --> 08:53.840] there's telnet enabled then they go like brute forcing telnet and maybe they get in. Uh, then [08:53.840 --> 08:59.580] they look for web interfaces and they look for stuff like Netgear exploits, like, you know, [08:59.580 --> 09:04.780] command injection in the web interface or stuff like that. And we see a lot of that in our IOT [09:04.780 --> 09:10.760] honeypots. There's like, I don't know, about a few hundred IOT botnets roaming, families [09:10.760 --> 09:16.520] roaming around. Mirai is one of them. So there's probably thousands of IOT botnets right now [09:16.520 --> 09:21.780] based on the code base of different types like Mirai, Hajime, uh, Hire and Seek and so on and [09:21.780 --> 09:27.340] so forth. Uh, just for trivia, if you're curious what they're doing with those botnets, just out [09:27.340 --> 09:34.000] of curiosity, anybody know what they're doing with the IOT botnets? Really? Okay, that guy [09:34.000 --> 09:39.980] knows. That's, that's right, it's DDoS. Um, are you familiar with the concept of stressor [09:39.980 --> 09:47.920] services? Right, so those, those services that you pay to stress test your infrastructure or [09:47.920 --> 09:53.500] somebody else's infrastructure, right? And, and you get, you get, you like pay, um, I don't [09:53.500 --> 10:02.400] know, like $15 or $35 for, uh, a 5,000 zombie botnet to DDoS for half an hour. And for [10:02.400 --> 10:08.160] $35 you can take somebody else's website down. We've seen a direct correlation between the [10:08.160 --> 10:14.060] functionalities offered by the stressor services, you know, uh, sync flood or, uh, NTP [10:14.060 --> 10:18.780] amplified flood or DNS amplified flood and all that stuff and the functionalities extracted [10:18.780 --> 10:25.260] from the binaries in our honeypots. So there's an, a direct correlation between the IOT [10:25.260 --> 10:34.120] botnets and the online stressor services. So that's the old way, now our prediction is that [10:34.120 --> 10:39.520] this is going to be the new way. And with that in mind, let me tell you a few things about how [10:39.520 --> 10:48.140] cloud is implemented in IOT. Because, you know, direct connection to IOTs is like so last [10:48.140 --> 10:54.120] Tuesday you need like port forwarding and you need, uh, direct access to some port on that [10:54.120 --> 11:02.140] IOT. So this is why many vendors implemented the cloud to relay, um, you know, any commands [11:02.140 --> 11:07.320] you would want to give that IOT or to give you access to that IOT, uh, if it's a video camera [11:07.320 --> 11:15.160] to give you the feed of that IOT and so on and so forth. And the way it works is that it [11:15.160 --> 11:19.380] provides more efficient management, right? Because you have like all this IOT registered to a [11:19.380 --> 11:26.980] cloud and the cloud relays commands. Um, it has a modular architecture, so nowadays vendors [11:26.980 --> 11:32.500] integrate each component of that IOT from different types of vendors, right? I mean, [11:32.500 --> 11:36.460] personally I think that's a good thing because maybe they don't know how to do their stuff and [11:36.460 --> 11:43.540] maybe somebody else knows better than them, but that's just me. Um, as far as cloud goes, this [11:43.540 --> 11:49.240] is a rough implementation in most cloud platforms. So you've seen at security conferences, we [11:49.240 --> 11:55.900] provide an IOT security, an IOT cloud platform. There are like dozens of companies that provide [11:55.900 --> 12:03.100] that. Their architecture is quite similar. Um, you provide, they generate a unique device ID [12:03.720 --> 12:11.600] which is, um, like that. It's a string, usually 32-bit string, uh, that's kind of non-predictable [12:12.040 --> 12:18.660] and that's roughly the bulk of authentication that happens in IOT clouds. If you know that [12:18.660 --> 12:25.380] string that you can interact with the device. Um, any commands that the application sends are [12:25.380 --> 12:31.140] just sent, I want to talk to that device ID and then some of them actually have decent [12:31.900 --> 12:38.320] encryption. We've seen, and thumbs up to the companies that have, um, unique symmetric keys [12:38.320 --> 12:43.460] between each app and their cloud and between, between each device and their cloud and that's [12:43.460 --> 12:51.640] great. Um, and arguably there is a, this is a genetic description but it applies to 90% of all [12:51.640 --> 12:58.380] the things that we've seen so far. And that's great. Anybody see anything wrong with this [12:58.380 --> 13:08.300] implementation? Not so far. However, as it turns out, when you look in depth, you see that [13:09.240 --> 13:14.060] not all cloud implementations, you know, are that good. And actually a thing that we've [13:14.060 --> 13:22.220] discovered is many of these third-party modules that IOT vendors integrate in their stuff are [13:22.220 --> 13:28.800] good. However, it very often, it's very often the case that it's the way they implement the [13:28.800 --> 13:43.050] stuff that's shit. Like so bad. So, for example, you know, if you want to, if you want to [13:43.070 --> 13:50.850] test Amazon S3, have you ever heard of bad implementations of Amazon S3? Of course not, [13:50.850 --> 13:56.990] right? Yeah, well, um, MQTT is this new kid on the block that's actually kind of cool. Uh, [13:56.990 --> 14:01.270] also poorly implemented by a lot of vendors. So this is kind of what we're going to go and [14:01.270 --> 14:06.750] talk about further on in this, uh, in this presentation. So a few words on Amazon S3 [14:06.750 --> 14:13.050] buckets. How many of you are familiar with how Amazon S3 works? A few. Cool, cool, cool. [14:13.050 --> 14:18.310] So you can correct me because this is me just, you know, babbling on about something so you [14:18.310 --> 14:24.190] can correct me if I'm wrong. Thank you. Uh, in many cases the bulk of authentication or [14:24.190 --> 14:27.870] security that comes with Amazon S3, and I'm talking about the vast majority of [14:27.870 --> 14:33.810] implementation, is that a device generates a path for a file. So Amazon S3 is used for [14:33.810 --> 14:39.610] storage, for those of you who didn't know. So, the device generates a path for a file and [14:39.610 --> 14:45.510] that's the file that I created and then passes on that path to whoever is allowed to read it. [14:45.510 --> 14:55.630] That would be the management mobile app of the, you know, uh, IOT device. Now, um, in most [14:55.630 --> 15:03.990] implementations of Amazon S3 you cannot do a listing of your bucket. Right? So, um, that's [15:03.990 --> 15:11.230] the way it's supposed to be. However, um, unfortunately in some implementations you can. [15:11.890 --> 15:17.490] So, just out of curiosity, if you're ever doing kind of research on Amazon S3 buckets, try to [15:17.490 --> 15:25.810] go list my own bucket or even more than that, try to go list the root folder of that vendor. [15:26.170 --> 15:33.970] And, um, you're going to be surprised what, about what you're going to find. Um, so we've [15:33.970 --> 15:41.110] seen a really big number of vendors allowing the equivalent of recursively listing the root [15:41.110 --> 15:47.690] folder of that company. So, not that bucket, of that company. So, that means all the devices, [15:47.690 --> 15:52.590] all the recordings, absolutely everything that's belonging to that company and that's [15:52.590 --> 16:03.130] ridiculous. Um, MQTT, um, essentially you have a device that registered to a server and it [16:03.130 --> 16:09.990] registers to, uh, something like, you know, vendor device ID slash topic where topic is I'm [16:09.990 --> 16:13.830] on, I'm off, I can do this, I can do that, I'm doing this, I'm doing that and so on and so [16:13.830 --> 16:21.470] forth. Um, now arguably, as I was saying earlier, one of the major security components of IoT [16:21.470 --> 16:28.730] cloud architecture is the device ID. So the way the app communicates is that I've received [16:28.730 --> 16:35.610] that I can register to vendor device ID topic and I can read that information. This is [16:35.610 --> 16:40.810] MQTT, it's not that complicated. I've learned about it literally three weeks ago. That's [16:40.810 --> 16:46.410] when I added, these slides were added very recently. Um, ideally security counter [16:46.410 --> 16:52.810] mergers will prevent attackers from tapping into another device. But it gets worse than [16:52.810 --> 16:59.930] that. You can actually, when it's poorly implemented, you can tap into slash root, much [16:59.930 --> 17:05.950] like with the S3 bucket, you can tap into slash vendor and then get swarmed by absolutely all [17:05.950 --> 17:12.470] the device IDs and all their statuses belonging to that vendor. And it can be, again, [17:12.470 --> 17:20.390] whenever somebody implements MQTT, again, I'm going to go to a hypothetical scenario here, [17:21.050 --> 17:26.450] purely hypothetical. We want to hack Irene's baby monitor and we want to do a targeted [17:26.450 --> 17:31.030] attack. So not just hack everybody but we want to do a targeted attack against a specific [17:31.030 --> 17:37.450] person. And what we're going to do is just register to slash vendor, get swarmed with all [17:37.450 --> 17:46.510] the device IDs, use the mobile app API to pull the config for each device ID because, I don't [17:46.510 --> 17:50.550] know if you noticed, when you use a mobile app on IoT, it refreshes its config from the [17:50.550 --> 17:56.850] cloud. It sends, I'm this application for this device, for this customer, give me my config. [17:57.130 --> 18:02.890] And then it displays it in the settings section of the mobile app. So you can essentially, [18:02.890 --> 18:06.750] if you have the device ID, you can pull the config, like name, last name, email address, [18:06.750 --> 18:13.230] location, and so on and so forth, for each one of their customers. So when you see the email [18:13.230 --> 18:18.550] of Irene popping up, you just correlate because you see now that's the device ID [18:18.550 --> 18:27.070] corresponding to Irene. So you go to S3 and fetch all her recordings. And of course, again, [18:27.070 --> 18:35.210] for some purposes, this is a purely hypothetical scenario. So onwards, we've been doing a lot [18:35.210 --> 18:40.070] of papers on IoT, especially cloud related. Erimax is one of them. It's quite relevant [18:40.070 --> 18:45.610] because you can get like RCE and you can get a lot of information on that just by knowing [18:45.610 --> 18:51.350] the MAC address of the power outlet. And essentially, you could just iterate all the MAC [18:51.350 --> 18:56.130] addresses, like 16 million of them. We can iterate them over Tor and still get RCE and all [18:56.130 --> 19:03.070] that good stuff. And we come to our star of the day. So as an example of some of the things [19:03.070 --> 19:07.810] that I've mentioned before, I'm going to talk to you about this security camera called [19:07.810 --> 19:23.940] Godzilla. I think I have a sample here somewhere. So this is one sample. The other one is in my [19:23.940 --> 19:31.600] room. And if the demo guys are good with us, we're going to try to hack it. So here's how it [19:31.600 --> 19:39.860] works. There's an API at apps.Godzilla.com. And after the application authenticates, you [19:39.860 --> 19:44.380] register an account with them, you're assigned something called a client ID by us, but they [19:44.380 --> 19:49.780] call it a UID. But we're going to call it both, but just so you know, it's a client ID. [19:50.420 --> 19:56.480] Essentially, this is a bad implementation for Godzilla. And does anybody see anything wrong [19:56.480 --> 20:08.200] here? Ours was 408,311. Show of hands who see something wrong here. I mean, yeah. It's a [20:08.200 --> 20:16.420] goddamn number. I mean, the cloud platform did a good job of providing them with like really [20:16.420 --> 20:24.520] long string device IDs and they've added a layer on top of that with sequential numbers. So you go [20:24.520 --> 20:31.860] like 408,312, 408,313. You can go like a hundred and you're still going to get somebody's. [20:31.900 --> 20:37.320] Because there's more devices per client. So they wanted to have this three architecture where [20:37.320 --> 20:43.500] client and devices per client. So yeah. The UID cannot be changed. So if you wanted to [20:43.500 --> 20:51.020] secure yourself, tough luck. And yeah, it's incremented by one for each account. So [20:52.160 --> 20:56.160] essentially the user, there's a username and password actually that's being used in [20:56.160 --> 21:00.900] communication with the cloud. However, they are hard coded in the app and they're the same [21:00.900 --> 21:06.300] for all of the apps and all of the devices of all of the Godzillas around the world. So it's [21:06.300 --> 21:09.900] cool that they're using the username and password, but not that cool that it's the same [21:09.900 --> 21:18.960] and it's hard coded. The post requests are actually sent using encryption. AS256 with CBC [21:18.960 --> 21:24.960] mode. However, the encryption key and the initialization vector are hard coded in the app [21:24.960 --> 21:33.420] as well. So yeah. So what we did, we kind of, and there's also the UID. So we kind of replicated [21:33.420 --> 21:49.730] that. And let's see if we can do our first demo. I hope that the fonts are okay. I can make them [21:49.730 --> 21:55.370] bigger. Can everybody see? Pretty much. Okay. So what we're going to do now is kind of try to [21:55.370 --> 22:01.390] pull our data from the Godzilla cloud from a server. This is my VPS in Canada. I usually like [22:01.390 --> 22:06.450] to do a lot of remote code execution, so not local area network, just because that's cooler [22:06.450 --> 22:13.770] than local attacks. So I'm going to use my VPS in Canada, which obviously is disconnected. [22:14.310 --> 22:46.290] Hang on. Hello. So BD research, Godzilla. And we have this very small crip called CMDS, which [22:46.290 --> 23:06.790] essentially emulates the mobile app. So again, Python, CMDS.py, I'm going to like get UID from [23:06.790 --> 23:14.930] 408311. And actually just for beautification, I'm going to go, just because I already know what [23:14.930 --> 23:24.290] the output is going to look like, I'm going to prettify it just a little bit. And it's a JSON, [23:24.290 --> 23:34.150] so JQ it. And there we go. So it's really not that complicated. It's literally emulating the [23:34.150 --> 23:40.930] mobile app. And I can do that for obviously 312, I can do that for 313. It's up to about 500 [23:40.930 --> 23:45.350] thousand and something right now. And each one of those people has more than one cameras [23:45.350 --> 23:50.510] associated with them. So this is why, you know, Sam was talking earlier about millions and [23:50.510 --> 23:56.510] millions. Well actually that's not very far fetched. Because if there's like 500,000 users [23:56.510 --> 24:01.410] with at least one camera each, you have 500,000 cameras. But more of them, many of them have [24:01.410 --> 24:07.230] like two or three cameras, right? So you get the information that you get is like the device [24:07.230 --> 24:14.710] IDs associated with that camera. So this one. And then you get the password set for each. Now [24:14.710 --> 24:19.390] mind you, you may want to change that password but tough luck because I'm going to see it [24:19.390 --> 24:26.030] anyway by making this query, right? Because you can change the device password but it's not [24:26.030 --> 24:42.480] going to matter. So there's a number of functions available in that API. One of them is update [24:42.480 --> 24:47.940] user. We're not going to use that now but it's just for your information. You can alter the [24:47.940 --> 24:53.200] user information like password or email address and you don't need to use a valid email [24:53.200 --> 25:01.620] address to do that. Another one is send invite. And this is a really cool one. It's an API [25:01.620 --> 25:14.120] function of Godzilla that allows you to send an invite for somebody to view your camera. The [25:17.080 --> 25:23.360] owner will have absolutely no idea that you've done that. And we're going to try to do that [25:23.360 --> 25:46.990] now. We have the Godzilla app running on my phone. So I'm inviting that device ID from that [25:46.990 --> 26:07.320] client ID, you see? So device ID, client ID and my email address. And now, oh look, I have an [26:07.320 --> 26:31.160] invite. How cool. So I'm going to accept the invite and yeah, that's my room and I'm going to [26:31.180 --> 26:41.960] send the invite. This is the camera live right now. So see, the seconds are rolling. So this is [26:41.960 --> 26:49.800] the camera in my hotel room right now. Just for your information. Which is kind of cool. Just for [26:49.800 --> 26:59.380] fun and games we kind of developed a new not so orthodox way of getting into the streams. Assuming [26:59.380 --> 27:09.020] that I'm doing this right. Hang on, hang on. One would argue that I was supposed to boot this way [27:09.020 --> 27:25.530] earlier. So I'm going to get back to it after it finishes booting. So cancel. Moving on. Again, the [27:25.530 --> 27:31.960] owner of the camera is completely unaware that somebody has been invited. Not at the moment of [27:31.960 --> 27:38.060] the invite and not after that. So you can send invites to everybody. What do they call it on [27:38.060 --> 27:46.100] Facebook? Live watch. Invite your friends. Stuff like that. This is how the email looks like. [27:46.100 --> 28:01.940] But you don't really need that. And yeah, just for the hell of it, we coded this. Sorry. [28:05.430 --> 28:17.730] You see I have this bad habit of insisting that I do live demos. And you know what's life without [28:17.890 --> 28:26.390] a little adventure? Live demos tend to break or you miss something. Anyway, until my Kali boots, I [28:26.390 --> 28:34.270] promise you next generation botnets, right? So we dumped the former, we got the binary and we [28:34.290 --> 28:42.390] ran them through EDA and you know, it wasn't very fast until we found a buffer overflow in their [28:42.390 --> 28:50.970] cloud agent which is actually a .exe file. So they have this Kali platform. Again, much like [28:50.970 --> 28:55.650] many other cloud platforms and there's a combination of P2P and relay servers and there's [28:55.650 --> 29:04.270] main 514 exe that handles the services device side. And upon inspection we found that the [29:04.290 --> 29:11.810] function was vulnerable to an out of bound rights. It's the TK set device model handle. And they [29:11.810 --> 29:20.090] specifically crafted buffer. So this is the code. And we have in the lower right hand corner, we [29:20.090 --> 29:29.190] have those two V28 and V29. All we have to do is just send a buffer that's large enough to [29:29.190 --> 29:36.070] overflow them and get past them and then we get, we have like system right after that. And we [29:36.070 --> 29:46.090] can call system and we have a command execution. Which hopefully we're going to be able to [29:46.090 --> 29:57.130] demonstrate. So let's see. So again, fully remote, we have this netcat listening and we're [29:57.130 --> 30:12.110] going to try to get a root shell in my room. And hopefully so. This is the almighty exploit. [30:22.600 --> 30:45.560] Am I sending it what I'm supposed to send it? Oh, well. Shit. Thank you, man. Yeah, actually [30:45.560 --> 31:20.640] that was exactly the problem. And you know I should have run that in Tmux or screen. Yeah, [31:20.640 --> 31:28.880] unfortunately the device tends to crash when you do the buffer overflow, but hopefully not this [31:28.880 --> 32:04.870] time. Yeah. Well, we have movies, as always. So the movie shows we get a UID, we get a device ID [32:05.490 --> 32:22.090] and then we just, and we get a shell. I'm sorry that my shell crashed, but yeah. I'm going to [32:22.110 --> 32:30.560] try to fix it. Happens to the best of us. Yeah, and fun story, probably I'm not going to be able [32:30.560 --> 32:35.700] to get the video stream either because the device is kind of down. But long story short, you can [32:35.700 --> 32:40.060] get a shell, a very predictable shell, works every time, root access, full root access on all [32:40.060 --> 32:50.330] these devices. And there is another vulnerability that we found. A command injection [32:50.330 --> 32:56.970] vulnerability which is significantly easier to exploit. Essentially the camera supports [32:56.970 --> 33:02.210] something called remote upgrade. Again, everything relayed through the cloud. And the [33:02.210 --> 33:07.910] function takes two parameters, the firmware version and the download location. Now the thing [33:07.910 --> 33:13.490] is if you send a bogus download location, it just has to be up so it can initiate a TCP [33:13.490 --> 33:18.210] connection to it. It doesn't have to be valid. It's going to pass the rest of the output to [33:20.310 --> 33:26.550] tar. So essentially it's going to do an initial connection to the update location and it's going [33:26.550 --> 33:33.530] to pass what you call as the file name to tar. And then that's going to get you a command [33:33.530 --> 33:39.010] injection, a very easy command injection actually. Because tar is going to execute your input [33:39.010 --> 33:42.810] and then semicolon and then whatever command that you want. And you're going to connect [33:42.810 --> 33:46.710] back shell to you. And you can actually on these devices you can do netcat. They have netcat [33:46.710 --> 33:56.150] installed. So you can netcat minus E BNSH to your machine. As a bonus and funny story about [33:56.150 --> 34:02.190] responsible disclosure, we were stuck with these guys for about four or five months. They [34:02.190 --> 34:07.450] wouldn't answer our e-mails. So we kind of didn't publish anything because we were like [34:07.450 --> 34:16.070] ethical. Or our legal department is very ethical. And then somebody published on Reddit [34:16.710 --> 34:21.750] the AWS bucket vulnerability that they found. So they're like, Godzilla AWS bucket [34:21.750 --> 34:27.310] vulnerability zero day in Godzilla. And at that point we were kind of forced to publish our [34:27.310 --> 34:36.030] stuff. And we're like, okay. And we have all these other things as well. So we got a call from [34:36.030 --> 34:45.190] them saying that they're going to patch their stuff. And they didn't. They just patched the [34:45.190 --> 34:50.650] bucket. But it's kind of messed up for them and I understand where they're coming from. The [34:50.650 --> 34:56.610] whole user ID thing is an architecture thing. And they already have devices in the market. It's [34:56.610 --> 35:02.490] kind of hard to change. The buffer overflows they could patch but I'm going to bet that I have [35:02.490 --> 35:09.930] like this shitty update process unfortunately. So yeah, it kind of sucks. And then a colleague [35:09.930 --> 35:20.250] of mine tells me that his mother in Puerto Rico has like three of these at home. So yeah. Now, I [35:20.250 --> 35:28.050] don't know how we are in stake aways. So IoT is obviously a huge attack surface. People ask me, [35:28.050 --> 35:35.570] how do you know what's a good or bad IoT? What should I buy? And I always tell them there's a [35:35.570 --> 35:39.390] few things that you can look out for. One of them is actually the update process. Inherently [35:39.390 --> 35:43.430] everything is vulnerable, right? We're seeing advisories on a weekly basis and all the big [35:43.430 --> 35:48.810] stuff, right? Including Google, including us. We get reports about vulnerabilities in our stuff. [35:49.010 --> 35:55.870] Not on a weekly basis but it's very important to look at the way people patch their stuff. How [35:55.870 --> 36:00.190] they update. If that update is unattended. If there's any chance that somebody didn't update [36:00.190 --> 36:05.010] when an update was available. So that's kind of one of the first things to look out for. The [36:05.010 --> 36:14.170] second I would say would be the magnitude of the company. Or how impacted would they be if a [36:14.170 --> 36:19.750] vulnerability was found. Let us not forget, and I hope nobody is going to be upset with me saying [36:19.750 --> 36:27.330] this, that the system is broken. It's still broken right now in terms of legal stuff. As a [36:27.330 --> 36:32.070] researcher, there's still a challenge in going outside. Remember that hypothetical scenario? [36:32.070 --> 36:38.630] It's hypothetical because you cannot go outside of your own space to see if you can go outside of [36:38.630 --> 36:45.010] your S3 bucket or see if you can get outside of your MQTT topic from a legal standpoint. And at [36:45.010 --> 36:51.490] the same time the system is fundamentally broken because D-Link won the lawsuit against FTC. So [36:51.490 --> 36:59.090] for those of you who don't know, FTC sued D-Link in February 2015 for Mirai. And everybody was [36:59.090 --> 37:07.250] like, okay, good. People should be accountable for their mess, their screw-ups. But they lost. In [37:07.250 --> 37:13.170] October 2015, FTC lost the lawsuit against D-Link. And it was so obviously there. Telnet enabled [37:13.170 --> 37:23.230] with 1, 2, 3, 4 on millions of devices. The cloud implementation in many IoTs is broken. It's [37:23.230 --> 37:28.510] like fundamentally broken. They are negligent, if not more than negligent. They are trying to [37:28.510 --> 37:35.770] add new functionality and we can get that. But not knowing, remember, do you know the cloud? [37:36.010 --> 37:42.510] Fuck! Nobody understands the cloud. So many companies don't really understand how to do cloud [37:42.510 --> 37:49.730] implementations for their stuff, right? And yeah, look into that. So vendors need to pentest their [37:49.730 --> 37:56.130] products. These guys told me, the director of product management called me on my cell phone. I [37:56.130 --> 38:01.950] was like in Singapore doing some other event. And asked me, why didn't you call us? Well, we [38:01.950 --> 38:06.270] tried. Okay. Then I asked him, why didn't you pentest your stuff before putting it in the [38:06.270 --> 38:14.630] market? And he said, but we did. No. No, we really did. How much did you pay? Seriously. [38:14.750 --> 38:22.730] Because seeing that there's a 408-311 client ID takes five minutes with burp. I mean, how much [38:22.730 --> 38:26.190] did you pay that company to do your security audit before pushing your stuff into the [38:26.190 --> 38:34.390] market? Dude, we paid a lot of money. Get out of here, you know. So yeah. Obviously, rock [38:34.390 --> 38:42.950] bug bounty programs have very good update mechanisms. And again, it's trivial to find RCEs [38:42.950 --> 38:49.990] in IOTs. Another more or less honorable mention and this is a call for me to you guys. How [38:49.990 --> 38:55.070] many of you are part of a big company and how many of you are independent researchers? So big [38:55.070 --> 39:08.330] company. I feel for you, man. Independent researchers? So you see, because so far we've [39:08.330 --> 39:16.250] been able to publish only a fraction of our research. Trust me. And we have like this big [39:16.250 --> 39:21.630] space with all the things that we've researched and it's insane. Unfortunately, I cannot talk [39:21.630 --> 39:28.490] about it, you know. And yeah. So because it's easier from a legal standpoint if we publish [39:28.490 --> 39:32.730] something for companies to go after us and the legal team is like, you know, maybe you [39:32.730 --> 39:40.210] shouldn't do that. Yeah, I mean, we already have a lot of other stuff to do. And yeah, maybe it [39:40.210 --> 39:43.650] would be best if we just stay on the safe side. You already published some papers, you know. [39:43.650 --> 39:47.970] You talked at a few conferences. What more do you want, you know? And I'm like, we need people [39:47.970 --> 39:53.730] to know about this stuff and patch it and fix it because that's why we do what we do. Yeah, but [39:54.530 --> 40:06.570] really? So if you're an independent researcher, if you have the capability, we need more. We [40:06.570 --> 40:11.170] need more research on mass hacking IOTs. It's so easy and we need more of this stuff [40:11.170 --> 40:15.070] published. So if you want to get into that and if you want help from us, yeah, we can [40:15.070 --> 40:19.670] definitely help. We would be more than happy to help. I mean, I'm not in Silicon Valley [40:19.670 --> 40:26.590] saying that I want to make the world a better place. But I mean, there's so many stuff that's [40:26.590 --> 40:31.870] not published and it's so dangerous. I mean, the hypothetical scenario of viewing all the [40:31.870 --> 40:36.170] recordings of all the people, of all those cameras from the beginning of times up until [40:36.170 --> 40:42.130] today, it's still, it may be still happening. And you know, there's a challenge for [40:42.130 --> 40:47.630] somebody like me to talk about it. So with that in mind, I thank you for your time and for [40:47.630 --> 40:50.470] your patience. I hope it was enjoyable and yeah.