WEBVTT

00:00.000 --> 00:04.200
I want to introduce a good friend of the village, Jay Ballon.

00:04.200 --> 00:05.700
He works at Bitdefender.

00:06.120 --> 00:07.920
They do a lot of great research.

00:07.940 --> 00:20.220
And he's going to expand upon a series of talks he's been doing and research he's been doing about hacking massive exploits across, you know, 500,000 devices.

00:20.220 --> 00:21.820
Maybe 450,000.

00:22.700 --> 00:24.740
A million devices.

00:26.760 --> 00:27.400
Okay.

00:27.400 --> 00:28.080
Seems legit.

00:28.080 --> 00:29.680
A million devices.

00:30.260 --> 00:31.440
Next gen.

00:32.040 --> 00:32.800
Botnets.

00:32.800 --> 00:33.760
Sounds cool?

00:33.900 --> 00:40.600
Without any other delays that I might be doing right now for people to be sitting down in the back and having a good time.

00:41.140 --> 00:44.120
Make sure to speak very loudly and clearly into the mic.

00:44.180 --> 00:46.000
And enjoy the talk.

00:46.000 --> 00:47.440
Thank you, everyone, for being here.

00:47.440 --> 00:48.140
Next call.

00:53.330 --> 00:54.730
Hello, everyone.

00:54.830 --> 00:58.330
Uh, thanks so much for coming to see this talk.

00:58.330 --> 01:01.030
Uh, my name is Alex Ballon, aka Jay.

01:01.030 --> 01:03.830
I work for this nice company called Bitdefender.

01:03.830 --> 01:06.530
Probably none of you, most of you have heard of it.

01:06.590 --> 01:11.650
Um, and this is the team that kind of put together just this research.

01:11.650 --> 01:17.210
We've been doing it, IoT, uh, research as of 2013, I would say.

01:17.210 --> 01:18.430
Something like that.

01:18.490 --> 01:34.330
Um, this talk is going to be focused on a specific particular topic and that is leveraging the cloud implementations to get unauthorized access, uh, root access on as many devices as possible.

01:34.330 --> 01:42.570
And we've actually focused on, on cloud implementations or actually bad cloud implementations for, for a while now.

01:42.570 --> 01:51.490
And this is kind of, I've prepared this small montage about what vendors talk about when they receive a report from us.

01:51.490 --> 01:59.870
Because we've been sending reports on bad cloud implementations to a number of vendors and every so often we actually get replies saying, yeah, that's cool stuff.

01:59.870 --> 02:05.770
Uh, unfortunately many times we get no replies because that's how responsible disclosure unfortunately works.

02:06.010 --> 02:15.930
But just, you know, for laughs and gigs, this is what, kind of what we imagine happens on the vendor side when we send our, our kind of, our reports through them.

02:17.510 --> 02:19.690
And you see, the sound doesn't work.

02:22.150 --> 02:23.330
It worked.

02:23.870 --> 02:24.750
Hang on.

02:24.890 --> 02:26.150
We hacked stuff.

02:31.980 --> 02:33.480
Uh, do, do, do, do, do.

02:33.480 --> 02:34.160
So.

02:42.040 --> 02:44.560
This microphone, oh, again.

02:50.960 --> 02:52.460
You know, the cloud.

02:54.040 --> 02:55.900
Nobody understands the cloud.

03:00.600 --> 03:08.820
Yeah, well pretty much, actually that was kind of the vibe that we got from, from most of the company that we sent our, our, our reports to.

03:09.280 --> 03:17.840
Um, essentially, yeah, none of them or at least most of them don't really understand how to, how to implement cloud for, for IoT.

03:17.900 --> 03:21.800
So with that in mind, I'm just going to stop, start, kind of move into it.

03:21.800 --> 03:29.720
So IoT, we kind of see it as a, this stack of hardware, operating system and, and cloud.

03:30.720 --> 03:33.400
So, it's, it's an analogy that I like to do.

03:33.400 --> 03:38.740
What if I told you that IoT is pretty much like a WordPress website?

03:39.960 --> 03:45.700
Can, no, just out of curiosity, show of hands who sees the analogy between IoT and WordPress?

03:46.880 --> 03:47.660
Cool, right?

03:47.660 --> 03:56.380
I mean, you, you look at this stack, you have like, for those older, as old as I am, you have like hardware, Red Hat 6.2 and VFTPD.

03:56.520 --> 04:06.000
Uh, this FTPD server that was known to provide root access to, to, to Red Hat servers back in the, I guess 1998, 1999 and the likes.

04:06.000 --> 04:10.940
Uh, then you had like, um, hardware, Windows operating system, IS 5.0.

04:11.040 --> 04:15.020
Um, and, and the stack goes on, right?

04:15.160 --> 04:20.340
So essentially, IoT is like hardware, a busy box environment, mostly Linux or whatever.

04:20.400 --> 04:25.580
And then there's an application layer which is in, in, in most parts like this web app, right?

04:25.680 --> 04:31.740
And being a web app is like susceptible to most of the vulnerabilities specific to a web app.

04:31.740 --> 04:33.620
But here's, here's the magic thing about this.

04:33.620 --> 04:39.200
You have like this huge threat landscape, huge attack surface because of that web app, right?

