When you come into the contest area and you see a vending machine like this, it's not to buy water. And this one doesn't sell water, it sells shells. Like Susie sold two shells down at the seashore. Wow, I can actually do that. You buy shells on this vending machine. And this is not a vending machine. What is this? This is our shell-on-demand appliance. This vending machine has been heavily modified to provide a service here at DEF CON for attendees to be able to come up anonymously to be able to buy a virtual machine that they can access over the DEF CON network or over Tor at a cheap price. We have $0.25, we have $1, we have $5 for Kali or Windows as well. So, hold on, I can throw a coin in here and it's real money. I actually have a real quarter in here. Yep, throw a quarter in there and you'll see that the lights will change to which ones you can afford. So select the second green one. I want to buy a Diet Open WRT. And it's going to spit out your shell down here. Oh my gosh. And so there's your login information. It will be valid until Sunday at 1pm. And how long does this buy me for? Anyone who wants this, who's watching the video, it is available. Yep, you can access it over Tor. So it's available until Sunday at 1pm. That's when we close everything down, that's when contests close. This is so cool. So I put money in. I want to hear about the hardware inside right before we did. I put money in, I push the button, and I have a shell on demand. Let's go ahead and open it up. What is in here? So you open it up like a standard soda machine. And then we open to the glorious land inside. Oh my gosh. Hi, there's the staff in here. So this is all new. There is, well the coin stuff looks new. No, this is the original from the Dixie Metro. Which is original, but there's also like Raspberry Pis in here and Arduinos. Walk me through. I stick a coin in, what happens? Okay, so when you stick a coin in through the front, it actually will drop down through this chute here. And into the coin acceptor. The coin acceptor then has a data bus, very similar to CAN bus, it's called MBD. It's used in vending machines. And it talks to this little controller here. This controller then talks over USB to the Raspberry Pi. The Raspberry Pi is also connected to the Arduino as well, which handles the button front and the button matrix. So it's also for the bill acceptor, comes in through the same bus. So you can see Dual D has done a very nice job on all the wiring here. I'm going to get a flashlight in here, so we can see it a little bit better. Gaur, you want to come on in? So you can see, that's the OLED display up front. That's an IR blaster we haven't really used yet. So we can do custom displays in this thing. Yes. And then if we look down here, this is behind the buttons. This is all the NeoPixels that Zorro wired up. And then obviously you have to do custom labels for everything. Yes, you can see how they're just paper. And we've got brand new labels for it from Dixie Narco. Okay. So I've put coins in. It registers a button click. Yes, and so then that goes to... The button click goes where though? I hit the button, where do we go? So it goes to the Arduino. It goes through to Arduino to recognize a button click. So it's... And then that gets talked to the Pi, which then is even more complicated. And we'll show you this here real fast. This is a printout of the PHP being used to detect the coin acceptor and the bill acceptor. Wow, do you have this like open source or anything like that? We will release it after the con. Oh, that is so cool. This is the PHP you wrote? Yes. This is not... There's no libraries in here, it's all my functions. This is so cool. Alright, so it goes to the Raspberry Pi. The Raspberry Pi looks like it's connected to two... Oh no, it's more complicated than that. Hold please. So we're going into the data center here now. You might want to get some good light in here. So this is the data center inside the soda machine. So this has four Dell R630s in it and a management unit. This management unit is I think a 430 or 460. And so it actually contains the code that's running the PHP that I showed you. It's handling everything for management. Hey, Gary, really quick, were you able to see this with the light? Yeah. Excellent. So it's all connected over the network. So the Raspberry Pi is just a serial relay. I'm talking from the management over TCP to the serial devices. So really all the code is ran on here. Raspberry Pi comes on in, it comes into here. And then, what is this? It's a Dell 430, I think. It's lower than the Pi. And that's all handled through this dumb switch here for management. You can actually see the primary tether from the door. This is the main Ethernet and then the power for it. We do have a switch on the inside. And that switch is right here. It's a four-port switch that handles everything. Yep, right down here. All right. Once management decides that your payment is valid and you've pressed your button, it will print it through the thermal printers here. These are networked as well. This is dual-star TSP 650s. Pretty standard restaurant thermal printers. And they're just kind of Velcroed in and there's a little guard on them to kind of prevent people from tampering with them. And so, that's pretty much it. We pre-warm the virtual machines, so whenever you request one, it's already been running for several hours, just waiting for somebody to buy one. We jumped a ton of steps. I mean, you walk through each individual step, but there's so much more to this. So, like, I have now put a coin in, I provisioned it, Raspberry Pi has recognized a serial connection, we've come back over to this, we've come into this, this now says to these servers, there's like four servers here, it's backwards, so these spin up the VMs whenever they say that there's many more idle ones, and pushes it to the database. Oh, it pushes it to the database. Yeah, so they're already running on here, and then when you buy one, you're selected one that's already been running. So, how are these running? These VMs are like, are they full-blown VMs? Are they Docker images? So, they're QM, KVM virtual machines with no management engine around them, so no libvert, no, you know, any of the other main ones. I'm literally launching the processes by hand with switches. And I'm running them on as an unprivileged user, re-niced, and so that way they are well-behaved, and they're directly joining to the bridges that I want them to. Alright, so it's now, database picks up on the fact that someone's ordered one, go do it, go connect this one, or it's in the database. And it gathers the credentials. It gathers the credentials, and then it sends it where? This server brings it right back to the printer directly? Yes. And then it prints out. Alright, we've talked about the technical details. Let's get it shut, because I know there's, there's like, the other thing we haven't even mentioned here. Obviously, with everything at DEF CON, you need good art. You need good hardware. You need good software and PHP code and all of this. But you also need, like, hardware hacking and manufacturing skills. The airflow I know had to be cut all the way through this to get good airflow through all these servers. Yeah. How many of these have been bought, even though we're early in the CON? So, we're at 250 virtual machines right now. And so, we've made north of $500 for a donation, that'll all be donated to the National Upcycling Cooperative, which is kind of a research slash institute that does a lot of dumpster diving and scavenging to be able to give out to others. This is Dual D's NUC. This was built using NUC equipment. Yeah, everything in this sort of machine was dumpster dived. This is amazing. All of this was dumpster dived. Even the vending machine? Yeah, we got it for free from a contact from Skull. I think it was in, like, a Mason Lodge or something. I mean, we even saw the squirt in it when we got it. We talk about dumpster diving, and again, this is a whole story in and of itself. And I need to talk to Dual D at one point about his adventures in dumpster diving. But never does anyone consider you could build something like this just from dumpster diving. Oh, yeah, for sure. At this point, you've kicked it out, but what I was talking about is you had to do custom cutting, you need to do custom airflow, but now all of that is done. But we haven't even turned to the right yet. The moment we go over to the right, we get to see all of the different... We call it the Leaning Tower of Visa. Oh, goodness. Okay, so what we have here on the top is the web UI for it. So, for instance, if I push a button on the front of it... Let me give it a second. It'll tell you the VM specs. So you can see here we got Dyed OpenWrt, Sugar-Free BSD, Debian 0. When you're pushing these buttons, this was new functionality you also had to build in because when each one of these buttons are pressed, not only does it need to detect has there been money in it, but if there isn't money in it, to go all the way through the process to then show this information on screen. Oh, yeah, for sure. This was very, very cool. It's six daemons that are currently running, six separate PHP scripts. They're all running in separate processes, and they synchronize through the database. So the web UI is just pulling states back out from the database. So when the button daemon says, hey, a button was pushed, it doesn't know that there's no money in it. It just says a button was pushed. Processor, which is a huge, I printed it out, it's like this thick, process, is the one who actually handles the receipt and VM capture. And so it's the one who kind of handles the money a little bit, the payment logic a little bit more. So here's really where it comes down to. I have seen many projects at DEF CON. This incorporates physical, it incorporates fabrication and software and art. This may be, this is hacking at DEF CON. This is what I envision hacking at DEF CON. This is, I'm kind of just flabbergasted. With that, though, if you are at DEF CON, check this out. Check what else the NUC has figured out and what they've been building. I'll leave links in the video description. Because the NUC, if they can build something like this from dumpster diving, we need to find out what else could be built. After DEF CON, where is this going? So after DEF CON, this soda machine will be exhibited at the Rochester Institute of Technology Global Cybersecurity Institute and the Experience Center. We have a little museum that's open to the public of different hacker things. And so we're going to bring this up there and make it live, available for students and staff or anybody else around, be able to get Shells at will. And then we'll bring it back to DEF CON next year. And so RIT is going to pay to bring it back next year. And so it's going to be great so it can continue to live on forever. And this is Shells. And what does Shells stand for again? Oh, no, soda. Soda. This is the soda machine. Yeah, for the Shell on-demand appliance. The Shell on-demand appliance. We be popping Shells over here. Thank you so much for sharing this with us. Thank you just for building something so cool. Thank you for watching. And as always, hack on!