start	end	text
860	5880	That was quite the introduction for compromising an electronic logging device
5880	8260	and creating a truck-to-truck worm.
8300	9800	But that's what we're going to be talking about.
9800	11860	So, my name is Jake. This is Rick.
11860	14360	And, Rick, take it away.
15700	17200	Thanks, Jake.
18340	23180	So, we are systems engineering master's students from Colorado State University
23180	26700	and we work with Dr. Jeremy Daly
26700	32360	and primarily concentrate our research on cybersecurity of heavy vehicles.
34040	38580	And, here's a video of the work we have done.
38580	39980	Hopefully, it plays.
48130	51890	Alongside the truck, you reflash the electronic device,
51890	55070	which is running its software with a malicious firmware
55070	59590	that will slow down the truck once it starts executing.
59950	61650	We were successful in this attack.
61650	63770	The car broke up alongside it.
63770	68930	About 30 seconds later, the truck begins to slow down and the car pulls out.
69130	70750	This is a wireless attack.
70750	74690	It gives us the freedom to explore creative attack vectors,
74690	76050	including flying a drone.
76050	79570	Critical infrastructure is becoming more and more connected, including trucks.
79570	82290	One of the reasons is due to the ELD mandate.
82290	86510	When the ELD mandate first came out, it did not have much security in it.
86510	88970	They couldn't use many security improvements.
88970	93730	Here at Colorado State University, we are exploring the security of heavy vehicles,
93730	98010	as well as the security of the devices attached to the heavy vehicles,
98010	99490	such as electronic logging.
103760	107660	Basically, what we did is, as far as we know,
107660	110700	the first wireless drive-by attack on a truck.
113940	115940	I was driving the truck.
115940	119460	Ray got to drive the smooth Tesla by it.
120540	125060	What he did was basically flash the ELD that was plugged into the truck
125060	127940	while the car was driving by the truck.
129740	134160	After about 30 seconds, after the firmware was loaded, the device rebooted.
134420	138920	Basically, what happened was the car pulled ahead and the truck started to slow down.
140140	144740	What we found and what we did was that the accelerator pedal stopped working.
144820	148760	It was stuck in idle, and that's why we could not move the truck any forward.
151360	157320	So, a bit of background on what happened, why we did, and why we chose to do that.
159080	164560	The first big question that comes up is, why do we do research on commercial vehicles?
165280	170200	Well, one simple answer to that thing is, they are very important to the supply chain.
170480	175060	And I think the pandemic gave us a good lesson on why it's important to the supply chain.
175060	180900	The shortages were pretty obvious, what lack of trucks on the road can do.
180920	185340	And they are considered part of critical infrastructure for that very same reason.
187260	189020	What's under the hood of trucks?
189360	193220	Well, basically, modern trucks are very much electronical.
193220	196260	They have lots of embedded computers inside them,
196260	200100	around 150 ECUs, as we call them, electronic controller units,
200100	202360	to control functions of modern trucks.
203060	206780	They use a lot of different network protocols, like CAN, CAN FD, LIN,
206780	209820	and even the most recent ones have started using automotive Ethernet
209820	211980	for some purposes.
212320	217600	In most trucks here in the United States, they say J1939 is the standard of choice.
218280	222980	And most trucks on the road do use that standard for communication between these ECUs.
225580	230140	Now, what are electronic logging devices and how did they come into trucks?
230900	235780	Well, it was started off as a mandate for commercial trucks,
235780	239320	and most of them use it ever since the mandate in 2017.
239980	243160	The goal of an ELD is to record hours of service
243160	246700	because paper logs are not reliable enough.
246700	250380	Truckers would more often than not be honest in those paper logs
250380	254560	and keep driving more than the allotted hours.
254600	258600	And the goal of electronic logging devices was to basically get rid of that
258600	262220	and have a device log your hours of service.
262580	268340	The big problem with that was in the entire mandate that was out there,
268340	270600	there was no mention of security at all.
271420	276580	The process for getting your own ELD was make one, self-certify it,
276580	279820	and you can start selling it out to each of the trucks.
280400	285780	There are about 880 ELDs of this time that are out there,
285780	289820	so a lot of different variants from a few different manufacturers.
290140	294200	And the goal of that ELD is, once again, they go into the diagnostic port of a truck,
294200	299380	similar to that of a car, and they log data.
300140	304600	One of the fundamental issues with this thing is that, more often than not,
304600	308420	they require both read and write access to the internal network
308420	311340	of a commercial vehicle to do that.
311420	316840	And that write access may create a problem if exploited.
317460	321880	The other thing is that ELDs don't work as standalone devices,
321880	326820	and more often, there are other apps or other devices
326820	330700	that are connected over Wi-Fi, Bluetooth, or sometimes even over cellular
330700	336120	to get the data of the ELDs that the ELDs record from a modern truck.
337420	343180	Now, when we start looking at ELDs from an attacker's perspective,
343180	348540	the main goal is to somehow go in there, compromise the ELD,
348540	354000	and write bad messages so that you can do something bad with the truck.
354420	359280	The initial landscape looks very difficult because there are around 880,
359280	363180	and launching a successful attack on 880 different variants
363180	365820	is extremely difficult.
365900	371240	The other big problem is most trucks have started incorporating gateways,
371240	373580	which basically act as firewalls.
373580	377940	They sit between your diagnostic port and the internal components
377940	380720	which need to be shielded from attacks.
381660	384900	The other thing is that it's a device that plugs in,
384900	387560	so plugging it out would stop the attack.
388780	393240	So a typical threat scenario would involve two things,
393240	396220	either short-range access over Bluetooth or Wi-Fi,
396460	399380	or long-range access via cellular networks.
399840	403420	But doing a deeper dive into the world of ELDs
403420	405720	reveals something entirely different.
406420	410360	Actually, there are only a few distinct ELDs,
410360	412060	let's say about 10 of them,
412060	415860	and most of them are basically rebranded clones of one another,
415860	420280	and there is significant code reuse among all the ELDs.
421440	425740	Okay, that takes out 880 and leaves us with 10 to look at.
425920	427980	The other problem is gateways,
427980	431420	but gateways have become popular most recently,
431420	433560	and trucks run for a lot of time.
433560	436300	They run for 20, 30 years on the road,
436300	438400	and gateways are relatively modern.
438700	442460	So most trucks out on the road today don't have gateways.
442660	446720	So the question of having a firewall inside a truck is gone.
447060	449480	Even the ones that do have gateways,
449480	453060	they can be subjected to some configuration errors,
453060	455740	and recently our team has discovered
455740	457580	some diagnostic protocol flaws
457580	460360	that allows you to write messages in a way
460360	461900	that can bypass a firewall
461900	464180	and go into the parts of the truck
464900	468400	where it should not go and actually cause some harm.
469380	471580	The other thing about ELDs is that
471580	473460	if something bad happens,
473460	476420	the first thing a diagnostic technician would do
476420	480600	is remove the ELD to plug their own maintenance tool there
480600	483020	to find out what's wrong with the truck.
483620	486340	So actually finding out the issue becomes a big problem
486340	489080	if an attack is launched through an ELD.
490580	493480	And thus, we introduce in this research
494000	497140	a novel approach of actually compromising an ELD
497140	500460	and creating a truck-to-truck warm.
500940	503480	With that, I would like to hand it over to Jake
503480	506380	to go into the in-depths of this research.
510880	513380	Alrighty, so since it's DEF CON,
513380	515560	instead of just going over what we found,
515560	517380	I'm also going to go over how we did it
517380	519280	because it's a bit of a journey.
519280	523740	This was the first big thing that I've reverse-engineered
523740	529280	and therefore, in comparison to CTS and stuff like that.
529680	531340	Alright, so real quickly,
531340	533780	I want to make it clear that I'm not up here
533780	535500	to shame the company.
535820	539100	In my opinion, all companies have security vulnerabilities.
539100	541160	Some might not have been found yet.
541160	544840	But this company did a great job in their response.
544840	547500	So we did a responsible disclosure with them
547500	551000	and they ended up putting out a patch.
551360	554160	And in our opinion, they responded pretty well.
555460	558960	So one day, Dr. Daly, which is our advisor,
558960	562820	just went onto Amazon and he bought some of these devices.
562900	565060	It's actually... oh, screens are up there.
565060	567200	It's actually the little disk, right?
567200	568500	So it's about this big.
568500	572200	And the reason he bought them is that they all look very similar.
572280	573320	And they work.
573320	577760	They were the exact same devices being sold by many different major brands.
577760	582240	So the devices are IO6, IO1020 micro-ELDs.
582240	585680	We found that this device was sold by like 50 plus different brands.
586120	590020	And this is kind of commonplace in the ELD industry.
590020	591900	So as Rick mentioned before,
591900	594880	these devices come with additional wireless networks on them.
594880	599360	So this one had Bluetooth and GPS, which were mentioned in the manual.
599360	602460	But what was interesting is that when you first powered it on,
602460	604860	it actually popped up a Wi-Fi network as well,
604860	609540	which is curious because why would you go through all the effort of programming the Wi-Fi
610120	612300	if you don't mention it in the manual?
612300	618180	So that's kind of the first thing that kind of was a clue initially.
618360	621120	And if you go ahead and look at the picture of the PCB,
621660	623120	that's the PCB of the board.
623120	625220	It's an ESP32-based device.
625320	629440	And that port right there is kind of what we're going to talk about next.
629440	633100	So it was labeled PROG, which we assumed was likely programming.
633100	634700	It's an ESP32 device.
634700	636720	So doing a little bit of hardware reverse engineering,
636720	639640	figuring out what pins, what communication, what programs to use,
639640	642420	we were eventually able to check the eFuses on it.
642420	647020	And checking the eFuses allowed us to determine that it had no protections on it at all.
647020	649580	So we could go ahead and just dump the firmware off of it.
649640	652900	And the first thing we're going to do with the firmware is run strings on it.
652920	656800	And normally you don't hit the jackpot with just strings.
656800	658420	But in this case, we did.
658420	663300	So as we're looking through strings, I come across that SSID.
663380	669560	And then two lines down, I see what I can only describe as a Wi-Fi password.
669560	670700	And that is what we found.
670700	674220	It was the hard-coded default Wi-Fi password for this device.
674220	677800	We continue scrolling down, and we start seeing stuff about web servers
677800	681060	and these endpoints, this slash upload.php.
681060	683480	It's talking about OTAs and flashing.
683480	684980	But it needs a key.
685160	687060	And as we go down a little bit more,
687060	691260	we see something that starts with a 1 and it ends with a 6.
691260	693640	And I'll let you figure out what's in between that.
693680	700080	And that was the hard-coded key that protected the over-the-air updates for this device.
702120	705600	All right. So once we now got onto the Wi-Fi network, of course,
705600	707420	we can go ahead and do an NMAP scan.
707420	711820	The NMAP results there are incomplete, but essentially it would find three services.
711820	714520	We had a Telnet service on port 23.
714520	718660	We had SSH. Well, NMAP thought it was SSH on port 22.
718660	720300	I did not think it was that.
720540	722960	And then we had an HTTP server on port 80.
722960	727860	So if we look at the screenshot of the HTTP server, we can see it's listing serial version.
727900	730600	And then we have that key and a little bit of foreshadowing.
730600	735520	We have a firmware-mal standing for a malicious firmware that we created.
736040	739960	All right. So this slide is, of course, the part that takes the longest.
739960	741380	This is the reverse engineer.
741380	744220	We found a device that has these vulnerabilities.
744220	747800	We went ahead and did a little bit of testing to confirm it's not doing firmware signing
747800	751520	and that we could actually upload a modified binary to it.
751520	753060	But now what do we do with that?
753060	757200	So at this point, we need to reverse engineer the binary, figure out how it works to the point
757200	761660	that we can create a malicious firmware for it and get it to do what we want it to do.
761820	764800	So this was on ESP32.
764920	770100	So the code for it is Extensa.
770160	772140	And Extensa was not well supported.
772140	773980	It's now officially supported by Ghidra.
773980	779220	But at the time, it was not on any of the major ones that I at least had the money for.
779680	781880	And so we were looking at community support.
781880	786020	And the best community support was for Ghidra at the time, but still needed a lot of work.
786020	792080	So after spending weeks fixing up the decomp and going through all that, I had a bunch of flows.
792260	795960	And it's kind of hard to describe what I mean by flows, but essentially I had a bunch of functions.
795960	797420	They all kind of connected to each other.
797420	799440	It was clear what their purpose was.
799440	803820	But I was missing the thing that connected them and the main function.
803820	805640	And that was a giant thing.
805640	807020	I still don't have main.
807020	810560	So I did what any good hacker would do, is I went snooping.
810560	812900	And I learned that there's an Expressive Forms.
812900	814900	I created an account, logged on.
814900	819200	And after looking around, I found that there is an account called io6llc.
819220	825700	And I guess that was probably related to someone that was working at that company.
825700	829020	And most of their questions and that stuff were pretty normal.
829020	835400	They were either reporting bugs or they were asking about help for certain things.
835400	840160	But on one of them, they posted a full crash dump, which was beautiful.
840160	844480	Because if we look at the crash dump, we can see it's talking about having a bunch of different threads.
844680	847300	And it actually gives names to each of those threads.
847480	853660	And so if I cross-reference those strings that we were looking at earlier, and I look at where those names are used,
853660	858880	I came across a function that ended up being main, and it just wasn't decompiled correctly.
858880	863680	So now that I had that, I was actually able to get the full picture of how it all worked.
863800	866980	And we went from there.
867760	872460	So quick overview of the vulnerabilities that were discovered through the reverse engineer.
872460	875700	We already talked about the default network credentials.
876560	881060	And we had this web server that seemingly was unused by these resellers.
881140	883560	But it was always on and it was always there.
883560	886600	We had Bluetooth and Wi-Fi being on at the same time.
886600	888280	Firmware wasn't being signed.
888280	891600	Firmware updates were protected by the weak password.
892120	898220	And then what I ended up finding was that service on port 22 was actually a debug service.
898220	903460	It essentially acted as an echo server, which we had no use for.
903460	911180	And it was beautiful because it gave us a giant function to go ahead and put our malicious code in that would always get called.
911180	912680	It was in its own thread.
912680	916520	We didn't have to make any trampolines out for space or anything like that.
916520	921700	And so we went ahead and just put in a pretty simple little bit of malicious code.
921700	925200	And it's what you kind of see on the screen up there.
925460	928280	And so essentially this would check a status variable.
928280	934040	And once the status variable was equal to certain conditions, we knew that CAN was initialized.
934040	936440	And it actually had a connection to the CAN bus.
936440	940720	And then at this point, we just went ahead and spammed TSC1 messages.
940940	944520	TSC1 messages are Torque Speed Control 1 messages.
944520	951660	They are a J1939 message that are essentially there to allow you to tell the engine to go to a certain torque.
951800	957580	So in the video, you saw us slowing down the truck because for safety reasons, we're going to slow down the truck.
957580	960500	But we could have also sped up the truck as well.
961980	965520	In terms of like how long it takes, it's a wireless attack.
965520	968500	So if you're really close to the device, it goes pretty quickly.
968500	971180	It can go in like 30 seconds, the entire thing.
971180	974060	But the farther you move away, the longer it takes.
974980	979080	We also found that the service on port 23 was this Telnet service.
979080	984980	And this provided a pretty comprehensive API that not only allowed you to do all the normal ELD stuff,
984980	991100	but it also allowed you to go ahead and change those defaults.
991100	993460	Unfortunately, those weren't being used.
993460	995060	And then we found something interesting.
995060	999640	As we were looking through a function that was essentially the main command handler,
999640	1006780	we can see that most of the commands are a pretty normal string compare between essentially the command and whatever your input is.
1006780	1012620	But if you go all the way down to the bottom, and you see these like five consecutive if statements,
1012620	1019360	and you match all of these very specific criteria, you'll see it goes all the way down to a send can function.
1019600	1021340	And that's what it allows you to do.
1021340	1027440	And this secret function would allow you to arbitrarily wirelessly send whatever can messages you want,
1027440	1032220	if you were connected over Bluetooth, Wi-Fi, anything like that.
1033980	1039120	All right, so while I was doing this, I didn't have much experience with ESP32s,
1039120	1041980	but I know that they're loved in the IoT community.
1041980	1048140	And one of the things I knew about them is that they could simultaneously be an access point and a station,
1048140	1051640	or a client and access point, essentially.
1051980	1057080	And so this would allow us to create a worm, a device that would not only be able to execute the attack,
1057080	1061220	but could also scan for and spread to other devices.
1061480	1065100	So we get a lot of truck deliveries to our building where we were working.
1065220	1069440	And we didn't really think it was worth it to build this full cyber weapon on the actual device.
1069440	1073280	So we switched over to dev boards. And on these dev boards, we developed this worm.
1073280	1077300	And essentially it does work exactly like how it would on the actual devices.
1077300	1081600	It just goes ahead, uses the default credentials to log in, perform an over-the-air update,
1081600	1084180	and copy itself onto the new device.
1084560	1087600	So is this realistic? I would argue yes.
1087600	1089440	Trucks congregate a lot.
1089440	1093940	They have truck stops, gas stations, rest stops, ports, distribution centers, hubs.
1094260	1098880	And if you've ever been on the highway, sometimes they take a really long time to pass each other.
1099400	1102860	We found that with the normal ESP32 dev boards,
1102860	1108400	we were able to get a total distance of about 120 feet in a dense parking lot.
1108400	1112260	So this is between all of the different cars that were parked there.
1112260	1114440	So that's about 12 parking spaces.
1116640	1121740	Now, the other thing that we found that for many trucks, the diagnostic port is also left on all the time,
1121740	1128300	which means that it can continually spread even while the driver is sleeping in one of those large sleeper trucks.
1129040	1130360	So this is fixed, right?
1130360	1135800	This ability for us to drive up alongside of a truck that's using these popular ELD devices,
1135800	1141780	reflash it, and then control the vehicle, causing it to speed up, slow down, spread a worm, something like that.
1141880	1143240	It's fixed.
1143260	1145340	Well, IO6 responded great.
1145340	1148940	They went ahead and they pushed out a patch to fix these issues.
1149020	1152740	And they overall responded well to the vulnerability report.
1152740	1159820	But these vulnerabilities arose from government-mandated, self-certified devices that lacked sufficient security standards.
1159820	1167880	So we argue that since government regulators have little incentive to get security right, the problem is not fixed until that changes.
1167880	1168820	Thank you.