04:39.200 --> 04:43.900
So it's like command injection, all types of injection like cross-site scripting, all that stuff, right?

04:43.940 --> 05:02.540
And then you have another layer added on top of it by the manufacturer for IoT functionality and they have like this new whole set of binaries stuck inside that IoT that get input from the cloud and this is you, you're going to see what I'm getting with this because the cloud is going to send input to those binaries,

05:02.540 --> 05:08.980
these new binaries on top, in, in, in that operating system and you're going to be able to do stuff like cool stuff with it.

05:09.160 --> 05:17.780
So essentially, IoTs are just websites running on Linux but with a significantly bigger attack surface due to mobile apps and cloud.

05:18.320 --> 05:24.680
If you want to get into IoT hacking, this is going to be like just a quick crash course on stuff to look for.

05:24.740 --> 05:30.840
Obviously look for software, there's still Telnet in 2019, like 6 million Telnet servers open in the internet.

05:31.100 --> 05:36.540
Uh, definitely the first thing that you look for is the, the way the mobile app communicates with the cloud.

05:36.620 --> 05:39.440
That's, that's the golden nugget right there.

05:39.440 --> 05:50.720
If you look at the way the mobile app communicates with the cloud and start impersonating the mobile app and start fuzzing those requests, you're going to see like a number of very interesting things that the cloud replies back to you.

05:50.920 --> 05:53.820
Um, as we, as you're going to actually see later on.

05:54.820 --> 06:01.180
Uh, fun thing, um, who here is familiar with the flag pi in, in compilers?

06:01.660 --> 06:05.180
Right, so pi is, pi is not used in, in IoT.

06:05.660 --> 06:10.400
So essentially if you get a buffer overflow in a binary on an IoT, you get a shell.

06:11.160 --> 06:16.520
You get a command execution, a connect back shell actually because a lot of them are behind NAT these days.

06:16.580 --> 06:26.120
So if you get any kind of buffer overflow on, on an IoT in any binary on an IoT, then you get almost a guaranteed remote command execution on that IoT.

06:26.120 --> 06:30.360
And that command is going to be a connect back shell to you and there you go, boom, shell.

06:31.080 --> 06:44.020
Um, the reason why they're not implementing pi, so ASLR is enabled on most operating systems running on IoT, but enabling pi, pi for those of you who don't know, uh, it stands for position independent executable.

06:44.020 --> 06:56.020
It's a, it's a flag at compile time which enables an executable to be moved in memory at random memory addresses in order to not have a predictable memory address to get code execution.

06:56.020 --> 07:02.200
So you can just crash it, so ASLR says where you just crash it, you don't get RC, right?

07:02.200 --> 07:13.500
But you need to compile your executables with the pi flag in order to allow it to be moved at different memory addresses to be able to benefit from ASLR.

07:14.080 --> 07:20.880
Uh, literally none of the IOTs that we've investigated had any binaries compiled with pi.

07:20.920 --> 07:25.560
So if you get a buffer overflow, again, full RC, full compromise.

07:26.300 --> 07:32.300
Um, arguably good old stuff, you know, back doors, traditional reuse and look for cloud chatter.

07:32.940 --> 07:49.700
If you want to dump the file system of an IOT, the easiest way to do it and the most popular way to do it is via serial interface and for those of you who didn't know, now you know, you can hijack the bootloader of an IOT much like you would hijack the bootloader,

07:49.700 --> 07:51.420
uh, of your Linux machine.

07:51.580 --> 07:55.660
So for those of you who sometimes forget your root password, right?

07:55.740 --> 08:13.980
And you like pause, grab and like init equals, BNSH and all that stuff, well you can do the same thing with IOTs and, uh, that's kind of the string over there, just serenv, bootargs, that's the memory, blah, blah, blah, init equals BNSH at the end of the bootloader.

08:13.980 --> 08:20.060
And you can just pause the bootloader via the serial interface and bam, you get root access.

08:20.960 --> 08:29.760
And from that point onwards you just plant a small, let's call it a back door or whatever you want to call it, to be able to access the system after the next boot and you dump the file system.

08:30.440 --> 08:34.220
Now we come to the cool part, the first cool part of the presentation.

08:34.220 --> 08:36.700
Let's look at traditional IOT botnets.

08:37.560 --> 08:53.020
The way it used to be done and the way it's currently being done, we're tracking a lot of them with our honeypots, is they iterate IP addresses, check if there's telnet enabled, if there's telnet enabled then they go like brute forcing telnet and maybe they get in.

08:53.280 --> 09:02.360
Uh, then they look for web interfaces and they look for stuff like Netgear exploits, like, you know, command injection in the web interface or stuff like that.

09:02.360 --> 09:05.600
And we see a lot of that in our IOT honeypots.

09:05.600 --> 09:12.160
There's like, I don't know, about a few hundred IOT botnets roaming, families roaming around.

09:12.160 --> 09:13.100
Mirai is one of them.

09:13.100 --> 09:22.660
So there's probably thousands of IOT botnets right now based on the code base of different types like Mirai, Hajime, uh, Hire and Seek and so on and so forth.

