WEBVTT

00:00.000 --> 00:00.840
Hi, folks.

00:00.840 --> 00:06.880
My name is Rik Ramgadi, and I originally had submitted a talk called Shining a Light on a Black Box.

00:06.880 --> 00:16.520
However, things changed, and then after, Ian and I changed our slides to be So Hopelessly Broken 2.0, Circumventing Security Controls and Network Accessible Services.

00:17.900 --> 00:19.760
So like I said, my name is Rik Ramgadi.

00:19.760 --> 00:21.140
I'm the one on the right here.

00:21.140 --> 00:31.060
I am a senior security analyst at ISE, and I like to hack things like web apps, mobile apps, binaries, and IOT devices, which is why I do a lot of work with the IOT village.

00:31.200 --> 00:33.620
I like to read a lot, and I'm always confused.

00:33.620 --> 00:35.080
Then we also have Ian Sinderman.

00:36.340 --> 00:38.020
Well, that would be me.

00:38.020 --> 00:40.160
I'm a security analyst at ISE as well.

00:40.240 --> 00:42.480
I may have been a low-key carny as a child.

00:42.520 --> 00:48.240
I also like to hack things, web apps, IOT garbage, some hardware, tech obscura, that sort of stuff.

00:48.240 --> 00:50.660
I always like to try and learn new things.

00:50.660 --> 00:52.860
I always like to teach them as well, whether that works.

00:52.920 --> 00:54.480
Maybe not.

00:54.560 --> 00:57.160
But I'm also always confused, like Rik.

00:57.160 --> 00:58.400
I really like that one.

00:58.800 --> 01:00.340
I guess it's an easy one to like.

01:00.340 --> 01:01.860
It's very realistic.

01:02.580 --> 01:05.920
So the things, here's the agenda.

01:05.920 --> 01:10.900
This talk is about our research project that we concluded in 2018.

01:10.960 --> 01:18.300
During our research project, we hacked a bunch of embedded devices, 13, we had 13 targets.

01:18.300 --> 01:26.620
We got a remotely exploitable shell in 12 of them, and these are the three best stories that I could fit in half an hour, that we could fit in half an hour.

01:26.880 --> 01:36.440
And the idea behind it was that we were trying to find remotely exploitable bugs in embedded devices, which is kind of what you do when you play the So Hopelessly Broken CTF.

01:36.860 --> 01:46.900
And throughout the whole presentation, we're going to cover three devices, the Buffalo Terror Station, the Drobo 5N2, and the Netgear R9000.

01:46.900 --> 01:51.540
These are all devices that we bought, I think, early last year, so I would say March-ish.

01:51.620 --> 01:55.960
And then we hacked in between then, and we ended everything in about October, November.

01:56.020 --> 02:00.700
But, as we'll find out throughout the presentation, just because we concluded testing does not mean that our job was over.

02:01.480 --> 02:08.580
With the Buffalo Terror Station, we're going to be looking at how sometimes developers may be confused with how some functionality may work.

02:08.580 --> 02:11.340
We're going to be looking at a couple interesting HTTP headers.

02:11.520 --> 02:24.480
And then we're going to be talking about an interesting situation where responsible disclosure, where we responsibly disclosed these issues to this manufacturer, and then they didn't respond to us, and some stuff happened where they tweeted some information and then deleted it.

02:24.580 --> 02:27.380
And it's all very humorous, yet concerning.

02:27.380 --> 02:29.380
Then we have the Drobo 5N2.

02:29.380 --> 02:33.800
We're going to be talking about how we reverse engineered the protocol, which is what this talk was originally about.

02:33.820 --> 02:39.640
And then after that, we're going to be talking about how we found the keys to get into the Drobo under the device's doormat.

02:39.800 --> 02:50.260
And then last, we have the R9000, which we'll be talking about an interesting authentication mechanism and how we were able to fake a call from inside of the house.

02:50.420 --> 02:55.720
And then after, a tale of bug bounties and bug bounty companies that we ended up in.

02:56.160 --> 03:06.660
And then after that, we're going to have a conclusion where we talk about responsible disclosure, the stuff that we found, how we found it, and comparing our study from last year with our original study from 2013.

03:07.260 --> 03:10.740
So without further ado, I'll kick it off with the first one.

03:11.100 --> 03:12.440
The Buffalo Terrace Station.

03:12.440 --> 03:14.980
This is one of the devices that's actually in the CTF right now.

03:14.980 --> 03:18.440
And after you figure out how easy this is, you'll score some easy points.

03:18.860 --> 03:25.340
The Terrace Station, with this very easy name, is a Soho enterprise business grade NAS.

03:25.420 --> 03:27.800
And it runs between $2,000 to $4,000.

03:27.800 --> 03:29.100
It's made in Japan.

03:29.100 --> 03:31.720
And it has an administrative web application.

03:31.840 --> 03:34.200
And I'll pass it over now to Ian to explain everything else.

03:34.200 --> 03:34.780
Okay.

03:34.860 --> 03:40.060
So this web app has, it has this wonderful JSON API.

03:40.780 --> 03:47.600
So one thing that I really dislike about JSON, at least in the context of, I guess, everything, is application JSON.

03:48.040 --> 03:57.700
So application JSON really sucks when you're trying to do CSRF, assuming they're actually checking the content type, because you generally need to preflight your requests if you want to set this content type.

03:58.140 --> 04:03.720
But further, we see that there is a authentication cookie, so they're probably using cookies for some of this.

04:04.000 --> 04:08.740
But there's also an authentication, like, value within the post body.

04:08.820 --> 04:19.440
Back to CSRF, that's probably not going to be something that we can do if that authentication token is there, because we would have to know their authentication token in order to send a malicious post body.

04:20.180 --> 04:23.860
However, we decided to kind of change that.

04:24.280 --> 04:29.460
So first thing we did is, you know, find the source code for this, or at least the code for the web app.

04:29.780 --> 04:34.480
In this case, we found that they were all precompiled Python binaries, which kind of sucks.

04:34.480 --> 04:38.880
Like, it's Python, you should be able to read it nice and easy, but this is not super readable.

04:39.460 --> 04:44.420
However, you just use uncompile 6 and then it's just ready to go in a matter of, like, one or two minutes.

04:45.200 --> 04:46.080
So that was nice.

04:46.080 --> 04:51.240
So now we have very nice readable data, and it's in Python, nice and easy to parse, even if you don't know what you're doing.

04:51.980 --> 04:55.560
And then we see some rather concerning stuff here.

04:56.100 --> 04:57.240
Like skip off.

04:58.360 --> 05:00.560
Yes, please, I'd very much like to do that.

05:00.740 --> 05:02.020
How do I do this?

05:03.460 --> 05:05.720
What do you guys think skip off does?

05:09.040 --> 05:11.680
So somebody thinks it's a security mechanism.

05:12.120 --> 05:13.080
We'll talk later.

05:14.200 --> 05:16.060
Let's figure out where this is going now.

05:18.880 --> 05:24.480
So the next thing I did after seeing this was just see where else is skip off referenced, like, within this file.

05:24.480 --> 05:28.100
So I just do a search and then we find this chunk of code.

05:28.800 --> 05:40.420
Highlight the important parts, and it looks like if we just set our HTTP host, like, our host header to local host, we skip authentication.

05:40.820 --> 05:45.680
I can kind of see why someone would implement this, so let's talk about that.

