start	end	text
0	5420	When you come into the contest area and you see a vending machine like this, it's not to buy water.
5440	10620	And this one doesn't sell water, it sells shells.
10620	14380	Like Susie sold two shells down at the seashore. Wow, I can actually do that.
14380	21100	You buy shells on this vending machine. And this is not a vending machine. What is this?
21100	24180	This is our shell-on-demand appliance.
24180	28560	This vending machine has been heavily modified to provide a service here at DEF CON
28560	33060	for attendees to be able to come up anonymously to be able to buy a virtual machine
33060	38580	that they can access over the DEF CON network or over Tor at a cheap price.
38580	46080	We have $0.25, we have $1, we have $5 for Kali or Windows as well.
46200	50940	So, hold on, I can throw a coin in here and it's real money.
50940	52460	I actually have a real quarter in here.
52460	57120	Yep, throw a quarter in there and you'll see that the lights will change to which ones you can afford.
57120	58780	So select the second green one.
58780	65960	I want to buy a Diet Open WRT.
65960	68360	And it's going to spit out your shell down here.
68820	70080	Oh my gosh.
70080	73980	And so there's your login information. It will be valid until Sunday at 1pm.
73980	76120	And how long does this buy me for?
76620	80740	Anyone who wants this, who's watching the video, it is available.
80740	82600	Yep, you can access it over Tor.
85440	88880	So it's available until Sunday at 1pm.
88880	91820	That's when we close everything down, that's when contests close.
93480	95020	This is so cool.
95020	96760	So I put money in.
96840	100100	I want to hear about the hardware inside right before we did.
100100	104820	I put money in, I push the button, and I have a shell on demand.
104820	106180	Let's go ahead and open it up.
106180	107800	What is in here?
114060	117020	So you open it up like a standard soda machine.
122040	125740	And then we open to the glorious land inside.
125920	127340	Oh my gosh.
127340	128980	Hi, there's the staff in here.
129440	132380	So this is all new.
132380	135040	There is, well the coin stuff looks new.
135040	136980	No, this is the original from the Dixie Metro.
136980	141980	Which is original, but there's also like Raspberry Pis in here and Arduinos.
142460	145940	Walk me through. I stick a coin in, what happens?
145940	150820	Okay, so when you stick a coin in through the front, it actually will drop down through this chute here.
150880	153100	And into the coin acceptor.
153140	157520	The coin acceptor then has a data bus, very similar to CAN bus, it's called MBD.
157520	159300	It's used in vending machines.
159480	161840	And it talks to this little controller here.
162140	166100	This controller then talks over USB to the Raspberry Pi.
166900	174600	The Raspberry Pi is also connected to the Arduino as well, which handles the button front and the button matrix.
175960	179500	So it's also for the bill acceptor, comes in through the same bus.
181120	185600	So you can see Dual D has done a very nice job on all the wiring here.
185960	189740	I'm going to get a flashlight in here, so we can see it a little bit better.
189740	191160	Gaur, you want to come on in?
191680	195080	So you can see, that's the OLED display up front.
195200	196860	That's an IR blaster we haven't really used yet.
196860	199340	So we can do custom displays in this thing.
199340	199880	Yes.
200240	204560	And then if we look down here, this is behind the buttons.
205280	209080	This is all the NeoPixels that Zorro wired up.
209260	212260	And then obviously you have to do custom labels for everything.
212260	213960	Yes, you can see how they're just paper.
213960	216820	And we've got brand new labels for it from Dixie Narco.
216820	217620	Okay.
217860	219460	So I've put coins in.
219460	221540	It registers a button click.
221540	224820	Yes, and so then that goes to...
224820	226420	The button click goes where though?
226420	228460	I hit the button, where do we go?
228460	230740	So it goes to the Arduino.
230740	233000	It goes through to Arduino to recognize a button click.
233000	233340	So it's...
233340	237320	And then that gets talked to the Pi, which then is even more complicated.
237320	239060	And we'll show you this here real fast.
239060	246980	This is a printout of the PHP being used to detect the coin acceptor and the bill acceptor.
250120	252920	Wow, do you have this like open source or anything like that?
252920	254400	We will release it after the con.
254400	255480	Oh, that is so cool.
255480	257440	This is the PHP you wrote?
257440	258060	Yes.
258060	259160	This is not...
259160	261600	There's no libraries in here, it's all my functions.
261600	263600	This is so cool.
263960	265940	Alright, so it goes to the Raspberry Pi.
265940	268600	The Raspberry Pi looks like it's connected to two...
269460	271760	Oh no, it's more complicated than that.
271780	273320	Hold please.
274080	276460	So we're going into the data center here now.
276460	278760	You might want to get some good light in here.
278760	281640	So this is the data center inside the soda machine.
282160	287460	So this has four Dell R630s in it and a management unit.
287460	290980	This management unit is I think a 430 or 460.
291620	296740	And so it actually contains the code that's running the PHP that I showed you.
296740	299040	It's handling everything for management.
299120	301860	Hey, Gary, really quick, were you able to see this with the light?
301860	302080	Yeah.
302080	302720	Excellent.
302720	305000	So it's all connected over the network.
305280	308380	So the Raspberry Pi is just a serial relay.
308380	312400	I'm talking from the management over TCP to the serial devices.
312940	314900	So really all the code is ran on here.
314900	318020	Raspberry Pi comes on in, it comes into here.
318260	319820	And then, what is this?
320840	322920	It's a Dell 430, I think.
323340	326020	It's lower than the Pi.
327600	331280	And that's all handled through this dumb switch here for management.
331520	333960	You can actually see the primary tether from the door.
333960	337540	This is the main Ethernet and then the power for it.
337600	339640	We do have a switch on the inside.
342920	346620	And that switch is right here. It's a four-port switch that handles everything.
346620	347940	Yep, right down here.
347940	352620	All right.
352960	360580	Once management decides that your payment is valid and you've pressed your button,
360580	364240	it will print it through the thermal printers here.
364240	366160	These are networked as well.
366400	369640	This is dual-star TSP 650s.
369940	372680	Pretty standard restaurant thermal printers.
373960	377080	And they're just kind of Velcroed in and there's a little guard on them
377080	379780	to kind of prevent people from tampering with them.
380600	382500	And so, that's pretty much it.
382580	388720	We pre-warm the virtual machines, so whenever you request one,
388720	392780	it's already been running for several hours, just waiting for somebody to buy one.
392780	394180	We jumped a ton of steps.
394180	398560	I mean, you walk through each individual step, but there's so much more to this.
398560	402700	So, like, I have now put a coin in, I provisioned it,
402700	404900	Raspberry Pi has recognized a serial connection,
404900	407020	we've come back over to this, we've come into this,
407020	411000	this now says to these servers, there's like four servers here,
411000	416300	it's backwards, so these spin up the VMs whenever they say that there's many more idle ones,
416300	418020	and pushes it to the database.
418020	419300	Oh, it pushes it to the database.
419300	421420	Yeah, so they're already running on here,
421420	424040	and then when you buy one, you're selected one that's already been running.
424040	425200	So, how are these running?
425200	429100	These VMs are like, are they full-blown VMs? Are they Docker images?
429100	436240	So, they're QM, KVM virtual machines with no management engine around them,
436240	441200	so no libvert, no, you know, any of the other main ones.
441240	444800	I'm literally launching the processes by hand with switches.
445040	448980	And I'm running them on as an unprivileged user, re-niced,
448980	451040	and so that way they are well-behaved,
451040	453440	and they're directly joining to the bridges that I want them to.
453440	458320	Alright, so it's now, database picks up on the fact that someone's ordered one,
458320	461060	go do it, go connect this one, or it's in the database.
461060	462440	And it gathers the credentials.
462440	465360	It gathers the credentials, and then it sends it where?
467300	470260	This server brings it right back to the printer directly?
470260	470840	Yes.
471040	472540	And then it prints out.
472540	474600	Alright, we've talked about the technical details.
474600	477120	Let's get it shut, because I know there's, there's like,
477120	478880	the other thing we haven't even mentioned here.
478880	482980	Obviously, with everything at DEF CON, you need good art.
483080	485100	You need good hardware.
485100	488400	You need good software and PHP code and all of this.
488400	492260	But you also need, like, hardware hacking and manufacturing skills.
492260	497700	The airflow I know had to be cut all the way through this to get good airflow through all these servers.
497700	497960	Yeah.
497960	502340	How many of these have been bought, even though we're early in the CON?
502760	506180	So, we're at 250 virtual machines right now.
506820	513580	And so, we've made north of $500 for a donation,
513580	517260	that'll all be donated to the National Upcycling Cooperative,
517260	521860	which is kind of a research slash institute that does a lot of dumpster diving and scavenging
521860	524300	to be able to give out to others.
524300	528340	This is Dual D's NUC. This was built using NUC equipment.
528340	531360	Yeah, everything in this sort of machine was dumpster dived.
531560	535500	This is amazing. All of this was dumpster dived.
535700	537280	Even the vending machine?
537280	540080	Yeah, we got it for free from a contact from Skull.
540080	542420	I think it was in, like, a Mason Lodge or something.
542420	544380	I mean, we even saw the squirt in it when we got it.
544380	547780	We talk about dumpster diving, and again, this is a whole story in and of itself.
547820	551640	And I need to talk to Dual D at one point about his adventures in dumpster diving.
551640	557420	But never does anyone consider you could build something like this just from dumpster diving.
557420	558440	Oh, yeah, for sure.
559800	564200	At this point, you've kicked it out, but what I was talking about is you had to do custom cutting,
564200	568080	you need to do custom airflow, but now all of that is done.
568080	570140	But we haven't even turned to the right yet.
570140	575020	The moment we go over to the right, we get to see all of the different...
575020	577860	We call it the Leaning Tower of Visa.
577880	578880	Oh, goodness.
578880	583960	Okay, so what we have here on the top is the web UI for it.
584260	586960	So, for instance, if I push a button on the front of it...
592090	593650	Let me give it a second.
593650	596030	It'll tell you the VM specs.
597030	605290	So you can see here we got Dyed OpenWrt, Sugar-Free BSD, Debian 0.
605290	609630	When you're pushing these buttons, this was new functionality you also had to build in
609630	614550	because when each one of these buttons are pressed, not only does it need to detect has there been money in it,
614550	620750	but if there isn't money in it, to go all the way through the process to then show this information on screen.
620770	621850	Oh, yeah, for sure.
621850	623390	This was very, very cool.
623450	627470	It's six daemons that are currently running, six separate PHP scripts.
627510	633030	They're all running in separate processes, and they synchronize through the database.
633190	638410	So the web UI is just pulling states back out from the database.
638410	644450	So when the button daemon says, hey, a button was pushed, it doesn't know that there's no money in it.
644450	646310	It just says a button was pushed.
646550	650910	Processor, which is a huge, I printed it out, it's like this thick, process,
650910	653790	is the one who actually handles the receipt and VM capture.
654330	659290	And so it's the one who kind of handles the money a little bit, the payment logic a little bit more.
659290	662310	So here's really where it comes down to.
662310	664650	I have seen many projects at DEF CON.
664650	671250	This incorporates physical, it incorporates fabrication and software and art.
672110	675950	This may be, this is hacking at DEF CON.
675950	678890	This is what I envision hacking at DEF CON.
679350	682010	This is, I'm kind of just flabbergasted.
682010	686350	With that, though, if you are at DEF CON, check this out.
686350	690890	Check what else the NUC has figured out and what they've been building.
690890	692990	I'll leave links in the video description.
692990	698110	Because the NUC, if they can build something like this from dumpster diving,
698110	701930	we need to find out what else could be built.
702010	704930	After DEF CON, where is this going?
704930	710110	So after DEF CON, this soda machine will be exhibited at the Rochester Institute of Technology
710110	714170	Global Cybersecurity Institute and the Experience Center.
714170	718590	We have a little museum that's open to the public of different hacker things.
718590	720910	And so we're going to bring this up there and make it live,
720910	724110	available for students and staff or anybody else around,
724110	726030	be able to get Shells at will.
726270	728750	And then we'll bring it back to DEF CON next year.
728970	731770	And so RIT is going to pay to bring it back next year.
732550	736830	And so it's going to be great so it can continue to live on forever.
737370	740190	And this is Shells.
740190	742370	And what does Shells stand for again?
742530	743410	Oh, no, soda.
743410	745370	Soda. This is the soda machine.
745370	747610	Yeah, for the Shell on-demand appliance.
747610	749790	The Shell on-demand appliance.
749790	751730	We be popping Shells over here.
751730	754450	Thank you so much for sharing this with us.
754450	758030	Thank you just for building something so cool.
758030	759890	Thank you for watching.
759890	762550	And as always, hack on!