09:22.920 --> 09:30.860
Uh, just for trivia, if you're curious what they're doing with those botnets, just out of curiosity, anybody know what they're doing with the IOT botnets?

09:31.840 --> 09:32.800
Really?

09:33.100 --> 09:34.800
Okay, that guy knows.

09:35.600 --> 09:37.680
That's, that's right, it's DDoS.

09:37.680 --> 09:41.060
Um, are you familiar with the concept of stressor services?

09:41.860 --> 09:50.680
Right, so those, those services that you pay to stress test your infrastructure or somebody else's infrastructure, right?

09:50.680 --> 10:02.040
And, and you get, you get, you like pay, um, I don't know, like $15 or $35 for, uh, a 5,000 zombie botnet to DDoS for half an hour.

10:02.040 --> 10:05.520
And for $35 you can take somebody else's website down.

10:05.520 --> 10:21.180
We've seen a direct correlation between the functionalities offered by the stressor services, you know, uh, sync flood or, uh, NTP amplified flood or DNS amplified flood and all that stuff and the functionalities extracted from the binaries in our honeypots.

10:21.540 --> 10:28.800
So there's an, a direct correlation between the IOT botnets and the online stressor services.

10:29.900 --> 10:35.720
So that's the old way, now our prediction is that this is going to be the new way.

10:35.720 --> 10:42.360
And with that in mind, let me tell you a few things about how cloud is implemented in IOT.

10:43.500 --> 10:54.880
Because, you know, direct connection to IOTs is like so last Tuesday you need like port forwarding and you need, uh, direct access to some port on that IOT.

10:55.040 --> 11:10.760
So this is why many vendors implemented the cloud to relay, um, you know, any commands you would want to give that IOT or to give you access to that IOT, uh, if it's a video camera to give you the feed of that IOT and so on and so forth.

11:11.460 --> 11:16.720
And the way it works is that it provides more efficient management, right?

11:16.720 --> 11:21.080
Because you have like all this IOT registered to a cloud and the cloud relays commands.

11:21.720 --> 11:31.400
Um, it has a modular architecture, so nowadays vendors integrate each component of that IOT from different types of vendors, right?

11:31.400 --> 11:39.900
I mean, personally I think that's a good thing because maybe they don't know how to do their stuff and maybe somebody else knows better than them, but that's just me.

11:40.400 --> 11:47.120
Um, as far as cloud goes, this is a rough implementation in most cloud platforms.

11:47.120 --> 11:53.680
So you've seen at security conferences, we provide an IOT security, an IOT cloud platform.

11:53.680 --> 11:56.520
There are like dozens of companies that provide that.

11:56.520 --> 11:59.180
Their architecture is quite similar.

11:59.440 --> 12:06.900
Um, you provide, they generate a unique device ID which is, um, like that.

12:06.920 --> 12:17.960
It's a string, usually 32-bit string, uh, that's kind of non-predictable and that's roughly the bulk of authentication that happens in IOT clouds.

12:17.960 --> 12:20.920
If you know that string that you can interact with the device.

12:22.240 --> 12:32.840
Um, any commands that the application sends are just sent, I want to talk to that device ID and then some of them actually have decent encryption.

12:32.840 --> 12:44.360
We've seen, and thumbs up to the companies that have, um, unique symmetric keys between each app and their cloud and between, between each device and their cloud and that's great.

12:44.540 --> 12:53.620
Um, and arguably there is a, this is a genetic description but it applies to 90% of all the things that we've seen so far.

12:54.180 --> 12:55.940
And that's great.

12:56.640 --> 12:59.540
Anybody see anything wrong with this implementation?

13:00.440 --> 13:01.840
Not so far.

13:02.960 --> 13:12.800
However, as it turns out, when you look in depth, you see that not all cloud implementations, you know, are that good.

13:12.800 --> 13:23.140
And actually a thing that we've discovered is many of these third-party modules that IOT vendors integrate in their stuff are good.

13:23.240 --> 13:30.520
However, it very often, it's very often the case that it's the way they implement the stuff that's shit.

13:30.800 --> 13:32.880
Like so bad.

13:36.620 --> 13:48.990
So, for example, you know, if you want to, if you want to test Amazon S3, have you ever heard of bad implementations of Amazon S3?

13:49.530 --> 13:51.590
Of course not, right?

13:52.470 --> 13:56.730
Yeah, well, um, MQTT is this new kid on the block that's actually kind of cool.

13:56.730 --> 13:59.210
Uh, also poorly implemented by a lot of vendors.

13:59.210 --> 14:04.570
So this is kind of what we're going to go and talk about further on in this, uh, in this presentation.

14:04.870 --> 14:07.590
So a few words on Amazon S3 buckets.

14:07.730 --> 14:11.110
How many of you are familiar with how Amazon S3 works?

14:11.630 --> 14:12.310
A few.

14:12.310 --> 14:13.050
Cool, cool, cool.

14:13.050 --> 14:19.670
So you can correct me because this is me just, you know, babbling on about something so you can correct me if I'm wrong.

14:19.670 --> 14:20.470
Thank you.

14:21.210 --> 14:31.990
Uh, in many cases the bulk of authentication or security that comes with Amazon S3, and I'm talking about the vast majority of implementation, is that a device generates a path for a file.