05:46.100 --> 05:50.660
So let's say that we have an API that it needs to talk to itself.

05:51.120 --> 06:04.560
We could, you know, implement some sort of authentication, like understanding what the authentication to grant yourself an auth token for yourself and then use it with yourself, or we could just say, hey, when I talk to myself, I know it's me, so we're good to go.

06:05.300 --> 06:07.600
So I'm pretty sure that's what they were trying to do.

06:08.080 --> 06:19.360
So, you know, if the host header is always a local host and a local request, and it's never a local host and a client request, then the host header being local host means it's a local request.

06:19.400 --> 06:21.000
You know, good to go, job done.

06:21.720 --> 06:28.080
Except there's a problem with this, and I think many of you have already realized this problem, and it's that the host header is client controlled .

06:28.920 --> 06:31.120
So that's not good.

06:31.780 --> 06:38.460
So the host header is usually local host and a local request, and it's rarely local host and a client request.

06:38.680 --> 06:43.560
So the host header being local host just means it's a request with a weird host header.

06:44.540 --> 06:55.220
So one of the reasons that I think this becomes an issue with a lot of people is that the host header is application layer while routing decisions are done at the network layer.

06:55.760 --> 07:07.100
So although in a lot of our large web applications, we can expect some routing decisions to be made based on the host header, this is a tiny little NAS on your LAN.

07:07.100 --> 07:09.540
You're not going through a load balancer to talk to your NAS.

07:09.540 --> 07:12.100
If you are, like, that's a hell of a NAS.

07:12.640 --> 07:18.120
So since there's no load balancer and since we're talking to it directly, what can we do?

07:18.400 --> 07:20.060
Well, let's find out.

07:20.060 --> 07:21.600
So we have a base request here.

07:21.760 --> 07:27.340
We have a junk SID, and it responds with, hey, this is an invalid session ID.

07:27.580 --> 07:29.000
That makes sense.

07:29.460 --> 07:32.220
So what if we set our host header to local host?

07:32.740 --> 07:36.380
And we still have a junk SID, and we still get an error, but it's a slightly different error.

07:36.380 --> 07:38.820
It's still invalid, but it's invalid params.

07:38.840 --> 07:43.720
And it's saying that, you know, the reboot function doesn't take any arguments, but we did give it one.

07:44.300 --> 07:49.060
As far as I can tell, the only argument that we may have given it was the SID parameter.

07:49.760 --> 07:51.360
So what if we just delete it?

07:51.920 --> 07:59.800
Well, if we delete it, we get result null, and then the device makes some sad beeps and reboots because suddenly we're an admin.

08:00.860 --> 08:02.280
That's probably not good.

08:02.680 --> 08:04.140
So I just got a shell.

08:04.720 --> 08:07.920
And now I can get a root shell without authentication.

08:10.140 --> 08:11.640
Also probably not good.

08:12.220 --> 08:17.480
Yeah , so I guess if, for those of you keeping track, the authentication is the host header kind of.

08:17.500 --> 08:25.240
So the fact that you could just send, say, your IP address is 127.0.0.1, and then have to say, this is all you need to know from here on out.

08:25.280 --> 08:31.200
We were able to access all the functionality in the NAS, also the ability to make the device beep.

08:31.420 --> 08:33.040
And that was really interesting as well.

08:33.040 --> 08:35.540
So we brought this device to another CTF.

08:35.540 --> 08:37.460
I think no one's figured it out here so far.

08:37.560 --> 08:39.780
There's actually a request to make the device play music.

08:40.660 --> 08:42.740
And that's one of the most annoying things that we found out.

08:42.740 --> 08:45.480
So remotely we're able to play music in other people's houses.

08:45.480 --> 08:49.440
And on top of the fact that we're able to get a shell, which I'm not sure which one's more concerning.

08:54.500 --> 08:59.740
So, I don't know, it seems like after all the shells that we got on these devices, getting a shell kind of got boring.

08:59.880 --> 09:01.820
So then it became, hey, we can play music.

09:01.820 --> 09:02.740
This is fun.

09:02.960 --> 09:04.300
This shell's boring.

09:05.460 --> 09:07.800
So yeah, how about that tweet and delete?

09:08.380 --> 09:10.120
So we decided to disclose.

09:10.120 --> 09:15.720
As normal, we disclosed all of the issues that we found to the manufacturer.

09:15.720 --> 09:19.520
Gave them at least a month or two to fix them before doing public disclosure.

09:19.860 --> 09:25.740
In this case, you know, we sent an email to their security contact on 0622 and heard nothing.

09:26.180 --> 09:29.800
So we sent another on 0702 and heard nothing.

09:30.300 --> 09:35.840
So then we sent the Volns to the security contact on 07, on the next day, and we heard nothing.

09:36.200 --> 09:40.740
So we sent the CVEs on 0822 and we heard nothing.

09:41.160 --> 09:46.280
So we announced our public release because it had been many months and we tried our best.

09:46.840 --> 09:53.660
And then two days later, we did our public release with a demo live stream showing off the exploits and how to do this.

09:54.540 --> 09:57.360
And then something happened the next day that none of us were anticipating.

09:58.660 --> 10:02.520
An official Buffalo Twitter account retweeted the link to our live stream.

10:04.740 --> 10:06.980
What did that link contain?

10:07.460 --> 10:14.960
That link contained a very nice URL to our live stream on YouTube about how to hack all Buffalo devices.

10:16.900 --> 10:18.460
What happened to that tweet Ian?

10:18.920 --> 10:24.100
Well, at some point, they must have realized that something was terribly wrong because they deleted it.

10:24.420 --> 10:27.040
However, we do have a screenshot, so that's nice.

10:27.260 --> 10:28.400
So we're not crazy.

10:28.400 --> 10:29.680
This actually did happen.

10:30.160 --> 10:32.140
Hopefully your folks in the back can see it.

10:32.180 --> 10:36.060
You're laughing, so you can see it in the back and hopefully you're enjoying it as much as we did.

10:36.580 --> 10:38.740
So what ended up happening with the device in the end?

10:38.740 --> 10:39.560
Did we get patches?

10:39.560 --> 10:40.720
Well, we'll find out.

10:40.900 --> 10:43.520
So clearly they realized that something was wrong.

10:43.520 --> 10:48.420
So at least someone at that company is aware that there's a lot of vulnerabilities that should be fixed.

10:48.560 --> 10:52.120
So clearly, as far as patchability goes, there are patches.

10:53.100 --> 10:54.520
There are no patches.

10:55.400 --> 10:57.740
It's been like a year, I think.

10:58.480 --> 11:10.000
And for a talk that I did at CypherCon, I did some more research and found that all TerraStations are vulnerable to the same exploit, including the ones with the brand new completely redone UI.

11:10.000 --> 11:11.580
How much were those devices again?

11:11.680 --> 11:17.180
The devices, I think some of them were upped into 20K, something like that.

11:17.180 --> 11:20.660
Like professional grade network attached storage for businesses.

11:21.260 --> 11:25.240
20K for your own, I guess, C2C server in the end, pretty much.

11:28.000 --> 11:31.240
But yeah, I guess in summary, the host header is client controlled.

11:31.240 --> 11:37.160
Unless you have something that's parsing it and making sure that it's not client controlled, maybe don't rely on it for authentication.

11:37.660 --> 11:41.240
And if you have a security address, please pay attention to it.

11:41.240 --> 11:42.580
We're trying to help you.

