1 00:00:00,440 --> 00:00:05,380 So today I'd like to share with you guys some of the research results for one of the 2 00:00:05,380 --> 00:00:29,680 digital car key system. Yeah, so. Okay, I have to go just this way. Okay. Yeah, so 3 00:00:31,040 --> 00:00:37,480 who am I? My name is Kevin. Yeah, you can follow me on Twitter. It's welcome. I'm a 4 00:00:37,480 --> 00:00:44,380 security researcher from InGeek Security Consultant. We are based in Shanghai. We dedicate to automotive 5 00:00:44,380 --> 00:00:49,900 security research. And my particular area is focused on wireless and embedded systems. 6 00:00:50,480 --> 00:00:58,140 Yeah, so. And today's agenda is going to be like this. First, I'm going to do a very quick 7 00:00:58,140 --> 00:00:59,980 introduction about key systems. 8 00:01:00,920 --> 00:01:06,640 And then I will walk through the structure and the functionality of our target today. It's called 9 00:01:06,640 --> 00:01:17,960 ArmyKey. And ArmyKey is also called, aka digital car keys. And then I will do some 10 00:01:17,960 --> 00:01:25,180 analysis and introduce attack vectors on this ArmyKey system. So basically I will start from 11 00:01:25,180 --> 00:01:29,980 physical layer and take a look a little bit about ArmyKey system. And then I will talk about 12 00:01:30,000 --> 00:01:37,580 RF. RF layer. And we take a look at the application. Eventually, we test see how can we do some 13 00:01:37,580 --> 00:01:50,420 Bluetooth sniffing and decrypter packet. Okay? So, introduction. I think the car key itself is 14 00:01:50,420 --> 00:01:58,320 one of the most common items we can find in our pocket. Right? So, in a very early age, the car key 15 00:01:58,320 --> 00:02:00,560 only really just rely on the mechanic key, 16 00:02:00,720 --> 00:02:04,540 and then they implement some kind of remote key entry. 17 00:02:07,460 --> 00:02:09,940 So it actually start with some kind of infrared, 18 00:02:10,360 --> 00:02:14,460 and then move on to RF fix code, and then the routing code. 19 00:02:14,960 --> 00:02:19,460 And in order to do some syndication, 20 00:02:19,800 --> 00:02:24,960 they also implement something called a RFID, 21 00:02:24,960 --> 00:02:27,840 and they put RFID chip inside your car keys, 22 00:02:28,060 --> 00:02:35,280 and then there's a new game changer coming in. 23 00:02:35,640 --> 00:02:40,720 So basically those manufacturers start to implement 24 00:02:40,720 --> 00:02:44,180 some kind of car key system that really just rely 25 00:02:44,180 --> 00:02:46,920 on mobile phones, right? 26 00:02:47,140 --> 00:02:52,500 So yeah, this is gonna be a new trend. 27 00:02:53,100 --> 00:02:54,020 For example, 28 00:02:54,020 --> 00:02:57,320 if you're buying a new Tesla Model 3, 29 00:02:57,480 --> 00:03:00,740 you won't have any actual physical key anymore. 30 00:03:01,220 --> 00:03:04,120 They're gonna provide you RFID tag, 31 00:03:04,340 --> 00:03:07,440 and also really you're gonna download 32 00:03:07,440 --> 00:03:08,420 the application from them, 33 00:03:08,520 --> 00:03:14,240 and you can unlock or start engine from your mobile phones. 34 00:03:17,760 --> 00:03:21,280 Sorry, that was not my laptop, so I don't know why. 35 00:03:22,140 --> 00:03:22,620 Yeah, so. 36 00:03:22,620 --> 00:03:27,780 So now Tesla is not the only manufacturer doing that. 37 00:03:28,940 --> 00:03:32,520 Actually it's everybody doing this for future cars. 38 00:03:32,800 --> 00:03:36,860 So like Volvo, like Mercedes Benz, 39 00:03:37,340 --> 00:03:39,440 they're also doing this kind of thing, right? 40 00:03:39,640 --> 00:03:41,060 So that's gonna be a new trend. 41 00:03:41,980 --> 00:03:43,780 And now, 42 00:03:45,520 --> 00:03:48,740 what has been done so far, 43 00:03:49,560 --> 00:03:52,360 for the past few years, we had, 44 00:03:52,620 --> 00:03:57,120 look at many different case studies 45 00:03:57,120 --> 00:04:01,060 dedicated to the key-file studies. 46 00:04:02,440 --> 00:04:06,980 So here I list some of them as an example. 47 00:04:08,600 --> 00:04:12,680 For example, in the early age 2008, 48 00:04:13,740 --> 00:04:17,500 the rolling code algorithm called KeyLog has been cracked. 49 00:04:17,500 --> 00:04:24,800 And also, there's a transplanted organism at high-tech, too, 50 00:04:24,900 --> 00:04:26,140 also being cracked. 51 00:04:26,780 --> 00:04:29,780 And also, Sammy, he's our hero, as always. 52 00:04:30,300 --> 00:04:36,980 He presented a talk in DEF CON a few years ago. 53 00:04:37,980 --> 00:04:42,580 Basically, he found a trick called the rolling jump 54 00:04:42,580 --> 00:04:44,380 that basically you can use a lot 55 00:04:44,380 --> 00:04:47,240 to kind of bypass the... 56 00:04:47,500 --> 00:04:49,100 rolling codes mechanism. 57 00:04:49,780 --> 00:04:53,240 Now, in 2015, 58 00:04:53,560 --> 00:04:56,960 there's some new attack metric came out. 59 00:04:58,240 --> 00:05:00,940 I'm going to introduce a little bit more on these two details. 60 00:05:01,620 --> 00:05:05,200 So basically, a researcher from Germany, 61 00:05:06,580 --> 00:05:11,300 he found a way to hack your BNW 62 00:05:11,300 --> 00:05:12,640 through a cellular network. 63 00:05:13,120 --> 00:05:14,100 And then there's... 64 00:05:14,400 --> 00:05:16,520 In England, there's a research... 65 00:05:17,500 --> 00:05:19,940 Well, a company from Pentax Partners, 66 00:05:20,160 --> 00:05:21,780 they did their research 67 00:05:21,780 --> 00:05:26,060 and found out how can they hack the Wi-Fi access point 68 00:05:26,060 --> 00:05:28,100 to your Mitsubishi Outlanders. 69 00:05:29,860 --> 00:05:30,940 Oh, okay, sorry. 70 00:05:31,120 --> 00:05:31,840 All right. 71 00:05:32,540 --> 00:05:33,480 Yeah, so... 72 00:05:34,820 --> 00:05:38,320 Yeah, those are the attack vectors 73 00:05:38,320 --> 00:05:40,420 not just only focused on your key-file anymore. 74 00:05:40,780 --> 00:05:43,280 So it actually involves even more attack vectors. 75 00:05:45,560 --> 00:05:47,480 So, yeah, here's the details. 76 00:05:47,500 --> 00:05:51,260 Here's the details regarding the BNW connect drive. 77 00:05:51,620 --> 00:05:53,800 So basically, this German researcher, 78 00:05:54,120 --> 00:05:56,380 he able to set up a fake base station. 79 00:05:56,620 --> 00:06:00,220 So it's like similar cellular network. 80 00:06:00,860 --> 00:06:06,800 Now, really, one of the design here is 81 00:06:07,420 --> 00:06:13,980 BNW is really around HTTP to communicate back 82 00:06:13,980 --> 00:06:14,760 to the back-end server. 83 00:06:15,020 --> 00:06:17,440 So he able to decrypt... 84 00:06:17,500 --> 00:06:21,480 The reverse engineer and decrypt the traffic 85 00:06:21,480 --> 00:06:25,800 and set up the fake base station 86 00:06:25,800 --> 00:06:31,160 in order to unlock the BNW connect drive, right? 87 00:06:31,700 --> 00:06:32,080 So... 88 00:06:32,600 --> 00:06:34,260 And then here's another case study. 89 00:06:35,500 --> 00:06:39,200 In 2016, Pentax Partners, 90 00:06:39,440 --> 00:06:43,880 the researcher, they able to crack the Wi-Fi access point 91 00:06:43,880 --> 00:06:46,580 provided by your Outlander cards. 92 00:06:47,500 --> 00:06:50,500 And once they connect to your car 93 00:06:50,500 --> 00:06:52,300 and reverse engineer protocols, 94 00:06:52,680 --> 00:06:58,560 now they able to do a lot of cool things 95 00:06:58,980 --> 00:07:02,360 like turn off your air conditioning, heating, 96 00:07:02,560 --> 00:07:03,820 and the alarms, right? 97 00:07:03,900 --> 00:07:04,600 That's the scary part. 98 00:07:05,340 --> 00:07:09,780 So I would say the new trend coming, 99 00:07:09,980 --> 00:07:13,160 there's always gonna be some new hacks, right? 100 00:07:13,600 --> 00:07:14,160 So... 101 00:07:15,260 --> 00:07:18,180 Now, let's take a look at our main target today. 102 00:07:18,360 --> 00:07:19,400 It's called AmiKey. 103 00:07:21,810 --> 00:07:24,700 Yeah, the AmiKey, aka digital car keys, 104 00:07:24,900 --> 00:07:29,580 is invest by a company called Xiaomi from China. 105 00:07:30,420 --> 00:07:33,240 Basically, this device here is, 106 00:07:33,320 --> 00:07:37,180 what it does is it enables some of old car module, 107 00:07:38,010 --> 00:07:40,760 model become like smart cars. 108 00:07:40,980 --> 00:07:43,960 So basically, you can use this device to connect to your car, 109 00:07:43,960 --> 00:07:47,240 and you can lock, unlock, and start your engine 110 00:07:47,240 --> 00:07:49,260 through mobile phones, right? 111 00:07:49,940 --> 00:07:53,120 And, yeah, here's some of the highlights for the features. 112 00:07:53,440 --> 00:07:57,020 So, yeah, so this device is really rely on 113 00:07:57,480 --> 00:08:00,120 Bluetooth Low Energy, and they can, 114 00:08:00,280 --> 00:08:02,840 as I said, they can lock and unlock your cars. 115 00:08:03,560 --> 00:08:08,940 And the one of the interesting feature I found 116 00:08:09,320 --> 00:08:11,200 regarding to any other smart locks 117 00:08:11,200 --> 00:08:13,720 is the key sharing features, and this is really, 118 00:08:13,720 --> 00:08:15,920 really advantageous, I think, 119 00:08:16,210 --> 00:08:20,380 this kind of old type of car key of systems is sharing. 120 00:08:20,520 --> 00:08:23,140 You can share to different users, your friends, 121 00:08:23,280 --> 00:08:25,320 even you are in different countries, right? 122 00:08:25,720 --> 00:08:29,740 So you take the picture down below, 123 00:08:29,900 --> 00:08:33,140 that's how you connect your AmiKey to your cars. 124 00:08:33,340 --> 00:08:36,640 So you have to put left your AmiKey, 125 00:08:36,700 --> 00:08:40,140 always left inside your car, right? 126 00:08:40,560 --> 00:08:41,800 And once, 127 00:08:43,720 --> 00:08:45,460 you come to a car, you want to open it, 128 00:08:45,580 --> 00:08:49,200 you just pairing with the AmiKey with your Bluetooth, 129 00:08:49,440 --> 00:08:51,800 and then you send the unlocking command. 130 00:08:53,700 --> 00:08:57,560 AmiKey will send another RF signal 131 00:08:57,560 --> 00:09:02,020 to, in order to unlock the car, right? 132 00:09:03,820 --> 00:09:07,560 So the components of AmiKey is like this. 133 00:09:07,820 --> 00:09:09,580 As you can see, it's quite simple. 134 00:09:10,580 --> 00:09:13,700 It's only really just a few items here. 135 00:09:13,700 --> 00:09:15,160 So here is one of the blank key, 136 00:09:15,340 --> 00:09:17,120 and then there's a main, 137 00:09:17,740 --> 00:09:23,100 you see the little thing in the middle? 138 00:09:23,220 --> 00:09:25,000 It's the last of the main board of AmiKey. 139 00:09:25,200 --> 00:09:27,020 And then there's another square one, 140 00:09:27,220 --> 00:09:28,740 it's called AmiKey sensor. 141 00:09:29,180 --> 00:09:32,600 So it's very simple components, right? 142 00:09:32,860 --> 00:09:33,300 It's not . 143 00:09:34,600 --> 00:09:37,980 So here's the, how you gonna do, 144 00:09:38,080 --> 00:09:41,020 how the AmiKey really works is first, 145 00:09:41,120 --> 00:09:43,260 you need to downloading some application, 146 00:09:43,260 --> 00:09:48,020 from AmiKey, and you do the normal process, 147 00:09:50,700 --> 00:09:53,120 sorry, you do a normal process, 148 00:09:53,200 --> 00:09:58,160 like you duplicate your original key, 149 00:09:58,320 --> 00:10:03,420 mechanical keys, and you scan the barcode 150 00:10:03,420 --> 00:10:07,280 on your AmiKey in order to get an activation code. 151 00:10:07,540 --> 00:10:11,300 Now once you put an activation code into application, 152 00:10:11,600 --> 00:10:12,940 then you are binding. 153 00:10:12,940 --> 00:10:16,080 You are binding your application with this AmiKey. 154 00:10:16,340 --> 00:10:19,860 And then you can log in to the AmiKey, 155 00:10:19,940 --> 00:10:22,760 to the booters, and from there you can lock and unlock. 156 00:10:23,180 --> 00:10:25,280 Send the lock, unlock command to AmiKey. 157 00:10:25,420 --> 00:10:30,560 And just like any other key duplicating process, 158 00:10:31,120 --> 00:10:36,500 the very last stage is you need to register 159 00:10:36,500 --> 00:10:38,420 your AmiKey to the car. 160 00:10:38,660 --> 00:10:41,380 It's just like if you lost your original car key, 161 00:10:41,420 --> 00:10:41,940 you go to the, 162 00:10:42,940 --> 00:10:44,540 the car dealer, you do the same thing. 163 00:10:44,640 --> 00:10:47,660 You need to register your new key to your car, right? 164 00:10:48,500 --> 00:10:48,600 So, 165 00:10:52,500 --> 00:10:56,880 as AmiKey claimed, they are supporting quite a lot, 166 00:10:57,420 --> 00:10:59,300 different brand of the car models. 167 00:10:59,640 --> 00:11:04,140 Now remember, those car models are not very high end, 168 00:11:04,160 --> 00:11:05,660 the recent car models. 169 00:11:06,220 --> 00:11:06,900 It's quite a, 170 00:11:07,980 --> 00:11:09,480 they're talking in the market, 171 00:11:09,640 --> 00:11:11,000 it's like an old car, 172 00:11:11,200 --> 00:11:12,700 an old model of cars. 173 00:11:12,940 --> 00:11:16,880 Because those cars usually don't have those fancy features. 174 00:11:17,200 --> 00:11:20,020 But what happens if you want to have some nice feature, 175 00:11:20,180 --> 00:11:22,940 and you probably can buy some AmiKey, right? 176 00:11:23,080 --> 00:11:23,680 So that's how, 177 00:11:23,680 --> 00:11:27,080 I think that's how the marketing strategy is. 178 00:11:27,580 --> 00:11:28,440 So yeah, as you can see, 179 00:11:32,120 --> 00:11:33,900 they supporting like a, 180 00:11:33,900 --> 00:11:36,920 but those model is very common, 181 00:11:36,980 --> 00:11:41,440 like a Volkswagen, Hyundai, yeah, Ford, right? 182 00:11:43,640 --> 00:11:44,140 So, yeah. 183 00:11:47,940 --> 00:11:50,480 yeah, let's take a look inside, right? 184 00:11:51,840 --> 00:11:54,400 From hacker perspective, we really want, 185 00:11:54,600 --> 00:11:57,100 we don't care how many model they are really support, 186 00:11:57,340 --> 00:11:59,680 we really care is how they last work, right? 187 00:11:59,820 --> 00:12:03,100 So, I think the very first stage when you, 188 00:12:04,020 --> 00:12:06,240 this is not just apply to AmiKey, 189 00:12:06,380 --> 00:12:09,480 I think it's a reply to any other embedded systems. 190 00:12:09,780 --> 00:12:11,240 The first thing when you get your target, 191 00:12:11,460 --> 00:12:12,460 you want to, 192 00:12:12,460 --> 00:12:15,800 you want to get as much information as possible. 193 00:12:16,640 --> 00:12:19,780 And now, sometimes when you get some, 194 00:12:20,380 --> 00:12:22,440 some black box of your target, 195 00:12:22,640 --> 00:12:24,580 you have no idea at all about your target. 196 00:12:24,800 --> 00:12:28,700 So, if you, I think the best practice is, 197 00:12:28,740 --> 00:12:31,100 if you are able to access some kind of x-ray machine, 198 00:12:31,400 --> 00:12:33,880 you take a picture to look inside. 199 00:12:34,280 --> 00:12:36,780 Now, the reason why we're doing that is to, 200 00:12:36,940 --> 00:12:41,080 to see if your target has implemented some kind of, 201 00:12:41,620 --> 00:12:42,140 protection. 202 00:12:42,140 --> 00:12:43,920 Protection mechanism inside, right? 203 00:12:45,180 --> 00:12:47,800 Sometimes you, if you, you, you, if you, 204 00:12:47,860 --> 00:12:49,680 they do, you, when you open the case, 205 00:12:49,820 --> 00:12:51,160 you will make damage, right? 206 00:12:51,340 --> 00:12:55,340 So, yeah, we take a look through x-ray machine, 207 00:12:55,540 --> 00:12:57,340 and we have found there's actually, 208 00:12:57,440 --> 00:12:58,840 there's just only two screws. 209 00:12:59,300 --> 00:13:02,480 We don't, they don't implement any actual protection 210 00:13:02,480 --> 00:13:06,680 mechanism, but still, this is a best, good practice, right? 211 00:13:07,100 --> 00:13:09,320 It's not necessarily, but yeah, good to have. 212 00:13:10,540 --> 00:13:11,260 Yeah, so. 213 00:13:11,260 --> 00:13:13,280 So, we can go ahead and open it up. 214 00:13:13,580 --> 00:13:17,540 And this, the Amikey system is, structure is very simple. 215 00:13:17,840 --> 00:13:19,460 They only have two boards inside. 216 00:13:20,020 --> 00:13:22,560 As you can see, the yellow board, the yellow one, 217 00:13:23,720 --> 00:13:25,300 and there's a green one. 218 00:13:25,620 --> 00:13:28,040 And the picture in the middle is actually 219 00:13:28,960 --> 00:13:30,520 backside of the green board. 220 00:13:31,020 --> 00:13:36,040 This one is just connected to, to, 221 00:13:36,060 --> 00:13:38,560 back to the yellow board, yellow board, yeah. 222 00:13:38,700 --> 00:13:39,120 So. 223 00:13:45,380 --> 00:13:45,860 Right. 224 00:13:46,160 --> 00:13:46,640 So. 225 00:13:49,800 --> 00:13:54,460 So, when we open up the, the, the Amikeys, 226 00:13:55,040 --> 00:13:56,940 we want, we want to see some details, right? 227 00:13:57,160 --> 00:13:57,780 The deep details. 228 00:13:57,960 --> 00:14:03,260 So, I think people have more familiar with reverse engineering 229 00:14:03,260 --> 00:14:04,860 of the hardware of embedded systems. 230 00:14:05,080 --> 00:14:09,080 We know the, the first thing we are going to be looking for 231 00:14:09,080 --> 00:14:10,940 is the, the, the chip. 232 00:14:11,740 --> 00:14:16,020 So, from there, we can find out some more details, right? 233 00:14:16,140 --> 00:14:19,400 So, for Amikey, the nicely labeled, 234 00:14:19,620 --> 00:14:24,680 the chip model is CC2640. 235 00:14:24,980 --> 00:14:28,020 And when we google it, we found out this is actually 236 00:14:28,020 --> 00:14:29,680 a Bluetooth module, right? 237 00:14:30,080 --> 00:14:32,940 So, and then we googled another green board. 238 00:14:33,140 --> 00:14:38,680 It's actually called NSP61X0915 and this is a RF module. 239 00:14:39,020 --> 00:14:41,240 So basically, we can use that to, yeah, 240 00:14:41,240 --> 00:14:46,100 on, it's actual, just like your actual RF car keys. 241 00:14:46,620 --> 00:14:53,100 Now, there's one thing different here is this RF module 242 00:14:53,100 --> 00:14:56,780 is really very different, different car models, right? 243 00:14:56,880 --> 00:15:00,460 So, not again, sorry, I really apologize. 244 00:15:03,060 --> 00:15:10,040 Yeah, and also, if you have ever done some RF hacking, 245 00:15:10,040 --> 00:15:12,540 you will know the first thing we always gonna look 246 00:15:12,540 --> 00:15:16,200 is something called FCCID, but since this Amici 247 00:15:16,200 --> 00:15:18,240 is really dedicated to the Chinese market, 248 00:15:18,540 --> 00:15:22,380 they have similar system, it's called CMITID, 249 00:15:23,900 --> 00:15:26,080 but it's just equivalent to FCCID, 250 00:15:26,260 --> 00:15:28,640 so we type into the database, we can find more details 251 00:15:28,640 --> 00:15:32,080 regarding this device, chip, device, chip, yeah, sorry. 252 00:15:32,680 --> 00:15:34,760 Now, there are one thing interesting, though. 253 00:15:35,480 --> 00:15:39,740 You remember, there's this little square device 254 00:15:40,040 --> 00:15:44,200 beside the Amici main board, it's called, it's sensor, 255 00:15:44,440 --> 00:15:49,180 and when I open it, we find out the chip type is SYD8801. 256 00:15:49,520 --> 00:15:54,420 Now, I don't know why they, I mean, Amici does this, 257 00:15:54,640 --> 00:15:58,600 the functionality of this sensor is unknown, right? 258 00:16:00,140 --> 00:16:03,000 I take the, I go through the menus, I go through 259 00:16:03,000 --> 00:16:05,660 the applications, I go through their official website. 260 00:16:06,100 --> 00:16:09,880 They have not any detail mention, what do we do with this? 261 00:16:09,880 --> 00:16:16,040 And we can, we can get Amici to work even without this one. 262 00:16:16,380 --> 00:16:18,720 So it's really strange they have this device here. 263 00:16:18,860 --> 00:16:22,880 So maybe they are just implement this for future use, 264 00:16:23,860 --> 00:16:25,420 so they send you in advance, right? 265 00:16:25,480 --> 00:16:26,960 So they don't need to send you again. 266 00:16:27,740 --> 00:16:31,800 So I open it up, and I, it's really just a Bluetooth, 267 00:16:31,920 --> 00:16:35,000 another Bluetooth module, so I connect into it 268 00:16:35,540 --> 00:16:39,860 to try to get some more details, and as we can see, 269 00:16:39,880 --> 00:16:42,840 this is something called Amici Smart Key Sensors, 270 00:16:42,880 --> 00:16:45,080 and there's some interesting UID here. 271 00:16:46,200 --> 00:16:49,600 So, since we cannot find more details, 272 00:16:51,080 --> 00:16:52,360 why not we just go deeper. 273 00:16:52,740 --> 00:16:57,060 So I take a look at a data sheet of this particular chip, 274 00:16:57,200 --> 00:17:00,920 and I try to connect a sense of, from the data sheet, 275 00:17:00,980 --> 00:17:04,320 we find out it's actually splitting UART, 276 00:17:04,460 --> 00:17:09,300 this SPI, all those common protocols, so I connect into it, 277 00:17:09,300 --> 00:17:11,780 I would try to find if there's a hint 278 00:17:12,440 --> 00:17:15,440 this may, what it may does, may do, 279 00:17:16,420 --> 00:17:19,600 but I cannot find much useful information here. 280 00:17:19,920 --> 00:17:21,320 But since this device is not really 281 00:17:25,040 --> 00:17:29,260 useful for hacking the actual, I mean, keys, 282 00:17:29,400 --> 00:17:30,880 so I just leave there for the moment. 283 00:17:31,060 --> 00:17:32,960 Maybe in the future, if they actually implement 284 00:17:32,960 --> 00:17:35,060 and they update some information, 285 00:17:35,320 --> 00:17:37,160 we can always go back to take a look at it. 286 00:17:37,160 --> 00:17:45,980 So now we actually spend most time 287 00:17:45,980 --> 00:17:47,800 on the main board of the ArmyKey. 288 00:17:47,940 --> 00:17:50,320 So we take a look first at the RFID module. 289 00:17:51,520 --> 00:17:55,060 In the back side of the RF green board, 290 00:17:56,200 --> 00:17:59,300 that's our certificate there. 291 00:17:59,740 --> 00:18:02,560 So they have nicely labeled the value on it. 292 00:18:02,680 --> 00:18:04,920 So we can simply do some simple math 293 00:18:04,920 --> 00:18:06,940 to calculating, to find out 294 00:18:06,940 --> 00:18:07,140 the value of the key. 295 00:18:07,140 --> 00:18:12,060 So we, it seems like a potential frequency range 296 00:18:12,060 --> 00:18:13,880 and a bit rate, something like that, right? 297 00:18:15,760 --> 00:18:18,280 But we need to verify it, right? 298 00:18:18,460 --> 00:18:21,240 So I, this is a very simple setup like this. 299 00:18:21,400 --> 00:18:26,140 We're using a SDR device, and we connect to an antenna, 300 00:18:26,320 --> 00:18:30,240 and then we just simply press the lock or unlock buttons, 301 00:18:30,420 --> 00:18:32,620 try to receive some signals to see 302 00:18:33,300 --> 00:18:36,320 if the configuration is correct, so. 303 00:18:37,140 --> 00:18:40,500 I'm using SDR HackRF here, but really it doesn't, 304 00:18:40,500 --> 00:18:43,380 really not just HackRF, you can use BrayRF or use RP, 305 00:18:43,520 --> 00:18:46,200 whatever you want, yeah, so. 306 00:18:47,260 --> 00:18:49,720 So, as you can see, when I press the button, 307 00:18:54,340 --> 00:18:56,460 yeah, there's the peaks coming up. 308 00:18:56,920 --> 00:19:06,280 It's definitely, it is the 433.9 MHz range, right? 309 00:19:06,280 --> 00:19:07,660 So, the configuration is correct. 310 00:19:10,700 --> 00:19:13,280 Now, we also take look at some RF, 311 00:19:13,460 --> 00:19:18,540 a bit of Bluetooth module, because the Bluetooth module 312 00:19:18,540 --> 00:19:21,160 is actually, we spend most of time on, 313 00:19:21,660 --> 00:19:24,720 to, in order to hack the RAMI key. 314 00:19:24,940 --> 00:19:28,360 So, we, what we can do, the first one we try to connect 315 00:19:28,360 --> 00:19:33,400 in your Bluetooth module is to do some recon operation, 316 00:19:33,580 --> 00:19:33,740 right? 317 00:19:33,860 --> 00:19:34,960 So, we can using, 318 00:19:36,280 --> 00:19:39,380 application, like a light blue or an RF connect. 319 00:19:40,120 --> 00:19:42,020 Yeah, really here, just try to find out 320 00:19:42,020 --> 00:19:42,700 as much as possible. 321 00:19:43,840 --> 00:19:46,220 So, first we can see the, actually, 322 00:19:46,360 --> 00:19:49,860 always broadcast the Bluetooth MAC address. 323 00:19:50,360 --> 00:19:53,900 So, that means we, potentially, we may able to track you. 324 00:19:54,480 --> 00:19:58,160 And, also, the other key information details here 325 00:19:58,160 --> 00:20:00,180 is those UUIDs, right? 326 00:20:00,320 --> 00:20:02,760 And, if you ever have done Bluetooth hacking 327 00:20:02,760 --> 00:20:05,120 and you know those UUIDs, it's really, 328 00:20:06,280 --> 00:20:10,640 a key, key things to, for you, right? 329 00:20:12,540 --> 00:20:16,200 Now, we, the, oh, come on. 330 00:20:20,760 --> 00:20:26,200 Yeah, so, the, the light blue or an RF connects, 331 00:20:26,360 --> 00:20:28,380 not the only thing, application you can use 332 00:20:28,380 --> 00:20:30,020 to talk to your Bluetooth devices. 333 00:20:30,720 --> 00:20:35,000 If we want to more interactive, we can always use the, 334 00:20:36,660 --> 00:20:41,840 get two, to come, to interact with your, your target. 335 00:20:42,240 --> 00:20:46,540 So here, I list of the, of the UUID here 336 00:20:46,540 --> 00:20:48,400 for ALMI key, right? 337 00:20:50,140 --> 00:20:52,220 Yeah, so, yeah. 338 00:20:54,660 --> 00:20:55,300 Okay. 339 00:20:55,440 --> 00:20:59,060 So, and, also, if we want to see more details, 340 00:20:59,400 --> 00:21:02,000 we also can, now, 341 00:21:02,180 --> 00:21:04,700 the last feature from the Android 342 00:21:04,700 --> 00:21:06,400 Android 4.4 or both. 343 00:21:06,660 --> 00:21:09,580 In the developer mode, there's a function 344 00:21:09,580 --> 00:21:12,080 you can enable a Bluetooth stamp. 345 00:21:12,420 --> 00:21:14,760 So basically, you can see all the traffic, 346 00:21:16,280 --> 00:21:21,420 interactive traffic from the log file. 347 00:21:21,800 --> 00:21:25,400 And we can reloading this log file into a wire shock 348 00:21:25,400 --> 00:21:30,160 and then we can, we know all the details, 349 00:21:30,340 --> 00:21:33,760 every steps between you, mobile phone, 350 00:21:33,760 --> 00:21:34,780 and your target AmiKey. 351 00:21:35,320 --> 00:21:38,820 So here we can see some read response 352 00:21:39,540 --> 00:21:41,420 regarding AmiKey's battery information. 353 00:21:45,740 --> 00:21:47,580 So, this is the actual app. 354 00:21:48,060 --> 00:21:51,820 I know it's in Chinese, but I'm gonna translate to English. 355 00:21:52,540 --> 00:21:54,220 Actually, the layout is quite simple. 356 00:21:54,700 --> 00:21:56,940 So first, there's a connection. 357 00:21:57,120 --> 00:21:59,700 You press the buttons to connect into your AmiKey. 358 00:21:59,860 --> 00:22:01,120 And then once you connect, 359 00:22:01,320 --> 00:22:03,740 there's only a few functions. 360 00:22:03,760 --> 00:22:06,820 So basically, it's unlock your car and unlock it. 361 00:22:06,960 --> 00:22:09,140 Or you open your trunk back door. 362 00:22:09,700 --> 00:22:10,640 Something like that. 363 00:22:10,700 --> 00:22:11,240 It's very simple. 364 00:22:11,420 --> 00:22:14,540 And then, as I mentioned, the nice feature is key sharing. 365 00:22:14,740 --> 00:22:17,720 You can share it with your friend, your wife, 366 00:22:17,900 --> 00:22:20,620 your other guys, and yeah, so. 367 00:22:22,880 --> 00:22:24,860 But we want to see more, right? 368 00:22:26,160 --> 00:22:31,000 Turns out, AmiKey application, just like everybody else, 369 00:22:31,220 --> 00:22:33,740 they never bother to have it in your actual car. 370 00:22:33,760 --> 00:22:38,020 So we can easily see the Java file code. 371 00:22:38,340 --> 00:22:38,700 So we can easily see the Java file code. 372 00:22:38,700 --> 00:22:39,720 Now, from Java file code, 373 00:22:39,780 --> 00:22:41,460 it's almost like we are reading the source code. 374 00:22:41,720 --> 00:22:44,560 So, for example, this class here 375 00:22:44,560 --> 00:22:49,180 is really just algorithm, how they generating the UUID. 376 00:22:49,600 --> 00:22:57,020 So, basically, we actually spend some time here 377 00:22:57,020 --> 00:22:58,620 to just reading through that code 378 00:22:58,620 --> 00:23:01,480 to understand how AmiKey works. 379 00:23:01,880 --> 00:23:02,300 Right? 380 00:23:02,300 --> 00:23:04,180 How they, how functional. 381 00:23:06,140 --> 00:23:06,500 Yeah. 382 00:23:08,620 --> 00:23:10,040 Now, here's got something interesting. 383 00:23:13,260 --> 00:23:15,660 Yeah, so, if you are able to read Chinese, 384 00:23:15,880 --> 00:23:19,400 then you will see that the comment is very funny, right? 385 00:23:20,540 --> 00:23:23,200 Yeah, basically, it turns, I think it's just, 386 00:23:23,360 --> 00:23:26,380 maybe developer, a lot of times, not very in a good mood. 387 00:23:26,600 --> 00:23:27,940 He actually put comments like that. 388 00:23:27,980 --> 00:23:28,860 What the hell in that code? 389 00:23:30,100 --> 00:23:30,660 Oh, wow. 390 00:23:32,900 --> 00:23:36,440 Now, other than that, there's some interesting information 391 00:23:36,440 --> 00:23:38,400 like this URL here. 392 00:23:39,000 --> 00:23:42,120 Now, it actually, when I try to access this URL, 393 00:23:42,320 --> 00:23:44,400 it actually turns out, how you mentioned, 394 00:23:44,480 --> 00:23:47,920 that it's a company internal login system. 395 00:23:48,200 --> 00:23:50,160 If you are not an employee, please go away. 396 00:23:50,620 --> 00:23:53,180 So, I don't know why, if they don't want people access it, 397 00:23:53,320 --> 00:23:55,800 why not just don't bother to put there, right? 398 00:23:58,280 --> 00:23:59,160 So, okay. 399 00:24:00,860 --> 00:24:01,300 Here. 400 00:24:01,300 --> 00:24:02,900 So, here, did you spot something interesting? 401 00:24:04,440 --> 00:24:05,040 Yeah. 402 00:24:06,840 --> 00:24:10,220 Usually, when I start to try to reverse engine 403 00:24:10,220 --> 00:24:12,860 some applications, I will expect to see, 404 00:24:13,080 --> 00:24:14,960 the first thing I actually expect to see, 405 00:24:15,040 --> 00:24:20,020 if they have enabled search pending or not. 406 00:24:20,220 --> 00:24:22,980 But, turns out, it's not, that's not necessary at all. 407 00:24:23,200 --> 00:24:26,660 They are completely rely on HTTP, right? 408 00:24:28,060 --> 00:24:31,040 So, from there, since we all know, 409 00:24:31,060 --> 00:24:31,280 we all know, we all know, we all know, we all know, 410 00:24:31,280 --> 00:24:32,100 HTTP is not insecure. 411 00:24:32,480 --> 00:24:34,500 All information is in plain text. 412 00:24:34,620 --> 00:24:37,560 So, they're leaking a lot of privacy information here. 413 00:24:37,920 --> 00:24:40,280 So, for example, this one here. 414 00:24:42,460 --> 00:24:47,520 But, it's actually your IMEI number of your mobile phones. 415 00:24:47,900 --> 00:24:51,520 So, if people happen to sniffing with your traffic, 416 00:24:51,720 --> 00:24:52,740 then, yeah. 417 00:24:54,620 --> 00:24:55,940 And, here's some more. 418 00:24:56,580 --> 00:24:59,580 Now, when we register with, usually when we register, 419 00:24:59,840 --> 00:25:01,260 a new user, let's say, a new user, let's say, a new user, 420 00:25:01,260 --> 00:25:04,140 they have some kind of protection called security questions 421 00:25:04,140 --> 00:25:07,020 in order to recover your keys in the future if you lost it. 422 00:25:07,240 --> 00:25:09,120 So, again, it's in HTTP. 423 00:25:09,580 --> 00:25:13,480 So, those, you have all the, if you sniffing it, 424 00:25:13,620 --> 00:25:15,780 you are able to find all the answer 425 00:25:15,780 --> 00:25:17,860 to those security questions, right? 426 00:25:18,000 --> 00:25:22,000 So, you may just impersonate this guy, 427 00:25:22,120 --> 00:25:23,200 the owner in the future, 428 00:25:23,280 --> 00:25:25,320 because you already know how to recover it. 429 00:25:27,340 --> 00:25:29,680 Yeah, so, simple summary here is, 430 00:25:31,260 --> 00:25:34,080 every key application communicating with 431 00:25:34,080 --> 00:25:36,940 the backend server is really just rely on HTTPS. 432 00:25:37,080 --> 00:25:38,840 So, yeah, no privacy here at all. 433 00:25:40,120 --> 00:25:41,240 But, there's more. 434 00:25:41,500 --> 00:25:44,080 So, I'm gonna introduce more on this one later on. 435 00:25:44,140 --> 00:25:47,580 So, we'll see how this HTTP can lead us 436 00:25:47,580 --> 00:25:48,960 to compromise your systems. 437 00:25:49,800 --> 00:25:50,280 Right. 438 00:25:51,480 --> 00:25:52,440 But, encryptions. 439 00:25:52,700 --> 00:25:54,440 There must be some kind of encryptions, right? 440 00:25:54,540 --> 00:25:57,300 Because every manufacturer, every vendor, 441 00:25:57,380 --> 00:26:00,540 they always claim their product is the most secure one 442 00:26:00,540 --> 00:26:00,920 in the world. 443 00:26:01,080 --> 00:26:02,900 So, actually, in the manual, 444 00:26:03,040 --> 00:26:05,240 there's one Q and A kind of thing. 445 00:26:05,420 --> 00:26:10,360 They mention their product is rely on Bluetooth 4.0, 446 00:26:10,480 --> 00:26:17,500 and they have created their own proprietary encryptions. 447 00:26:17,720 --> 00:26:18,980 Unique, right? 448 00:26:19,080 --> 00:26:19,820 Very secure. 449 00:26:22,060 --> 00:26:25,020 So, they really think they are super secure. 450 00:26:25,440 --> 00:26:28,120 So, they put, this is a picture I took 451 00:26:28,120 --> 00:26:29,380 from their official website. 452 00:26:29,380 --> 00:26:35,240 They put all the fancy crypto awards on there. 453 00:26:35,320 --> 00:26:38,000 So, you may think, wow, really, this is really scary. 454 00:26:38,160 --> 00:26:39,720 It's super secure, right? 455 00:26:40,960 --> 00:26:41,540 Wow, okay. 456 00:26:41,740 --> 00:26:42,640 Let's find out. 457 00:26:46,800 --> 00:26:51,860 Yeah, the first thing we can do is try to do some 458 00:26:51,860 --> 00:26:53,240 physical access, right? 459 00:26:57,040 --> 00:26:57,960 Not again. 460 00:26:59,540 --> 00:27:00,020 Okay. 461 00:27:01,220 --> 00:27:02,600 So, here's the, let's see. 462 00:27:04,520 --> 00:27:07,740 We can always do some old school way, right? 463 00:27:07,940 --> 00:27:09,980 Now, remember, the admin key, by request, 464 00:27:10,260 --> 00:27:12,220 has to be always left in the car. 465 00:27:12,780 --> 00:27:17,000 So, maybe, those theft, or what you usually do, 466 00:27:17,080 --> 00:27:19,360 they can break in your glass, right? 467 00:27:19,500 --> 00:27:20,300 They get it. 468 00:27:20,380 --> 00:27:21,140 They get your key. 469 00:27:21,240 --> 00:27:22,200 Your key is inside. 470 00:27:22,500 --> 00:27:24,900 Now, however, you cannot, because you cannot 471 00:27:26,540 --> 00:27:29,360 pair in with your, I mean, key. 472 00:27:29,380 --> 00:27:29,720 You don't have the admin key yet. 473 00:27:29,980 --> 00:27:34,320 So, what they can do is they, since it's also easy 474 00:27:34,320 --> 00:27:36,420 to open up, they don't have any protection mechanism. 475 00:27:36,700 --> 00:27:39,500 You can simply grab a blank key. 476 00:27:39,640 --> 00:27:43,840 You replace the admin key RF module chip 477 00:27:44,260 --> 00:27:46,260 and swap to the blank keys. 478 00:27:46,400 --> 00:27:48,720 And that way, you are able to unlock it. 479 00:27:49,260 --> 00:27:52,640 Or you can, during a reverse engineering process, 480 00:27:52,820 --> 00:27:58,020 we attribute a board to simplify the process, right? 481 00:27:58,140 --> 00:27:58,600 Yeah. 482 00:27:59,540 --> 00:28:02,500 So, here, I like to play a little demo here 483 00:28:02,880 --> 00:28:04,200 to see, to prove my point. 484 00:28:05,600 --> 00:28:09,160 Okay, let me find the physical access. 485 00:28:12,100 --> 00:28:13,320 It's not coming up, okay. 486 00:28:15,580 --> 00:28:27,760 Yeah, this is actually a blank key, right? 487 00:28:27,760 --> 00:28:31,120 Oh, we've already done a replacing process, so yeah. 488 00:28:33,020 --> 00:28:34,000 Yeah, it's open, right? 489 00:28:34,140 --> 00:28:36,760 So, this is a simple process to prove that 490 00:28:38,180 --> 00:28:43,040 this replacing RF process, it will work, right? 491 00:28:43,540 --> 00:28:44,020 All right, thanks. 492 00:28:45,140 --> 00:28:45,540 Yeah. 493 00:28:46,800 --> 00:28:48,560 But, you know, we're gentlemen. 494 00:28:48,760 --> 00:28:50,760 We shouldn't do that to boot, like, you know. 495 00:28:53,040 --> 00:28:54,800 But theft, they don't care, right? 496 00:28:57,800 --> 00:28:58,640 So, yeah. 497 00:29:00,280 --> 00:29:05,760 Since this physical access is really not much 498 00:29:06,480 --> 00:29:07,760 technical detail involved. 499 00:29:07,960 --> 00:29:08,480 This is violent. 500 00:29:09,480 --> 00:29:11,160 Let's check out some RF. 501 00:29:13,000 --> 00:29:15,540 Now, when I researched the RF module, 502 00:29:15,700 --> 00:29:21,260 I easily found some news over on the internet. 503 00:29:21,500 --> 00:29:25,580 So, basically, some theft, they actually used a device 504 00:29:26,260 --> 00:29:27,440 called Kaki Jammer. 505 00:29:27,440 --> 00:29:31,420 They used it now to preventing the owner 506 00:29:31,420 --> 00:29:33,360 to lock in your cars, right? 507 00:29:33,520 --> 00:29:37,140 And they actually make a lot of money from just by doing it. 508 00:29:37,280 --> 00:29:42,020 Even by selling those key for jammer to make a fortune. 509 00:29:42,520 --> 00:29:43,620 So, yeah. 510 00:29:45,560 --> 00:29:48,660 Now, here's the actual simple process, how they do it. 511 00:29:48,840 --> 00:29:53,320 So, they basically, the theft just wait in a car parking lot 512 00:29:53,760 --> 00:29:56,320 and waiting for some user can, 513 00:29:57,440 --> 00:29:59,620 maybe they have something in mind 514 00:29:59,620 --> 00:30:01,700 and they forgot, they are in a rush. 515 00:30:01,900 --> 00:30:04,720 They just simply press the lock button 516 00:30:04,720 --> 00:30:07,260 and they don't bother to check if it actually lock or not. 517 00:30:08,800 --> 00:30:11,100 Because, meanwhile, the theft, 518 00:30:11,240 --> 00:30:13,580 they sending out RF jamming signals. 519 00:30:13,880 --> 00:30:17,540 So, you cannot actually unlock your cars. 520 00:30:17,700 --> 00:30:19,620 So, when the owner walk away, 521 00:30:19,780 --> 00:30:23,940 they can just open your cars and take away whatever they want. 522 00:30:24,700 --> 00:30:26,300 So, this is a very simple process. 523 00:30:27,600 --> 00:30:29,720 Now, and then my question is, 524 00:30:30,170 --> 00:30:35,220 does Amiki smart enough to avoid this kind of attack, right? 525 00:30:37,440 --> 00:30:40,220 So, turns out, the Amiki is actually 526 00:30:40,220 --> 00:30:41,460 just a one-way communication. 527 00:30:41,960 --> 00:30:44,840 So, basically, you're sending a signal 528 00:30:44,840 --> 00:30:46,720 to a yellow board through Bluetooth 529 00:30:46,720 --> 00:30:51,080 and Bluetooth will send another, like, simple post 530 00:30:51,490 --> 00:30:55,680 to your green board to say, okay, let's unlock it. 531 00:30:55,820 --> 00:30:57,420 But, you never check it. 532 00:30:57,440 --> 00:31:00,720 So, there's no response if the actual signal 533 00:31:00,720 --> 00:31:02,860 has actually arrived in your car. 534 00:31:03,720 --> 00:31:07,660 So, here I make another simple demo 535 00:31:07,660 --> 00:31:09,580 just to prove my point. 536 00:31:11,880 --> 00:31:12,560 Yeah. 537 00:31:20,580 --> 00:31:25,260 Yeah, you see, you hear the background noise is SDR. 538 00:31:27,440 --> 00:31:30,940 So, I see when I press lock and unlock, 539 00:31:31,120 --> 00:31:32,860 you'll hear the signal beep. 540 00:31:33,100 --> 00:31:35,400 And then a little yellow light LED turn on. 541 00:31:35,720 --> 00:31:38,300 That means this operation works, right? 542 00:31:40,340 --> 00:31:42,640 So, yeah, to prove my point, 543 00:31:42,740 --> 00:31:45,660 you press button and you will see the signal peeks. 544 00:31:47,700 --> 00:31:48,920 All right, okay. 545 00:31:49,100 --> 00:31:53,100 So, now I using a Yard Sticker, 546 00:31:53,100 --> 00:31:57,140 an RF cap, like a tool called OOKtools to, just basically, 547 00:31:57,140 --> 00:32:00,180 Basically, you can use to signal all the jamming signals. 548 00:32:03,040 --> 00:32:08,680 As you can see, the frequency band has already been jammed. 549 00:32:09,480 --> 00:32:15,000 Now let's do the unlocking command operation again. 550 00:32:16,460 --> 00:32:20,020 As you can see, the LED still turns light up, 551 00:32:20,160 --> 00:32:26,740 but there's no details regarding the jamming. 552 00:32:27,140 --> 00:32:30,640 So the owner of the AmiKey cannot tell 553 00:32:30,640 --> 00:32:32,520 if it actually works or not, right? 554 00:32:33,140 --> 00:32:38,200 So basically, even AmiKey clean itself 555 00:32:38,200 --> 00:32:40,540 is a smart car key system, but they're... 556 00:32:43,420 --> 00:32:48,980 But really, they're just like any other old systems, right? 557 00:32:58,540 --> 00:32:59,560 So, okay, what's next? 558 00:33:00,240 --> 00:33:01,660 Again, Sami is our hero. 559 00:33:02,640 --> 00:33:07,300 Right, so, yeah, I would recommend you to take a look 560 00:33:07,300 --> 00:33:11,280 at his talk, presentation back a few years ago in DEF CON, 561 00:33:11,460 --> 00:33:14,680 and yeah, check out the rolling codes. 562 00:33:15,920 --> 00:33:18,340 Roller jam techniques is really cool. 563 00:33:19,020 --> 00:33:20,400 Come on, this is really bad. 564 00:33:21,180 --> 00:33:27,120 But since the RF module on AmiKey is very different, 565 00:33:27,140 --> 00:33:29,880 it's different from other AmiKeys. 566 00:33:30,140 --> 00:33:33,980 So, my goal here is really just complete, 567 00:33:34,200 --> 00:33:36,640 I want to compromise the AmiKeys. 568 00:33:36,860 --> 00:33:40,520 So I don't spend, I decide not to spend much time on it, 569 00:33:40,700 --> 00:33:45,060 right, but, here's more we can do. 570 00:33:45,640 --> 00:33:47,240 Key sharing analysis, right? 571 00:33:50,020 --> 00:33:55,800 So here's the nice feature regarding your key sharings. 572 00:33:55,800 --> 00:33:57,040 It's very simple. 573 00:33:57,200 --> 00:34:03,640 First, you, you set the name of your key you want to share, 574 00:34:04,480 --> 00:34:06,300 how long you gonna be last, 575 00:34:06,540 --> 00:34:08,800 or you can also set a permanently, 576 00:34:09,060 --> 00:34:12,620 or you can set just, like, maybe one day, one month, 577 00:34:12,800 --> 00:34:13,860 something like that. 578 00:34:14,180 --> 00:34:16,720 And once you create that, you can send. 579 00:34:18,600 --> 00:34:22,680 Also, this AmiKey has a limitation on only, 580 00:34:22,840 --> 00:34:25,420 you can only create a share to 20, 581 00:34:25,420 --> 00:34:28,980 20 keys to, basically 20 users, right? 582 00:34:29,140 --> 00:34:32,400 So once the name is reached, 583 00:34:32,660 --> 00:34:34,600 you are not able to create anymore. 584 00:34:37,160 --> 00:34:41,580 So this is the entire process of how you can share. 585 00:34:41,800 --> 00:34:45,080 What it actually shared was your friends, right? 586 00:34:45,420 --> 00:34:50,940 So basically you click on the shared key you created, 587 00:34:50,940 --> 00:34:54,780 then the AmiKey will generate a barcode here, 588 00:34:55,000 --> 00:34:58,260 and also they have three other different ways 589 00:34:58,260 --> 00:35:01,520 to dispute those shared keys. 590 00:35:01,800 --> 00:35:05,260 So basically you can send the text to your friend, 591 00:35:05,440 --> 00:35:08,440 you can just copy the keys, 592 00:35:08,600 --> 00:35:10,680 and just maybe email it to him, or whatever. 593 00:35:11,200 --> 00:35:13,620 Now, there's another interesting feature, 594 00:35:13,680 --> 00:35:16,460 it's called, you can send to WeChat. 595 00:35:16,660 --> 00:35:20,460 WeChat, aka WeChat, is one of the most popular 596 00:35:20,460 --> 00:35:23,180 IM software they use in China. 597 00:35:23,420 --> 00:35:27,460 So you can send your key through WeChat now. 598 00:35:28,020 --> 00:35:31,020 Also, I'm using the 2D barcode reader 599 00:35:31,020 --> 00:35:35,100 to just check out what code inside of 2D barcode. 600 00:35:35,660 --> 00:35:37,540 Turns out it sounds like this. 601 00:35:37,980 --> 00:35:42,440 Now, this is actually the key you are sharing with users. 602 00:35:42,840 --> 00:35:47,560 So the user, when the user get these keys, 603 00:35:47,800 --> 00:35:50,200 they can, again, put into the activation key, 604 00:35:50,200 --> 00:35:50,440 they can, again, put into the activation key, 605 00:35:50,440 --> 00:35:52,380 they can, again, put into the activation key, 606 00:35:52,380 --> 00:35:53,500 go through the activation process, 607 00:35:53,820 --> 00:35:57,200 and once they activate it, and then good code, right? 608 00:35:59,120 --> 00:36:00,920 So, what could possibly go wrong? 609 00:36:01,720 --> 00:36:02,820 Super secure, right? 610 00:36:04,360 --> 00:36:05,940 Again, as I mentioned, 611 00:36:09,400 --> 00:36:12,380 complete communicating process is to rely on HTTP. 612 00:36:12,920 --> 00:36:16,140 So really, if we are doing some kind of 613 00:36:16,140 --> 00:36:18,260 man-in-the-middle sniffing, 614 00:36:18,320 --> 00:36:20,200 we can able easily to get your, 615 00:36:20,200 --> 00:36:22,340 your actual key, right? 616 00:36:22,460 --> 00:36:24,600 Now, the first thing, when, 617 00:36:25,580 --> 00:36:28,780 in a background, the first thing, 618 00:36:28,780 --> 00:36:33,320 I mean, key does, is they send your very long, 619 00:36:33,560 --> 00:36:35,280 secure encryption key, 620 00:36:35,380 --> 00:36:39,820 I mean, key to one of the website, 621 00:36:40,100 --> 00:36:41,900 and the website will short, 622 00:36:43,060 --> 00:36:46,160 response back a very short URL for you. 623 00:36:46,300 --> 00:36:49,980 And when I access that URL, again, it will just, it will, 624 00:36:49,980 --> 00:36:51,620 it will reveal the actual keys, right? 625 00:36:52,220 --> 00:36:55,780 So, now, this is from owner side. 626 00:36:56,080 --> 00:37:00,120 If you are sniffing in your, in a car owner's web, 627 00:37:01,120 --> 00:37:03,240 local network, then you will get, get a key. 628 00:37:03,620 --> 00:37:05,940 Now, what about if you, you are at, 629 00:37:06,520 --> 00:37:07,040 hands up? 630 00:37:08,380 --> 00:37:10,480 But, but, if it's because a lot of guys, 631 00:37:13,620 --> 00:37:15,260 oh, I will do it very quick, right? 632 00:37:15,320 --> 00:37:16,300 Okay, sorry about guys. 633 00:37:18,360 --> 00:37:19,860 Yeah, so, in the end, 634 00:37:19,860 --> 00:37:21,400 the user side, they, they are, 635 00:37:21,520 --> 00:37:24,520 it's very, also, simple, they send you the car keys, 636 00:37:24,600 --> 00:37:27,640 and, yeah, it's also plain text, 637 00:37:27,760 --> 00:37:29,560 and then you can sniff in form for it, right? 638 00:37:29,860 --> 00:37:33,720 So, because time stops, so I don't do much demos here. 639 00:37:33,980 --> 00:37:37,360 So, yeah, so, the very next thing is, 640 00:37:37,480 --> 00:37:40,040 what you can do is, can you, can we cancel it, right? 641 00:37:40,560 --> 00:37:43,340 So, if owner find out that they want to cancel a key, 642 00:37:43,420 --> 00:37:46,100 right, so, yeah, I have to do a very quick demo here, 643 00:37:46,240 --> 00:37:47,600 just, ah, come on. 644 00:37:55,880 --> 00:38:00,080 So, yeah, see, I actually, um, try to cancel it. 645 00:38:03,520 --> 00:38:08,020 Now, see, the, the, the, I mean, the key's canceled, 646 00:38:08,300 --> 00:38:10,580 this shared key's canceled, but still, 647 00:38:10,720 --> 00:38:13,220 we're still able to lock and unlock the car keys. 648 00:38:13,400 --> 00:38:13,660 Why? 649 00:38:14,100 --> 00:38:15,820 Right, maybe it's already connected, 650 00:38:15,900 --> 00:38:19,840 so I disconnect it again, and try to reconnect, right? 651 00:38:19,860 --> 00:38:21,240 It still work. 652 00:38:21,860 --> 00:38:22,340 Why? 653 00:38:23,360 --> 00:38:25,640 Right, see, you turn on, turn off, no problem. 654 00:38:26,940 --> 00:38:30,900 Now, it turns out, if you go back to the owner's phone, 655 00:38:31,060 --> 00:38:34,160 there's actually a message here, it's actually say, 656 00:38:34,300 --> 00:38:38,600 you need to sync, in order to cancel the shared key, 657 00:38:38,780 --> 00:38:42,680 you need to connect, sync your admin key first, right? 658 00:38:42,840 --> 00:38:43,580 Now, think about it. 659 00:38:43,740 --> 00:38:46,380 If you already lost your car keys, ah, cars, 660 00:38:46,740 --> 00:38:49,840 where the hell you can connect into the, ah, 661 00:38:49,840 --> 00:38:50,740 the, the, the keys, right? 662 00:38:50,860 --> 00:38:51,460 You cannot. 663 00:38:52,320 --> 00:38:54,460 So, you never were able to cancel it. 664 00:38:55,800 --> 00:38:58,180 Right, simple, very interesting logic here. 665 00:38:59,120 --> 00:39:00,000 Um, again. 666 00:39:03,740 --> 00:39:05,760 Right, so, if we cannot cancel it, 667 00:39:05,860 --> 00:39:08,240 can we wait, because there's timing, right? 668 00:39:08,380 --> 00:39:10,980 If you, we, if you are not set up permanently, 669 00:39:11,360 --> 00:39:13,380 there is timing, so maybe we can just wait 670 00:39:13,380 --> 00:39:14,720 till I expire it, right? 671 00:39:15,440 --> 00:39:18,260 Okay, we're gonna go just very, very quick. 672 00:39:18,900 --> 00:39:19,760 Almost there, right? 673 00:39:21,000 --> 00:39:25,300 Um, yeah, so, here again, um, I try to find out 674 00:39:25,300 --> 00:39:28,580 if we can bypass those timing, sharing issues, right? 675 00:39:28,660 --> 00:39:31,080 So, see, as you can see here, it's to tell me 676 00:39:31,080 --> 00:39:33,880 that time's already expired, and, and actually, 677 00:39:34,520 --> 00:39:37,680 shared time is actually 1.30, right? 678 00:39:37,780 --> 00:39:39,880 In a.m. in the morning, yeah, okay, that's no problem. 679 00:39:41,280 --> 00:39:44,280 And when, when you share to the user, you have not, 680 00:39:44,360 --> 00:39:47,380 you don't have much function to do, just lock and unlock. 681 00:39:47,680 --> 00:39:48,600 So, again. 682 00:39:49,840 --> 00:39:50,800 Oh, come on, this one. 683 00:39:52,580 --> 00:39:54,700 We're still able to, uh, lock and unlock. 684 00:39:56,500 --> 00:39:56,780 Right? 685 00:39:58,280 --> 00:39:59,540 Even in time expired. 686 00:40:00,860 --> 00:40:01,720 So, disconnect. 687 00:40:02,800 --> 00:40:03,640 Connect again. 688 00:40:05,280 --> 00:40:06,080 Still function. 689 00:40:09,240 --> 00:40:09,520 Right? 690 00:40:10,440 --> 00:40:12,160 Unlock, lock, yep. 691 00:40:12,340 --> 00:40:17,940 Just, um, so, um, just to confirm, 692 00:40:18,720 --> 00:40:21,680 now time is, like, 1.43 already. 693 00:40:22,020 --> 00:40:24,500 It's way past the time, right? 694 00:40:24,680 --> 00:40:28,240 So, again, when, when time expired, 695 00:40:28,360 --> 00:40:31,700 you have to connect to your original car keys, 696 00:40:31,880 --> 00:40:35,440 to, in order to update information this car is expired. 697 00:40:36,580 --> 00:40:37,220 What the hell? 698 00:40:37,380 --> 00:40:37,940 You cannot. 699 00:40:38,260 --> 00:40:43,120 So, which means, did your key sharing, uh, exp, uh, 700 00:40:43,120 --> 00:40:45,440 expired, it will never expire, right? 701 00:40:45,520 --> 00:40:46,720 Your last key is gone. 702 00:40:47,940 --> 00:40:48,140 Okay. 703 00:40:49,440 --> 00:40:50,100 Hmm. 704 00:40:56,200 --> 00:40:58,880 Just sniffing the traffic and decreasing. 705 00:40:59,160 --> 00:41:00,780 So, that's the interesting part. 706 00:41:00,900 --> 00:41:02,200 So, but, so yeah, 707 00:41:02,300 --> 00:41:04,540 where's the security encryption they're talking about? 708 00:41:05,410 --> 00:41:08,820 So, basically, when I analyzed into the wireshark, 709 00:41:10,740 --> 00:41:11,400 uh, 710 00:41:12,640 --> 00:41:15,720 they, they, they sent some, uh, 711 00:41:15,880 --> 00:41:17,920 listed some interesting information, uh, 712 00:41:17,920 --> 00:41:21,620 the first step they send some, seems like they send some 713 00:41:21,620 --> 00:41:24,340 command to your AMI key and the AMI key will respond some 714 00:41:24,340 --> 00:41:29,140 random values here. And then the following is a very long, 715 00:41:30,420 --> 00:41:34,360 actually in total is 70 bytes of the some kind of, I don't 716 00:41:34,360 --> 00:41:39,100 know, encryption strings maybe. So, yeah, because, yeah, okay. 717 00:41:39,340 --> 00:41:44,180 So, and then, and then you, and I try to lock and unlock the 718 00:41:44,180 --> 00:41:48,740 cards and then we all, three times then I can see this fixed 719 00:41:48,740 --> 00:41:52,900 value, always gonna see this fixed value. And the reason they 720 00:41:52,900 --> 00:41:56,480 send it two times is they may probably simulate the press and 721 00:41:56,480 --> 00:41:59,840 the release movement, right? So that's why they send two values 722 00:41:59,840 --> 00:42:03,820 to your UIDs. Okay, so once we have the value, actually, can we 723 00:42:03,820 --> 00:42:06,780 unlock it? Actually it's not, we've actually failed with it. 724 00:42:08,260 --> 00:42:11,560 So, actually it turns out in order to lock, unlock your key 725 00:42:11,560 --> 00:42:13,780 you actually implement some kind of locking process. 726 00:42:14,240 --> 00:42:18,020 So, yeah, so I take a look at it very quickly, the, the, the 727 00:42:18,020 --> 00:42:21,800 locking process is, is actually, uh, lock, so we have details 728 00:42:21,800 --> 00:42:24,920 regarding all the parameter we need for locking to your system. 729 00:42:25,120 --> 00:42:28,980 And the, yeah, from the picture here we literally see the 730 00:42:28,980 --> 00:42:32,540 secure, uh, super secure algorithm is the XOR. We see 731 00:42:32,540 --> 00:42:36,200 XOR operation all over the place. Now, turns out the 732 00:42:36,200 --> 00:42:38,520 locking protocol is really, like, working like this. We fetch, 733 00:42:38,600 --> 00:42:43,020 uh, uh, they fetch a random, uh, a value to the server and 734 00:42:43,020 --> 00:42:44,160 they'll get a random value. So, uh, they fetch a random value 735 00:42:44,160 --> 00:42:48,800 keys and then they calculate it, um, yeah, in a roundabout, uh, 736 00:42:48,880 --> 00:42:52,020 rough up to make an encryption lock in pocket. Now, if, uh, 737 00:42:52,160 --> 00:42:55,540 everything works fine, it will respond to a status code, uh, 738 00:42:55,580 --> 00:43:01,220 A. Okay? Now, um, really, we, when they look deeper, we're 739 00:43:01,220 --> 00:43:07,600 able to find out it's actually, uh, uh, it, it, in order to, to 740 00:43:07,600 --> 00:43:10,480 find out an encryption code, it's really just, uh, uh, run, 741 00:43:10,480 --> 00:43:14,040 run the numbers, uh, we got from, uh, uh, I mean, 742 00:43:14,160 --> 00:43:16,740 there's a secret key and then there's, uh, also another secret 743 00:43:16,740 --> 00:43:20,280 key, uh, fix, fix random DWORD number from device 744 00:43:20,280 --> 00:43:25,200 initialization. But it turns out it's only one byte. So, we take 745 00:43:25,200 --> 00:43:28,580 a look at lock in pocket parameter again. Um, we, we 746 00:43:28,580 --> 00:43:31,420 see some interesting code. The algorithm to find out a, a one 747 00:43:31,420 --> 00:43:34,460 byte key code is really just, uh, you get a current, current 748 00:43:34,460 --> 00:43:38,180 current, calendar, the year and you minus two thousand and you, 749 00:43:38,220 --> 00:43:42,000 you, you, you get a, a, a one byte. Then you convert to the 750 00:43:42,000 --> 00:43:44,120 hex code. And you, once you get that, you are able to 751 00:43:44,160 --> 00:43:46,160 get all the rest, all the information to, in order to 752 00:43:46,160 --> 00:43:49,520 create your, uh, lock in pocket. Right? And then here's the 753 00:43:49,520 --> 00:43:53,080 code I, I, uh, I wrote, we, we wrote, uh, to, to, you know, to 754 00:43:53,080 --> 00:43:57,100 do that. And, yeah, just. And, however, uh, this is, uh, 755 00:43:57,160 --> 00:43:59,060 turns out, uh, some, some surprise, but it's not gonna 756 00:43:59,060 --> 00:44:01,220 bother too much. But, because we're not, we're not see that, 757 00:44:01,320 --> 00:44:04,080 uh, uh, starter code A, A to in order to work. Uh, we 758 00:44:04,080 --> 00:44:06,600 re-engineer the, the, the actual firmware. But in order to 759 00:44:06,600 --> 00:44:08,660 find out, it's really, we, we have to set, disassemble it. So 760 00:44:08,660 --> 00:44:10,880 in order to not work, we have to put all, all, everything in 761 00:44:10,880 --> 00:44:14,140 one piece. So, okay. So, now we get, uh, uh, uh, uh, uh, 762 00:44:14,160 --> 00:44:21,040 code at working. Uh, uh, so we, yeah, we can sniff in the, 763 00:44:21,060 --> 00:44:24,520 sniff in the traffic and, uh, yeah. And then, yeah, turns out 764 00:44:24,520 --> 00:44:26,860 it's, it's not really, really scary at all. That it's a one 765 00:44:26,860 --> 00:44:30,400 by one machine, SOR. Yeah, we can sniff in it. So, yeah, uh, 766 00:44:30,500 --> 00:44:35,680 sorry, I, uh, then we'll just prove my point. Uh, yeah. 767 00:44:39,140 --> 00:44:43,320 Yeah, so here we just, uh, running a simple, um, uh, 768 00:44:45,400 --> 00:44:52,740 script. Right. And then you can from, yeah, see, we are able 769 00:44:52,740 --> 00:44:56,720 to trigger AmiKey to send out a, create our own, uh, packet to 770 00:44:56,720 --> 00:45:00,500 log in to the AmiKey and send out a signal, right? We go, we 771 00:45:00,500 --> 00:45:03,640 send it three times to, just to prove from our, our point. Okay, 772 00:45:03,700 --> 00:45:13,760 so let's go back again. Oh, very quickly. Yeah, so what's the, 773 00:45:14,160 --> 00:45:17,040 uh, can we, can we report for CVEs, right? So, as a, uh, 774 00:45:17,240 --> 00:45:19,500 responsible disclosure. So I actually connect, uh, connect, 775 00:45:19,520 --> 00:45:22,880 contact through, uh, their, uh, uh, phone, mobile, uh, uh, 776 00:45:22,880 --> 00:45:26,660 emails. They, they have nothing replied. So, okay. So, yeah, 777 00:45:26,700 --> 00:45:29,120 really conclusion here is, uh, security by obscurity is not 778 00:45:29,120 --> 00:45:31,520 really gonna work. You have to test, uh, your, uh, product 779 00:45:31,520 --> 00:45:34,580 prop, property before going on market. Yeah, it's running time 780 00:45:34,580 --> 00:45:36,620 so there's no questions. So, sorry guys. 781 00:45:38,640 --> 00:45:40,700 Very fast. Thank you.