14:31.990 --> 14:36.410
So Amazon S3 is used for storage, for those of you who didn't know.

14:36.490 --> 14:45.510
So, the device generates a path for a file and that's the file that I created and then passes on that path to whoever is allowed to read it.

14:45.510 --> 14:51.290
That would be the management mobile app of the, you know, uh, IOT device.

14:51.810 --> 15:00.910
Now, um, in most implementations of Amazon S3 you cannot do a listing of your bucket.

15:00.930 --> 15:01.810
Right?

15:01.910 --> 15:05.490
So, um, that's the way it's supposed to be.

15:05.490 --> 15:11.230
However, um, unfortunately in some implementations you can.

15:11.890 --> 15:25.810
So, just out of curiosity, if you're ever doing kind of research on Amazon S3 buckets, try to go list my own bucket or even more than that, try to go list the root folder of that vendor.

15:26.170 --> 15:31.730
And, um, you're going to be surprised what, about what you're going to find.

15:32.250 --> 15:43.250
Um, so we've seen a really big number of vendors allowing the equivalent of recursively listing the root folder of that company.

15:43.250 --> 15:45.370
So, not that bucket, of that company.

15:45.370 --> 15:54.170
So, that means all the devices, all the recordings, absolutely everything that's belonging to that company and that's ridiculous.

15:54.670 --> 16:14.550
Um, MQTT, um, essentially you have a device that registered to a server and it registers to, uh, something like, you know, vendor device ID slash topic where topic is I'm 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 forth.

16:14.910 --> 16:24.490
Um, now arguably, as I was saying earlier, one of the major security components of IoT cloud architecture is the device ID.

16:25.230 --> 16:34.430
So the way the app communicates is that I've received that I can register to vendor device ID topic and I can read that information.

16:35.270 --> 16:37.450
This is MQTT, it's not that complicated.

16:37.450 --> 16:39.790
I've learned about it literally three weeks ago.

16:40.590 --> 16:43.550
That's when I added, these slides were added very recently.

16:44.270 --> 16:50.570
Um, ideally security counter mergers will prevent attackers from tapping into another device.

16:51.490 --> 16:53.710
But it gets worse than that.

16:54.670 --> 17:10.590
You can actually, when it's poorly implemented, you can tap into slash root, much like with the S3 bucket, you can tap into slash vendor and then get swarmed by absolutely all the device IDs and all their statuses belonging to that vendor.

17:10.870 --> 17:22.630
And it can be, again, whenever somebody implements MQTT, again, I'm going to go to a hypothetical scenario here, purely hypothetical.

17:23.070 --> 17:26.890
We want to hack Irene's baby monitor and we want to do a targeted attack.

17:26.890 --> 17:32.050
So not just hack everybody but we want to do a targeted attack against a specific person.

17:32.390 --> 17:51.250
And what we're going to do is just register to slash vendor, get swarmed with all the device IDs, use the mobile app API to pull the config for each device ID because, I don't know if you noticed, when you use a mobile app on IoT, it refreshes its config from the cloud.

17:51.270 --> 17:56.850
It sends, I'm this application for this device, for this customer, give me my config.

17:57.130 --> 18:01.890
And then it displays it in the settings section of the mobile app.

18:01.930 --> 18:10.890
So you can essentially, if you have the device ID, you can pull the config, like name, last name, email address, location, and so on and so forth, for each one of their customers.

18:12.110 --> 18:20.230
So when you see the email of Irene popping up, you just correlate because you see now that's the device ID corresponding to Irene.

18:20.270 --> 18:25.890
So you go to S3 and fetch all her recordings.

18:25.890 --> 18:31.770
And of course, again, for some purposes, this is a purely hypothetical scenario.

18:32.810 --> 18:38.270
So onwards, we've been doing a lot of papers on IoT, especially cloud related.

18:38.410 --> 18:39.410
Erimax is one of them.

18:39.410 --> 18:49.150
It's quite relevant because you can get like RCE and you can get a lot of information on that just by knowing the MAC address of the power outlet.

18:49.630 --> 18:53.030
And essentially, you could just iterate all the MAC addresses, like 16 million of them.

18:53.030 --> 18:57.290
We can iterate them over Tor and still get RCE and all that good stuff.

18:58.150 --> 19:00.790
And we come to our star of the day.

19:00.790 --> 19:08.630
So as an example of some of the things that I've mentioned before, I'm going to talk to you about this security camera called Godzilla.

19:10.170 --> 19:12.430
I think I have a sample here somewhere.

19:20.080 --> 19:21.600
So this is one sample.

19:22.960 --> 19:24.660
The other one is in my room.

19:25.140 --> 19:28.320
And if the demo guys are good with us, we're going to try to hack it.

19:28.920 --> 19:32.280
So here's how it works.

19:32.720 --> 19:36.520
There's an API at apps.Godzilla.com.

19:36.520 --> 19:45.720
And after the application authenticates, you register an account with them, you're assigned something called a client ID by us, but they call it a UID.

19:45.720 --> 19:49.780
But we're going to call it both, but just so you know, it's a client ID.

19:50.420 --> 19:53.620
Essentially, this is a bad implementation for Godzilla.

19:54.060 --> 19:57.360
And does anybody see anything wrong here?