11:42.840 --> 11:44.800
And if you screw up, oh no.

11:44.840 --> 11:51.020
Clearly whoever had deleted that tweet knew that something was wrong, but they didn't own up to it.

11:51.300 --> 11:53.480
Or if they did, someone didn't listen to them.

11:53.480 --> 11:57.720
And all of these devices are still vulnerable, including the one in the CTF.

11:57.720 --> 11:59.400
Like it's running the newest firmware.

11:59.620 --> 12:01.680
And you can go over and get a shell in it if you like.

12:02.820 --> 12:05.780
Oh, you want to talk about Maryland Democratic Party real quick?

12:05.780 --> 12:10.200
You get more, you're way more enthusiastic about this issue than I am, so I'm going to let you take care of this one.

12:11.200 --> 12:21.940
So after all of this, we found out that the Maryland Democratic Party had a Buffalo NAS on the internet with no password.

12:22.580 --> 12:30.000
And while we were doing all this research, another research company found it and contacted them and then like did a release about it.

12:30.180 --> 12:35.280
Apparently like every nation state and their grandmother was in this NAS pulling off all their data.

12:35.960 --> 12:38.320
But the Maryland Democratic Party did take care of it.

12:38.320 --> 12:39.520
They put a password on it.

12:39.520 --> 12:41.780
So it was still on the internet, but they put a password on it.

12:42.080 --> 12:43.300
And then we released this.

12:44.160 --> 12:49.160
So I guess, I'm pretty sure every nation state and their grandmother can Google.

12:49.560 --> 12:52.700
So sorry Maryland Democratic Party, we tried.

12:54.640 --> 12:58.000
Just to be clear on that one, we didn't hack them at all.

12:58.000 --> 12:59.160
That never happened.

12:59.200 --> 13:03.140
Let's make sure, I don't want to hear about that later on from anybody.

13:03.780 --> 13:13.060
But it's kind of funny because we give a lot of these presentations where we tell people about like, hey, there are vulnerabilities that you're seeing are, it's in the system.

13:13.060 --> 13:15.540
It's like you can have the like up-to-date firmware.

13:15.540 --> 13:16.760
You can have a good password.

13:16.760 --> 13:21.760
It's like if there are authentication bypasses, it's like false sense of security that you're leading yourself into.

13:21.960 --> 13:25.520
Don't get me wrong, it's important to have good passwords and important to keep your stuff up to date.

13:25.520 --> 13:31.260
But if there's no update and people can just change the host header to localhost and get in, you're just lying to yourself.

13:31.840 --> 13:35.960
Talking about lying to yourself is our next device, the Drobo 5N2.

13:36.280 --> 13:44.460
The Drobo 5N2 is a Soho Enterprise grade NAS, and it is between $400 and $500, way cheaper than a Buffalo, but just as vulnerable.

13:44.540 --> 13:45.560
This one's made in the great...

13:45.560 --> 13:46.980
I'd say a lot more vulnerable.

13:46.980 --> 13:48.840
This one's probably way more vulnerable.

13:48.840 --> 13:52.280
I'll tell you guys how many unauthenticated shells we got on this thing at the end of this.

13:52.440 --> 13:54.380
But this one's made in America.

13:55.320 --> 14:05.120
The reason why we wanted to do research into this device was because you can't manage it through a web app by default.

14:05.120 --> 14:08.720
Almost all these devices, you hook it up, there's a web app, you connect to it.

14:08.720 --> 14:14.320
The Drobo, the only way that you can connect to it by default is by installing this thing called a Drobo dashboard.

14:15.020 --> 14:21.320
And people on Reddit were losing their minds over it because they thought it was really cool, because it has all these pretty lights and the kids really like LEDs.

14:21.880 --> 14:28.180
And the other reason why is because it's pretty robust and it's also like a pretty fair price point, I guess.

14:29.180 --> 14:40.140
I wanted to get it because it has this custom protocol that it uses to connect to the device with this only macOS and Windows binary that you need to install.

14:40.140 --> 14:44.220
So we installed it, and this is what the Drobo dashboard looks like.

14:44.460 --> 14:46.440
I think this was the macOS version.

14:46.440 --> 14:51.720
You install it, and then it gives you other information about the device, like the serial number.

14:51.720 --> 15:00.080
It tells you how many drives you have installed, when was the last time you set up RAID and all that, and the life expectancy of all those drives.

15:00.080 --> 15:01.540
I'm not sure how it does that.

15:01.680 --> 15:07.680
And you can also install other apps and remotely access the device through other means as well.

15:09.000 --> 15:17.240
The first thing that we did is that I was really worried that the only way that we'd be able to assess this device is by doing a lot of hardcore reverse engineering.

15:17.240 --> 15:21.060
It's like, oh, they probably have certificate pinning, they probably encrypted everything with TLS.

15:21.200 --> 15:21.760
Ha!

15:22.080 --> 15:23.680
It was just plain text.

15:25.140 --> 15:33.520
Everything, and I know it's a little bit hard to see that, but that's just, we opened up Wireshark and started clicking on a bunch of stuff, and we found out that everything was in plain text, and I was like, well, cool.

15:34.280 --> 15:39.760
But, so it's like, this customer proprietary API was just XML.

15:40.060 --> 15:51.180
And what you had to do is that you sent the, like, that, like, dry net, TM stuff at the beginning, those dots are just hex characters, I put dots in so it's a little bit more easy on the eyes, and then some XML data.

15:51.800 --> 15:54.000
Well, we still need to reverse engineer the protocol here.

15:54.000 --> 16:01.740
We need to figure out, like, how it all works, what does the 61 here mean, what is that DRA number, and how does this all work?

16:01.740 --> 16:10.860
So, the first step that I said is like, well, cool, maybe I can just send this message with echo, and then pipe it into Netcat, connect to the device on port 5001.

16:11.000 --> 16:18.860
We saw that whenever we were interfacing with the device, it was over port 5001, and that it was always listening on that port as soon as the device turned on.

16:19.260 --> 16:23.900
So, maybe we can just send this and figure out if it just gives us a message back.

16:23.900 --> 16:25.420
Maybe there's no authentication.

16:26.420 --> 16:28.380
We sent it, we didn't get anything back.

16:28.380 --> 16:29.240
It just froze.

16:29.240 --> 16:30.860
We needed to figure out why at that point.

16:30.860 --> 16:34.440
So, we need to do some more protocol reverse engineering and see where that goes.

16:34.740 --> 16:48.060
So, I also found out while we were looking at it, that if you kill the instance of your Drobo dashboard, it'll restart, and when it restarts, it'll have something listening on port 5000.

16:48.180 --> 16:51.880
It's like, cool, well, I can probably just connect to the device on port 5000.

16:52.600 --> 16:57.700
If you connect to the device on port 5000, it spits out all this XML, and that's really interesting.

16:57.700 --> 17:03.820
Notice there's no trickery there, no authentication, I'm not sending anything, connect to the device on port 5000, and that's it.

17:04.360 --> 17:10.940
So, I was like, alright, maybe it is that it needs to be connected to the device on port 5000 and also send a message.

17:11.420 --> 17:12.780
Well, let's try that out.

17:12.780 --> 17:19.600
If we send that and we echo this information, pipe it into Netcat, maybe there's no authentication.

17:19.940 --> 17:21.760
It's like, well, that's not working either.

17:21.760 --> 17:23.040
Maybe there's something else.

