1 00:00:00,000 --> 00:00:05,420 When you come into the contest area and you see a vending machine like this, it's not to buy water. 2 00:00:05,440 --> 00:00:10,620 And this one doesn't sell water, it sells shells. 3 00:00:10,620 --> 00:00:12,960 Like Susie sold two shells down at the seashore. 4 00:00:12,960 --> 00:00:14,380 Wow, I can actually do that. 5 00:00:14,380 --> 00:00:17,400 You buy shells on this vending machine. 6 00:00:17,400 --> 00:00:19,880 And this is not a vending machine. 7 00:00:19,880 --> 00:00:21,100 What is this? 8 00:00:21,100 --> 00:00:24,180 This is our shell-on-demand appliance. 9 00:00:24,180 --> 00:00:38,580 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. 10 00:00:38,580 --> 00:00:46,080 We have $0.25, we have $1, we have $5 for Kali or Windows as well. 11 00:00:46,200 --> 00:00:50,940 So, hold on, I can throw a coin in here and it's real money. 12 00:00:50,940 --> 00:00:52,460 I actually have a real quarter in here. 13 00:00:52,460 --> 00:00:57,120 Yep , throw a quarter in there and you'll see that the lights will change to which ones you can afford. 14 00:00:57,120 --> 00:00:58,780 So select the second green one. 15 00:00:58,780 --> 00:01:05,960 I want to buy a Diet Open WRT. 16 00:01:05,960 --> 00:01:08,360 And it's going to spit out your shell down here. 17 00:01:08,820 --> 00:01:10,080 Oh my gosh. 18 00:01:10,080 --> 00:01:11,600 And so there's your login information. 19 00:01:11,600 --> 00:01:13,980 It will be valid until Sunday at 1pm. 20 00:01:13,980 --> 00:01:16,120 And how long does this buy me for? 21 00:01:16,620 --> 00:01:20,740 Anyone who wants this, who's watching the video, it is available. 22 00:01:20,740 --> 00:01:22,600 Yep, you can access it over Tor. 23 00:01:25,440 --> 00:01:28,880 So it's available until Sunday at 1pm. 24 00:01:28,880 --> 00:01:31,820 That's when we close everything down, that's when contests close. 25 00:01:33,480 --> 00:01:35,020 This is so cool. 26 00:01:35,020 --> 00:01:36,760 So I put money in. 27 00:01:36,840 --> 00:01:40,100 I want to hear about the hardware inside right before we did. 28 00:01:40,100 --> 00:01:44,820 I put money in, I push the button, and I have a shell on demand. 29 00:01:44,820 --> 00:01:46,180 Let's go ahead and open it up. 30 00:01:46,180 --> 00:01:47,800 What is in here? 31 00:01:54,060 --> 00:01:57,020 So you open it up like a standard soda machine. 32 00:02:02,040 --> 00:02:05,740 And then we open to the glorious land inside. 33 00:02:05,920 --> 00:02:07,340 Oh my gosh. 34 00:02:07,340 --> 00:02:08,980 Hi, there's the staff in here. 35 00:02:09,440 --> 00:02:12,380 So this is all new. 36 00:02:12,380 --> 00:02:15,040 There is, well the coin stuff looks new. 37 00:02:15,040 --> 00:02:16,980 No, this is the original from the Dixie Metro. 38 00:02:16,980 --> 00:02:21,980 Which is original, but there's also like Raspberry Pis in here and Arduinos. 39 00:02:22,460 --> 00:02:23,480 Walk me through. 40 00:02:23,480 --> 00:02:25,940 I stick a coin in, what happens? 41 00:02:25,940 --> 00:02:30,820 Okay, so when you stick a coin in through the front, it actually will drop down through this chute here. 42 00:02:30,880 --> 00:02:33,100 And into the coin acceptor. 43 00:02:33,140 --> 00:02:37,520 The coin acceptor then has a data bus, very similar to CAN bus, it's called MBD. 44 00:02:37,520 --> 00:02:39,300 It's used in vending machines. 45 00:02:39,480 --> 00:02:41,840 And it talks to this little controller here. 46 00:02:42,140 --> 00:02:46,100 This controller then talks over USB to the Raspberry Pi. 47 00:02:46,900 --> 00:02:54,600 The Raspberry Pi is also connected to the Arduino as well, which handles the button front and the button matrix. 48 00:02:55,960 --> 00:02:59,500 So it's also for the bill acceptor, comes in through the same bus. 49 00:03:01,120 --> 00:03:05,600 So you can see Dual D has done a very nice job on all the wiring here. 50 00:03:05,960 --> 00:03:09,740 I'm going to get a flashlight in here, so we can see it a little bit better. 51 00:03:09,740 --> 00:03:11,160 Gaur, you want to come on in? 52 00:03:11,680 --> 00:03:15,080 So you can see, that's the OLED display up front. 53 00:03:15,200 --> 00:03:16,860 That's an IR blaster we haven't really used yet. 54 00:03:16,860 --> 00:03:19,340 So we can do custom displays in this thing. 55 00:03:19,340 --> 00:03:19,880 Yes. 56 00:03:20,240 --> 00:03:24,560 And then if we look down here, this is behind the buttons. 57 00:03:25,280 --> 00:03:29,080 This is all the NeoPixels that Zorro wired up. 58 00:03:29,260 --> 00:03:32,260 And then obviously you have to do custom labels for everything. 59 00:03:32,260 --> 00:03:33,960 Yes, you can see how they're just paper. 60 00:03:33,960 --> 00:03:36,820 And we've got brand new labels for it from Dixie Narco. 61 00:03:36,820 --> 00:03:37,620 Okay. 62 00:03:37,860 --> 00:03:39,460 So I've put coins in. 63 00:03:39,460 --> 00:03:41,540 It registers a button click. 64 00:03:41,540 --> 00:03:44,820 Yes, and so then that goes to... 65 00:03:44,820 --> 00:03:46,420 The button click goes where though? 66 00:03:46,420 --> 00:03:48,460 I hit the button, where do we go? 67 00:03:48,460 --> 00:03:50,740 So it goes to the Arduino. 68 00:03:50,740 --> 00:03:53,000 It goes through to Arduino to recognize a button click. 69 00:03:53,000 --> 00:03:53,340 So it's... 70 00:03:53,340 --> 00:03:57,320 And then that gets talked to the Pi, which then is even more complicated. 71 00:03:57,320 --> 00:03:59,060 And we'll show you this here real fast. 72 00:03:59,060 --> 00:04:06,980 This is a printout of the PHP being used to detect the coin acceptor and the bill acceptor. 73 00:04:10,120 --> 00:04:12,920 Wow, do you have this like open source or anything like that? 74 00:04:12,920 --> 00:04:14,400 We will release it after the con. 75 00:04:14,400 --> 00:04:15,480 Oh, that is so cool. 76 00:04:15,480 --> 00:04:17,440 This is the PHP you wrote? 77 00:04:17,440 --> 00:04:18,060 Yes. 78 00:04:18,060 --> 00:04:19,160 This is not... 79 00:04:19,160 --> 00:04:21,600 There's no libraries in here, it's all my functions. 80 00:04:21,600 --> 00:04:23,600 This is so cool. 81 00:04:23,960 --> 00:04:25,940 Alright, so it goes to the Raspberry Pi. 82 00:04:25,940 --> 00:04:28,600 The Raspberry Pi looks like it's connected to two... 83 00:04:29,460 --> 00:04:31,760 Oh no, it's more complicated than that. 84 00:04:31,780 --> 00:04:33,320 Hold please. 85 00:04:34,080 --> 00:04:36,460 So we're going into the data center here now. 86 00:04:36,460 --> 00:04:38,760 You might want to get some good light in here. 87 00:04:38,760 --> 00:04:41,640 So this is the data center inside the soda machine. 88 00:04:42,160 --> 00:04:47,460 So this has four Dell R630s in it and a management unit. 89 00:04:47,460 --> 00:04:50,980 This management unit is I think a 430 or 460. 90 00:04:51,620 --> 00:04:56,740 And so it actually contains the code that's running the PHP that I showed you. 91 00:04:56,740 --> 00:04:59,040 It's handling everything for management. 92 00:04:59,120 --> 00:05:01,860 Hey, Gary, really quick, were you able to see this with the light? 93 00:05:01,860 --> 00:05:02,080 Yeah. 94 00:05:02,080 --> 00:05:02,720 Excellent. 95 00:05:02,720 --> 00:05:05,000 So it's all connected over the network. 96 00:05:05,280 --> 00:05:08,380 So the Raspberry Pi is just a serial relay. 97 00:05:08,380 --> 00:05:12,400 I'm talking from the management over TCP to the serial devices. 98 00:05:12,940 --> 00:05:14,900 So really all the code is ran on here. 99 00:05:14,900 --> 00:05:18,020 Raspberry Pi comes on in, it comes into here. 100 00:05:18,260 --> 00:05:19,820 And then, what is this? 101 00:05:20,840 --> 00:05:22,920 It's a Dell 430, I think. 102 00:05:23,340 --> 00:05:26,020 It's lower than the Pi. 103 00:05:27,600 --> 00:05:31,280 And that's all handled through this dumb switch here for management. 104 00:05:31,520 --> 00:05:33,960 You can actually see the primary tether from the door. 105 00:05:33,960 --> 00:05:37,540 This is the main Ethernet and then the power for it. 106 00:05:37,600 --> 00:05:39,640 We do have a switch on the inside. 107 00:05:42,920 --> 00:05:44,220 And that switch is right here. 108 00:05:44,220 --> 00:05:46,620 It's a four-port switch that handles everything. 109 00:05:46,620 --> 00:05:47,940 Yep, right down here. 110 00:05:47,940 --> 00:05:52,620 All right. 111 00:05:52,960 --> 00:06:04,240 Once management decides that your payment is valid and you've pressed your button, it will print it through the thermal printers here. 112 00:06:04,240 --> 00:06:06,160 These are networked as well. 113 00:06:06,400 --> 00:06:09,640 This is dual-star TSP 650s. 114 00:06:09,940 --> 00:06:12,680 Pretty standard restaurant thermal printers. 115 00:06:13,960 --> 00:06:19,780 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. 116 00:06:20,600 --> 00:06:22,500 And so, that's pretty much it. 117 00:06:22,580 --> 00:06:32,780 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. 118 00:06:32,780 --> 00:06:34,180 We jumped a ton of steps. 119 00:06:34,180 --> 00:06:38,560 I mean, you walk through each individual step, but there's so much more to this. 120 00:06:38,560 --> 00:06:56,300 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, 121 00:06:56,300 --> 00:06:58,020 and pushes it to the database. 122 00:06:58,020 --> 00:06:59,300 Oh, it pushes it to the database. 123 00:06:59,300 --> 00:07:04,040 Yeah, so they're already running on here, and then when you buy one, you're selected one that's already been running. 124 00:07:04,040 --> 00:07:05,200 So , how are these running? 125 00:07:05,200 --> 00:07:07,720 These VMs are like, are they full-blown VMs? 126 00:07:07,720 --> 00:07:09,100 Are they Docker images? 127 00:07:09,100 --> 00:07:21,200 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. 128 00:07:21,240 --> 00:07:24,800 I'm literally launching the processes by hand with switches. 129 00:07:25,040 --> 00:07:33,440 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. 130 00:07:33,440 --> 00:07:41,060 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. 131 00:07:41,060 --> 00:07:42,440 And it gathers the credentials. 132 00:07:42,440 --> 00:07:45,360 It gathers the credentials, and then it sends it where? 133 00:07:47,300 --> 00:07:50,260 This server brings it right back to the printer directly? 134 00:07:50,260 --> 00:07:50,840 Yes. 135 00:07:51,040 --> 00:07:52,540 And then it prints out. 136 00:07:52,540 --> 00:07:54,600 Alright, we've talked about the technical details. 137 00:07:54,600 --> 00:07:58,880 Let's get it shut, because I know there's, there's like, the other thing we haven't even mentioned here. 138 00:07:58,880 --> 00:08:02,980 Obviously, with everything at DEF CON, you need good art. 139 00:08:03,080 --> 00:08:05,100 You need good hardware. 140 00:08:05,100 --> 00:08:08,400 You need good software and PHP code and all of this. 141 00:08:08,400 --> 00:08:12,260 But you also need, like, hardware hacking and manufacturing skills. 142 00:08:12,260 --> 00:08:17,700 The airflow I know had to be cut all the way through this to get good airflow through all these servers. 143 00:08:17,700 --> 00:08:17,960 Yeah. 144 00:08:17,960 --> 00:08:22,340 How many of these have been bought, even though we're early in the CON? 145 00:08:22,760 --> 00:08:26,180 So, we're at 250 virtual machines right now. 146 00:08:26,820 --> 00:08:44,300 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. 147 00:08:44,300 --> 00:08:45,700 This is Dual D's NUC. 148 00:08:45,700 --> 00:08:48,340 This was built using NUC equipment. 149 00:08:48,340 --> 00:08:51,360 Yeah, everything in this sort of machine was dumpster dived. 150 00:08:51,560 --> 00:08:53,660 This is amazing. 151 00:08:53,660 --> 00:08:55,500 All of this was dumpster dived. 152 00:08:55,700 --> 00:08:57,280 Even the vending machine? 153 00:08:57,280 --> 00:09:00,080 Yeah, we got it for free from a contact from Skull. 154 00:09:00,080 --> 00:09:02,420 I think it was in, like, a Mason Lodge or something. 155 00:09:02,420 --> 00:09:04,380 I mean, we even saw the squirt in it when we got it. 156 00:09:04,380 --> 00:09:07,780 We talk about dumpster diving, and again, this is a whole story in and of itself. 157 00:09:07,820 --> 00:09:11,640 And I need to talk to Dual D at one point about his adventures in dumpster diving. 158 00:09:11,640 --> 00:09:17,420 But never does anyone consider you could build something like this just from dumpster diving. 159 00:09:17,420 --> 00:09:18,440 Oh, yeah, for sure. 160 00:09:19,800 --> 00:09:28,080 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. 161 00:09:28,080 --> 00:09:30,140 But we haven't even turned to the right yet. 162 00:09:30,140 --> 00:09:35,020 The moment we go over to the right, we get to see all of the different... 163 00:09:35,020 --> 00:09:37,860 We call it the Leaning Tower of Visa. 164 00:09:37,880 --> 00:09:38,880 Oh, goodness. 165 00:09:38,880 --> 00:09:43,960 Okay, so what we have here on the top is the web UI for it. 166 00:09:44,260 --> 00:09:46,960 So, for instance, if I push a button on the front of it... 167 00:09:52,090 --> 00:09:53,650 Let me give it a second. 168 00:09:53,650 --> 00:09:56,030 It'll tell you the VM specs. 169 00:09:57,030 --> 00:10:05,290 So you can see here we got Dyed OpenWrt, Sugar-Free BSD, Debian 0. 170 00:10:05,290 --> 00:10:20,750 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. 171 00:10:20,770 --> 00:10:21,850 Oh, yeah, for sure. 172 00:10:21,850 --> 00:10:23,390 This was very, very cool. 173 00:10:23,450 --> 00:10:27,470 It's six daemons that are currently running, six separate PHP scripts. 174 00:10:27,510 --> 00:10:33,030 They're all running in separate processes, and they synchronize through the database. 175 00:10:33,190 --> 00:10:38,410 So the web UI is just pulling states back out from the database. 176 00:10:38,410 --> 00:10:44,450 So when the button daemon says, hey, a button was pushed, it doesn't know that there's no money in it. 177 00:10:44,450 --> 00:10:46,310 It just says a button was pushed. 178 00:10:46,550 --> 00:10:53,790 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. 179 00:10:54,330 --> 00:10:59,290 And so it's the one who kind of handles the money a little bit, the payment logic a little bit more. 180 00:10:59,290 --> 00:11:02,310 So here's really where it comes down to. 181 00:11:02,310 --> 00:11:04,650 I have seen many projects at DEF CON. 182 00:11:04,650 --> 00:11:11,250 This incorporates physical, it incorporates fabrication and software and art. 183 00:11:12,110 --> 00:11:15,950 This may be, this is hacking at DEF CON. 184 00:11:15,950 --> 00:11:18,890 This is what I envision hacking at DEF CON. 185 00:11:19,350 --> 00:11:22,010 This is, I'm kind of just flabbergasted. 186 00:11:22,010 --> 00:11:26,350 With that, though, if you are at DEF CON, check this out. 187 00:11:26,350 --> 00:11:30,890 Check what else the NUC has figured out and what they've been building. 188 00:11:30,890 --> 00:11:32,990 I'll leave links in the video description. 189 00:11:32,990 --> 00:11:41,930 Because the NUC, if they can build something like this from dumpster diving, we need to find out what else could be built. 190 00:11:42,010 --> 00:11:44,930 After DEF CON, where is this going? 191 00:11:44,930 --> 00:11:54,170 So after DEF CON, this soda machine will be exhibited at the Rochester Institute of Technology Global Cybersecurity Institute and the Experience Center. 192 00:11:54,170 --> 00:11:58,590 We have a little museum that's open to the public of different hacker things. 193 00:11:58,590 --> 00:12:06,030 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. 194 00:12:06,270 --> 00:12:08,750 And then we'll bring it back to DEF CON next year. 195 00:12:08,970 --> 00:12:11,770 And so RIT is going to pay to bring it back next year. 196 00:12:12,550 --> 00:12:16,830 And so it's going to be great so it can continue to live on forever. 197 00:12:17,370 --> 00:12:20,190 And this is Shells. 198 00:12:20,190 --> 00:12:22,370 And what does Shells stand for again? 199 00:12:22,530 --> 00:12:23,410 Oh, no, soda. 200 00:12:23,410 --> 00:12:24,110 Soda. 201 00:12:24,110 --> 00:12:25,370 This is the soda machine. 202 00:12:25,370 --> 00:12:27,610 Yeah, for the Shell on-demand appliance. 203 00:12:27,610 --> 00:12:29,790 The Shell on-demand appliance. 204 00:12:29,790 --> 00:12:31,730 We be popping Shells over here. 205 00:12:31,730 --> 00:12:34,450 Thank you so much for sharing this with us. 206 00:12:34,450 --> 00:12:38,030 Thank you just for building something so cool. 207 00:12:38,030 --> 00:12:39,890 Thank you for watching. 208 00:12:39,890 --> 00:12:42,550 And as always, hack on!