I'm Nathaniel Boggs from Red Balloon Security and this is our talk on the Automotive Exploitation Sandbox. So Red Balloon Security, we do, you know, basically three things. Commercially, we license our host-based defense technology for embedded devices to large vendors. We also do a lot of fundamental research. And then thirdly, we like to do a lot of talks raising awareness or educational giving back to the community. And this is one of those. So our goals here in this, for the Automotive Sandbox is to educate all stakeholders about typical automotive attack chains and more generally embedded device attack chains. And to actually provide hands-on experience with real hardware to people. So it was found we're going to different industry verticals talking about security, working with large vendors is that a lot of people, you know, have lots of engineering experience but they really haven't learned about security. So we're going to different industry verticals talking about security before. And they just read some articles, have some buzzwords, but they never actually like hacked something, right? Which is always a fun experience. You think back to the first time you actually like hacked something to face to web page, you know, that you saw, you know, using a device in a strange way. But one of our goals for this is we wanted to really make it hands-on. So it's real hardware, realistic exploits, you know, real code running on, you know, typical operating system. And then provide, you know, we'll provide the exploits but then, to talk through how an attacker would actually come up with those, what kind of reverse engineering they would do. And this is we wanted to actually have a lot of depth to it, right? We didn't want to just have a little toy exercise in a VM. We wanted to have like a full software and hardware stack that then both as the amateur person who wants to just hack for the first time can enjoy it and have a walk through. Whereas then more experienced people can also then actually have the depth to really play with the sandbox, potentially write their own exploits. So that's kind of the thing. So, and accessibility. So we wanted this to actually be free, publicly available. So if it's not available, you know, if you're, oh, you have to like come to us and like sign your life away and be like, oh, I swear I'll never do anything with it. It just, nobody's actually going to use it, right? So we want to actually make it available on the internet. We want to have really clear instructions, right? So we actually tested these instructions. We're like, here, here's our office administrator. Like, can you run through this? You know, tell us where we're too technical, we don't explain it well enough. And then remotely accessible. So if we're doing real hardware, it's very expensive to like hand out everyone a dev, you know, a few hundred dollar dev board. So we actually want to actually do that remotely. So to build this out, we, you know, obviously we want to like segment this far away from any sort of internal network. We want to have this completely isolated. So that's what we did. Put a firewall in front of it. And then you can see we have these Saber Lite development boards, which is what we use for this because this is a typical board for automotive. And then we're like, okay, well, if we want to do this remotely, we're going to have to do this remotely. So if people are hacking these, we need a way to reset the boards periodically to a clean state. So we put up remote power that we can control and reset the board, have the boards boot off of the network off of TFTP server. So then we can actually reset these boards to kind of a pristine state so that other people can do it. We have a walk-through web server that has all the instructions. Not wave my arms too much. So the hardware, like I mentioned, is the Saber Lite board arm. You know, pretty typical here. Here's the breakdown. We're a little tight for time, but, you know, you can take a look at it. You know, multi-core kind of typical features. We use the QNX 6.6 microkernel for this. This is fairly common in automotive especially. And gives you kind of that depth. We just use a little simple web server. So, you know, any sort of embedded device is going to have some exposed network service. That may not always be a web server. You know, an automotive may be something else sometimes. Often times embedded devices will have web servers, but they're not always going to be web servers. So for this, just to make it easier for people to follow along, we went with a web server. And then we put in synthetic vulnerabilities, right? We're not going to, like, find zero days and put them here. But these are inspired by, you know, very common vulnerabilities that we've seen time and time again. And embedded devices, a command injection, a heap overflow for the initial remote exploit. And then a kernel arbitrary memory modification via vulnerable system call for a privileged escalation type of attack. I mentioned before, we wanted to make this to be ephemeral so that, you know, we don't have to manually, like, reset the boards, reflash them or something every time somebody walks through the sandbox. So now I'll kind of go through a high level walk through. And then depending on the time, I'll actually take you through actually doing it on a board. So the stage one is where, you know, we're going to walk people through our initial remote exploit, right? So this is where they're going to connect to the web server. There's a little file upload option even, just to make it a little easier for them to see. And, you know, which you do see sometimes somebody wants to upload their logo image or something to the device to, like, brand it. And then there's two vulnerabilities that you can choose from for the initial remote exploit. You can do command injection or a heap overflow. And then with that, after you upload Netcat, you can then get a remote shell. So you can actually then connect to the device, have a user privilege cell, and then you've, you know, gotten your first foothold on the device. And then you can actually get a remote shell. So you can actually get a remote shell. And then stage two, right, we want to use now this user privilege shell to do privilege escalation to get you a root shell, right? So now you're going to then run an exploit to compromise and use the vulnerable syscall to modify memory. And the one that we used for this was, okay, now we can use this vulnerable syscall, modify memory, and we can just modify the SU binary to, instead of prompting for a password, we'll just knock out that and return every password works. Even no password. So we can just use this vulnerable syscall to modify memory. And then we can get the password, you know, and then that can get you the full root access here. And then stage three, which is, you know, the fun part. Well, now you have root access. Now you can modify the web server. We put, like, a little flag on the device that, you know, is only readable by root that you can read as, you know, the secret file to have a fun message for you. And then anything else you can think of, right? So we'll walk through users on these two things, but it's a full syscall. And then you can modify the web server. And then you can modify the root access. So that's why we wanted to make it actually fleshed out, real hardware, so you can actually do whatever you like. Okay. So now I'll actually go through a live demo. This is also available online. And if you've got one of the fliers, it has the URL as well. Hdpsandbox.redballoonsecurity.com. I'm actually going to do this on this local board here, just so no one hijacks the same board I'm using while I'm doing the demo. And I know, you know, I'm not going to be able to show you the demo. I know how you guys think. So here I have this local board. And this is, as you can see here, this is a little Saber Lite development board. So I'm going to bring up my web page here. So this is the, this is a local copy, but this is the same page that you'll see when you go to the, to our sandbox URL. You'll see kind of the overview of the sandbox and explanation of it. Support email. And then you'll come down to these available endpoints where these are the actual, you know, publicly accessible IPs that you can go to. So if you click on one of those, then you're going to see, you know, a little mocked up web page of a typical embedded device web server where you might have some different things. And often times they'll have a diagnostic page where you'll have, like, oh, I can ping things. Or I can upload files for, you know, rebranding purposes or something. Or maybe there's some other service here. And then you'll see here. So we put these vulnerabilities, right? So this one has, the ping has the simple command injection. The echo test has a heap overflow that then you can use to go through the exploitation. So then the actual walk through is going to go through, you know, in great detail, step by step. So it's going to discuss, you know, the stages, kind of what I just told you. And then it's going to come down to and actually give you, you know, example commands that you could run. So, for instance, here. I have this semicolon, which is the escape character for Bash to run two commands instead of just one. So if this is going to ping something, I could ping something and run the LS command, for instance. So here you can see the results of your ping command. But then you can also see now the listing of the files in the, in the local directory where this service is running for instance. So that's how, you know, we walk everyone through this like oh, that's how an attacker would see whether or not this is vulnerable to this type of command injection. And then we'll even have, you know, a little video play through typing it out just so you know, right? So in our office admin, they're like, ping, you know, what box? You know, it's like, no, this is the actual box you type in. This is how you do it. So it's really going to, you know, both hold your hand all the way if you need it, which is fine. You know, we love to educate people who are new to security as well as kind of give you the highlights, the commands you want to run if you just want to, like, bang it out real quick and explore it and do your own thing. So you can also do, so things like this where, you know, an attacker is going to want to know what sort of system, you know, it's running. They might check and see and be like, oh, okay, this is actually QNX system. It's ARM, little Indian. So now I know, you know, the sort of tool chain I might need to compile the attack for this. And then we're actually going to then upload a file. So we actually have, you know, so you could, as an exercise as a reader, you can, you know, go out, grab Netcat, open source, you know, compile it for this target and put it on there. That's going to be out of the scope of what, you know, a lot of people are going to want to do. If they're very new to security, they probably also don't want to compile for ARM, little Indian, random open source, you know, projects. So we actually have those files available. So we can actually, you know, we can just upload this. And then we can now pull it over. So now this has been uploaded as a very random file here. I might want to save out that file name because those are randomized each time. And then we're going to want to chmod it so it's actually executable because when, you know, most web servers, you upload a file, they're not going to be able to execute it. So we're going to want to just give you the full executable right away. Although, you know, there's always the hilarious ones that just, oh, yes, this file needs 777 permissions all across the board. So now we actually give you the command, okay, now you want to run Netcat to listen, to pipe, you know, the shell. So basically we're just forwarding all of, all of the, you know, the bin essays and then we're going to run this web page into Netcat which just gives us this little network socket where we can interact with bin essays. Now you can see, oh, this web page is actually hanging because now I've started a program that's not returning. So now I can jump in here and connect back to it. If I get the right port. What port did I, oh. One, three, if I get my right leak port combination, then this is what I'm running. And then now, now I have a remote shell on the device, right. So I can check what ID, so I'm running as nobody which is probably what, you know, the web server is running as presumably. And, you know, then we can continue on. So we also have an in-browser terminal. So we found very early on that, you know, a lot of these users who are new to security are running Windows, they don't have Netcat installed by default, it's actually non-trivial to install Netcat on Windows. So, like, if you have a Windows server and you have a device with a here. We'll actually make a little JavaScript web socket proxy that you can connect back to one of our servers that will spawn up a netcat, connect to it, and then forward back, you know, the commands back and forth through your JavaScript. So even on a Windows machine, you can use, you can actually use this to have users walk through the whole thing. Okay. So we connected. We checked the ID. So now here's the alternative stage one where you can do the heap overflow exploit. I won't do that since we're running short on time. And now here we want to do privilege escalation, right? Now we're in stage two. So we can, if I try to do SU right now, it's going to say it's sorry. I'm sorry too. I'm still nobody. This is very disturbing. And then we're going to actually here have a walkthrough of how an attacker would then, you know, kind of reverse engineer this. So right here, okay, they know SU says, you know, the sorry string when you're wrong. So now I can, you know, look through the code, find out where that actual final check is, right? Look at the check and then just change the string compare, you know, to always return true basically. So it's like these basic principles, but we want to make it accessible as accessible as possible to people. So now I'm going to upload. We have another binary to upload here to exploit the privilege escalation. So again, we write this one for you, whereas as an exercise of the reader, you could then use your user's cell to like pull down things and try to explore and actually write this exploit to exploit the vulnerable syscall that we injected. And again, we're going to want to chmod this. And then, and this is all, all these commands I'm kind of breezing through are all very in detail written out here. So now this little tool here basically is just a primitive tool to do arbitrary read and writes of memory using this vulnerability. So if you run the help on it, you'd see, you know, kind of the details, but the two things that I'm going to do is tell me to write, you know, at this address, this binary hex, which is going to be the op code that's going to make this little change in the SU binary that's now going to remove the requirement to have a password. And now it did not say sorry, and now I'm root, right? So it just walks you through like very step by step this process of having this visceral, you know, visceral reaction to being able to actually, you know, write a password. And you can actually see what it's like to hack something. So for ease of use, you know, now you can do anything. For ease of use, we added another file you can upload that will do like a large copy paste. So you can more easily deface the web server. But, you know, you're root now, so you can do whatever you want. But this one is a little easier for the lay user to use. So again, we have to go through all the mechanics here. Or I could do this actually inside my shell now that I have a shell as well. But this shell is just so more convenient because it's on a web server. So that's nice too. So now, right, I can put some text. The famous your name here hacker, for instance. Because he's really dastardly. He's hacked all kinds of things. And then I can just go through all the things. And then I can actually, if I remember what file it was I uploaded. Now I can run this and copy over this file. But you can be, I hope you guys are more creative. You can have some cool ASCII art or something. So again, here, right, we're giving you this memory address which is actually the memory address of where the web server is storing in memory, you know, the text, the web pages. But that again, right, is an exercise for the reader. You could go through reverse engineer ads, search through the memory space now that you have root privilege and do that. So that's patching everything in. So now, if I'm lucky, and sometimes you have to do a hard refresh, you know, for these. But I can actually have the experience of, like, hacking the web server. So this may not seem, you know, those of you who are more experienced in security, this isn't anything new or, like, crazy. But our main goal here is to be able to do this. So I'm going to go ahead and do this. So the idea here was to really just detail this walkthrough so that anyone could do it. So then we also put a little secret flag here. So if I look in the data folder, there's a secret file. Up here it does not work here. You know, that you can see is only rewritable by root. But I'm not going to show you what that is. You'll have to go and do it yourself. So that's the gist of it. Where's my presentation at? Yeah. So Sandbox is available here at, well, maybe. I was thinking about it. Well, sandbox.redballoonsecurity.com. You know, you're welcome to try it out. Show your colleagues. Send it to the person who always, like, was like, what do you do? You hack things. How is that? This magical craziness. Be like, no, here. It's actually not that hard. You know, an experienced person will burn through this in, like, ten minutes. Our office admin took, like, 45 minutes to do this. So I think, you know, but it's there for a whole set of users. So you have any questions that really does not want to show up? Hmm. Okay. Well, maybe it'll show up. I'll just keep saying it. Sandbox.redballoonsecurity.com. Any questions? Yep. We have no plans to take it down if you all, like, break it horribly. Right now we have eight boards set up. So if you guys physically destroy all eight of our boards, we'll be sad. And, like, maybe we'll bring it back up with bigger and better boards and more security. Or maybe we won't. But, no, we plan to, like, keep this online for people to play with and to use. So, you know, now that it's set up, it's all pretty automated. And as long as nothing horrible happens to it, you know, feel free. You know, it's there. You do what you need to do. But, you know, and they do powering it up. But, you know, it's a power cycle periodically. So we'll keep an eye on it. But the goal is to leave it up. So every, I don't think we're going to run out of people who want to or need to learn about security and new verticals and embedded devices any time soon. So. Yep. So depending on the interest, we're definitely considered, you know, adding, you know, kind of a multi-state, right? The obvious next step is to say, okay, well, here's this little dev board. Maybe once you get root on this one, you need to, like, go over CAN or something to some other device and, like, start building it out. Obviously that takes more effort. So, like, if there's interest, we'd love to hear about it. You know, be like, oh, this is really cool. But can you add this cool thing? And then, yeah, we've definitely thought about, you know, in the future we may continue to build this out. You know, especially as, you know, if we have internal things that, oh, we could just spend a little extra time and adapt it to this where we have little tests and things that we write for our own, you know, for other purposes, whether it's research or commercial. So. Yep. So I'm not familiar with QNX, but is there, like, isolation between different users that are playing with the sandbox and if they're accessing it? Well, that's a very good question. So we thought about that and we're like, okay, people are going to have to have some weird checkout interface and, like, we're like, no, free for all. You have more power to you. Hence why I have my board right here, not one of the ones online. But, realistically, you can actually do a lot of things with QNX. I mean, you can do a lot of things with it. You can actually go through most of the same thing, as long as they don't, like, really mess up the board. If they're just following the instructions, the only thing you're going to notice is that, one, the web page may already be defaced, but you can just deface over it and be like, no, your name here, no, my name here. And then when, if they already patched the SU binary, you're going to get root without having to patch it yourself. But that's the only thing. So you can actually still go through most of the steps. But the boards do reset every hour and they're staggered. So every 15 minutes, you can kind of choose a board that has a little more lifetime in it. But, yes, that is, there is a race condition there that we're like, well, they can still go through most of it. The other side of building all that out would be a lot more. Yeah? Yeah? So I'm guessing that these boards aren't too hard to find, like, just buy online. Mm-hmm. Yeah. How easy would it be to configure it realistically so it resembles something you might find in a car? Sure. So, I mean, yeah, these are used actively. And development. So this is the kind of, the kind of thing. So, you know, this one of the ECUs you would see. What's going to make it, you know, very particular to a car is the, you know, user binaries that you're putting on it, right? So obviously this little web server is not, hopefully not one of those binaries you would put on it. But you just, if you wanted to make it more realistic, you'd be like, oh, here's an old binary that was actually put on a car and you could put on it. And then you'd have a more, a more, you know, in-depth environment. But the concept is the same. You're going to have some service. There's going to be some vulnerability. Yeah. It might look a little different, but it's the same, it's the same thing. Yep. Did I have, I had one question over there maybe? Nope. You just answered it. Oh, perfect. Okay. Two for one. Any other questions? I can end a little early and try to catch up on time. All right. Thank you all. Thank you.