17:23.200 --> 17:31.060
So, at this point, we're going through the process of reverse engineering and figuring out how is it that the whole, like, handshake part is happening between these things.

17:31.400 --> 17:39.520
So, we killed the Drobo dashboard, and I think the other thing that was very important about this is that every time you kill it, it just automatically restarts.

17:39.520 --> 17:45.380
So, we needed to set a script to automatically kill it every time until we were ready, start Wireshark, and then start back there from nothing.

17:45.600 --> 17:47.980
And we found out that there is authentication.

17:48.580 --> 17:54.800
When the Drobo dashboard starts, so the application that connects to your device, it sends this message.

17:55.440 --> 18:00.020
And this message is only, it only happens once at the beginning.

18:00.020 --> 18:02.620
Kind of sounds like what happens when you log into an application, right?

18:02.620 --> 18:10.880
You log in, you send your username and password once, it sets a session token, it gives it back to you, and then you have all that information and you can just keep on doing the do.

18:11.200 --> 18:13.980
So, we needed to reverse engineer the front part here.

18:13.980 --> 18:17.560
So, you can see that the DRAINATM part is still the same.

18:17.760 --> 18:20.320
There's a bunch of dots and a number there.

18:20.660 --> 18:26.920
That number looks pretty long, and it looks, I would say, it looks complex enough that I don't think I'd be able to brute force it.

18:27.440 --> 18:30.880
So, we started looking into what it is that this number meant.

18:32.000 --> 18:35.920
The first part, the DRAINATM part, was just those hex characters.

18:36.420 --> 18:45.320
Ian found out that, after that, it would say if it's coming from the server or if it's being sent to the server with the other bytes, and then the rest of it was the size of the packet.

18:45.660 --> 18:50.740
And now that we know all that information, there's something else here that we still need to figure out.

18:50.840 --> 18:51.940
What's that?

18:51.980 --> 19:01.920
So, the part that's, I guess, kind of highlighted in red, but definitely bolded, that looks like something that's still complex enough that we can't just randomly guess where it belongs to.

19:02.340 --> 19:08.700
But, we found out that when we connect to the device on port 5000, it gives us back that number.

19:09.020 --> 19:12.420
That here, folks, is the serial number.

19:12.760 --> 19:17.060
So, it looks like the thing that you need to authenticate to the device is its serial number.

19:17.060 --> 19:22.600
It's like, oh, this is complex enough, serial numbers are pretty long, but you can just do the following.

19:22.660 --> 19:35.200
Connect to the target on port 5000, extract the serial number from the XML that's returned to you, send the login request on port 5001, send whatever command you want on port 5001, and then install whatever you want.

19:35.600 --> 19:37.580
We found out that you can install pretty much anything.

19:37.580 --> 19:47.000
You can install MySQL, you can install Apache, you can install OpenSSH, you can install other malware that you find anywhere, but it pretty much allows you to do anything.

19:47.360 --> 19:51.200
And then after, we found out that Drupal also provides this thing called Drupal Access.

19:51.280 --> 19:57.160
It's a web application that they provide so that you can connect to the device through something that's not the Drupal dashboard.

19:57.540 --> 20:00.500
And we were still wondering, well, we don't really have a shell yet.

20:00.640 --> 20:02.180
How are we going to do this?

20:02.420 --> 20:13.400
The first application that we installed gave us CVE-2018-14-699, and I think that's a little bit hard to see for everyone in the back, so let's look at this a little bit more closely.

20:13.540 --> 20:17.680
Here's the device's IP address, 192.168.1.26.

20:17.980 --> 20:19.740
It's on port 8080.

20:19.860 --> 20:21.400
It listens on Drupal Access.

20:21.400 --> 20:26.500
You send an enable user request, and you say your username to your command injection payload.

20:26.500 --> 20:30.560
That goes straight into a shell, and that's the easiest shell I've ever gotten throughout my whole career.

20:31.320 --> 20:32.380
And that's pretty much it.

20:32.380 --> 20:33.700
There's no authentication or anything.

20:33.700 --> 20:40.980
You send this individual request to any Drupal Access, I guess, Drupal, Drupal with Drupal Access, and you automatically get a shell.

20:42.320 --> 20:44.860
So let's talk about now the disclosure timeline.

20:46.500 --> 20:49.100
We sent everything to them on 07.06.

20:49.200 --> 20:52.160
In an email we said like, hey, we want to send you these vulnerabilities over.

20:52.200 --> 20:53.400
How do you want to receive them?

20:53.400 --> 20:54.580
Do you want us to encrypt them or not?

20:54.580 --> 20:56.240
Do you want us to PGP sign it?

20:56.240 --> 20:58.000
Ha, they didn't care.

20:58.000 --> 21:00.580
We send them back again to a security contact.

21:00.580 --> 21:02.160
Ha, they didn't care.

21:02.780 --> 21:09.020
We send the CVs over anyways, hopefully stirring something up for them to respond back to us.

21:09.040 --> 21:10.160
We got nothing.

21:10.760 --> 21:17.960
And then after I did a public release and a live demo of me exploiting this vulnerability, I'm also going to be doing this in other conferences.

21:17.960 --> 21:19.800
I'm going to be at BSides Puerto Rico in October.

21:19.800 --> 21:21.160
I'm going to be doing the same thing again.

21:21.160 --> 21:23.940
And the reason why is because they don't fix anything.

21:24.280 --> 21:27.800
So, send a DM to the Drobo CTO.

21:27.800 --> 21:28.780
Ian, what happened there?

21:28.780 --> 21:31.140
How do we DM the Drobo CTO?

21:31.940 --> 21:39.180
So, for that handy dandy protocol that they gave us, I decided to write a little Python utility that makes it very easy to run your own commands.

21:39.480 --> 21:41.480
And I accidentally got command injection.

21:42.740 --> 21:44.660
Just while writing a script.

21:44.860 --> 21:49.880
So, we kind of figured we should probably tell them about that because it's depressingly trivial.

21:49.880 --> 21:51.580
So I sent them a DM.

21:51.980 --> 21:58.920
Or I sent the CTO of the company that acquired Drobo a DM.

21:59.160 --> 22:00.260
We'll get to that.

22:01.360 --> 22:08.020
So then after that, we sent all the vulnerabilities that we found to Drobo and to CTO email.

22:08.020 --> 22:11.380
Or sent all the vulnerabilities that we found in Drobo to the CTO's email.

22:11.400 --> 22:12.340
We didn't hear back from him.

22:12.340 --> 22:14.000
I'm pretty sure he doesn't like us.

22:14.140 --> 22:17.440
Besides the point, Ian mentioned something interesting.

22:18.320 --> 22:22.400
While we were sending all this stuff over, something was happening in the background.

22:22.880 --> 22:24.300
Drobo was getting acquired.

22:25.140 --> 22:30.880
While Drobo was getting acquired, we found a bunch, we found nine unauthenticated shells, folks.

22:30.920 --> 22:31.880
Nine.

22:32.120 --> 22:33.760
That's embarrassing to me.

22:33.980 --> 22:34.420
Well, not for me.

22:34.420 --> 22:35.300
I found them.

22:35.340 --> 22:37.540
But they're like, this company is store centric.

22:37.540 --> 22:42.320
They were acquiring two companies, Drobo and Nexen, throughout that whole process.

22:42.640 --> 22:46.360
Now I'm here in red, which I'm hoping all of you can see.

22:46.360 --> 22:51.260
In August 21st, 2018, they released this on the Nexen website.