19:57.480 --> 20:00.680
Ours was 408,311.

20:01.400 --> 20:03.840
Show of hands who see something wrong here.

20:05.180 --> 20:06.900
I mean, yeah.

20:07.620 --> 20:09.720
It's a goddamn number.

20:11.540 --> 20:24.260
I mean, the cloud platform did a good job of providing them with like really long string device IDs and they've added a layer on top of that with sequential numbers.

20:24.260 --> 20:27.060
So you go like 408,312, 408,313.

20:27.060 --> 20:31.860
You can go like a hundred and you're still going to get somebody's.

20:31.900 --> 20:35.180
Because there's more devices per client.

20:35.180 --> 20:39.480
So they wanted to have this three architecture where client and devices per client.

20:39.480 --> 20:40.280
So yeah.

20:40.580 --> 20:42.660
The UID cannot be changed.

20:42.880 --> 20:45.520
So if you wanted to secure yourself, tough luck.

20:46.160 --> 20:50.100
And yeah, it's incremented by one for each account.

20:50.700 --> 20:57.580
So essentially the user, there's a username and password actually that's being used in communication with the cloud.

20:57.580 --> 21:05.600
However, they are hard coded in the app and they're the same for all of the apps and all of the devices of all of the Godzillas around the world.

21:05.820 --> 21:11.040
So it's cool that they're using the username and password, but not that cool that it's the same and it's hard coded.

21:14.600 --> 21:17.320
The post requests are actually sent using encryption.

21:17.820 --> 21:19.760
AS256 with CBC mode.

21:20.180 --> 21:25.680
However, the encryption key and the initialization vector are hard coded in the app as well.

21:25.920 --> 21:26.720
So yeah.

21:27.040 --> 21:30.580
So what we did, we kind of, and there's also the UID.

21:30.920 --> 21:34.220
So we kind of replicated that.

21:35.540 --> 21:39.700
And let's see if we can do our first demo.

21:46.790 --> 21:48.690
I hope that the fonts are okay.

21:49.110 --> 21:50.510
I can make them bigger.

21:50.790 --> 21:51.990
Can everybody see?

21:52.210 --> 21:52.790
Pretty much.

21:52.790 --> 21:53.350
Okay.

21:53.350 --> 21:58.710
So what we're going to do now is kind of try to pull our data from the Godzilla cloud from a server.

21:58.710 --> 22:00.470
This is my VPS in Canada.

22:00.630 --> 22:08.230
I usually like to do a lot of remote code execution, so not local area network, just because that's cooler than local attacks.

22:08.230 --> 22:13.770
So I'm going to use my VPS in Canada, which obviously is disconnected.

22:14.310 --> 22:15.570
Hang on.

22:33.110 --> 22:34.550
Hello.

22:35.310 --> 22:39.250
So BD research, Godzilla.

22:39.430 --> 22:49.310
And we have this very small crip called CMDS, which essentially emulates the mobile app.

22:54.010 --> 23:08.730
So again, Python, CMDS.py, I'm going to like get UID from 408311.

23:09.630 --> 23:17.970
And actually just for beautification, I'm going to go, just because I already know what the output is going to look like, I'm going to prettify it just a little bit.

23:19.650 --> 23:25.510
And it's a JSON, so JQ it.

23:27.130 --> 23:28.110
And there we go.

23:28.610 --> 23:32.310
So it's really not that complicated.

23:32.310 --> 23:34.890
It's literally emulating the mobile app.

23:34.890 --> 23:38.510
And I can do that for obviously 312, I can do that for 313.

23:38.750 --> 23:42.450
It's up to about 500 thousand and something right now.

23:42.450 --> 23:46.770
And each one of those people has more than one cameras associated with them.

23:46.870 --> 23:51.370
So this is why, you know, Sam was talking earlier about millions and millions.

23:51.370 --> 23:54.190
Well actually that's not very far fetched.

23:54.190 --> 23:59.990
Because if there's like 500,000 users with at least one camera each, you have 500,000 cameras.

23:59.990 --> 24:03.570
But more of them, many of them have like two or three cameras, right?

24:03.890 --> 24:09.510
So you get the information that you get is like the device IDs associated with that camera.

24:09.690 --> 24:11.110
So this one.

24:11.530 --> 24:14.150
And then you get the password set for each.

24:14.470 --> 24:22.370
Now mind you, you may want to change that password but tough luck because I'm going to see it anyway by making this query, right?

24:22.370 --> 24:26.950
Because you can change the device password but it's not going to matter.

24:27.750 --> 24:31.010
So there's

24:39.080 --> 24:41.140
a number of functions available in that API.

24:41.180 --> 24:43.240
One of them is update user.

24:43.240 --> 24:46.740
We're not going to use that now but it's just for your information.

24:46.740 --> 24:54.400
You can alter the user information like password or email address and you don't need to use a valid email address to do that.

24:57.400 --> 24:59.880
Another one is send invite.

24:59.880 --> 25:01.140
And this is a really cool one.

25:01.140 --> 25:06.220
It's an API function of Godzilla that allows you to send an invite for somebody to view your camera.

25:13.680 --> 25:21.880
The owner will have absolutely no idea that you've done that.

