Great. Let's go ahead and get started here. About me, my name is BitBane. I also go by Tim occasionally. I am a largely recovered software developer. I started my career doing a lot of safety critical aerospace and automotive embedded systems. Came over to security about three years ago. And apparently, as you'll discover through this talk, I enjoy looking at bad situations and going, how can I make this worse? I work with a company called Grim. Grim does not take this view of making things worse all the time. We actually try to help people. We're a cybersecurity research development company located in Arlington, Virginia. As a company, we do most aspects of cybersecurity between our various teams. We're going to do a little bit of overview. We're going to talk about what is CAN bus. We're going to start with the basic, high-level Wikipedia overview of how CAN bus works. And then we're going to dive into how CAN bus works at much greater detail than you typically get, typically need to know. Because all the low-level details are handled by an onboard CAN peripheral. And then we're going to talk about what we did this time. A little bit of history. CAN bus was developed by Bosch. It was released in 1990. The latest version, version 2.0, was released in 1991. It is a fairly old standard. And like many fairly old standards, when they developed it, they weren't really thinking about how to incorporate cybersecurity best practices, because there was no such thing back then. The first production vehicle was in 1991. This here is patient zero, the 1991 Mercedes Benz W140. ISO 11898 is the set of ISO specs for the CAN bus. And this is the ISO specs that define CAN bus for automotive. So why do the car manufacturers love CAN bus so much and put it everywhere they possibly can? A lot of it, it's cheap. It's really cheap. Nearly any microcontroller you buy will have a CAN peripheral built into it, because it's cheap. Why not? It's reliable. If you don't ignore it, if you ignore it or don't use it, it's going to cost a lot of money to build. Plus it's really reliable. It's designed from the ground up to be extremely reliable to environmental noise. It's used in a lot of situations, like a building automation or some industrial applications where there's a lot of electromechanical noise going on. It's designed to be very reliable for that. And oh yeah, by the way, it's been mandated by law since 2008. Turns out a good way to get the OEMs to do something is to say you cannot sell your cars unless you do the thing. It's mandated, but you can't 40 CFR 86 1806-05. That mandates that all the cars have to follow the ISO spec 15765-4. Rolled vehicle diagnostics on controller area network. This is required for your emissions related system. So any of you who live in a state that mandates that you do emissions tests, this is so that they can basically do those emissions tests more easily. They just have one tool, they plug in an OBD2 port, regardless of tool, and it can go in and make sure that all your emissions stuff is reporting that it is up to snuff. As I mentioned, CAN bus is used quite extensively outside of automobiles. It's used a lot in some aviation areas, like I mentioned building automation, some industrial control type applications as well. Those often use a different physical layer. There's quite a few different physical layers that CAN bus controls. So you can see here, you can see that the CAN bus is using a different physical layer. We're going to focus on ISO 11898-2. Which is the spec that the CAN bus uses in an automobile. So the way that ISO 11898-2, the physical layer works, is you have this diagram here of a CAN bus. So we have bits going across the bus. CAN bus uses differential signaling. So anywhere you see that the voltages are the same on the two lines, that is an area that's transmitting a recessive bit, which is interpreted as a one. And here, where there are different voltages, that's a dominant bit, which is interpreted as a zero. This is the signaling across the lines on the actual wires that run through your car. This is what they carry. Those come into a CAN transceiver. And all the CAN transceiver really does is it takes this data, there's more than a hundred tons, signaling and outputs your standard digital logic signal for your microcontroller to interface with. There's generally not really much in the way of smarts in a CAN transceiver. Some will do things like if you transmit a dominant state for too long, they'll shut off for you. But they don't really generally do a whole lot in terms of logic. If I'm sending a one, it leaves the output of the recessive voltage I'm receiving. If I'm sending a zero, it puts the output at a dominant voltage and does the opposite for any signals that it receives. So that's how the physical layer works. And as we'll get to later, something that's important to keep in mind is that any time that you're, one of the core fundamental principles of CAN bus is that if any node on the bus is sending a zero signal, it will send a zero signal to the bus. If any node is sending a zero sending this dominant voltage, then that will be the state of the bus. So if any node is sending a dominant, the bus will be in a dominant state. The only time the bus will be in a recessive state is if every node on the CAN bus is sending the recessive state, sending a one to the bus. This is what a CAN message looks like, a CAN frame. You have a start of frame, which is a zero. So CAN in an idle state is a one of the recessive state. So if you're sending a zero, as soon as somebody wants to start sending a message, you have the start of frame. So we'll start transmitting a zero. Then you have this arbitration field. This message is the, for an 11-bit arbitration field. This is generally more common in automotive. There's also a variation that has a 29-bit arbitration field. And the difference there is that this ID extended bit, instead of a zero, is a one. And then after that one, you have the other 18 bits of the arbitration ID plus two reserved bits instead of a zero. So you have a zero. So you have a zero. Instead of just one. But for all intents and purposes, you can, they're very similar. And they can operate with each other. You can have both 29-bit and 11-bit identifiers on the same CAN bus because you can look at this ID extension bit and know which length identifier it is. They have a length field. They have four bits for a length field. The maximum length of a CAN frame is eight bytes. And we'll talk slightly about why that can be somewhat problematic for some security applications in a little bit. You then have your one to eight bytes of data that you're sending. It computes a 15-bit CRC. It's sort of a weird CRC, but it was chosen, it will always detect any single bit error and is really good at detecting like two and three bit errors as well. So this plays into why CAN is so reliable. It is very good at detecting if a bit was flipped at some point. Due to, like, you know, if you're using a lot of data, you're going to have a little bit of noise or whatever the case may be. CRC delimiter, just a recessive at the end of the CRC to indicate the end of the CRC. Then you have this acknowledgement slot. So what the acknowledgement slot is used for is any time a node on the bus properly receives a message. So it's the right length, has the right CRC, everything about it looks good, it will send a dominant here in the acknowledgement slot. And whoever transmitted the message listens to this acknowledgement slot to make sure that at least one node acknowledges that it received the message. Otherwise you'll get an acknowledgement error if nobody acts the message, you'll get an acknowledgement error. And we'll talk about CAN's error handling when we dive into CAN a little bit more deeply. Then you have the act delimiter. You have a seven bit end of frame and at least three more recessive bits after the end of frame as an inner frame spacing. Then once all this is done, the bus will stay idle until another node decides it wants to transmit on the bus. So I mentioned the arbitration ID before. And the arbitration ID is how the CAN bus determines who's allowed to talk on the bus. So as I mentioned before, one of the features, one of the core fundamental things that CAN believes about how the world works is that if any node on the bus is sending a dominant, then the bus state will be a dominant. So if you have node A and node B on the bus, if you have node A and node B on the bus, they both send a start bit at the same time. So they're not going to know at that point that somebody else is transmitting because they're sending a dominant bit. They're seeing a dominant bit on the bus. So they assume that it's their dominant bit that's making the bus in the dominant state. And it will continue while it sends the arbitration ID until one of the nodes sends a one when the other node is sending a zero. As soon as a node sees that, hey, I'm sending a one, but because somebody else is asserting a dominant state on the bus, that node has the higher priority and will get access to the bus. So node B will drop out here and node A will continue with its arbitration ID. And what you'll actually see on the CAN bus if you're not node A or node B is the arbitration ID sent by node A. So that's how CAN ensures that people aren't stepping on each other on the bus, how it does its bus arbitration. Now to dive a little bit more deeply into how CAN bus does its error handling and et cetera. So CAN was designed to be resilient to transient errors. Like I mentioned, electrical noise, just stuff that happens because digital signaling is a lie we pretend to tell ourselves about how analog signaling works. CAN has five different error detection mechanisms. It can detect bit errors, stuff errors, CRC errors, form errors, and acknowledgment errors. Bit errors are only detected by a transmitter. So a bit error happens when a transmitter has one arbitration, so it knows it has access to the bus, and it is sending a specific bit on the bus, but the state that it reads back from the bus is the opposite state. It's sending a recessive and it sees a dominant or vice versa. That will be a bit error. And that will cause the transmitter to send an error frame and go into CAN's error handling. This will be detected by the transmitter, of course, because anybody receiving won't know what the state of the bus is supposed to be. Then you have stuff errors. Another feature that CAN bus uses to increase its resiliency is something called bit stuffing. And how bit stuffing works is that with a couple exceptions for a couple of the fields, if you send more than, if you're going to send more than five bits in a row that are the same, either dominant or recessive, after you send the fifth bit, you're supposed to send one or more bits in a row that are dominant or recessive. So you're sending one bit of the opposite, one opposite bit. So recessive, you're sending dominance and vice versa. This indicates, basically prevents the bus from going into a DC state where the receiver is going, am I actually still receiving something, or did the other node just die and is done now. So it does bit stuffing to make sure, it also helps keep clocks synchronized. If clocks drift a little bit on different nodes, it does re-clock on each edge that it receives. So it does a bit of that, but it also helps keep the clock synchronized. If the clock drifts a little bit on different nodes, it does re-clock on each edge that it receives. And it also helps make sure that your clocks don't drift too far apart from each other so you're still able to properly receive a message. So any time that a node sees that the bus has been in the same state for longer than five bits, that is a stuff error and it will then also go into CAN's error handling functionality. CRC error, CRC, if the CRC doesn't check out, then that will also cause an error to happen. Form error, form error is what happens if some of the fixed form field errors occur. So these three bits, the CRC delimiter, the ACK delimiter, or the ACK slot, if that isn't right, like if you end up seeing a zero in the ACK delimiter, that would be a form error because that's not how it's supposed to be. And the last error, like I mentioned before, is the acknowledgement error. If you send a message but nobody ACKs your message on the bus, then that will cause an acknowledgement error to occur. There are three other CAN files that are in the CAN bus. There's a remote frame and how a remote frame works is it's basically a node on the CAN bus saying, hey, whoever sends this arbitration ID, which is the arbitration ID that it tries to send on the bus, go ahead and send the data that you have. I've never actually seen a remote frame used in automotive. But it's a feature of the bus. There's also error frames. I'll get into more into error frames and overload frames and how they work. So the next slide. So there's two types of error frames. And we'll get into how CAN gets into its three error states in a couple of slides. But there's an active error. And if a bus is in the active error state, that means that basically it hasn't seen very many errors. And it will, whenever it detects an error on the bus, will send out six dominant bits. But of course, six dominant bits, that violates bit stuffing because it has more than five bits in a row that are the same. So all the other nodes on the bus will also start sending out error frames because of the bit stuffing error. So you'll end up with between six and 12 dominant bits on the bus, depending on exactly when, you know, what bits you were sending before the error frame and how long it takes for the other nodes on the bus to notice that there was a stuff error, essentially. When you're in the passive error state, then you'll send six recessive bits on the bus. And we'll talk about how that's used as part of CAN's error recovery as well. And then after you send out six dominant bits on the bus, you'll send six recessive bits. You send out your error frame, the six or 12 dominant bits, or the six recessive bits. You send out eight more recessive bits, essentially, to leave the bus in the idle state for a period of eight bits. Overload frames, I have had some fun with overload frames on this. So the intention behind an overload frame is that if you have a slower microcontroller on the bus, that needs a little bit more time to process a message. And that's because it's a little bit more time consuming. So it can send an overload frame in order to just kind of delay processing of CAN messages for a short period of time. And six dominant bits followed by eight recessive bits. It's sent during the intermission, which is the three recessive bits after the end of frame, that first three-bit interframe spacing that you saw on the previous slide. That is where the overload frame is sent if a node is sending the overload frame. According to the spec, it says at most two overload frames may be generated. So that's where the overload frame is sent. So that's the first point. It doesn't say anything about what to do if you generate more than two overload frames. This is how CAN does its error recovery. It uses error counters to do fault confinement. There's two error counters, the transmit error counter, which is the error counter that your node, your CAN peripheral will use if it's transmitting something and gets an error. And the receive error counter, which is the error counter that it will use if it was receiving something and saw an error. So that's the error. So there's three error states. There's error active. And when you're in error active is the default state. It's what you're in when your error counter is less than 128. So you haven't seen any errors, haven't seen very many errors. And that is the state where you'll send the active error frames if you do see an error. Once your error counter has gone over 128, then you'll move into the error passive state. And the error passive state is where you send the passive error frame. The idea here is that if you're a node on the CAN bus and you're seeing a lot of errors, it's possible that actually you're the problem, not somebody else. So in order to, so you'll stop stomping on the CAN bus every time you see an error and send that active error frame. And you'll go into error passive state where you'll check to see if, basically if you get recessive bits on the bus to tell you whether or not something else is happening on the bus. Once your error counter has gone to 128, then you'll move into the error passive state. Once your error counter has gone to over 256, then you go into the bus off state. And in the bus off state, you're supposed to completely stop participating in the CAN bus entirely until you either reset or get 128 occurrences of 11 consecutive recessive bits. So you can recover that way if the bus stays quiet for a while. But CAN buses often don't. You know, vehicle CAN buses are often very, very chatty. And the way that the error counters get incremented, there's, you know, there's a lot of edge cases in the spec. And I'm not going to go over all of them. But in general, on a receive error, you'll increment the counter by one for every time you get a receive error. And you also decrement by one every time you successfully receive a message. That's how you can move from error passive back to error active. If it's going to start working properly, then you'll go back into the error active state. On a transmit error, though, you increase your error counter by eight for every time you receive a transmit error in order to kickstart the error counter. So that's a lot of things you can do to kick a transmitter off the bus. Because a transmitter that's behaving poorly is going to be more problematic than a receiver that's behaving poorly. And that's how CAN does its error handling and error recovering. One of my, another of my favorite parts of the CAN specification is this quote here. It is in the nature of the MAC sublayer that there is no freedom for modifications. Well, what if I want to modify some of these things? CAN is essentially based on the premise that every node on the bus, everything that's connected to the CAN bus will behave the way that it's supposed to behave all the time. Sometimes you really don't want your tools to behave nicely. Sometimes you want them to do things they're not supposed to do. Wouldn't it just be so nice if somebody would make something like that? . . . . . . . . . . . . . . . . . . . . . . . So existing research tools, like we have a tool we opened talking the CAN cat, Eric Uvanchik is, he's here somewhere and has written tools, the CAN tact. A bunch of tools that are all written using a standard CAN peripheral. It's something that's baked into silicon on a microcontroller that will behave the way it's supposed to behave. As far as using, as far as like the error recovery, error detection, stopping transmitting when it's supposed to stop transmitting again. So, I provided for the machine there's a lot of great applications to the transmitting, all that stuff. But we've had conversations with several people in the industry that there's been a need for a tool that doesn't have those restrictions on what it can do on the CAN bus. The final kick in the pants for me about a year ago, ICS alert 17-209-01 was published. This ICS alert talked about essentially how you can do this sort of thing on the CAN bus. I remember one of my coworkers told me that when he was in college, one of his classmates pointed out this was a problem on CAN bus. So this isn't exactly news to anybody who understands CAN bus, but now we have an actual ICS alert we can point to and say, hey, CAN bus has some issues when it comes to security. Also tired of hearing that that can't happen. I got it more in aerospace, but that doesn't mean that the mindset that people can have that people aren't going to actively do malicious things in order to bypass the assumptions you've made about the system is a mindset that really has been bothering me for a while. So we built a tool called CANT. CANT is purpose built to selectively target an individual ECU by abusing the CAN specification. It's based on an STMicroNucleoH743ZI dev board. It's like a $20, $21, $20, $20, $20, $20, $20, $20, $20, $20, $20, dev board that you can actually get now. I gave this talk the first time at SchmooCon, and they were backordered on Mouser until April. So that was a little bit of a buzzkill. I just barely managed to get the two that I had before they were sold out. Currently supports five attacks. Denial of service attack, where it just targets all messages, essentially sends an arbitration ID of zero every time a node starts to transmit, so nobody else can actually talk on the bus because they will always lose arbitration. So that's a little bit of a buzzkill, but I think it's a little bit of a buzzkill. I can choose an arbitration ID and say, hey, instead of sending this data, send this data instead. And just ignore the other guy yelling at you for sending the data that you shouldn't be sending. Transmitting multiple overload frames. Something that's interesting about the overload frames is that they're generally not reported up to your software. The CAN peripheral just, oh, it's an overload frame. I'm going to ignore that. But they don't actually check to see if they get more than two overload frames. So, you know, it's a little bit of a buzzkill. So you can transmit overload frames. That doesn't even get reported up to the software that you're using. I also created a cyber paperclip mode and a knack attack that I'll talk about a little bit more in the demo videos that I have. So the advantages of CANT over a lot of the tools that we have right now is that we have complete control over signaling, including being able to force a recessive bit with the CANT shield that I made. We can follow the CANT spec as it suits us. Smith messages, as you would with the CANT shield. We can follow the CANT with the normal CANT peripheral. And then as soon as we want to start abusing the CANT spec, we can do that. If an ECU is giving you trouble, I've used CANT for this before. I'll just use CANT to knock a specific ECU offline so that it can stop interfering with what I'm trying to do. And it's more difficult to detect than packet injection. That's something they talked about in the paper that led to the ICS alert is using this sort of technique to evade car IDS and IPS type systems. Because you're as far as something sitting on the bus receiving is concerned, the bus is actually behaving properly. There's only the note that's transmitting knows that something is really going on often. I've got a demonstration that walks through the what we can do with CANT. For this demo, I'm using 3PO, our portable car hacking demo, to demonstrate some of the CAN attacks that we can do with two of the open source. Is that picking up at all? No? All right. One of those tools that Grim has developed, one of these tools is CANCAT. CANCAT is the tool that Grim has been developing for a few years now. It is an Arduino DUA with a CAN shield. It is more of your common car hacking tool. We use it for doing CAN bus packet injection, CAN bus sniffing. There's another tool that I've used. It's called CANCAT. It's about going through the The one disadvantage that CAN-CAT has, though, is it is built on top of a standard CAN peripheral. So it's limited in how badly we can misbehave with that. We'll demonstrate a little bit later. The other tool is the CANT tool that Graham recently released. CANT is a Nucleo H743ZI development board with a CAN transceiver wired to it. And we use that to essentially bitbang CAN over GPIO. This gives us complete control over the CAN messaging at the electrical level and allows us much greater control over what is going out on the CAN bus. We're going to start the demo by showing how to use CANT to act as a bus killer. What this attack does is any time any node on the bus tries to send a message, CANT will take over and send a message, a valid CAN message with an arbitration ID of zero. This... limits... effectively this... limits any other node from transmitting on the CAN bus. So we'll go ahead and set up that attack. Set the mod rate. And we'll go ahead and choose the bus killer attack. And we see that the... very quickly the brake fluid light pops up. The instrument cluster starts shutting down. Currently, nothing is able to transmit on this bus. We can come over here to the oscilloscope. The video is not working. We see... Oh wait, what? ...that we're sending out a valid CAN... ...is it not? I can't see where the main one is. ...is it... ...is it... ...is it... ...is it... ...is it... ...is it... ...is it... ...is it... For this demo, I'm using 3PO, our portable car hacking demo, to demonstrate some of the CAN attacks that we can do with two of the open source tools that Grim has developed. One of these tools is CanCat. CanCat is a tool that Grim has been developing for a few years now. It is an Arduino Due with a CAN shield. It is more of your common car hacking tool. We use it for doing CAN bus and packet injection, CAN bus sniffing. The one disadvantage of CAN... CanCat has those. It is built on top of a standard CAN peripheral. So it's limited in how badly we can misbehave with that. We'll demonstrate a little bit later. The other tool is the CANT tool that Grim recently released. CANT is a Nucleo H743ZI development board with a CAN transceiver wired to it. And we use that to essentially bitbang CAN over GPIO. This gives us complete control over the CAN. We can do CAN messaging at the electrical level and allows us much greater control over what is going out on the CAN bus. We're going to start the demo by showing how to use CANT to act as a bus killer. What this attack does is any time any node on the bus tries to send a message, CANT will take over and send a message, a valid CAN message, with an arbitration ID of zero. This limits... This... Effectively... This... This... Limits any other node from transmitting on the CAN bus. So we'll go ahead and set up that attack, set the baud rate. And we'll go ahead and choose the bus killer attack. And we see that the... Very quickly, the brake fluid light pops up. The disk block cluster starts shutting down. Currently, nothing is able to transmit on this bus. If we come over here to the oscilloscope... We see that we're sending out the valid CAN message. And if you deported this, it would be a completely valid message. But it's only sending this message whenever any other bus tries to send its own message, effectively killing the CAN bus. Now, the effect of this isn't all that much different than you'd get from jamming a paperclip into the CAN bus and shorting the two wires. The advantage of CANT's approach is that it does that same... It has that same effect without violating any of the rules of the CAN bus. This is a perfectly valid, properly functioning CAN bus, just nobody else is allowed to transmit on it. We'll go ahead and stop this attack from happening. See that the CAN bus goes back to normal on the oscilloscope. Next step is we're going to illustrate those differences I was talking about between how CAN-CAT works and how CANT works. So CAN-CAT is a tool we've been developing for a while. Like I mentioned, it runs on the Arduino Due with a CAN shield on it using a standard CAN peripheral. So it allows us to do things like just send a CAN packet. What this CAN packet that I'm about to send does is it causes the brake fluid low light to come off. And we'll see that happen up in the instrument cluster. I'll send it. Brake fluid low pops up. But only for a fraction of a second. And this is because the body control module is sending out the brake fluid status message about three times a second. And of course the brake fluid level is actually okay on our demo. So this message that we're injecting is being overridden by the body control module almost immediately once we send it. If we try to flood the bus with this message, just put this in a wild loop and keep pounding on it, we see that the brake fluid light will pop up and go away. And pop up and go away. And pop up and go away. This gives us very herky-jerky control over whatever it is we are trying to control. This is a problem that you run into quite frequently with CAN. You're trying to inject a message to do something malicious. But your message is getting overridden by a different ECU on the system. CANT has a very nice data replacement tool node that has been written. We'll go ahead and set the arbitration ID. The arbitration ID is 290. We'll set the baud rate to 125 orbits per second. And we'll choose the data replacer attack. The data is 8 bytes long. If we go back, we'll see the message is 8800106000000. We'll go 880010600000000. And as soon as we start doing this, we see that our brake fluid level low light comes on in the instrument cluster and stays on. And the reason for this is because this attack, since we're replacing the data with our own data, violating the rules of CAN, we're only violating the rules of the CAN bus from the perspective of the body control module. The body control module should be the one sending the message. It should be the only one on the bus. But we're taking the bus away from the body control module. So the body control module is going into an error state. If we take a look at the scope here, we'll see. Right here, we see that the body control module is hitting out these longer pulses. These are error frames. The error frames we were discussing earlier. We'll see there's quite a few of them. Down below, there should be 16 of them. Because the body control module is going into its plus off state. Resetting. Resetting. Sending active error frames until it accumulates 128 send errors again. And once it's accumulated those 128 send errors, it goes into error passive. And then eventually into plus off. So CAT allows us to then just override any message on the bus. Eventually knocking that ECU offline to allow us to have complete control. Over whatever message it is we are trying to control. The last attack I want to demonstrate is an attack of the overload inserter attack. So the overload frame jumped out at me when I was reading the CAN specification. The CAN spec says that no device on the bus should send more than two overload frames. But it doesn't say what should happen if somebody does send more than two overload frames. Now the purpose of the overload frame is to allow slower nodes on the CAN bus to request a little bit of extra processing time after they receive a message. So they send out the overload frame. This gives them just a little bit more time to process a message that they've received. Let's go ahead and set the baud rate again. And choose the overload inserter. Let's just send two overload frames. Just behave in a nice appropriate manner. And we see that things seem to be functioning quite normally. So let's go. We go in and we see we have one, two overload frames. Everything looks nice and kosher. Let's send more. Let's send five overload frames. See what happens. Now that we're here at the scope, we see we have our one, two, three, four, five overload frames. And we also see that everything still seems to be running properly. So apparently sending more than two overload frames doesn't immediately cause any issues. Let's try sending more. Let's try sending 50 of these overload frames. We'll be sending quite a few. Now we see that this is taking some effect. The brake fluid level low light comes on for some reason. And that it's not a camera glitch. That instrument cluster really is kind of dimming. You can still see it's still kind of running. But it's definitely something weird going on. And if we come over here to the oscilloscope, we see, as we expect, that we're sending a whole bunch of overload frames. We also see that the amount of time we're spending on this, when we're sending overload frames, is vastly more than we're sending actual messages. So we're actually seeing a significant increase in bus loading here. We want to send more. Let's try sending 100 of these things. No, 1,000. Send 1,000 of these things. And if we send 1,000, it causes the instrument cluster to completely shut off at this point. And if we come back here to the scope, we see the amount quite a bit. We see we're spending very little time actually sending messages. And we're almost spending the entire bus time is spent in these overload frames. This is a demonstration of CANT. What CANT allows you to do. CANT allows you to do things that you can't do. And see what the effects of that is. So after... Since that demo, I've added a couple new features, which are also interesting. And I have a demo for those as well. Maybe. You know, I recorded these videos, so I didn't have to go through all the problems you get with a live demo. But I'm going to show you how to do that. I'm going to show you how to do that. When I released CANT back in January, there was one thing that CANT couldn't do at the time. And I figure if I'm going to release a tool called CANT, I should probably make sure there's nothing that CANT can't do. The thing that CANT couldn't do at the time was, CANT couldn't assert a recessive state on the bus. This is how CANT handles all of its arbitration, all of its error handling and error recovery, is by assuming that a node cannot assert a recessive state on the bus. That if any node on the bus is asserting a dominant state, then the state of the bus will be in the dominant state. So in order to accomplish this, I created this piece of hardware. It's a shield that plugs into the Nucleo STM32H7ZI dev board that we've been using. And it is a standard CANT transceiver. It has a... It has a CANT transceiver connector, a couple of passives on it. The thing that I added that makes it special is this little device here at U2. It's an analog switch. And what this analog switch allows me to do is it allows me to short CANT HIGH and CANT LOW together. And when CANT HIGH and CANT LOW are shorted together, it allows... It will cause any node on the bus to read a recessive state because they'll be in the same potential. So this allows me to violate that last inviolable for the CANT bus, is by asserting a recessive state on the bus. And this allows me to create two new attacks plus adding an enhancement to a third attack. So the first attack I'm going to demonstrate is the cyber paperclip mode. This just turns on the bus. It does the same thing that shrugging a paperclip into the CANT bus would do. It just causes the buses to short together and nobody can communicate. We'll go ahead and start that attack, the bus short attack. And we see that this purple line here on the scope is the state of the switch. So we see that this went HIGH, turned the switch ON, and that now we don't really have any traffic on the CAN bus. And at some point we should be able to see some sort of message start to come up. We can see that the instrument cluster is dead. We see it's kind of trying to send a message here and there, but it's not able to actually send anything because the bus is shorted together. Go ahead and reset our CANT. Reset the car because recovering from this is difficult. Go ahead and get the instrument cluster running again. The second attack I want to demonstrate is a knack attack. And so what the knack attack does is it tries to essentially clobber the acknowledgement bit that the node and the bus are supposed to send back once they properly receive a message. So go ahead and set our baud rate. Choose the knack attack. And this should, as we see here, this is where the knack slot should be here on the scope. We see that our switch goes high for one CAN fray or one CAN bit, and it does cause all this crazy stuff to happen on the bus, all this noise to happen. So as we can see, our instrument cluster is still running. It seems like it's still getting enough back that the car isn't too unhappy. But we're able to see that we're able to generate a bunch of noise on the knack frame. The last attack I want to show is an improvement to the data replacer attack. Previously, the data replacer attack would only work if we were wanting to send a dominant bit where a recessive bit was being sent. The brake fluid test that I showed and the previous video showed that. The brake fluid level low is a dominant state, so I was able to assert that dominant state on the bus and have the brake fluid level low show up on the bus. But what if we want to go the other way? So in this case, I've actually used our control box to cause the body control module to actually be sending the brake fluid level low, which it does by setting that bit to zero, to the dominant state. And now I want to overwrite that with the recessive state for that bit to cause the brake fluid level low light to turn off. I was unable to do that with the previous version of cant, but now I can do that. I'm going to go ahead and set the arbitration ID, choose the baud rate again, and do the data replacer attack. Set 8 bytes. First byte will be 98 00 01 06 00 00 00 00. Then I added this line here, the force recessive bit. Force and recessive is not currently the default. I'm going to go ahead and say yes to force the recessive bit. And we'll see here that the brake fluid level light goes away. Now we will see occasionally that the brake fluid level light will flash back on for just a second and turn back off. I haven't been able to figure out why that is happening. If we go and look at the actual state of the bus using the CanCat tool that I have hooked up, we can see that it's all of the brake fluid message bytes are being set to what I set it to, which would be a 78 all the way across. There's some other behavior in the instrument cluster that's causing that message to pop back up occasionally. But the attack works. All of the messages that we're targeting are now coming across the bus with the correct value. And one thing I forgot to mention in the video is that another advantage of being able to force the recessive bit is that I can also clobber the error frame that the body control module or whatever ECU is sending the message is sending. So that the only node on the bus that has any idea anything's wrong is the one that I'm specifically targeting. Nobody else uses an error frame. Nobody else does anything to its error counters. Whatever else you have on the system, it would continue to operate as if nothing was wrong and have no idea anything else was going on. So there are some things that we can do. There are some limitations and mitigations to this. One limitation is that you need physical access to the car in order to do this. Maybe. It's also possible to, theoretically possible, to find a way to get into the car remotely or wireless or cell modem or something and can reprogram an ECU to be a cant, essentially. Because there's nothing, minus the analog switch to force the recessive, which I'm guessing most, OEMs don't actually stick on the CAN bus for you to play with. Minus that feature, everything else you can do, just a bog standard CAN peripheral that is shipped with every car, every ECU that has a CAN bus. So increased, for the attacks that just increase CAN bus load, those could be detected by something that's looking at CAN bus. You wouldn't necessarily be able to tell why with the overload attack, because like I mentioned, those overload frames aren't actually reported up to software. Of course, you'd see your bus load increasing, and that stuff couldn't make its timings that it's supposed to make, but it'd be difficult to determine why without hooking a scope or similar up to the car. Power fingerprinting is something that some companies are working on. Were they able to fingerprint the nodes on the CAN bus to see if there's anything out of the ordinary? CAN is definitely out of the ordinary. I haven't actually used one of these to see what CAN looks like, but I'm sure it sticks out like a sore thumb, because I am bit banning CAN over GPIO. That's going to look a bit different. Of course, then the question is, then what? So, yay, something's happening, but what do you do now with that car to make it work properly? Increased network segmentation can help limit how this attack, some sort of encryption or authentication could help mitigate some of this, possibly, although CAN makes a lot of this difficult because of how small its data size is and how low power a lot of the ECUs are. And, of course, you can always switch away from CAN bus. Minus itself is mandated by law. That will give you some more options. As I'm further reading, the CAN spec is available right up there, and this is the paper that led to that ICS report, ICS alert going out. I've made a couple other improvements to CAN't backspace works now. I did it as of a week ago, so that's really handy. A couple other usability improvements, and I am pushing those up to GitHub right now. So that will all be available very shortly up on GitHub. I also have about 20 of those CAN't shields available. I don't have those. I have the dev boards, just the shields. But those dev boards, like I said, they're about 20 bucks. Get them from Mouser, Arrow, whoever you generally order from. And anybody who wants one, feel free to come up and get one. And if anyone has any questions. I switched to this because I wanted to make sure that I would have enough. This dev board is an ARM Cortex M7 at 400 megahertz. It's a pretty beefy board. I wanted to make sure that I would have time to actually launch the attacks I wanted to be able to launch and have the flexibility to do more complex attacks without then not being able to make timings on the CAN bus. All right. Thank you all very much. Like I said, if you have any more questions for me, feel free to come up. I have a handful of those shields that I'm handing out.