22:51.700 --> 22:53.520
Let's look at that timeline again.

22:53.520 --> 22:55.840
We submitted everything on 07-06.

22:56.520 --> 22:58.280
So that would be July?

22:59.120 --> 23:00.320
Yeah, July.

23:00.320 --> 23:01.080
He's shaking his head.

23:01.080 --> 23:01.860
July.

23:01.980 --> 23:06.940
And then after, on August 22nd, we send them all the CVEs.

23:06.940 --> 23:11.800
Throughout that whole process, they could have addressed these issues or just got them back to us.

23:12.180 --> 23:18.540
I'll be honest, they could have been just busy with their acquisition and not really in the mood to deal with nine unauthenticated shells.

23:19.080 --> 23:20.560
Sounds like their problem, not mine.

23:21.080 --> 23:24.160
But let's go to the summary of this issue.

23:24.520 --> 23:26.840
Having a proprietary protocol does not make you safe.

23:26.840 --> 23:34.200
Just because you're prescribing to the idea behind, like, if it's mine and nobody else knows about it, nobody can find any exploits, that's not true.

23:34.200 --> 23:36.020
There are many good reverse engineers out there.

23:36.020 --> 23:37.180
They will figure it out.

23:37.500 --> 23:40.560
It's a bad idea to authenticate with a thing that you're providing users.

23:41.000 --> 23:44.420
They probably shouldn't be authenticating users with a serial name or their serial number.

23:44.420 --> 23:46.840
I probably wouldn't be authenticating people with their name.

23:47.540 --> 23:49.800
And pay attention to your support tickets.

23:49.800 --> 23:53.620
We sent a couple support tickets in hope that they would address these issues.

23:53.620 --> 23:54.800
Never got addressed.

23:55.060 --> 24:00.740
And then last up, it's like, if you end up screwing up, like Ian said, it's probably just to own up to it.

24:00.740 --> 24:04.640
It's like, if somebody submitted these things, maybe it's time to address them.

24:04.700 --> 24:09.460
There was also something other, some other thing that happened that was interesting throughout this whole process.

24:09.840 --> 24:15.280
When I was sending them these emails, I got, or I guess we got, we got blacklisted.

24:15.280 --> 24:16.720
RPA just got blacklisted.

24:16.720 --> 24:18.920
Now, that makes no sense.

24:19.060 --> 24:24.120
Why would you blacklist somebody who's sending you an email and I'm hacking a device that I have in my house?

24:24.400 --> 24:25.360
Those things don't add up.

24:25.360 --> 24:27.260
Those are very separate things.

24:27.460 --> 24:30.960
But that was, whatever, I could have also, I give them the benefit of the doubt.

24:30.960 --> 24:37.760
I actually give all these companies, despite all the headaches, the benefit of the doubt, may have just been that we downloaded the firmware too many times.

24:38.040 --> 24:41.840
May have just been that, like, we're a security company and it looked like fishy traffic.

24:42.400 --> 24:45.800
It's all, I, they, I, I understand if those things happen.

24:45.800 --> 24:48.420
I don't understand not addressing the issues that we reported.

24:49.020 --> 24:55.360
So now, I'm passing it over to Ian for the Netgear R9000, which is the last device we're gonna be looking at today.

24:55.420 --> 24:56.920
And this one's really a doozy.

24:56.920 --> 24:57.760
Have fun, Ian.

24:59.460 --> 25:00.520
No idea.

25:00.520 --> 25:06.640
So, the R9000 holds a special place in my heart, for good reasons and bad reasons.

25:07.040 --> 25:08.000
We'll get to that.

25:08.100 --> 25:10.000
So it's a flagship router by Netgear.

25:10.080 --> 25:14.240
At the time that we did our research, I think it was like the most expensive one they offered.

25:14.260 --> 25:17.500
Something like $350 to $500.

25:17.980 --> 25:20.460
It's aimed at like power users, that sort of thing.

25:20.740 --> 25:26.720
It has a rich feature set with all sorts of fun applications you can run on your router because you need to run applications on your router.

25:27.280 --> 25:31.680
And it's administered via a web app, a mobile app, and Telnet if you cheat.

25:31.680 --> 25:32.820
Of course, I cheat.

25:33.600 --> 25:38.260
But it also has a bug bounty for vulnerability disclosure.

25:38.260 --> 25:40.960
And only a bug bounty for vulnerability disclosure.

25:41.020 --> 25:44.460
We'll get to how that kind of broke things in a minute.

25:45.080 --> 25:48.000
So, the web app, you know, it was kind of boring.

25:48.000 --> 25:49.320
It's what we've seen a lot.

25:49.320 --> 25:53.750
It's just basic authorization or like, yeah, basic authentication.

25:53.950 --> 25:55.470
No clear bypasses.

25:55.470 --> 25:57.730
It's a forum post, but it has C-serve protection.

25:57.890 --> 25:59.510
It's very crappy C-serve protection.

25:59.510 --> 26:01.570
So if you want to break that, you probably can.

26:01.570 --> 26:02.810
I highly recommend trying.

26:03.790 --> 26:05.630
So I started poking at other things.

26:05.830 --> 26:07.870
Like the mobile API.

26:07.870 --> 26:11.590
So it's a SOAP API, which, yeah, ew, it's not fun to work with those.

26:11.890 --> 26:13.170
But it's different.

26:13.170 --> 26:16.730
It has JWT-based authentication, which, eh, it's okay.

26:17.330 --> 26:21.050
But static analysis showed it was a total minefield of command injection.

26:21.050 --> 26:23.790
And command injection is one of my favorite things to do.

26:23.810 --> 26:25.970
So that instantly got me interested.

26:27.090 --> 26:32.010
But, sadly, the API is terribly broken and unreliable.

26:32.010 --> 26:35.430
And half of the endpoints just did not work at all.

26:35.790 --> 26:40.390
So it kind of ended up being an uphill battle to do anything with this API.

26:40.690 --> 26:43.790
But I still got off-bypassing friends, so we'll figure out how.

26:44.450 --> 26:45.310
Hey, Rick.

26:45.330 --> 26:48.930
Have you ever, like, seen people using the X-Forwarded Foreheader much?

26:48.930 --> 26:51.030
I've seen a lot of people use the X-Forwarded Foreheader.

26:51.030 --> 26:52.990
I've never seen somebody use it properly.

26:54.070 --> 26:58.650
So the X-Forwarded Foreheader, it's a de facto standard.

26:59.010 --> 27:03.910
So it's something that a lot of people have agreed on, that it does X thing.

27:03.970 --> 27:06.170
But it's not properly standardized.

27:06.510 --> 27:12.830
But it's usually used by load balancers to convey a client's actual IP address to some sort of upstream service.

27:13.810 --> 27:14.690
Usually.

27:15.350 --> 27:18.670
So it's also not as simple as a lot of people think it is.

27:18.730 --> 27:21.570
So the X-Forwarded Foreheader is actually a list of IP addresses.

27:21.650 --> 27:34.890
Normally we only see it as a single IP address, but it's designed so that when a load balancer or whatever that's working with this header receives a request, it should prepend the IP address that it received that header from to the beginning of the list.

27:35.510 --> 27:37.890
And also, it doesn't have to be an IP address.

27:37.890 --> 27:43.910
You can put whatever you like in this header and your load balancer is probably just going to stick an IP address on the front of it.