25:21.940 --> 25:24.320
And we're going to try to do that now.

25:24.420 --> 25:27.660
We have the Godzilla app running on my phone.

25:36.910 --> 25:48.890
So I'm inviting that device ID from that client ID, you see?

25:48.890 --> 25:54.650
So device ID, client ID and my email address.

25:58.220 --> 26:01.160
And now,

26:05.500 --> 26:08.380
oh look, I have an invite.

26:09.260 --> 26:10.640
How cool.

26:10.640 --> 26:19.280
So I'm going to accept the invite and yeah,

26:26.700 --> 26:31.800
that's my room and I'm going to send the invite.

26:31.800 --> 26:33.740
This is the camera live right now.

26:34.480 --> 26:38.580
So see, the seconds are rolling.

26:41.320 --> 26:44.060
So this is the camera in my hotel room right now.

26:44.060 --> 26:45.940
Just for your information.

26:46.300 --> 26:47.720
Which is kind of cool.

26:49.040 --> 26:58.880
Just for fun and games we kind of developed a new not so orthodox way of getting into the streams.

26:59.140 --> 27:00.940
Assuming that I'm doing this right.

27:00.940 --> 27:02.300
Hang on, hang on.

27:06.520 --> 27:09.720
One would argue that I was supposed to boot this way earlier.

27:09.720 --> 27:13.000
So I'm going to get back to it after it finishes booting.

27:15.000 --> 27:18.140
So cancel.

27:19.260 --> 27:20.740
Moving on.

27:24.570 --> 27:30.730
Again, the owner of the camera is completely unaware that somebody has been invited.

27:30.730 --> 27:34.180
Not at the moment of the invite and not after that.

27:34.180 --> 27:36.320
So you can send invites to everybody.

27:36.960 --> 27:38.540
What do they call it on Facebook?

27:38.540 --> 27:39.940
Live watch.

27:39.940 --> 27:41.500
Invite your friends.

27:41.500 --> 27:42.660
Stuff like that.

27:43.160 --> 27:46.100
This is how the email looks like.

27:46.100 --> 27:48.120
But you don't really need that.

27:49.120 --> 27:57.040
And yeah, just for the hell of it, we coded this.

28:00.980 --> 28:01.940
Sorry.

28:05.430 --> 28:13.790
You see I have this bad habit of insisting that I do live demos.

28:15.630 --> 28:19.070
And you know what's life without a little adventure?

28:19.950 --> 28:23.190
Live demos tend to break or you miss something.

28:23.190 --> 28:29.050
Anyway, until my Kali boots, I promise you next generation botnets, right?

28:29.430 --> 28:46.570
So we dumped the former, we got the binary and we ran them through EDA and you know, it wasn't very fast until we found a buffer overflow in their cloud agent which is actually a .exe file.

28:47.010 --> 28:50.270
So they have this Kali platform.

28:50.270 --> 29:01.250
Again, much like many other cloud platforms and there's a combination of P2P and relay servers and there's main 514 exe that handles the services device side.

29:02.290 --> 29:06.770
And upon inspection we found that the function was vulnerable to an out of bound rights.

29:06.770 --> 29:09.530
It's the TK set device model handle.

29:11.130 --> 29:13.630
And they specifically crafted buffer.

29:14.130 --> 29:16.270
So this is the code.

29:16.830 --> 29:24.990
And we have in the lower right hand corner, we have those two V28 and V29.

29:24.990 --> 29:35.610
All we have to do is just send a buffer that's large enough to overflow them and get past them and then we get, we have like system right after that.

29:35.690 --> 29:43.030
And we can call system and we have a command execution.

29:43.910 --> 29:47.230
Which hopefully we're going to be able to demonstrate.

29:50.090 --> 29:51.730
So let's see.

29:51.730 --> 29:59.530
So again, fully remote, we have this netcat listening and we're going to try to get a root shell in my room.

30:00.730 --> 30:03.390
And hopefully so.

30:09.070 --> 30:12.110
This is the almighty exploit.

30:22.600 --> 30:25.620
Am I sending it what I'm supposed to send it?

30:33.000 --> 30:33.980
Oh, well.

30:38.620 --> 30:39.400
Shit.

30:39.400 --> 30:40.440
Thank you, man.

30:44.720 --> 30:47.320
Yeah, actually that was exactly the problem.

30:50.960 --> 30:50.960
And

30:59.050 --> 31:03.970
you know I should have run that in Tmux or screen.

31:20.120 --> 31:29.820
Yeah, unfortunately the device tends to crash when you do the buffer overflow, but hopefully not this time.

31:35.420 --> 31:36.520
Yeah.

31:37.320 --> 31:40.800
Well, we have movies, as always.

31:43.180 --> 31:48.700
So the movie

32:02.550 --> 32:08.870
shows we get a UID, we get a device ID and then we just,

32:12.540 --> 32:13.840
and we get a shell.

32:16.990 --> 32:22.090
I'm sorry that my shell crashed, but yeah.

32:22.090 --> 32:22.470
I'm going to try to fix it .

32:23.010 --> 32:24.510
Happens to the best of us.

32:28.160 --> 32:33.720
Yeah, and fun story, probably I'm not going to be able to get the video stream either because the device is kind of down.

