start	end	text
870	2510	Okay, so what are we going to cover today?
2510	6290	We're going to explain what a vehicle diagnostics adapter,
6290	7710	or VDA, is to you.
8250	10170	Then we're going to talk about, you know,
10170	13330	some research we did attacking the VDA.
13810	15370	And then we're going to talk about ways
15370	18790	and approaches we took to defend the VDA.
19390	20690	And then finally, we're going to talk about
20690	24050	some educational things we did with the VDA.
24210	26330	So specifically, we had four challenges
26330	28330	in last year's Car-Convilled CTF
29010	31730	that were based around the VDA.
31730	33410	This is a picture of it here.
33410	35170	We had it in Vegas mode, so...
38780	40380	Yeah, look at that.
41320	43960	Binary modification for Vegas mode, awesome.
44420	46320	And we also did some educational things
46320	48820	at the Cybertruck Challenge we'll talk about.
49180	51580	So Alex and I are on stage today,
51580	54980	but Edward and Sam did a lot of this work as well
54980	58100	as a team effort, so we wanted to acknowledge them.
58100	61060	We also wanted to acknowledge Dr. Jeremy Daly,
61060	65080	who put us on the path to looking at VDAs.
65720	70840	And Friendly Vendor Person, who will not be named today,
70840	72840	but helped give us some of the VDAs
72840	74800	for some of the educational things,
74800	76700	and was a really good partner working with us
76700	81620	to shine light on this part of trucking security.
81880	82560	Cool.
86760	87660	All right, so finally,
87660	89840	what is a vehicle diagnosis adapter?
91140	96060	So your truck has an OBD port in it.
96060	98940	It's a thing that technicians can plug into
99480	103140	to pull diagnostic information off the truck.
103180	105320	I think the VIN number comes through there as well,
105320	106900	so you can pull the VIN number through there,
106900	109540	and also some information from some of the ECUs
109540	111160	or the controllers on the truck.
111820	114460	It also sometimes is used to flash the firmware
114460	116320	of the ECUs within the truck.
116360	118100	So the idea is you pull into a service station,
118100	119120	you can plug in there,
119120	121200	and I guess the way they do it
121200	123420	is there's a little computer, the VDA,
123420	125460	that actually plugs into the truck.
126440	127260	And then there's a,
127260	129040	for some reason it's always a Windows computer
129540	131200	that plugs into the VDA.
131440	132900	So you have like a Windows laptop
133440	136680	with these vendor DLLs that,
136680	139060	there's kind of like a joint protocol,
139060	140820	I think it's called RP-1210,
140820	142920	that everyone used to talk to the VDA,
142920	144700	then the VDA talks to the truck,
144700	146920	and it pulls data back and forth from it.
148180	149900	And you can kind of see here on the right,
149900	152300	this is kind of a diagram of the VDA we looked at.
152300	155100	So on the right, there's the computer interface,
155100	158600	so the USB, Bluetooth, and Wi-Fi,
158600	161480	also is how you connect directly to the VDA.
161560	164880	And then the micropositor connects to the vehicle network,
164880	168300	usually over J1939, unless it's really old.
170760	172840	Okay, so congratulations,
172840	174460	we all now know what a VDA is.
176920	179280	Okay, so now we're gonna talk about attacking the VDA.
181780	184340	So we do a lot of embedded device security around balloons,
184340	186380	so attacking embedded devices,
186380	188660	it's a pretty simple formula.
189160	190980	First, you need to get the thing.
191880	193720	The internet is really good with this.
193920	197000	Pro tip, get more than one of the things,
197000	199880	because you'll probably break one of them in the process.
200080	202280	I think you broke one of these, yeah.
203320	205420	Then you wanna do the hardware reversing.
207160	209700	Figure out, I guess, enumerate all the components
209700	212400	on the board, figure out if it has JTAG, UART,
212400	213440	stuff like that.
213440	215360	Then you wanna get the firmware either from the board
215360	217660	or from some sort of firmware update thing.
217820	219420	Reverse the firmware,
219420	221240	figure out how to update the firmware.
222680	224500	And then if you can modify the firmware
224500	226280	and put the modified firmware back on,
226280	227840	you can change how it works.
228100	229580	And then you win.
229840	231100	So this is pretty complicated,
231100	233760	so when we started working on this,
233760	235220	we decided that it was so hard
235220	237760	that only our interns could do it.
238800	240200	And so that's where Alex came in.
240200	242340	He was an intern at the time, he's a full-time employee now.
242340	245400	So he's gonna walk you through the work he did as an intern,
245400	247580	you know, trying to figure out how this thing works.
250400	253720	Awesome, so the first step that we always go through
254300	255580	when reversing a new device
255580	257900	is grabbing your favorite screwdriver set
257900	259100	and taking it apart.
259600	262680	So that's what we did.
263160	266920	This is a shot of the PCB of one of the VDAs.
267440	269640	And as you can see, the vendor did a great job
270240	273020	making connecting to JTAG and UART super hard
273020	276360	by giving us really awesome adapters to use
276360	277680	and just plug into.
278540	282060	We've identified the flash, the microcontroller,
282060	287420	and then a Wi-Fi chip and a Bluetooth chip on this board.
287600	290780	Now, the more astute of you might be noticing...
292880	297660	the Wi-Fi chip has a Wi-Fi and Bluetooth stack,
298060	300860	but there's also a Bluetooth chip on the board,
300860	303820	which begs the question, why?
306680	308520	We don't have a great answer.
308520	310240	I think these memes probably illustrate
310240	311860	some of our confusion as to why
311860	315100	there were two independent Bluetooth stacks on this device,
315100	317960	but it had both.
318560	321320	So once we took a look at the hardware
323360	326200	and read a couple of data sheets,
326200	329700	we were able to make a super legit power adapter
329700	333560	to plug in the VDA in a way that it's not normally powered.
333580	335260	Yeah, this is what happens when you tell an intern
335260	339060	to power a VDA, but it gets the job done, so that's cool.
340080	344480	And then just grab your favorite female adapter cables
344480	349120	to connect to the UART and not have to do any work with that,
349120	351140	really, because the vendor provided a handy-dandy
351140	352400	interface.
354540	357760	So once we connected to the UART,
357760	361400	unlike most devices that try and obfuscate
361400	363320	and make it really difficult to find out
363320	365540	what the debug options are on a shell,
367700	371720	the vendor just gave us a really easy way of dumping memory.
371720	374980	So, you know, we typed in dump invalid option
374980	378100	and then got every possible permutation of dumping
378100	379260	we could ever want.
379260	380820	So it was pretty simple.
380820	383960	We're just like, hey, can we get the first copy of firmware
383960	385220	on the device?
387040	390920	And then it spits it out handy-dandy over ASCII over UART.
390920	394480	So, you know, I wrote a really complicated extraction algorithm,
394480	397480	which is dump the whole firmware to serial
397480	401420	and then write a Python program to convert that into binary.
406930	410790	So once we actually had the bytes of the firmware
411350	413290	sitting in memory on the device,
413290	417130	what we wanted to do is reverse engineer the file format
417130	419330	that actually puts those bytes on the device
419330	422090	so then we can see whether we can actually change
422090	424590	the bytes that are put on the device.
424850	427410	So as Wyatt mentioned,
427410	430850	this piece of hardware uses a Windows laptop
430850	433950	in order to do the firmware update.
433970	436470	And so I was a little worried
436470	438150	because I hadn't done Windows reversing
438150	440150	that this would be kind of complicated.
440150	443410	But it turns out the firmware update format file
443410	447450	was just put in the files for the application on Windows,
447450	448930	like called firmware.bin.
448930	451480	So that took about two seconds to look at.
452010	454730	And then we had the full firmware update file
454730	456330	for the manufacturer.
460450	465270	This is a colorized GIF of me reversing the firmware update.
465570	466890	It did not take that long.
466890	468370	We're not going to go into the details
468370	470710	of how this firmware format actually works.
470710	473190	But if you spend enough time looking at it,
473190	475350	you will be able to figure it out.
476050	478010	And once we did that,
478650	481590	we knew how the vendor firmware update file
481590	485470	translates to the bytes actually sitting in memory on the device.
488620	492940	So once we'd done all that really complicated reversing work,
493660	496260	we wanted a way to be able to replicate that
496260	498780	so no one would have to go through the same process.
498780	502240	So internally, this is our tool called OFrac.
502240	505040	This is what Red Balloon Security uses internally.
505200	508340	It's also open source. You guys can try it at home.
508760	513240	And it allows us to very easily go through all of the steps
513240	517020	that we normally do to reverse engineer and modify firmware
517020	521180	so we can identify arbitrary binary formats,
521180	526320	unpack them, analyze them, make the changes that we want,
526320	530540	and then repack them up in the format that the device expects.
531380	535240	It's in Python, and we have a really snazzy GUI on the right.
535400	537460	If you guys want to take a look at it in more depth,
537460	540060	we'll be at our booth over there demoing it.
543580	545660	So after I reverse the format,
546280	547940	we can write a script in Python
550080	551840	that specifies the firmware format
551840	554460	and allows us to make the modifications programmatically
554460	555920	and have it spit out a binary
555920	558840	that we can just drop back on the device.
559400	561320	So saving a lot of time for anyone else
561320	563080	to have to do any of the reversing.
569460	573080	So now that we know how to make the firmware file
573520	575420	for the device to take,
575420	578560	we wanted a more fun way of putting it on the device
578560	581700	than just putting that file back in the Windows file system
581700	584920	and clicking through the vendor tool to actually put it on.
585100	588200	So the firmware update happened over USB.
588820	592140	So, you know, computer connected to a thing over USB.
592720	595100	What do you do? You sniff the USB traffic
595100	596960	and store it as a PCAP.
597560	600700	And then we spent a really long time reversing it.
600700	602120	We're going to go through the protocol later
602120	604680	and then wrote our own little Python script
605180	606480	to just do the firmware update
607160	608600	and then got rid of our Windows laptop
608600	610380	because we don't really like Windows.
615440	619380	So to go over the super complicated update procedure
619380	620940	of this device,
620940	623680	you first have to send hex 3
624100	626700	and then the size of the firmware update in hex
626700	631000	as a USB packet and then wait for it.
633310	636990	You just send the entire bytes of the firmware update.
637390	640150	There's no encryption. There's no signature.
640150	641790	It has a CRC check,
641790	644310	but you basically just slop it in a USB packet
644310	647030	and it just takes it up and rewrites the firmware.
649950	652370	For those playing at home, there's bonus points.
652370	656550	This same unauthenticated firmware update works over HTTP.
656550	658450	So if you have Wi-Fi on the device,
658450	660610	you could very easily just connect to the access point
660610	664850	and then do this exact same update format over HTTP.
670300	674300	So now we have a full way of having bytes
674300	675440	that we can modify our computer
675440	678120	and putting it on the target device.
678120	680320	So what do we do with that?
680420	682140	Well, the first thing that we always do
682140	684120	when performing this type of analysis
684120	686500	is testing that are unpacking and repacking
686500	688960	and this whole process works correctly.
688960	690340	So the first thing that we normally do
690340	691800	is just by modifying a string
692190	694260	and seeing whether the device still boots.
694900	696120	So that worked.
696860	698840	And then we wanted to do something more fun,
698840	700100	which we showed you at the beginning,
700100	704320	which was the LED toggle that we hooked into ping.
704880	708300	So you can see the code on the right, pretty complicated.
708300	710160	But again, we used OFRAC,
710160	713420	which is our custom unpacker and packer tool,
713420	716140	in order to put this code into the binary.
716140	717860	And specifically, we used OFRAC
717860	719880	with a tool we wrote called Patchmaker,
719880	722920	which allows us to compile C into bytes
722920	725900	and then link it into the full firmware image.
725920	728220	So it's really easy to iterate and write code
728220	730100	and just plunk it back in the binary
730100	731940	without having to deal with any linking.
732420	739380	So this case was a little bit more difficult than normal.
739380	741720	If you can see on the top left,
741720	746620	the compiler directive, underscore, underscore, reg args.
747220	750220	The calling convention for this toggle LED function
750220	752540	was kind of abnormal.
752980	755600	So the architecture of this was Motorola Coldfire.
756100	758060	And for this specific function,
758060	761160	you needed to pass in the first argument as a register,
761160	764800	which kind of messed with our compiler toolchain.
764800	768420	So we had to use a different toolchain
768420	771280	written by the wonderful Dr. Volkel Barthelme.
771880	774920	Shout out to him, who made the VBCC toolchain.
774920	776860	And then we just had to integrate it into our tool
777880	779560	and compile that code in,
779560	782560	and then, boom, just add in our modification.
783020	786940	Yeah, Dr. Volkel Barthelme. His website's pretty cool.
786940	788380	I would definitely check it out.
789200	792520	VBCC supports a lot of architectures.
792520	795120	It looks like it's from the 90s, but we built it,
795120	797160	and it worked right away.
797540	800180	So just to highlight this, this is kind of how we do
800740	803220	binary modification with OFRAC.
803220	808120	We can use runPingCMD as a function we found in the binary,
808120	810740	and we wanted to overplace it so whenever we pinged,
810740	812520	we would toggle the LED lights.
812780	815940	And so in this case, we were able to call toggleLED
815940	818480	directly in the C code that we're writing.
818620	821500	And then using Patchmaker, we can compile this code
821940	824580	and then link it in so that all the addresses
824580	826220	just work with the target binary,
826220	828380	and then just use OFRAC to copy it back
828380	829640	into the target binary.
829640	831940	So you get pretty readable C,
833220	836380	that's really useful for developing binary modifications.
841950	846630	Awesome. So, so far we showed you a cool demo with LEDs,
846630	848810	like why do we care about this ability
848810	851030	to modify the former of the VDA?
851130	857050	So most VDAs are used to update the engine control unit
857050	858350	in these big trucks.
858350	861170	So the workflow is you have a new engine control unit
861170	863810	firmware from the vendor that needs to be updated.
863910	865870	It gets passed to the VDA,
865870	867830	which then directly uses it
867830	871270	and sends it over to the ECU to flash it.
871550	872770	And so the engine control unit
872770	874730	obviously controls the engine,
874730	877210	very important part of the car.
877210	879910	That's why it's worrying in particular that the VDA
882650	885750	is normally completely unsecured, right?
885750	888630	Like this is a device that technicians use
888630	891370	at the dealership, not really locked up,
891370	893550	not a part of anyone's threat model.
893550	895870	Anyone could sort of walk in
895870	898330	and do this kind of firmware change.
898450	899850	And then in addition, you know,
899850	903590	since we found so many ways to update this firmware,
904490	907010	really not a good thing that this is a critical path
907010	909950	in terms of getting firmware on the engine controller.
913990	914770	Excuse me.
914770	919290	So, you know, as a result, you could, for example,
919290	921370	put an implant on the VDA,
921370	923670	wait for an engine controller update,
923670	925510	add your own modifications to it,
925510	928070	and then unbeknownst to anyone else,
928070	930510	you now have code running on the ECU of that big truck,
930510	932810	which is obviously really not great.
934910	938530	Yeah, so this is kind of where the attack work ended.
938530	940350	We were able to, as you see,
940350	942370	modify the firmware to put it in Vegas mode,
942370	944670	flash the LED lights, which is fun,
944670	947470	but those LED lights are what tell the technician
947470	949730	that the device is on or off, if Wi-Fi is connected,
949730	951170	if data is being transmitted.
952030	953250	So you can use your imagination
953250	955510	to think about what things like that can do.
956430	958930	Alex mentioned, you know, sometimes firmware updates,
958930	960950	these ECUs pass through this device,
960950	962410	some diagnostic data come out,
962410	964590	so it's a really nice place for an attacker to sit.
964690	966930	And this work kind of extends work that Dr.,
966930	969770	that Jeremy Daly and Srikanth Kumar did.
969770	971190	They presented at ESCAR this year
971190	974030	about attacking the Windows application
974030	975970	that communicates with the VDA.
976470	978050	So I'd recommend checking out that work.
978050	980330	They looked at the Windows DLLs
980330	981610	and found that it was pretty easy
981610	984430	to insert shim DLLs into the process
984430	987650	and peek and poke and manipulate packets
987650	989150	on the Windows laptop.
989150	990690	So kind of all the way down to the truck,
990690	992790	there's all these places where you can insert
992790	994490	and manipulate the traffic.
994490	996750	Something interesting just to think about.
1000380	1002440	Okay, so now we're gonna defend it,
1002440	1004680	we're gonna fix all the problems and go home, yay.
1005640	1007900	So we're not actually gonna fix all the problems today,
1007900	1010940	we're just gonna focus on some of the low-hanging fruit.
1011200	1013140	So the immediate problem here is,
1013140	1014840	you might have noticed there's Wi-Fi
1014840	1017280	and Bluetooth on this VDA.
1017600	1019440	And I think you can imagine that some people
1019440	1022800	might not want that Wi-Fi and Bluetooth enabled.
1023120	1024820	I wouldn't want it enabled.
1025320	1027600	I think people maintaining military vehicles
1027600	1030120	might not want to have Wi-Fi access point
1030680	1033700	on their VDAs they're plugging in, or Bluetooth as well.
1034180	1036180	But this is kind of a classic situation
1036180	1038380	in not just automotive, but all embedded devices
1038380	1041760	where the vendors, either they don't want to
1041760	1045100	or can't remove the hardware components
1045100	1048480	and software components that these features
1048480	1049920	are implemented on.
1050920	1052520	And so the way you disable the features
1052520	1056020	is essentially flipping a bit in a config file saying,
1056020	1058780	don't turn on Wi-Fi, don't turn on Bluetooth.
1058940	1061400	But as we all know, the code that underlines it
1061400	1062800	and the hardware is still there.
1062800	1065720	So an attacker can still modify the firmware
1067140	1070520	or use an exploit to then turn on these features.
1070880	1073060	So it's a very ripe attack surface.
1073660	1075180	So we're going to be talking about VDAs,
1075180	1076440	but I encourage you to think about,
1076440	1077660	this is a broader problem.
1077660	1079860	We have component access features, ABC.
1079860	1081180	We don't want those features.
1081180	1083980	We can't remove them because the vendor won't remove them.
1083980	1086520	So how can we remove them in the binary?
1088800	1091200	Okay, so what we're going to do today to talk you through
1091200	1093780	and what we did is like, how can we apply a binary patch
1093780	1096540	to the VDA firmware that removes all the code
1096540	1098380	that underpins these features
1098380	1100880	without having any side effects on the device?
1101020	1103480	And of course, this is an example of a general problem.
1103480	1106800	How do we remove features XYZ from component A
1106800	1109340	so there's no side effects and those features can't work
1109340	1112560	and the attack surface isn't there for people to use?
1114000	1117280	So we use a technique called autotomic binary reduction.
1117280	1119860	So the name is derived from nature, actually.
1119860	1121780	It's a nice place to look for inspiration.
1122280	1125220	So autotomy is when animals will shed a part of their body
1125700	1126920	when they're being attacked
1127340	1129840	to make it harder for predators to catch them.
1130180	1133140	So ABR was proposed by our CEO Ong
1133140	1134860	when he was a graduate student at Columbia.
1134860	1136240	That's where the work comes from.
1136280	1138180	So if you want to really get into the math behind it,
1138180	1139500	you can look at his dissertation.
1139940	1142620	But to simplify it, there's really just four steps.
1142680	1144660	First, you identify the high-level feature
1144660	1145580	that you don't want,
1145580	1148200	and then you identify the entry point in the code for it.
1148500	1152660	Then you can use analysis tools
1152660	1153900	to identify all the code and data
1153900	1156040	that are exclusively controlful,
1156040	1157700	dependent on those entry points.
1158080	1159800	You want to do this very carefully,
1159800	1162180	so if you're not sure, you'll leave something in.
1162360	1164220	And then you remove that code and data,
1164220	1167020	and then you replace the high-level entry point
1167020	1169380	with a return patch that makes sense
1169380	1171320	if the program ever calls it.
1171320	1174000	So if you think about a Bluetooth subsystem,
1174000	1175420	there's usually some sort of process
1175420	1177140	that initializes everything.
1177140	1178440	You can remove the code for that
1178440	1181160	and insert a return negative one,
1181160	1183280	or it depends on what is actually in the system,
1183280	1185360	but return code that will tell the system
1185360	1187240	this is not up and it's not going to run.
1188060	1190460	So this graph, I think, simplifies.
1190460	1191780	Obviously, it's more complex,
1191780	1193980	but at a high level, this is the idea.
1193980	1196000	If you have feature A and feature B,
1196000	1197600	we want to remove feature A.
1197760	1199440	We look at the control flow graph,
1199440	1202020	find all the functions that are exclusively controlful,
1202020	1203520	dependent on feature A.
1203700	1206600	So function five, we cannot remove,
1206600	1208820	but functions one and two, three, we can.
1208820	1211320	And then we insert that return patch there.
1214880	1219540	So the workflow for this is fairly standard,
1219540	1222060	and actually, Alex did most of the work already
1222060	1224720	that you need human input for now in.
1224720	1227120	So we've understood how the firmware works
1227120	1228780	and how we can update the firmware.
1228800	1231400	So next step is just to identify the feature points,
1231400	1234660	and then all of the actual autotomy work
1234660	1236940	about identifying the code that needs to be removed
1236940	1239360	and removing it and packing the firmware,
1239360	1243260	we can completely automate right now with the work we have.
1243260	1244360	And what we're doing as a company
1244360	1245500	is we're trying to move up the stack
1245500	1247400	to automate this entire process.
1247700	1250940	So there's minimal human interaction needed into it.
1255070	1257650	Okay, so identifying the feature entry points,
1257650	1258670	how do you do that?
1258690	1260070	Well, this is where you have to like, you know,
1260070	1261930	roll up your sleeves and do a little reversing.
1262590	1264870	So on embedded systems like the VDA,
1264870	1266790	this can be a little complicated,
1266790	1268370	but sometimes you get lucky.
1268370	1270770	So in this case, you can use symbols
1270770	1272530	to find leaked source code online
1272530	1274730	that you can use to then label the functions
1275150	1276110	in your project.
1276110	1278330	This was using ColdFire.
1278330	1280350	So in this case, we use Gija,
1280350	1281210	but you can use, you know,
1281210	1283650	any other disassembly tool as well to do this.
1283650	1285850	And then you can kind of start labeling
1285850	1288350	the features inside the binary.
1288350	1289570	So a new binary comes in,
1289570	1290810	this whole process can be automated.
1290810	1295230	You can start with the debug strings within the binary
1295230	1296570	and then work up to find the functions
1297090	1299370	and then automate this process removing that code.
1301230	1303270	So for this like proof of concept,
1303270	1306150	we generalized five entry points,
1306150	1309030	the OS tasks that initialize the subsystems.
1309030	1311130	We also wanted to remove the UR debug commands
1311130	1312910	because we found them super useful.
1312930	1315630	And yeah, it should be harder to figure out
1315630	1316950	how to dump the memory from the device.
1316950	1317830	I think, yeah.
1318750	1322350	Then we also targeted some driver initialization code
1322350	1323710	for these things as well.
1324870	1326070	And these were the results.
1326070	1329030	So we use the ABR algorithm that we have ever balloon.
1329030	1333750	We removed in total 574 functions
1334510	1337390	and ended up being 144 kilobytes of code.
1337390	1339210	So that was about 7% of the binary.
1339210	1340890	And you can kind of visualize it here.
1340890	1343390	Everything that's dark was unmodified
1343870	1346270	and the stripes of green here are the areas
1346270	1348850	where ABR removed the binary code.
1349010	1350070	So it's kind of cool.
1350070	1351470	You can see like throughout the binary,
1351470	1354210	there's huge swaths of functions that are just not needed
1354990	1357270	and attackers can't use it anymore.
1357270	1360990	Then we worked with friendly vendor person
1360990	1364490	to test the image using the functional test suite
1364490	1365570	that they used.
1365710	1368250	And they confirmed that performance was consistent
1368250	1369990	with the original firmware image.
1370010	1370530	So that was great.
1370530	1372310	We basically showed we were able to remove this feature
1372310	1374310	and the regular performance of the device
1374310	1375810	wasn't modified at all.
1377470	1380050	Okay, so we didn't fix all the problems.
1380050	1384070	So as we're reflecting on this, it's kind of Zen.
1384430	1386290	We were able to use some of the reversing
1386290	1387710	that attacker would use.
1387710	1388930	It's the same workflow in the beginning
1388930	1391090	to identify the features and remove it.
1392370	1395190	So removing the Bluetooth and Wi-Fi code is good.
1396590	1399790	We would challenge vendors to reconsider
1399790	1401350	whether they even need it.
1403550	1405730	Yeah, I think that's something we can all think about.
1405730	1407310	Do we need to put this in?
1407450	1411410	Can we support firmware builds that don't have it in?
1411970	1414090	Another thing to think about is ideally you wanna
1414090	1418190	at least not leave the headers on to JTAG and UART.
1418810	1420530	Ideally disable them as well.
1420530	1421670	That just makes it a little harder
1421670	1424010	for people to mess with the device.
1424050	1425970	For production devices, of course.
1427210	1430670	So then we get to some of the lower level challenges.
1430670	1434030	How can we make it so anyone can't modify the firmware?
1434110	1436150	So some sort of secure firmware update mechanism,
1436150	1438990	maybe a secure boot mechanism would be useful here.
1439350	1440810	And then how do we know
1440810	1443810	that the firmware hasn't been modified?
1443810	1447050	How do we know that the VDA that's on the shelf
1447050	1449790	in my technician's office hasn't been tampered with?
1449930	1451350	There's some sort of runtime protection
1451350	1452850	and monitoring could help there.
1452850	1453470	Because then you could see
1453470	1454850	that the device has been corrupted.
1458360	1460440	Okay, so we've attacked, we've defended,
1460440	1463540	and now let's talk about some education we did.
1463540	1465980	So we repurposed this research
1465980	1468620	to build two educational things
1468620	1470560	to kind of take these real world problems
1470560	1472520	and make it challenges that people can use
1473340	1476280	to kind of learn about this specific issue.
1478620	1480040	And this is another area
1480040	1482320	where the friendly vendor person helped us out
1482320	1484220	because we only had two of these devices,
1484220	1486560	but we were able to, at the Cybertruck Challenge,
1486560	1489400	have, for the last two years, a two hour workshop.
1490800	1492920	So the Cybertruck Challenge is a pretty cool event
1492920	1496180	that's held every year where a bunch of students
1496180	1498220	are paired up with industry experts
1499360	1502140	in automotive, specifically truck security,
1502140	1505180	and then a bunch of vendors come with fleets,
1505180	1506800	and there's a bunch of education that happens,
1506800	1508000	and then a bunch of assessments
1508000	1509600	that students do on the devices.
1509700	1511220	So I encourage you to check it out.
1511220	1513140	There's also some really good educational resources
1513140	1514540	on the website as well.
1514720	1518280	So if you're not super familiar with J1939,
1518280	1519660	that's a good place to start.
1520060	1521180	But anyway, in our workshop,
1521180	1522880	we walked them through this process.
1522880	1525840	They physically took apart the devices,
1525840	1526980	dumped the firmware.
1527080	1528720	Getting UART was a really fun moment
1528720	1531760	when you get the shell there.
1531760	1534680	One thing that we've kind of observed
1534680	1537440	is that familiarity with command line tools
1537440	1541100	is something that probably we could build on more.
1541100	1544080	So connecting the UART, getting screen working,
1544080	1544840	and stuff like that,
1544840	1546580	it was a really good moment for the students.
1546780	1547440	And then we walked them through
1547440	1549040	the bootstring modification,
1549040	1550720	and a contained environment
1550720	1552680	where they could toggle the LED lights there.
1555040	1556320	A little more fun, though.
1556320	1559340	Last year, as part of the Car-Wrecking Village CTF,
1559820	1562200	we had a bunch of these VDA boards here,
1562200	1563680	and four challenges.
1564080	1565940	So challenge one was a real-world challenge.
1565940	1567760	We gave them a PCAP,
1567760	1570020	and we gave them a modified firmware image
1570020	1573200	and said, flash this image on the device.
1573400	1576140	And so there, the flag printed in the boot shell
1576140	1578440	once you're able to flash the device.
1579440	1581680	Challenge two was a little too difficult.
1581680	1582760	It was ambitious.
1583400	1586140	I think we would remove it if we did it again at CTF.
1586140	1588420	But there, the challenge was to
1588980	1590980	essentially put the device in Vegas mode.
1591780	1592680	And then challenge three,
1592680	1593840	there's a really good write-up online
1593840	1596400	that kind of walks through the process,
1596400	1599780	but challenge three involved finding a
1601880	1604820	super-military-grade encryption scheme on the device.
1604820	1607160	I think it was just a bunch of XORing data
1607160	1610660	against the XOR repeating key.
1610660	1611680	And so the write-up's really cool
1611680	1614020	because they showed you how they use the ability
1614020	1616160	to map the firmware to load a Giger project,
1616160	1617080	find the function.
1617080	1619180	And I think they actually emulated the function in this
1619180	1621200	to get the decrypted key there.
1621340	1623500	And then challenge four was OTA to save the day.
1623500	1625320	So we had the Wi-Fi access points turned on
1625320	1628320	and you had to do the firmware update procedure,
1628320	1630660	but over the air.
1634120	1636440	Okay, so just to recap.
1640150	1643330	Yeah, so that's the binary modified image in Vegas mode.
1643330	1645630	We talked about what VDAs are.
1646090	1650730	We showed how it's relatively straightforward
1650730	1653390	to try to modify the firmware on them and attack it.
1653390	1655550	We can think about what that implies to the industry.
1655830	1658570	We talked through some ways which binary modifications
1658570	1660330	can be made to harden the image,
1660330	1663230	so we don't need to go to the end manufacturers if we want to.
1663470	1664850	And we talked about how we can use...
1664850	1666290	I think this is a really good takeaway point.
1666290	1668470	You've used real-world research and convert it
1668470	1671250	into challenges to educate both students
1671250	1673970	and also push people out of their comfort zone.
1673970	1675210	I think this was the first VDA
1675210	1677110	that was at the Carr-Akenville CTF.
1677970	1680470	And yeah, I think we just wanna acknowledge Edward and Sam
1680470	1681810	who couldn't be here today.
1682870	1685050	Jeremy and the friendly vendor person
1685050	1686470	for helping out with this.
1689410	1691150	So, oh, and lastly...
1693510	1694450	We're at Red Balloon.
1694450	1696050	We're hiring now.
1696790	1698930	So if you wanna learn more about OFRAC for this work,
1698930	1700350	we can take some questions now,
1700350	1702290	but we also have a booth over at the Carr-Akenvillage.
1702330	1704710	And we have two different CTF challenges
1705970	1708090	that we contributed to the Carr-Akenvillage CTF
1708090	1709130	this year as well.
1709130	1711390	So yeah, thanks for your time.