27:44.250 --> 27:47.330
So a lot of people don't seem to realize this.

27:47.330 --> 27:48.730
And it causes problems.

27:48.950 --> 27:53.590
Like what happens if they're just expecting an IP address and dumping that into a database?

27:53.890 --> 27:55.930
And I put a little semicolon boy in there.

27:56.310 --> 27:57.290
Breaks things.

27:58.130 --> 28:00.370
So how does this relate to our router?

28:00.810 --> 28:04.250
Well, our SOAP API interprets the X-Forwarded Foreheader.

28:04.390 --> 28:05.190
Why?

28:05.190 --> 28:07.050
I honestly have no idea.

28:07.050 --> 28:10.710
There's no reason that you should need the X-Forwarded Foreheader on your LAN.

28:10.790 --> 28:14.530
Again, you're not talking to your router on your LAN through a load balancer.

28:14.970 --> 28:16.450
That would be a hell of a router.

28:17.350 --> 28:24.790
But static analysis also showed that the R9000 is probably the only Netgear router or device that interprets the X-Forwarded Foreheader.

28:24.810 --> 28:33.510
I downloaded all the firmware that I could find, unpacked it, searched through it, and the R9000 was the only one with an instance of the X-Forwarded Foreheader.

28:33.570 --> 28:35.410
So that's also weird.

28:35.950 --> 28:37.950
But what can we do with it?

28:38.570 --> 28:40.190
Well, here's a problem.

28:40.530 --> 28:43.610
So HTTP requests are handled by a CGI server.

28:43.610 --> 28:45.430
And this is U-H-T-T-P-D.

28:45.510 --> 28:51.870
That CGI server sends those requests down to a downstream process.

28:51.910 --> 28:55.850
In this case, Net CGI is what handles all of our SOAP API requests.

28:56.310 --> 29:03.890
So U-H-T-T-P-D will take something in, take the request, turn all of the headers into environment variables, and then toss that down to a different process.

29:04.890 --> 29:10.190
So, Net CGI uses the remote address environment variable to determine if a request is local.

29:10.250 --> 29:16.130
And much like the Buffalo, it will whitelist itself so it can talk to itself without having to deal with authentication.

29:16.490 --> 29:21.250
Now normally, the remote address environment variable is what you would want to use for this.

29:21.250 --> 29:26.130
Because it will be the actual IP address that that request came from in normal circumstances.

29:26.350 --> 29:30.870
And even if you try to change it, chances are you're not going to be able to mess with it.

29:31.250 --> 29:37.570
However, U-H-T-T-P-D just replaces the remote address environment variable with the contents of the exported for header.

29:39.210 --> 29:40.510
For some reason.

29:40.990 --> 29:43.410
Like, I'm a complete RE scrub.

29:43.410 --> 29:45.450
I graph scrub and everything.

29:45.690 --> 29:49.010
But even looking at the assembly, I could tell that that's exactly what that did.

29:49.010 --> 29:51.570
Because it was like ten lines of assembly and that was it.

29:52.570 --> 29:55.030
So, yeah, that's not good.

29:55.030 --> 30:05.250
Because if we can say that we're whatever IP address we want and it uses an IP address to determine if you should bypass authentication, why can't we bypass authentication?

30:05.810 --> 30:07.310
Well, we can.

30:07.630 --> 30:15.610
We just set exported for colon 192.168.1.1 and suddenly we're an admin on the SOAP API.

30:15.670 --> 30:17.370
And we can do whatever we like.

30:17.870 --> 30:22.170
So thus, CVE 2019.12.51.0 was born.

30:23.230 --> 30:25.710
So, I wasn't thinking satisfied.

30:26.290 --> 30:30.210
Because, you know, off bypass isn't fun if you don't get a shell, right?

30:30.790 --> 30:32.010
So, I got a shell .

30:32.110 --> 30:35.690
CVE 2019.12.51.1.

30:36.750 --> 30:37.910
It's kind of big.

30:38.130 --> 30:44.470
So, I don't think we're going to focus on this shell because it's got a lot of fun challenges.

30:44.470 --> 30:46.070
Like, it can only be 17 characters.

30:46.070 --> 30:48.230
It has to be all capitalized , all capitals.

30:48.230 --> 30:49.250
It has to have a colon.

30:49.250 --> 30:53.150
It has to have a single quote and then a semicolon and you have to comment out everything.

30:53.830 --> 30:56.710
But if you want to talk about that, talk to us later.

30:56.830 --> 30:57.970
Because we don't have time.

30:58.130 --> 31:04.490
Before we get away from this one, the interesting part was Ian found the range header, which is definitely an unexpected header.

31:04.490 --> 31:07.890
So, we're able to use the range header to say, like, all right, cool.

31:07.890 --> 31:15.310
Let's put the whole thing that we need in that header and then we'll reference that header in the XML body of that SOAP request.

31:15.430 --> 31:18.590
And I guess we were just lucky that all those things happened to jive together.

31:19.830 --> 31:20.650
Yep.

31:20.650 --> 31:27.150
When you're poking at CGI and you're trying to get weird command injection payloads through, the environment variables are very much your friend.

31:27.910 --> 31:30.070
But I wasn't quite done yet.

31:30.130 --> 31:32.990
Because Netgear has a very fun clause in their bug bounty.

31:33.050 --> 31:40.270
If you can get remote unauthorized access to administer a Netgear device via the internet, not LAN, they'll give you 15 grand.

31:40.430 --> 31:42.170
I can buy a lot of ice cream with 15 grand.

31:42.170 --> 31:46.230
So, I started looking into that.

31:46.690 --> 31:49.570
So, the SOAP API requires extra headers.

31:49.830 --> 31:52.650
Like, for the SOAP requests and all that good stuff.

31:52.650 --> 32:01.250
So, XHR can set these, but it's cross-origin, so it'll have to preflight the requests and chances are the router's just going to slap that right out of the air.

32:01.450 --> 32:03.370
So, CSURF isn't going to happen.

32:03.790 --> 32:09.290
So, the device isn't exposed to any, it doesn't expose itself over the LAN at all.

32:09.290 --> 32:11.650
So, I was kind of out of luck at this point.

32:11.770 --> 32:13.750
So, I just kind of decided, well, I guess I'll die.

32:13.750 --> 32:15.230
I guess I'm not getting the 15K.

32:15.570 --> 32:16.970
Until two weeks later.

32:17.130 --> 32:20.850
And I was taking a shower and my brain started just shouting DNS rebinding.

32:21.570 --> 32:24.490
And say, two minutes later, I figured out why.

32:24.890 --> 32:31.430
The thing with DNS rebinding is that it functions a lot like CSURF, except it's seen as being the same origin.

32:31.470 --> 32:37.230
So, you can send whatever request you like without having to deal with these preflighting annoyances.

32:38.110 --> 32:39.650
So, yeah, no more preflighting.

32:39.650 --> 32:43.610
However, it differs from CSURF in that we cannot send authentication.

32:44.350 --> 32:48.550
In our case, well, DEX 4.4 is a de facto standard.

32:48.610 --> 32:51.810
So, can we just set that header and make ourself an admin?

32:52.230 --> 32:53.530
Well, yes.

32:53.850 --> 32:55.130
So, that's what I did.

32:55.870 --> 32:57.350
So, it's not a restricted header.

32:57.350 --> 32:58.670
So, let's just build a payload.

32:59.090 --> 33:00.870
So, this is the workflow that I went with.