32:33.980 --> 32:40.860
But long story short, you can get a shell, a very predictable shell, works every time, root access, full root access on all these devices.

32:40.880 --> 32:45.040
And there is another vulnerability that we found.

32:49.510 --> 32:53.910
A command injection vulnerability which is significantly easier to exploit.

32:54.850 --> 32:58.710
Essentially the camera supports something called remote upgrade.

32:58.990 --> 33:01.130
Again, everything relayed through the cloud.

33:01.850 --> 33:06.830
And the function takes two parameters, the firmware version and the download location.

33:07.210 --> 33:14.190
Now the thing is if you send a bogus download location, it just has to be up so it can initiate a TCP connection to it.

33:14.190 --> 33:15.690
It doesn't have to be valid.

33:15.690 --> 33:21.150
It's going to pass the rest of the output to tar.

33:22.750 --> 33:30.270
So essentially it's going to do an initial connection to the update location and it's going to pass what you call as the file name to tar.

33:30.730 --> 33:36.410
And then that's going to get you a command injection, a very easy command injection actually.

33:36.890 --> 33:41.970
Because tar is going to execute your input and then semicolon and then whatever command that you want.

33:41.970 --> 33:43.910
And you're going to connect back shell to you.

33:43.910 --> 33:46.150
And you can actually on these devices you can do netcat.

33:46.150 --> 33:47.730
They have netcat installed.

33:47.730 --> 33:52.390
So you can netcat minus E BNSH to your machine.

33:53.170 --> 34:01.750
As a bonus and funny story about responsible disclosure, we were stuck with these guys for about four or five months.

34:01.990 --> 34:03.830
They wouldn't answer our e-mails.

34:04.010 --> 34:08.590
So we kind of didn't publish anything because we were like ethical.

34:09.350 --> 34:11.750
Or our legal department is very ethical.

34:12.930 --> 34:19.970
And then somebody published on Reddit the AWS bucket vulnerability that they found.

34:19.970 --> 34:24.050
So they're like, Godzilla AWS bucket vulnerability zero day in Godzilla.

34:24.350 --> 34:28.170
And at that point we were kind of forced to publish our stuff.

34:28.170 --> 34:29.590
And we're like, okay.

34:29.590 --> 34:32.350
And we have all these other things as well.

34:33.830 --> 34:39.830
So we got a call from them saying that they're going to patch their stuff.

34:40.590 --> 34:42.150
And they didn't.

34:42.150 --> 34:46.070
They just patched the bucket.

34:46.130 --> 34:50.530
But it's kind of messed up for them and I understand where they're coming from.

34:50.530 --> 34:54.230
The whole user ID thing is an architecture thing.

34:54.230 --> 34:56.490
And they already have devices in the market.

34:56.490 --> 34:58.510
It's kind of hard to change.

34:59.030 --> 35:06.830
The buffer overflows they could patch but I'm going to bet that I have like this shitty update process unfortunately.

35:06.950 --> 35:09.090
So yeah, it kind of sucks.

35:09.090 --> 35:14.430
And then a colleague of mine tells me that his mother in Puerto Rico has like three of these at home.

35:16.910 --> 35:17.950
So yeah.

35:18.470 --> 35:22.990
Now, I don't know how we are in stake aways.

35:23.030 --> 35:26.690
So IoT is obviously a huge attack surface.

35:26.690 --> 35:32.370
People ask me, how do you know what's a good or bad IoT?

35:32.370 --> 35:33.450
What should I buy?

35:33.590 --> 35:36.950
And I always tell them there's a few things that you can look out for.

35:36.950 --> 35:38.970
One of them is actually the update process.

35:38.970 --> 35:40.590
Inherently everything is vulnerable, right?

35:40.590 --> 35:44.030
We're seeing advisories on a weekly basis and all the big stuff, right?

35:44.150 --> 35:45.770
Including Google, including us.

35:45.770 --> 35:48.810
We get reports about vulnerabilities in our stuff.

35:49.010 --> 35:55.570
Not on a weekly basis but it's very important to look at the way people patch their stuff.

35:55.570 --> 35:56.670
How they update.

35:56.670 --> 35:58.130
If that update is unattended.

35:58.130 --> 36:01.690
If there's any chance that somebody didn't update when an update was available.

36:01.690 --> 36:04.230
So that's kind of one of the first things to look out for.

36:04.670 --> 36:09.810
The second I would say would be the magnitude of the company.

36:09.950 --> 36:15.430
Or how impacted would they be if a vulnerability was found.

36:15.510 --> 36:22.170
Let us not forget, and I hope nobody is going to be upset with me saying this , that the system is broken.

36:22.170 --> 36:26.270
It's still broken right now in terms of legal stuff.

36:26.570 --> 36:30.090
As a researcher , there's still a challenge in going outside.

36:30.090 --> 36:32.070
Remember that hypothetical scenario?

36:32.070 --> 36:44.770
It's hypothetical because you cannot go outside of your own space to see if you can go outside of your S3 bucket or see if you can get outside of your MQTT topic from a legal standpoint.

36:44.770 --> 36:51.350
And at the same time the system is fundamentally broken because D-Link won the lawsuit against FTC.

