Hi, folks. My name is Rik Ramgadi, and I originally had submitted a talk called Shining a Light on a Black Box. 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. So like I said, my name is Rik Ramgadi. I'm the one on the right here. 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. I like to read a lot, and I'm always confused. Then we also have Ian Sinderman. Well, that would be me. I'm a security analyst at ISE as well. I may have been a low-key carny as a child. I also like to hack things, web apps, IOT garbage, some hardware, tech obscura, that sort of stuff. I always like to try and learn new things. I always like to teach them as well, whether that works. Maybe not. But I'm also always confused, like Rik. I really like that one. I guess it's an easy one to like. It's very realistic. So the things, here's the agenda. This talk is about our research project that we concluded in 2018. During our research project, we hacked a bunch of embedded devices, 13, we had 13 targets. 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. 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. And throughout the whole presentation, we're going to cover three devices, the Buffalo Terror Station, the Drobo 5N2, and the Netgear R9000. These are all devices that we bought, I think, early last year, so I would say March-ish. And then we hacked in between then, and we ended everything in about October, November. But, as we'll find out throughout the presentation, just because we concluded testing does not mean that our job was over. With the Buffalo Terror Station, we're going to be looking at how sometimes developers may be confused with how some functionality may work. We're going to be looking at a couple interesting HTTP headers. 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. And it's all very humorous, yet concerning. Then we have the Drobo 5N2. We're going to be talking about how we reverse engineered the protocol, which is what this talk was originally about. 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. 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. And then after, a tale of bug bounties and bug bounty companies that we ended up in. 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. So without further ado, I'll kick it off with the first one. The Buffalo Terrace Station. This is one of the devices that's actually in the CTF right now. And after you figure out how easy this is, you'll score some easy points. The Terrace Station, with this very easy name, is a Soho enterprise business grade NAS. And it runs between $2,000 to $4,000. It's made in Japan. And it has an administrative web application. And I'll pass it over now to Ian to explain everything else. Okay. So this web app has, it has this wonderful JSON API. So one thing that I really dislike about JSON, at least in the context of, I guess, everything, is application JSON. 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. But further, we see that there is a authentication cookie, so they're probably using cookies for some of this. But there's also an authentication, like, value within the post body. 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. However, we decided to kind of change that. So first thing we did is, you know, find the source code for this, or at least the code for the web app. In this case, we found that they were all precompiled Python binaries, which kind of sucks. Like, it's Python, you should be able to read it nice and easy, but this is not super readable. However, you just use uncompile 6 and then it's just ready to go in a matter of, like, one or two minutes. So that was nice. 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. And then we see some rather concerning stuff here. Like skip off. Yes, please, I'd very much like to do that. How do I do this? What do you guys think skip off does? So somebody thinks it's a security mechanism. We'll talk later. Let's figure out where this is going now. So the next thing I did after seeing this was just see where else is skip off referenced, like, within this file. So I just do a search and then we find this chunk of code. 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. I can kind of see why someone would implement this, so let's talk about that. So let's say that we have an API that it needs to talk to itself. 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. So I'm pretty sure that's what they were trying to do. 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. You know, good to go, job done. 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. So that's not good. So the host header is usually local host and a local request, and it's rarely local host and a client request. So the host header being local host just means it's a request with a weird host header. 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. 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. You're not going through a load balancer to talk to your NAS. If you are, like, that's a hell of a NAS. So since there's no load balancer and since we're talking to it directly, what can we do? Well, let's find out. So we have a base request here. We have a junk SID, and it responds with, hey, this is an invalid session ID. That makes sense. So what if we set our host header to local host? And we still have a junk SID, and we still get an error, but it's a slightly different error. It's still invalid, but it's invalid params. And it's saying that, you know, the reboot function doesn't take any arguments, but we did give it one. As far as I can tell, the only argument that we may have given it was the SID parameter. So what if we just delete it? 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. That's probably not good. So I just got a shell. And now I can get a root shell without authentication. Also probably not good. Yeah, so I guess if, for those of you keeping track, the authentication is the host header kind of. 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. We were able to access all the functionality in the NAS, also the ability to make the device beep. And that was really interesting as well. So we brought this device to another CTF. I think no one's figured it out here so far. There's actually a request to make the device play music. And that's one of the most annoying things that we found out. So remotely we're able to play music in other people's houses. And on top of the fact that we're able to get a shell, which I'm not sure which one's more concerning. 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. So then it became, hey, we can play music. This is fun. This shell's boring. So yeah, how about that tweet and delete? So we decided to disclose. As normal, we disclosed all of the issues that we found to the manufacturer. Gave them at least a month or two to fix them before doing public disclosure. In this case, you know, we sent an email to their security contact on 0622 and heard nothing. So we sent another on 0702 and heard nothing. So then we sent the Volns to the security contact on 07, on the next day, and we heard nothing. So we sent the CVEs on 0822 and we heard nothing. So we announced our public release because it had been many months and we tried our best. And then two days later, we did our public release with a demo live stream showing off the exploits and how to do this. And then something happened the next day that none of us were anticipating. An official Buffalo Twitter account retweeted the link to our live stream. What did that link contain? That link contained a very nice URL to our live stream on YouTube about how to hack all Buffalo devices. What happened to that tweet Ian? Well, at some point, they must have realized that something was terribly wrong because they deleted it. However, we do have a screenshot, so that's nice. So we're not crazy. This actually did happen. Hopefully your folks in the back can see it. You're laughing, so you can see it in the back and hopefully you're enjoying it as much as we did. So what ended up happening with the device in the end? Did we get patches? Well, we'll find out. So clearly they realized that something was wrong. So at least someone at that company is aware that there's a lot of vulnerabilities that should be fixed. So clearly, as far as patchability goes, there are patches. There are no patches. It's been like a year, I think. 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. How much were those devices again? The devices, I think some of them were upped into 20K, something like that. Like professional grade network attached storage for businesses. 20K for your own, I guess, C2C server in the end, pretty much. But yeah, I guess in summary, the host header is client controlled. 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. And if you have a security address, please pay attention to it. We're trying to help you. And if you screw up, oh no. Clearly whoever had deleted that tweet knew that something was wrong, but they didn't own up to it. Or if they did, someone didn't listen to them. And all of these devices are still vulnerable, including the one in the CTF. Like it's running the newest firmware. And you can go over and get a shell in it if you like. Oh, you want to talk about Maryland Democratic Party real quick? 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. So after all of this, we found out that the Maryland Democratic Party had a Buffalo NAS on the internet with no password. And while we were doing all this research, another research company found it and contacted them and then like did a release about it. Apparently like every nation state and their grandmother was in this NAS pulling off all their data. But the Maryland Democratic Party did take care of it. They put a password on it. So it was still on the internet, but they put a password on it. And then we released this. So I guess, I'm pretty sure every nation state and their grandmother can Google. So sorry Maryland Democratic Party, we tried. Just to be clear on that one, we didn't hack them at all. That never happened. Let's make sure, I don't want to hear about that later on from anybody. 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. It's like you can have the like up-to-date firmware. You can have a good password. It's like if there are authentication bypasses, it's like false sense of security that you're leading yourself into. Don't get me wrong, it's important to have good passwords and important to keep your stuff up to date. 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. Talking about lying to yourself is our next device, the Drobo 5N2. 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. This one's made in the great... I'd say a lot more vulnerable. This one's probably way more vulnerable. I'll tell you guys how many unauthenticated shells we got on this thing at the end of this. But this one's made in America. The reason why we wanted to do research into this device was because you can't manage it through a web app by default. Almost all these devices, you hook it up, there's a web app, you connect to it. The Drobo, the only way that you can connect to it by default is by installing this thing called a Drobo dashboard. 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. And the other reason why is because it's pretty robust and it's also like a pretty fair price point, I guess. 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. So we installed it, and this is what the Drobo dashboard looks like. I think this was the macOS version. You install it, and then it gives you other information about the device, like the serial number. 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. I'm not sure how it does that. And you can also install other apps and remotely access the device through other means as well. 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. It's like, oh, they probably have certificate pinning, they probably encrypted everything with TLS. Ha! It was just plain text. 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. But, so it's like, this customer proprietary API was just XML. 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. Well, we still need to reverse engineer the protocol here. 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? 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. 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. So, maybe we can just send this and figure out if it just gives us a message back. Maybe there's no authentication. We sent it, we didn't get anything back. It just froze. We needed to figure out why at that point. So, we need to do some more protocol reverse engineering and see where that goes. 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. It's like, cool, well, I can probably just connect to the device on port 5000. If you connect to the device on port 5000, it spits out all this XML, and that's really interesting. Notice there's no trickery there, no authentication, I'm not sending anything, connect to the device on port 5000, and that's it. 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. Well, let's try that out. If we send that and we echo this information, pipe it into Netcat, maybe there's no authentication. It's like, well, that's not working either. Maybe there's something else. 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. 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. 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. And we found out that there is authentication. When the Drobo dashboard starts, so the application that connects to your device, it sends this message. And this message is only, it only happens once at the beginning. Kind of sounds like what happens when you log into an application, right? 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. So, we needed to reverse engineer the front part here. So, you can see that the DRAINATM part is still the same. There's a bunch of dots and a number there. 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. So, we started looking into what it is that this number meant. The first part, the DRAINATM part, was just those hex characters. 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. And now that we know all that information, there's something else here that we still need to figure out. What's that? 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. But, we found out that when we connect to the device on port 5000, it gives us back that number. That here, folks, is the serial number. So, it looks like the thing that you need to authenticate to the device is its serial number. It's like, oh, this is complex enough, serial numbers are pretty long, but you can just do the following. 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. We found out that you can install pretty much anything. 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. And then after, we found out that Drupal also provides this thing called Drupal Access. It's a web application that they provide so that you can connect to the device through something that's not the Drupal dashboard. And we were still wondering, well, we don't really have a shell yet. How are we going to do this? 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. Here's the device's IP address, 192.168.1.26. It's on port 8080. It listens on Drupal Access. You send an enable user request, and you say your username to your command injection payload. That goes straight into a shell, and that's the easiest shell I've ever gotten throughout my whole career. And that's pretty much it. There's no authentication or anything. You send this individual request to any Drupal Access, I guess, Drupal, Drupal with Drupal Access, and you automatically get a shell. So let's talk about now the disclosure timeline. We sent everything to them on 07.06. In an email we said like, hey, we want to send you these vulnerabilities over. How do you want to receive them? Do you want us to encrypt them or not? Do you want us to PGP sign it? Ha, they didn't care. We send them back again to a security contact. Ha, they didn't care. We send the CVs over anyways, hopefully stirring something up for them to respond back to us. We got nothing. 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. I'm going to be at BSides Puerto Rico in October. I'm going to be doing the same thing again. And the reason why is because they don't fix anything. So, send a DM to the Drobo CTO. Ian, what happened there? How do we DM the Drobo CTO? 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. And I accidentally got command injection. Just while writing a script. So, we kind of figured we should probably tell them about that because it's depressingly trivial. So I sent them a DM. Or I sent the CTO of the company that acquired Drobo a DM. We'll get to that. So then after that, we sent all the vulnerabilities that we found to Drobo and to CTO email. Or sent all the vulnerabilities that we found in Drobo to the CTO's email. We didn't hear back from him. I'm pretty sure he doesn't like us. Besides the point, Ian mentioned something interesting. While we were sending all this stuff over, something was happening in the background. Drobo was getting acquired. While Drobo was getting acquired, we found a bunch, we found nine unauthenticated shells, folks. Nine. That's embarrassing to me. Well, not for me. I found them. But they're like, this company is store centric. They were acquiring two companies, Drobo and Nexen, throughout that whole process. Now I'm here in red, which I'm hoping all of you can see. In August 21st, 2018, they released this on the Nexen website. Let's look at that timeline again. We submitted everything on 07-06. So that would be July? Yeah, July. He's shaking his head. July. And then after, on August 22nd, we send them all the CVEs. Throughout that whole process, they could have addressed these issues or just got them back to us. 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. Sounds like their problem, not mine. But let's go to the summary of this issue. Having a proprietary protocol does not make you safe. 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. There are many good reverse engineers out there. They will figure it out. It's a bad idea to authenticate with a thing that you're providing users. They probably shouldn't be authenticating users with a serial name or their serial number. I probably wouldn't be authenticating people with their name. And pay attention to your support tickets. We sent a couple support tickets in hope that they would address these issues. Never got addressed. 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. It's like, if somebody submitted these things, maybe it's time to address them. There was also something other, some other thing that happened that was interesting throughout this whole process. When I was sending them these emails, I got, or I guess we got, we got blacklisted. RPA just got blacklisted. Now, that makes no sense. Why would you blacklist somebody who's sending you an email and I'm hacking a device that I have in my house? Those things don't add up. Those are very separate things. But that was, whatever, I could have also, I give them the benefit of the doubt. 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. May have just been that, like, we're a security company and it looked like fishy traffic. It's all, I, they, I, I understand if those things happen. I don't understand not addressing the issues that we reported. 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. And this one's really a doozy. Have fun, Ian. No idea. So, the R9000 holds a special place in my heart, for good reasons and bad reasons. We'll get to that. So it's a flagship router by Netgear. At the time that we did our research, I think it was like the most expensive one they offered. Something like $350 to $500. It's aimed at like power users, that sort of thing. 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. And it's administered via a web app, a mobile app, and Telnet if you cheat. Of course, I cheat. But it also has a bug bounty for vulnerability disclosure. And only a bug bounty for vulnerability disclosure. We'll get to how that kind of broke things in a minute. So, the web app, you know, it was kind of boring. It's what we've seen a lot. It's just basic authorization or like, yeah, basic authentication. No clear bypasses. It's a forum post, but it has C-serve protection. It's very crappy C-serve protection. So if you want to break that, you probably can. I highly recommend trying. So I started poking at other things. Like the mobile API. So it's a SOAP API, which, yeah, ew, it's not fun to work with those. But it's different. It has JWT-based authentication, which, eh, it's okay. But static analysis showed it was a total minefield of command injection. And command injection is one of my favorite things to do. So that instantly got me interested. But, sadly, the API is terribly broken and unreliable. And half of the endpoints just did not work at all. So it kind of ended up being an uphill battle to do anything with this API. But I still got off-bypassing friends, so we'll figure out how. Hey, Rick. Have you ever, like, seen people using the X-Forwarded Foreheader much? I've seen a lot of people use the X-Forwarded Foreheader. I've never seen somebody use it properly. So the X-Forwarded Foreheader, it's a de facto standard. So it's something that a lot of people have agreed on, that it does X thing. But it's not properly standardized. But it's usually used by load balancers to convey a client's actual IP address to some sort of upstream service. Usually. So it's also not as simple as a lot of people think it is. So the X-Forwarded Foreheader is actually a list of IP addresses. 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. And also, it doesn't have to be an IP address. 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. So a lot of people don't seem to realize this. And it causes problems. Like what happens if they're just expecting an IP address and dumping that into a database? And I put a little semicolon boy in there. Breaks things. So how does this relate to our router? Well, our SOAP API interprets the X-Forwarded Foreheader. Why? I honestly have no idea. There's no reason that you should need the X-Forwarded Foreheader on your LAN. Again, you're not talking to your router on your LAN through a load balancer. That would be a hell of a router. But static analysis also showed that the R9000 is probably the only Netgear router or device that interprets the X-Forwarded Foreheader. 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. So that's also weird. But what can we do with it? Well, here's a problem. So HTTP requests are handled by a CGI server. And this is U-H-T-T-P-D. That CGI server sends those requests down to a downstream process. In this case, Net CGI is what handles all of our SOAP API requests. 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. So, Net CGI uses the remote address environment variable to determine if a request is local. And much like the Buffalo, it will whitelist itself so it can talk to itself without having to deal with authentication. Now normally, the remote address environment variable is what you would want to use for this. Because it will be the actual IP address that that request came from in normal circumstances. And even if you try to change it, chances are you're not going to be able to mess with it. However, U-H-T-T-P-D just replaces the remote address environment variable with the contents of the exported for header. For some reason. Like, I'm a complete RE scrub. I graph scrub and everything. But even looking at the assembly, I could tell that that's exactly what that did. Because it was like ten lines of assembly and that was it. So, yeah, that's not good. 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? Well, we can. We just set exported for colon 192.168.1.1 and suddenly we're an admin on the SOAP API. And we can do whatever we like. So thus, CVE 2019.12.51.0 was born. So, I wasn't thinking satisfied. Because, you know, off bypass isn't fun if you don't get a shell, right? So, I got a shell. CVE 2019.12.51.1. It's kind of big. So, I don't think we're going to focus on this shell because it's got a lot of fun challenges. Like, it can only be 17 characters. It has to be all capitalized, all capitals. It has to have a colon. It has to have a single quote and then a semicolon and you have to comment out everything. But if you want to talk about that, talk to us later. Because we don't have time. Before we get away from this one, the interesting part was Ian found the range header, which is definitely an unexpected header. So, we're able to use the range header to say, like, all right, cool. 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. And I guess we were just lucky that all those things happened to jive together. Yep. 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. But I wasn't quite done yet. Because Netgear has a very fun clause in their bug bounty. If you can get remote unauthorized access to administer a Netgear device via the internet, not LAN, they'll give you 15 grand. I can buy a lot of ice cream with 15 grand. So, I started looking into that. So, the SOAP API requires extra headers. Like, for the SOAP requests and all that good stuff. 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. So, CSURF isn't going to happen. So, the device isn't exposed to any, it doesn't expose itself over the LAN at all. So, I was kind of out of luck at this point. So, I just kind of decided, well, I guess I'll die. I guess I'm not getting the 15K. Until two weeks later. And I was taking a shower and my brain started just shouting DNS rebinding. And say, two minutes later, I figured out why. The thing with DNS rebinding is that it functions a lot like CSURF, except it's seen as being the same origin. So, you can send whatever request you like without having to deal with these preflighting annoyances. So, yeah, no more preflighting. However, it differs from CSURF in that we cannot send authentication. In our case, well, DEX 4.4 is a de facto standard. So, can we just set that header and make ourself an admin? Well, yes. So, that's what I did. So, it's not a restricted header. So, let's just build a payload. So, this is the workflow that I went with. The victim is anyone on the LAN. They can be authenticated, unauthenticated, does not matter. Mobile devices, does not matter. They just wait for the DNS TTL to wear out. And then once it does, I start issuing post requests via XHR with our off-bypass header to do the following. We start a config change. We enable QOS. We enable advanced QOS. Then we finish the config change and we pop a shell. So, we have to fire off five requests to enable a bunch of services and do configs and stuff. But it actually only takes like 20 seconds to do all of that and then get a shell. So, just threw that into, I guess, a shell and then it was off to the races. So, we started disclosure. So, we got the 15K bounty. Didn't we, Rick? Right? Although I appreciate the applause, something we didn't get the bounty. What was that, Ian? So, you know how our disclosure timelines have been pretty small up until now and we tabbed through them all? This is half of our disclosure timeline. We just put the important bits in here. So, let's go through some of the more important ones. 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. So, we got an award for crosshead scripting via the X-Ordered Foreheader, a completely different issue that was rather low severity. So, that was nice. 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. So, we did that. We verified that, yes, I can still get root remotely and I gave them a nice video. So, they marked the command injection exploit as triaged, which was nice. That was a little over two months after the initial release. And then about a month after that, they released the firmware 1.0.4.26. They didn't tell us about that. They just released it. 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. So, I checked. And they had. So, we confronted them. And they marked everything as unresolved and gave us degraded rewards. Like, you know that command injection and off bypass that lets you do admin and everything? Totally not critical. Totally. So, whatever. That's fine. We just wanted to disclose the issues. We're not actually going for the money, although it would be nice. So, we asked for CVEs. Because Netgear is a, or it was, a CVE numbering authority. So, they should be giving us CVEs for their products. And they just didn't respond. And then something like a month later, we asked for CVEs again. And they said, we're not doing CVEs anymore. Okay, then why are you with CNA? So, we contact MITRE to get CVEs. And they say, we'll give you CVEs once we know that Netgear is not a CNA. Two months later, almost like, what, half a year over? Eight months since we started the disclosure timeline, we got our CVEs from MITRE. And unsurprisingly, Netgear was no longer on the list of CNAs. So, that was fun. Anything to add, Rick? Well, I got plenty to add. 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. They weren't admiring that we had sent them the issues over. I can't, I blame both Netgear and BugCrowd for this situation. Because we had responsibly disclosed all these vulnerabilities through them. 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. 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. 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. 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. That's beside the points. I guess it's kind of water under the bridge at this point. Ian, the summary? So, in general, like, I highly recommend if you're doing anything with web applications, use the X-Forwarded Foreheader. It is a very fun header to mess with. You can get command injection, SQL injection, a lot of SQL injection, tainting logs, all sorts of good stuff like that. And CMDI, like, yeah, it'll find a way. Even if it's, you know, 17 characters and mangled to all hell, you're still going to get command injection. You just have to try hard enough. So, again, environment variables are your friend. DNS rebinding is remarkably powerful. 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. And, like, yeah, if you have a bug bounty, please communicate with us. Don't just leave us sitting there for two months, five times. And if you stop providing service, communicate. You can, like, say, hey, we're not a CNA anymore. And also, like, communicate in general. It's nice. 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. They can just say, no, and you can't really do much. There's no incentive for them to not really do that aside from just people getting angry. And bug bounties probably shouldn't replace your security contacts. We would not have gone through the bug bounty if we didn't have to. But that was their only security contact. That was the only way that we had. So, that's just how it ended. I guess, anything to add, Rick? No, that's kind of it. I know we're definitely over time, so we're just going to run through these conclusions and answer some questions at the end. For the quick conclusions, these were the things that were different from when we conducted our research project in 2013. In 2013, most of the shells that we ended up getting were through CSRF. 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. So, in this case, we didn't need to use CSRF for any of these. We just used a lot of authentication bypasses. 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. We found, I think, two buffer workflows in one of the ASUS routers that we hacked. 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. That was not the case in 2013, where just pretty much it was the bottom of the barrel with regards to security. And software packages were really out of date in 2013. They're really not that much anymore. 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. That's really not the case anymore for a lot of these. It's much more up to date. 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. 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. Now we did see some manufacturers, for example, Asus, TerraMaster, Synology, QNAP. A lot of these companies actually tried their best to ensure that the vulnerabilities that we were disclosing were getting addressed. 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. QNAP and Synology were very good about all the issues that were reported to them. 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. Let's find out what stayed the same. Devices that are still remotely exploitable, given the 125 CVEs that we found, I think that's pretty easy to understand. 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. Now we don't need to use it as much because we found out about a lot of authentication bypasses. OS command injection is still a problem. That's probably one of the vulnerabilities that we focused on this time around. And security through obscurity is still alive and well. 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. And here's some of the stuff that stayed the same for, or I guess like what changed, but stayed the same in manufacturers. Some manufacturers actually really care. 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. Oh yeah, Xiaomi was another one that was very good. I think that's how you say it, right? Xiaomi did a very good job of addressing the issues that we disclosed. They have an interesting bug bounty program. They paid us in toys, never had that happen before, even as a child. And a lot of the companies have bug bounty programs. 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. And some companies are really interested in working with researchers to get things addressed. A lot of the stuff that we reported, they were very much happy. They wanted to know, how did you guys find it? What did you do? Do you think that we have more instances? Can you check? Also, it's free work, so why not? But it's a really nice situation where they care about the security and they're trying their best to improve it. And that's kind of it, folks. These are me and Ian's Twitters. And we also love talking shop. We're going to be at the Village for the rest of the day until Sunday we'll be here. We'll leave eventually, but this was a very good experience. And this was the results of our three of the best results from our research project. There are two other people that weren't able to present with us today. That's Josh Meyer and Sean Marani. Those guys found a lot of other vulnerabilities and it was great to work with them. Thanks for your time and I'll open the floor up to questions if any of you have anything to say or ask.