33:01.470 --> 33:03.210
The victim is anyone on the LAN.

33:03.210 --> 33:05.630
They can be authenticated, unauthenticated , does not matter.

33:05.630 --> 33:07.770
Mobile devices, does not matter.

33:08.230 --> 33:10.610
They just wait for the DNS TTL to wear out.

33:10.830 --> 33:17.170
And then once it does, I start issuing post requests via XHR with our off-bypass header to do the following.

33:17.230 --> 33:18.570
We start a config change.

33:18.750 --> 33:19.890
We enable QOS.

33:19.970 --> 33:21.450
We enable advanced QOS.

33:21.610 --> 33:24.430
Then we finish the config change and we pop a shell.

33:24.450 --> 33:29.050
So, we have to fire off five requests to enable a bunch of services and do configs and stuff.

33:29.250 --> 33:32.530
But it actually only takes like 20 seconds to do all of that and then get a shell.

33:33.190 --> 33:37.050
So, just threw that into, I guess, a shell and then it was off to the races.

33:37.650 --> 33:40.470
So, we started disclosure.

33:41.850 --> 33:43.650
So, we got the 15K bounty.

33:43.650 --> 33:44.510
Didn't we, Rick?

33:48.230 --> 33:48.950
Right?

33:49.250 --> 33:53.070
Although I appreciate the applause, something we didn't get the bounty.

33:53.230 --> 33:54.170
What was that, Ian?

33:55.550 --> 34:00.750
So, you know how our disclosure timelines have been pretty small up until now and we tabbed through them all?

34:01.110 --> 34:03.150
This is half of our disclosure timeline.

34:03.550 --> 34:05.430
We just put the important bits in here.

34:06.430 --> 34:09.750
So, let's go through some of the more important ones.

34:10.330 --> 34:19.090
On 10.03, or 18.10.03, we submitted all of our vulnerabilities through bug crowd because that was the only disclosure avenue that we had.

34:19.570 --> 34:25.330
So, we got an award for crosshead scripting via the X-Ordered Foreheader, a completely different issue that was rather low severity.

34:25.330 --> 34:26.530
So, that was nice.

34:26.670 --> 34:40.130
But we didn't hear anything else for two months until Netgear stated that they can't reproduce the command injection issue and they had, in the meantime, released new firmware and asked us to test again and record the proof of concept so they could figure out what they were doing.

34:41.850 --> 34:43.230
So, we did that.

34:43.230 --> 34:48.490
We verified that, yes, I can still get root remotely and I gave them a nice video.

34:48.710 --> 34:52.970
So, they marked the command injection exploit as triaged, which was nice.

34:53.350 --> 34:56.250
That was a little over two months after the initial release.

34:56.770 --> 35:03.630
And then about a month after that, they released the firmware 1.0.4.26.

35:03.930 --> 35:05.270
They didn't tell us about that.

35:05.270 --> 35:06.430
They just released it.

35:07.430 --> 35:15.230
And then about a month after that, or half a month or so, I got a hunch that, you know, I think they fixed everything without telling us or giving us rewards.

35:15.710 --> 35:17.010
So, I checked.

35:17.690 --> 35:19.290
And they had.

35:19.750 --> 35:21.330
So, we confronted them.

35:21.650 --> 35:25.410
And they marked everything as unresolved and gave us degraded rewards.

35:25.690 --> 35:29.330
Like, you know that command injection and off bypass that lets you do admin and everything?

35:29.490 --> 35:31.110
Totally not critical.

35:32.270 --> 35:33.210
Totally.

35:33.990 --> 35:35.450
So, whatever.

35:35.450 --> 35:36.110
That's fine.

35:36.110 --> 35:37.550
We just wanted to disclose the issues.

35:37.550 --> 35:40.170
We're not actually going for the money, although it would be nice.

35:40.390 --> 35:42.290
So, we asked for CVEs.

35:42.290 --> 35:47.670
Because Netgear is a, or it was, a CVE numbering authority.

35:47.670 --> 35:50.230
So, they should be giving us CVEs for their products.

35:50.430 --> 35:52.370
And they just didn't respond.

35:52.510 --> 35:55.410
And then something like a month later, we asked for CVEs again.

35:55.410 --> 35:57.510
And they said, we're not doing CVEs anymore.

35:58.730 --> 36:00.230
Okay, then why are you with CNA?

36:00.490 --> 36:02.830
So, we contact MITRE to get CVEs.

36:02.830 --> 36:07.070
And they say, we'll give you CVEs once we know that Netgear is not a CNA.

36:07.590 --> 36:10.990
Two months later, almost like, what, half a year over?

36:10.990 --> 36:15.330
Eight months since we started the disclosure timeline, we got our CVEs from MITRE .

36:16.030 --> 36:20.450
And unsurprisingly, Netgear was no longer on the list of CNAs.

36:22.050 --> 36:23.270
So, that was fun.

36:23.270 --> 36:24.650
Anything to add, Rick?

36:25.170 --> 36:26.670
Well, I got plenty to add.

36:26.670 --> 36:38.370
So, one of the things that I guess was really problematic about all this was that when we reported all these vulnerabilities through BugCrowd to Netgear, all that time went by and they were just not fixing the issues.

36:38.370 --> 36:41.110
They weren't admiring that we had sent them the issues over.

36:41.170 --> 36:45.010
I can't, I blame both Netgear and BugCrowd for this situation.

36:45.170 --> 36:49.130
Because we had responsibly disclosed all these vulnerabilities through them.

36:49.130 --> 36:58.930
And this was the first time ever, I think both of us have ever seen BugCrowd put a blocker, not on the researcher, but on the company for not addressing the issues that we had sent over.

36:59.350 --> 37:07.030
Netgear had also put us in a position that we thought that, alright, cool, we could have easily sent them these issues separately and they could have been addressed.

37:07.110 --> 37:20.410
And the DNS rebinding was just kind of a nice feature that we knew or, I guess, a nice way to chain all the things together to get unauthenticated command injection on this device with, I guess, 20 seconds of user interaction.

37:20.490 --> 37:35.150
The thing about it is that we, I feel, I can't help but feel that I ended up being lied to as a researcher, especially from the fact that we met all the requirements of their program and we didn't get what they promised that they were going to give us.

37:35.390 --> 37:36.370
That's beside the points.

37:36.370 --> 37:38.550
I guess it's kind of water under the bridge at this point.

37:38.670 --> 37:39.610
Ian, the summary?

37:40.930 --> 37:47.350
So, in general, like, I highly recommend if you're doing anything with web applications, use the X-Forwarded Foreheader.

37:47.350 --> 37:49.730
It is a very fun header to mess with.

37:49.730 --> 37:58.090
You can get command injection, SQL injection, a lot of SQL injection, tainting logs, all sorts of good stuff like that.

37:58.570 --> 38:01.510
And CMDI, like, yeah, it'll find a way.

38:01.510 --> 38:07.110
Even if it's, you know, 17 characters and mangled to all hell, you're still going to get command injection.

38:07.110 --> 38:08.850
You just have to try hard enough.

38:09.530 --> 38:12.250
So, again, environment variables are your friend.

38:12.390 --> 38:14.490
DNS rebinding is remarkably powerful.

38:14.490 --> 38:30.350
This was the first time that I had used it and it kind of blew my mind because suddenly all of these attacks that require, you know, authentication tokens or require bypassing CSRF protection become extremely easy to do as long as you don't have to worry about authentication.