36:51.370 --> 36:56.650
So for those of you who don't know, FTC sued D-Link in February 2015 for Mirai.

36:57.870 --> 37:00.150
And everybody was like, okay, good.

37:00.430 --> 37:04.970
People should be accountable for their mess, their screw-ups.

37:05.370 --> 37:07.030
But they lost.

37:07.030 --> 37:10.590
In October 2015, FTC lost the lawsuit against D-Link.

37:10.730 --> 37:12.490
And it was so obviously there.

37:12.490 --> 37:15.670
Telnet enabled with 1, 2, 3, 4 on millions of devices.

37:16.210 --> 37:23.090
The cloud implementation in many IoTs is broken.

37:23.090 --> 37:24.890
It's like fundamentally broken.

37:24.890 --> 37:27.890
They are negligent, if not more than negligent.

37:27.890 --> 37:31.250
They are trying to add new functionality and we can get that.

37:31.890 --> 37:35.770
But not knowing, remember, do you know the cloud?

37:36.010 --> 37:37.050
Fuck!

37:37.410 --> 37:39.250
Nobody understands the cloud.

37:39.850 --> 37:44.510
So many companies don't really understand how to do cloud implementations for their stuff, right?

37:44.610 --> 37:47.350
And yeah, look into that.

37:48.490 --> 37:50.730
So vendors need to pentest their products.

37:50.850 --> 37:56.030
These guys told me, the director of product management called me on my cell phone.

37:56.030 --> 37:58.890
I was like in Singapore doing some other event.

37:59.210 --> 38:01.610
And asked me, why didn't you call us?

38:01.610 --> 38:02.630
Well, we tried.

38:02.630 --> 38:03.070
Okay.

38:03.070 --> 38:06.990
Then I asked him, why didn't you pentest your stuff before putting it in the market?

38:07.270 --> 38:08.950
And he said, but we did.

38:09.990 --> 38:10.870
No.

38:11.330 --> 38:12.690
No, we really did.

38:12.690 --> 38:13.850
How much did you pay?

38:13.850 --> 38:14.630
Seriously.

38:14.750 --> 38:21.310
Because seeing that there's a 408-311 client ID takes five minutes with burp.

38:21.310 --> 38:26.890
I mean, how much did you pay that company to do your security audit before pushing your stuff into the market?

38:27.030 --> 38:28.630
Dude, we paid a lot of money.

38:29.290 --> 38:31.430
Get out of here, you know.

38:32.470 --> 38:33.650
So yeah.

38:33.770 --> 38:40.210
Obviously, rock bug bounty programs have very good update mechanisms.

38:40.510 --> 38:44.010
And again, it's trivial to find RCEs in IOTs.

38:45.010 --> 38:49.830
Another more or less honorable mention and this is a call for me to you guys.

38:49.830 --> 38:54.830
How many of you are part of a big company and how many of you are independent researchers?

38:54.830 --> 38:55.930
So big company.

38:58.010 --> 38:59.730
I feel for you, man.

39:00.830 --> 39:02.370
Independent researchers?

39:04.690 --> 39:11.670
So you see, because so far we've been able to publish only a fraction of our research.

39:13.350 --> 39:14.150
Trust me.

39:14.150 --> 39:20.410
And we have like this big space with all the things that we've researched and it's insane.

39:20.610 --> 39:22.710
Unfortunately, I cannot talk about it, you know.

39:23.110 --> 39:24.010
And yeah.

39:24.650 --> 39:34.030
So because it's easier from a legal standpoint if we publish something for companies to go after us and the legal team is like, you know, maybe you shouldn't do that.

39:34.710 --> 39:38.230
Yeah, I mean, we already have a lot of other stuff to do.

39:38.490 --> 39:41.910
And yeah, maybe it would be best if we just stay on the safe side.

39:41.910 --> 39:43.650
You already published some papers, you know.

39:43.650 --> 39:45.150
You talked at a few conferences.

39:45.150 --> 39:46.510
What more do you want, you know?

39:46.510 --> 39:52.670
And I'm like, we need people to know about this stuff and patch it and fix it because that's why we do what we do.

39:52.790 --> 39:55.450
Yeah, but really?

39:58.170 --> 40:05.930
So if you're an independent researcher, if you have the capability, we need more.

40:06.110 --> 40:08.870
We need more research on mass hacking IOTs.

40:08.870 --> 40:11.930
It's so easy and we need more of this stuff published.

40:11.930 --> 40:16.510
So if you want to get into that and if you want help from us, yeah, we can definitely help.

40:16.690 --> 40:18.310
We would be more than happy to help.

40:18.310 --> 40:22.470
I mean, I'm not in Silicon Valley saying that I want to make the world a better place.

40:23.410 --> 40:28.450
But I mean, there's so many stuff that's not published and it's so dangerous.

40:28.450 --> 40:39.490
I mean, the hypothetical scenario of viewing all the recordings of all the people, of all those cameras from the beginning of times up until today, it's still, it may be still happening.

40:40.490 --> 40:44.930
And you know, there's a challenge for somebody like me to talk about it.

40:44.930 --> 40:48.270
So with that in mind, I thank you for your time and for your patience.

40:48.270 --> 40:50.470
I hope it was enjoyable and yeah.

