Welcome to security like the 80s how i stole your rf and we'll be exploring cve 2022 27254 and more so who am i my name is Aipan Rajesh and i'm an aspiring security researcher and a student at the university of Massachusetts Dartmouth um you can go visit my website or follow me and reach out to me on either twitter and you can also go check out my github repositories and the co-author for this is Papa Mikhail also known as Scott he's a sub gigahertz architect for flipper devices and you can reach out to him at telegram or even check out his github repo so these are the video that introduced me to the very concept of cyber security so huge shout out to sammy kankar hack5 and even defcon for teaching me what cyber security is and which even got me interested in the field um and it's been almost seven years and it's insane that i have this opportunity now so quick disclaimer no key fobs are harmed in this making in the making of this presentation and please don't try stealing cars this presentation in no way is to encourage vehicle theft story time how did i get this so this all started off for a class in college last semester which was ece 488 cyber cyber threats and security management by professor liu and we had to do a project for the class and i thought to myself why not take this opportunity and try something new something that i've been wanting to do for so long so i was searching around and i came across the cve for a 2017 honda crb and i thought um i have a honda civic it's 2018 it's a cv and i'm going to they're going to be working for the law school this year and i was like dude what's happening to people who are not working for the law school this year why not pay cv so i went through the repositories and um i went there and i went up to the and why not write myself so i went through the repositories and i saw two links which was to a github repository by hacking in your heart uh his name is blake berry and the vulnerability was first reported by uh victor cazares another security researcher so i went on facebook marketplace found a hack rf for about 200 250 got it and tested on my car and it worked so what next i realized that the cv only mentioned a 2017 car and i thought why not build onto it why not try and add um to make a complete list of the vehicles that are vulnerable to a simple replay attack so i submitted a cve got this email so we were credited for this cve and here's a picture of it on the website so that got me quite a bit of attention i didn't expect it at first but then um i had the opportunity to be interviewed by fox 11 la um and even featured on it i was also interviewed by abc's good morning america which was an amazing event so getting into the tech so keyless entry systems have been there for a really long time so over 72 percent of the cars after 2014 have done and even 19 for this attack we'll be exploiting the remote keyless entry systems onto on on vehicles so it was first introduced by renault on the renault fuego in way back in 1982 and it also operates at 315 433 or 868 megahertz depending on which country you're in and which brand you're going for so the way remote keyless entry works is that it's just one way something interesting that i saw on an article where to quote mr clements where he said this bank intelligence has obtained this keyless entry segments per inform and this keyless entry century where there's a challenge response this is just one way and that's why this is possible so what next we need to know what modulation is it's the way the message is sent through radio signals so you have amplitude key shifting frequency key shifting and face key shifting which is ask fsk and psk where data is transparent so this is one way where this is really possible so i attached a bamboozled keyוך over here so you might think it's possible to articulate his voice seat but basically what you would see is at the bottom there's 3 transmitted even either in the amplitude the frequency or the phase like the name suggests so static versus rolling keys I'm sure everyone's seen Sammy Conkers fixed code and rolling code attacks on the open Sesame and many things like that so over here what we're exploiting is a fixed code so like the diagram mentions the code is always sent as X and it doesn't it never expires but what's supposed to be good practice for this is rowing codes where every time the button is pressed the car or any other device whatever it is it rolls to a certain code that's determined by the pseudo random number generator and so does the key fob but in in this case it's clearly not so what what tools are we using so over here we'll be using FCC ID.io I'm sure everyone's heard of it in all the other talks and it's really useful because you don't need to know anything about the key fob apart from its FCC ID which you can Google and then you need an RF transceiver either a hack RF usrp flipper zero or even a yardstick one and then GQRX or SISDR whatever you prefer based on your operating system and universal radio hacker so FCC ID.io so you can either open up a key fob or even Google what key you have for depending on your car and for this Honda Civic 2018 EX uh it's krv52x and then once you go on to FCC ID.io you can see that the key fob is set to 6.7 so we know roughly about where it starts and ends and just visually we can tell that it's FSK so it's frequency key shifting which is important to remember and I'll explain that a little later so getting into RF transceivers so a hacker F flipper zero and yardstick one and usrp enter 10 are great um devices you can use to try this attack out yourself it's worth mentioning that the hacker F and usrp are what are known as software defined radios unlike zero and the last one which are computer control data devices so one main difference in both them is that SDRs can um simply capture anything and it will simply transmit what it hears although for um the flipper zero and the yardstick one you need to know exactly what you're looking for which means the modulation as well as the frequency unlike the SDRs where it only cares about what frequency um that the device you're trying to capture is using and another big difference is that the hacker F and usrp go from maybe one megahertz to six gigahertz depending on the daughter board present in it but the flipper zero and yardstick one are two gigahertz devices but that's perfect for us because all we're doing is attacking from 315 433 and 868 megahertz so here's a short video on gqrx of a real key fob capture so you can clearly see that it's speaking at about 433.6 as well as 434.1 ish something so we now know that it's not only frequency key shifting but it's also transmitting at two set frequencies and here's a video of an SDR as well so in the video you can see that it's telling you exactly roughly about where the frequency is so I estimated it to be around 433.65 ish and 434.18 which is good enough for an SDR because we just need a rough indication of where the signal is playing so Universal radio it's a great tool that I recommend if you're new to wireless security it's really easy to use you can demodulate you can capture and you can even analyze everything but I prefer GNU radio uh just because it's I'd like to learn more on how things actually work so it's built in C and the way this works is that you just drag and drop blocks and feed in parameters and it works so this is the real capture flowchart that we have used so you just have a source which is actually our hacker F where you just feed in the channel frequency and your sample rate and then what you do is you put it into a file sync in order to save it and the QTG Y sync is just to show where the peak is so if you see clearly there are two peaks at 433 as well as 434 roughly and here's the real flow chart for transmitting so all we're doing here is we've already saved um the files in and it's either file lock start and unlock and then we can just enable whatever whichever one we like and then just feed it into the sync which will transmit through the hacker so enough theory let's see a demo foreign foreign foreign foreign so as you can see in the video we first used the start file capture after which we use the unlock capture to not only remote start the car but also unlock it and then next up is my favorite so new england weather in the summer can be really harsh and it's really hot up there and having a black car doesn't really help so i use this feature almost every time before driving the car just so it can cool down but just imagine if someone was listening with a with any of the RF transceivers new england also has a lot of snow so just imagine if you were to replay that as a prank of course on okay moving on it's time to get serious so that's the key fob which we've opened up and then if you want to extract useful information out of this the best place to refer to is the data sheet so once you know what pin you're looking for you can look up the data sheet which over here is the pcf um nine uh pcf 7 900 and then you just connect um you just connect to the key fob via spi so um scott from uh flipper sorted everything and then using spi analysis uh we were able to extract a lot of information out so spi which is serial output and and and spi was developed by motorola in the 1980s and its you can use three wire or four wires as well and the this particular chip supports both so the way this one was wired up was um was three wire so spi consists of uh serial output uh mossy which is uh master output slave input so which is master input slave output s clock which is serious uh serial clock sorry um and over here we can find the good stuff on the miso so here's here's the information on the miso so it's zero b zero one one zero one one anyone asked me what the hell does this mean i mean that's that's the first question that that came to my mind when when i saw this it's just numbers right but to quote uh professor weill it's in the data sheet so then if you look carefully if you uh see zero b zero one one zero one one is zero one one zero one one which is each bit and after checking the data sheet you can find out exactly what it means so in reality the screenshot that you saw previously was for selecting the baud rate and here's the um useful information that we have been able to use in the data sheet so here's the data sheet so here's the data sheet and here's the baud rate and uh we're trying to extract only some of it so the so zero b one thousand zero one hundred actually correlated to um the frequency low which gave us the information that um one of the frequencies that it's operating it at is 433.657070 so like you saw in the previous gqrx and um s5 videos we did estimated to be about four three three point six 65, but this is obviously more precise. And the same with 434.17, 6948, where we estimate it to be somewhere around 434.18-ish. And then something that's also very important is what modulation. So obviously, we could see that it was FSK, but then this is a guaranteed value as well, because we know exactly the deviation of the same amount. And going into the Baud rate selection, we were able to find out that the Baud division is 51. And with a little math, we can find out the Baud rate itself, which came up to about 15380 per second. So what next? So we have Manchester. So we did find out that the device uses Manchester encoding, which is a way of encoding the data for transfer. And we didn't know much about it. And in fact, the RF end of the chip selected the encoding as NRZ, but the previous chip had Manchester encoding. So the RF chip only transmitted what it heard, which was actually Manchester. So it thinks it's NRZ. So here's how you calculate that. So remember the 62.81 microsecond in the previous slide? So that's the shortest distance between the peaks. So you divide one second by that, which gives you about 7,961 kilobytes per second. Which is really useful, because in case we need to demodulate it, we need to know the Manchester bit rate. So here's how you do that as well. So you just once again, you feed it in, and it will demodulate it for you and gives you all the information you need. So you might ask, why did we do all of this when Universal Radio Hacker can do it for us? Like, really, really easily. And I have the answer to that as well. So I'm sure everyone's heard of the Flipper Zero. So out of the box, it can not support locking, unlocking, or doing any of this, but with the help of SCORP, and through this analysis and the information extracted, we can program it to do so. Like I said earlier, it's not an SDR, so you have to program it. So for this, he added the frequencies for 433.65, 434.17, and even added a special modulation called Honda 1. There's Honda 2 as well, which is more sensitive, but that means it's more noisy. And, but Honda 1 works perfectly. So real question, does it work? Looks like it does, right? So here's a picture of the key fob capture and the Flipper Zero. So you can see that the Flipper Zero capture might be a little noisy, and that's because of the CC1101 chip, which we already know is pretty noisy. So here's a video of it working. You might have seen this on Twitter, and here's how we actually make it work. And let's take a look at it in real time. Okay, so here's a picture of the key fob. Right, so it's not a good idea to have a key fob capture at a time. So let's see what happens. And here's another picture where it works. Let's see if it really works. Here's the full picture, you know what I mean. So if I had a key fob, there would be a little bit backlight. If I had the Flipper Zero on it, it would set the key fob up. Okay, next up, a Civic with a laptop is the most feared thing in the car community. And if you don't understand it, Google it. And this is a pretty sick picture. Someone managed to get Linux running on their infotainment system. So we already know that a Civic with a laptop is pretty dangerous. But imagine a Civic with a laptop and a Hacker F1. Isn't it the ultimate wall-driving setup? Okay, enough about that. So what's the solution? So obviously, I've recommended Faraday pouches and got trolled for it. And we all know that it's not the solution because it's just an MPV fix. But we all know there are billions to overcome it. So rolling keys is the only way that a simple replay attack like this would not work, right? That means rolling codes, they're safer, right? No. So after we released this, my good friend, Kevin from 600, who also ran a talk at Car Hacking Village, managed to break rolling code encryption as well. And he published his research calling it rolling porn. So there you go. So it looks like even rolling codes have been hacked as well. He was his level. So there you go. Rolling codes have been broken into as well. And he did report this to the automotive company at first and they straight up denied it until he reached out to Rob Stump from The Drive. And he said, Hey, what's up? and he confirmed it as well you can go check out his page on twitter and see the demo for yourself so after all of that they did acknowledge the issue and they said that it's not as easy to exploit and yes they're right car thieves are obviously more sophisticated than all of us and they've been doing it for years they i'm sure they must have found a billion ways which are more efficient so in response to that honda came up with a statement saying that our vulnerability has no indication that you can actually drive an acura or a honda vehicle but i think everyone already knows especially at the car hacking village that once you're in a car it's yours because you have access to the canvas and yeah so this vulnerability alone cannot let you drive away with it but we already know we have key programmers and it's already known that car thieves do buy these things and they can program new keys for the car it's like this so when honda came up with that i said challenge accepted and he said well we're gonna test this out we're gonna get some people to come in and take the key we can't even tell them that we want it because we're just paid to do that we can't even tell people that they want it yes so the problem is that we're trying to get the key to the car and that's why we were starting to figure out what to do because to get it out of the way i think it's it's like oh so you're trying to police the car I don't think it fits in here. Let's try to go that way. Let's go that way. Let's go that way. Let's go that way. Let's go that way. Let's go that way. Let's go that way. So there you go. You can drive away with a locked car in just under four minutes. And that's insane, right? Something alarming is that these devices cost anywhere between $3,000 to $4,000. And I also learned that in the state of Massachusetts, you actually don't need a license to go ahead and buy one of these. So just for a video, buying one didn't make sense. But if you were a car thief, it's a great investment. I don't encourage it. And obviously, you know, but it's very much possible. And it does happen, unfortunately. Okay. So in the future, obviously, we know that cannabis attacks are a thing. Just imagine anyone can reverse engineer such a key program or code it into a great tool like J. Teller's Scantot and just defeat the immobilizer or make it program a new key. You can do it much quicker than four minutes as well. So quite recently, about two weeks ago, even Senator Markey sent out about 20 different letters to all different automotive companies asking them questions about security in remote keyless entry systems or keyless entry systems itself, which I think is a great thing just because many of these systems are vulnerable. And I've also heard from other researchers that car companies either acknowledge it and say that, oh, it's fine. But I don't think it's fair to know that you have a vulnerability and don't fix it at all. Especially fixed codes. The first time I heard about it was about seven years ago through Samy Kamkar. And that's why garage doors now have rolling codes. So why not a car? It's the least that can be done, right? And in fact, the NHSPA only for 2020 approximates the cost of stolen vehicles to be about $7 billion. And that's a huge number just in the US. And that's from 804,000 vehicles stolen in 2020 alone. So what next? You can join us on this journey. If you want to show your support, please grab a free sticker. This is a sticker for CVE202227254. Or a rolling sticker at DEF CON's car hacking village. This is what they look like. And also, if you are interested in this. . .