38:31.230 --> 38:33.950
And, like, yeah, if you have a bug bounty, please communicate with us.

38:33.950 --> 38:36.970
Don't just leave us sitting there for two months, five times.

38:37.450 --> 38:40.270
And if you stop providing service, communicate.

38:40.270 --> 38:43.350
You can, like, say, hey, we're not a CNA anymore.

38:43.610 --> 38:45.390
And also, like, communicate in general.

38:45.390 --> 38:46.250
It's nice.

38:46.910 --> 38:58.490
And for bug bounties, we found out a few times now that bug bounty programs, like, the companies don't have much of an incentive to treat researchers fairly.

38:58.490 --> 39:02.790
They can just say, no, and you can't really do much.

39:02.790 --> 39:07.430
There's no incentive for them to not really do that aside from just people getting angry.

39:08.690 --> 39:12.310
And bug bounties probably shouldn't replace your security contacts.

39:12.370 --> 39:15.230
We would not have gone through the bug bounty if we didn't have to.

39:15.830 --> 39:17.970
But that was their only security contact.

39:17.970 --> 39:19.990
That was the only way that we had.

39:20.830 --> 39:23.450
So, that's just how it ended.

39:24.310 --> 39:26.270
I guess, anything to add, Rick?

39:26.990 --> 39:27.990
No, that's kind of it.

39:27.990 --> 39:32.250
I know we're definitely over time, so we're just going to run through these conclusions and answer some questions at the end.

39:32.510 --> 39:39.150
For the quick conclusions, these were the things that were different from when we conducted our research project in 2013.

39:39.150 --> 39:43.630
In 2013, most of the shells that we ended up getting were through CSRF.

39:43.790 --> 39:56.070
We found out now, I think it's more that our security research in general has gotten to a spot where it's more, it's easier to get a hand of different ways to bypass checks, especially authentication checks.

39:56.070 --> 39:58.350
So, in this case, we didn't need to use CSRF for any of these.

39:58.350 --> 40:00.890
We just used a lot of authentication bypasses.

40:01.370 --> 40:09.970
One of the things that was nice now that we didn't see in 2013 is that, in 2013, a lot of the devices had executable stacks.

40:10.190 --> 40:16.030
We found, I think, two buffer workflows in one of the ASUS routers that we hacked.

40:16.130 --> 40:21.910
Those did not have an executable stack, so we had to do ROP and a bunch of other really fancy stuff to eventually get a shell.

40:22.310 --> 40:27.870
That was not the case in 2013 , where just pretty much it was the bottom of the barrel with regards to security.

40:28.570 --> 40:32.190
And software packages were really out of date in 2013.

40:32.190 --> 40:33.390
They're really not that much anymore.

40:33.390 --> 40:41.190
One of the bugs that we found a lot in that study was that SMB was horribly out of date, so you could do symlink traversal.

40:41.270 --> 40:43.270
That's really not the case anymore for a lot of these.

40:43.370 --> 40:44.890
It's much more up to date.

40:45.150 --> 40:52.210
And I guess nicer from both the security's perspective, because you get to try to find new, interesting security vulnerabilities instead of these old ones.

40:52.590 --> 40:59.110
And before we didn't see any publicly documented security contacts, a lot of the times we were just emailing people that we found on LinkedIn.

40:59.410 --> 41:05.630
Now we did see some manufacturers, for example, Asus, TerraMaster, Synology, QNAP.

41:05.690 --> 41:12.290
A lot of these companies actually tried their best to ensure that the vulnerabilities that we were disclosing were getting addressed.

41:12.790 --> 41:20.770
And publicly documented disclosure outlets, the two that I mentioned that I think were the ones that made me the happiest were QNAP and Synology.

41:21.870 --> 41:25.290
QNAP and Synology were very good about all the issues that were reported to them.

41:25.290 --> 41:32.390
As soon as we reported to them, they responded within a day or two and they addressed the issues and they had us check to make sure that everything was good.

41:33.330 --> 41:34.930
Let's find out what stayed the same.

41:35.570 --> 41:41.850
Devices that are still remotely exploitable, given the 125 CVEs that we found, I think that's pretty easy to understand.

41:42.450 --> 41:50.090
There's still plenty of CSERF, like I said in the previous slide, before we were using that for the exploit chain for a lot of the stuff.

41:50.230 --> 41:54.790
Now we don't need to use it as much because we found out about a lot of authentication bypasses.

41:55.090 --> 41:57.210
OS command injection is still a problem.

41:57.210 --> 42:01.030
That's probably one of the vulnerabilities that we focused on this time around.

42:01.570 --> 42:03.750
And security through obscurity is still alive and well.

42:03.750 --> 42:15.590
We looked at a lot of manufacturers that the way that they would do stuff, it's like they would try to do their own type of encryption or their own type of file hosting so that it would become kind of problematic but it wasn't in the end.

42:15.590 --> 42:23.630
And here's some of the stuff that stayed the same for, or I guess like what changed, but stayed the same in manufacturers.

42:23.990 --> 42:25.690
Some manufacturers actually really care.

42:25.810 --> 42:33.050
I've been talking about Synology and QNAP a lot, not because I know anybody there, but it's because I was really happy with the disclosure process.

42:33.850 --> 42:36.650
Oh yeah, Xiaomi was another one that was very good.

42:36.650 --> 42:38.430
I think that's how you say it, right?

42:39.590 --> 42:43.150
Xiaomi did a very good job of addressing the issues that we disclosed.

42:43.170 --> 42:45.410
They have an interesting bug bounty program.

42:45.550 --> 42:52.550
They paid us in toys, never had that happen before, even as a child.

42:52.750 --> 42:55.570
And a lot of the companies have bug bounty programs.

42:55.690 --> 43:05.870
Needless to say, I'm not very happy with companies like Netgear who were partnering with Bug Crowd and they ended up in this situation where we feel cheated, but a lot of other companies did actually pay out their bug bounties and I'm happy for that.

43:06.470 --> 43:11.190
And some companies are really interested in working with researchers to get things addressed.

43:11.450 --> 43:14.390
A lot of the stuff that we reported, they were very much happy.

43:14.650 --> 43:16.450
They wanted to know, how did you guys find it?

43:16.450 --> 43:17.370
What did you do?

43:17.370 --> 43:18.830
Do you think that we have more instances?

43:18.830 --> 43:19.590
Can you check?

43:19.590 --> 43:21.050
Also, it's free work, so why not?

43:21.070 --> 43:25.950
But it's a really nice situation where they care about the security and they're trying their best to improve it.

43:26.850 --> 43:28.270
And that's kind of it, folks.

43:28.690 --> 43:31.830
These are me and Ian's Twitters.

43:32.230 --> 43:34.510
And we also love talking shop.

43:34.510 --> 43:38.570
We're going to be at the Village for the rest of the day until Sunday we'll be here.

43:38.850 --> 43:42.670
We'll leave eventually, but this was a very good experience.

43:42.710 --> 43:46.550
And this was the results of our three of the best results from our research project.

43:46.550 --> 43:49.190
There are two other people that weren't able to present with us today.

43:49.190 --> 43:50.850
That's Josh Meyer and Sean Marani.

43:50.970 --> 43:54.650
Those guys found a lot of other vulnerabilities and it was great to work with them.

43:54.650 --> 43:59.870
Thanks for your time and I'll open the floor up to questions if any of you have anything to say or ask.

