That was quite the introduction for compromising an electronic logging device and creating a truck-to-truck worm. But that's what we're going to be talking about. So, my name is Jake. This is Rick. And, Rick, take it away. Thanks, Jake. So, we are systems engineering master's students from Colorado State University and we work with Dr. Jeremy Daly and primarily concentrate our research on cybersecurity of heavy vehicles. And, here's a video of the work we have done. Hopefully, it plays. Alongside the truck, you reflash the electronic device, which is running its software with a malicious firmware that will slow down the truck once it starts executing. We were successful in this attack. The car broke up alongside it. About 30 seconds later, the truck begins to slow down and the car pulls out. This is a wireless attack. It gives us the freedom to explore creative attack vectors, including flying a drone. Critical infrastructure is becoming more and more connected, including trucks. One of the reasons is due to the ELD mandate. When the ELD mandate first came out, it did not have much security in it. They couldn't use many security improvements. Here at Colorado State University, we are exploring the security of heavy vehicles, as well as the security of the devices attached to the heavy vehicles, such as electronic logging. Basically, what we did is, as far as we know, the first wireless drive-by attack on a truck. I was driving the truck. Ray got to drive the smooth Tesla by it. What he did was basically flash the ELD that was plugged into the truck while the car was driving by the truck. After about 30 seconds, after the firmware was loaded, the device rebooted. Basically, what happened was the car pulled ahead and the truck started to slow down. What we found and what we did was that the accelerator pedal stopped working. It was stuck in idle, and that's why we could not move the truck any forward. So, a bit of background on what happened, why we did, and why we chose to do that. The first big question that comes up is, why do we do research on commercial vehicles? Well, one simple answer to that thing is, they are very important to the supply chain. And I think the pandemic gave us a good lesson on why it's important to the supply chain. The shortages were pretty obvious, what lack of trucks on the road can do. And they are considered part of critical infrastructure for that very same reason. What's under the hood of trucks? Well, basically, modern trucks are very much electronical. They have lots of embedded computers inside them, around 150 ECUs, as we call them, electronic controller units, to control functions of modern trucks. They use a lot of different network protocols, like CAN, CAN FD, LIN, and even the most recent ones have started using automotive Ethernet for some purposes. In most trucks here in the United States, they say J1939 is the standard of choice. And most trucks on the road do use that standard for communication between these ECUs. Now, what are electronic logging devices and how did they come into trucks? Well, it was started off as a mandate for commercial trucks, and most of them use it ever since the mandate in 2017. The goal of an ELD is to record hours of service because paper logs are not reliable enough. Truckers would more often than not be honest in those paper logs and keep driving more than the allotted hours. And the goal of electronic logging devices was to basically get rid of that and have a device log your hours of service. The big problem with that was in the entire mandate that was out there, there was no mention of security at all. The process for getting your own ELD was make one, self-certify it, and you can start selling it out to each of the trucks. There are about 880 ELDs of this time that are out there, so a lot of different variants from a few different manufacturers. And the goal of that ELD is, once again, they go into the diagnostic port of a truck, similar to that of a car, and they log data. One of the fundamental issues with this thing is that, more often than not, they require both read and write access to the internal network of a commercial vehicle to do that. And that write access may create a problem if exploited. The other thing is that ELDs don't work as standalone devices, and more often, there are other apps or other devices that are connected over Wi-Fi, Bluetooth, or sometimes even over cellular to get the data of the ELDs that the ELDs record from a modern truck. Now, when we start looking at ELDs from an attacker's perspective, the main goal is to somehow go in there, compromise the ELD, and write bad messages so that you can do something bad with the truck. The initial landscape looks very difficult because there are around 880, and launching a successful attack on 880 different variants is extremely difficult. The other big problem is most trucks have started incorporating gateways, which basically act as firewalls. They sit between your diagnostic port and the internal components which need to be shielded from attacks. The other thing is that it's a device that plugs in, so plugging it out would stop the attack. So a typical threat scenario would involve two things, either short-range access over Bluetooth or Wi-Fi, or long-range access via cellular networks. But doing a deeper dive into the world of ELDs reveals something entirely different. Actually, there are only a few distinct ELDs, let's say about 10 of them, and most of them are basically rebranded clones of one another, and there is significant code reuse among all the ELDs. Okay, that takes out 880 and leaves us with 10 to look at. The other problem is gateways, but gateways have become popular most recently, and trucks run for a lot of time. They run for 20, 30 years on the road, and gateways are relatively modern. So most trucks out on the road today don't have gateways. So the question of having a firewall inside a truck is gone. Even the ones that do have gateways, they can be subjected to some configuration errors, and recently our team has discovered some diagnostic protocol flaws that allows you to write messages in a way that can bypass a firewall and go into the parts of the truck where it should not go and actually cause some harm. The other thing about ELDs is that if something bad happens, the first thing a diagnostic technician would do is remove the ELD to plug their own maintenance tool there to find out what's wrong with the truck. So actually finding out the issue becomes a big problem if an attack is launched through an ELD. And thus, we introduce in this research a novel approach of actually compromising an ELD and creating a truck-to-truck warm. With that, I would like to hand it over to Jake to go into the in-depths of this research. Alrighty, so since it's DEF CON, instead of just going over what we found, I'm also going to go over how we did it because it's a bit of a journey. This was the first big thing that I've reverse-engineered and therefore, in comparison to CTS and stuff like that. Alright, so real quickly, I want to make it clear that I'm not up here to shame the company. In my opinion, all companies have security vulnerabilities. Some might not have been found yet. But this company did a great job in their response. So we did a responsible disclosure with them and they ended up putting out a patch. And in our opinion, they responded pretty well. So one day, Dr. Daly, which is our advisor, just went onto Amazon and he bought some of these devices. It's actually... oh, screens are up there. It's actually the little disk, right? So it's about this big. And the reason he bought them is that they all look very similar. And they work. They were the exact same devices being sold by many different major brands. So the devices are IO6, IO1020 micro-ELDs. We found that this device was sold by like 50 plus different brands. And this is kind of commonplace in the ELD industry. So as Rick mentioned before, these devices come with additional wireless networks on them. So this one had Bluetooth and GPS, which were mentioned in the manual. But what was interesting is that when you first powered it on, it actually popped up a Wi-Fi network as well, which is curious because why would you go through all the effort of programming the Wi-Fi if you don't mention it in the manual? So that's kind of the first thing that kind of was a clue initially. And if you go ahead and look at the picture of the PCB, that's the PCB of the board. It's an ESP32-based device. And that port right there is kind of what we're going to talk about next. So it was labeled PROG, which we assumed was likely programming. It's an ESP32 device. So doing a little bit of hardware reverse engineering, figuring out what pins, what communication, what programs to use, we were eventually able to check the eFuses on it. And checking the eFuses allowed us to determine that it had no protections on it at all. So we could go ahead and just dump the firmware off of it. And the first thing we're going to do with the firmware is run strings on it. And normally you don't hit the jackpot with just strings. But in this case, we did. So as we're looking through strings, I come across that SSID. And then two lines down, I see what I can only describe as a Wi-Fi password. And that is what we found. It was the hard-coded default Wi-Fi password for this device. We continue scrolling down, and we start seeing stuff about web servers and these endpoints, this slash upload.php. It's talking about OTAs and flashing. But it needs a key. And as we go down a little bit more, we see something that starts with a 1 and it ends with a 6. And I'll let you figure out what's in between that. And that was the hard-coded key that protected the over-the-air updates for this device. All right. So once we now got onto the Wi-Fi network, of course, we can go ahead and do an NMAP scan. The NMAP results there are incomplete, but essentially it would find three services. We had a Telnet service on port 23. We had SSH. Well, NMAP thought it was SSH on port 22. I did not think it was that. And then we had an HTTP server on port 80. So if we look at the screenshot of the HTTP server, we can see it's listing serial version. And then we have that key and a little bit of foreshadowing. We have a firmware-mal standing for a malicious firmware that we created. All right. So this slide is, of course, the part that takes the longest. This is the reverse engineer. We found a device that has these vulnerabilities. We went ahead and did a little bit of testing to confirm it's not doing firmware signing and that we could actually upload a modified binary to it. But now what do we do with that? So at this point, we need to reverse engineer the binary, figure out how it works to the point that we can create a malicious firmware for it and get it to do what we want it to do. So this was on ESP32. So the code for it is Extensa. And Extensa was not well supported. It's now officially supported by Ghidra. But at the time, it was not on any of the major ones that I at least had the money for. And so we were looking at community support. And the best community support was for Ghidra at the time, but still needed a lot of work. So after spending weeks fixing up the decomp and going through all that, I had a bunch of flows. And it's kind of hard to describe what I mean by flows, but essentially I had a bunch of functions. They all kind of connected to each other. It was clear what their purpose was. But I was missing the thing that connected them and the main function. And that was a giant thing. I still don't have main. So I did what any good hacker would do, is I went snooping. And I learned that there's an Expressive Forms. I created an account, logged on. And after looking around, I found that there is an account called io6llc. And I guess that was probably related to someone that was working at that company. And most of their questions and that stuff were pretty normal. They were either reporting bugs or they were asking about help for certain things. But on one of them, they posted a full crash dump, which was beautiful. Because if we look at the crash dump, we can see it's talking about having a bunch of different threads. And it actually gives names to each of those threads. And so if I cross-reference those strings that we were looking at earlier, and I look at where those names are used, I came across a function that ended up being main, and it just wasn't decompiled correctly. So now that I had that, I was actually able to get the full picture of how it all worked. And we went from there. So quick overview of the vulnerabilities that were discovered through the reverse engineer. We already talked about the default network credentials. And we had this web server that seemingly was unused by these resellers. But it was always on and it was always there. We had Bluetooth and Wi-Fi being on at the same time. Firmware wasn't being signed. Firmware updates were protected by the weak password. And then what I ended up finding was that service on port 22 was actually a debug service. It essentially acted as an echo server, which we had no use for. 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. It was in its own thread. We didn't have to make any trampolines out for space or anything like that. And so we went ahead and just put in a pretty simple little bit of malicious code. And it's what you kind of see on the screen up there. And so essentially this would check a status variable. And once the status variable was equal to certain conditions, we knew that CAN was initialized. And it actually had a connection to the CAN bus. And then at this point, we just went ahead and spammed TSC1 messages. TSC1 messages are Torque Speed Control 1 messages. They are a J1939 message that are essentially there to allow you to tell the engine to go to a certain torque. So in the video, you saw us slowing down the truck because for safety reasons, we're going to slow down the truck. But we could have also sped up the truck as well. In terms of like how long it takes, it's a wireless attack. So if you're really close to the device, it goes pretty quickly. It can go in like 30 seconds, the entire thing. But the farther you move away, the longer it takes. We also found that the service on port 23 was this Telnet service. And this provided a pretty comprehensive API that not only allowed you to do all the normal ELD stuff, but it also allowed you to go ahead and change those defaults. Unfortunately, those weren't being used. And then we found something interesting. As we were looking through a function that was essentially the main command handler, we can see that most of the commands are a pretty normal string compare between essentially the command and whatever your input is. But if you go all the way down to the bottom, and you see these like five consecutive if statements, and you match all of these very specific criteria, you'll see it goes all the way down to a send can function. And that's what it allows you to do. And this secret function would allow you to arbitrarily wirelessly send whatever can messages you want, if you were connected over Bluetooth, Wi-Fi, anything like that. All right, so while I was doing this, I didn't have much experience with ESP32s, but I know that they're loved in the IoT community. And one of the things I knew about them is that they could simultaneously be an access point and a station, or a client and access point, essentially. And so this would allow us to create a worm, a device that would not only be able to execute the attack, but could also scan for and spread to other devices. So we get a lot of truck deliveries to our building where we were working. And we didn't really think it was worth it to build this full cyber weapon on the actual device. So we switched over to dev boards. And on these dev boards, we developed this worm. And essentially it does work exactly like how it would on the actual devices. It just goes ahead, uses the default credentials to log in, perform an over-the-air update, and copy itself onto the new device. So is this realistic? I would argue yes. Trucks congregate a lot. They have truck stops, gas stations, rest stops, ports, distribution centers, hubs. And if you've ever been on the highway, sometimes they take a really long time to pass each other. We found that with the normal ESP32 dev boards, we were able to get a total distance of about 120 feet in a dense parking lot. So this is between all of the different cars that were parked there. So that's about 12 parking spaces. Now, the other thing that we found that for many trucks, the diagnostic port is also left on all the time, which means that it can continually spread even while the driver is sleeping in one of those large sleeper trucks. So this is fixed, right? This ability for us to drive up alongside of a truck that's using these popular ELD devices, reflash it, and then control the vehicle, causing it to speed up, slow down, spread a worm, something like that. It's fixed. Well, IO6 responded great. They went ahead and they pushed out a patch to fix these issues. And they overall responded well to the vulnerability report. But these vulnerabilities arose from government-mandated, self-certified devices that lacked sufficient security standards. So we argue that since government regulators have little incentive to get security right, the problem is not fixed until that changes. Thank you.