1 00:00:00,000 --> 00:00:07,140 Let's start because this is a lot of information. Thank you so much for coming here. We're going 2 00:00:07,140 --> 00:00:13,600 to be talking about Salinas rat. Whoever is Mexican, they know what I'm talking about, 3 00:00:13,720 --> 00:00:19,100 the rat, you know, my friends? The biggest one, actually. Anyway, this is Salinas rat. 4 00:00:19,300 --> 00:00:29,980 It's an SMS-commanded rat. This is an effort done by three guys of us, not only me. It's 5 00:00:29,980 --> 00:00:38,380 an effort of three guys. We're going to be talking about the whole process that we took 6 00:00:38,380 --> 00:00:42,860 in order to infect an infotainment. The one that you guys have in the right side, the 7 00:00:43,720 --> 00:00:48,740 infotainment is up and running, standalone. We're going to give a demo at the end of how 8 00:00:48,740 --> 00:00:50,760 we can steal SMS messages here. 9 00:00:52,860 --> 00:00:59,960 I'm going to give you a copy of one of the books that I wrote. I'm going to ask you guys 10 00:00:59,960 --> 00:01:05,940 one specific question in Spanish. Hopefully, you can understand it. No, just kidding. 11 00:01:06,820 --> 00:01:13,660 Everything started with Cardloop. Cardloop is an OBD2 port. It's connected into the automobile. 12 00:01:14,000 --> 00:01:18,140 When you go to the service, you plug in this guy there in order to do debugging information. 13 00:01:18,820 --> 00:01:24,380 We started thinking about, okay, let's plug this device into the car. It's pretty convenient. 14 00:01:24,680 --> 00:01:29,580 It has a microcontroller from particle. Basically, you can code your stuff and push 15 00:01:29,580 --> 00:01:36,680 firmware updates through the cloud. This is an example of an implementation of socket 16 00:01:36,680 --> 00:01:44,580 can, so that you can basically monitor OBD2 information. This is just a one-on-one example 17 00:01:44,580 --> 00:01:49,120 of just sniffing into the car. We were playing with that one-on-one stuff. 18 00:01:49,840 --> 00:01:56,780 This is a quick video. What we did here is we were just connecting this guy, sniffing 19 00:01:56,780 --> 00:01:58,820 the OBD2 port. 20 00:02:00,720 --> 00:02:01,740 I'm flashing the car. 21 00:02:07,200 --> 00:02:15,560 This is okay. Is that okay? Okay. This was just a one-on-one flashing thing. We said, 22 00:02:15,600 --> 00:02:22,680 okay, if we can flash the car, you see. Why don't we try to get into the car and see what 23 00:02:22,680 --> 00:02:27,240 else we can do? It turns out that only the lights can be controlled through the OBD2 24 00:02:27,240 --> 00:02:28,100 exposed to the car. 25 00:02:28,300 --> 00:02:28,900 We said, okay. 26 00:02:28,900 --> 00:02:34,960 Let's go inside the car and see what it is. Then we started playing with this. I wanted 27 00:02:34,960 --> 00:02:39,540 to ask you guys, who of you pair your phone with your car while you're driving? Can you 28 00:02:39,540 --> 00:02:40,060 raise your hand? 29 00:02:41,100 --> 00:02:41,500 Yeah. 30 00:02:41,520 --> 00:02:45,560 Yeah, right? We all do that, right? That's the reason that we decided to target the driver 31 00:02:45,560 --> 00:02:50,560 in this talk. When you guys are plugged with your car, it's pretty convenient, but at the 32 00:02:50,560 --> 00:02:56,160 same time, what if the car is infected with malware? What if we can use your phone to 33 00:02:56,160 --> 00:02:58,880 talk to our rat remotely? Right? 34 00:02:58,880 --> 00:03:02,980 That was the thing that we wanted to prove in this specific talk. 35 00:03:04,280 --> 00:03:10,140 Why the driver? As you guys know, there has been a lot of effort on car hacking, on those 36 00:03:10,140 --> 00:03:16,040 guys. Really good research on breaking stuff into the brakes, into the echos, those things, 37 00:03:16,280 --> 00:03:21,580 controlling the steering wheel. That's great. We wanted to focus on something different, 38 00:03:21,700 --> 00:03:27,360 especially, as I said, because it's very convenient to plug your phone into the car while you're 39 00:03:27,360 --> 00:03:27,660 driving. 40 00:03:28,120 --> 00:03:28,860 Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. 41 00:03:28,880 --> 00:03:34,000 That's why we decided that based on many people that it's plugged in their phone in 42 00:03:34,000 --> 00:03:40,620 the car, if we can do something inside the car, that can be huge. We can actually trade 43 00:03:40,620 --> 00:03:46,860 the data through SMS. That means that as you know, when you're driving the car, those 44 00:03:46,860 --> 00:03:52,260 cars doesn't have internet connection. Then how can you create the data? Some of the people 45 00:03:52,260 --> 00:03:56,820 were trying to search for open networks while you're driving, but that's going to take you 46 00:03:56,820 --> 00:03:58,860 probably three to five seconds to know how you're interacting with people who are there. 47 00:03:58,860 --> 00:04:02,620 seconds to get the open network and then it's gone, right? So it's not stable. 48 00:04:02,940 --> 00:04:09,520 So we said if we connect through the phone, we can do back and forth information with 49 00:04:09,520 --> 00:04:13,180 attacker through the attacker, through the driver's phone, and it's totally stable. 50 00:04:14,140 --> 00:04:18,620 So different scenarios that we can come up with is spionage. You can monitor messages 51 00:04:18,620 --> 00:04:25,560 from a person, like congressman, your wife, if you want to know if she's cheating on you. 52 00:04:27,040 --> 00:04:34,080 You can imagine if we can rent a car, right? We infect the car, we rent a car, we infect 53 00:04:34,080 --> 00:04:39,360 it, send it back to the dealer, to the rental office. Then every time someone else drives 54 00:04:39,360 --> 00:04:43,000 that car, you can be stealing information from that. And that's huge because that's 55 00:04:43,000 --> 00:04:45,760 not targeting one person, it's targeting whoever is driving that car, right? 56 00:04:45,900 --> 00:04:51,800 So splitting out CD-ROM, turning off the display, we're going to see that in the demo. So many 57 00:04:51,800 --> 00:04:53,920 scenarios that we can think about. 58 00:04:54,100 --> 00:04:55,520 Obviously, ransomware. 59 00:04:55,520 --> 00:05:00,360 Like wiping the operating system, denying calls. We can, for example, if someone calls 60 00:05:00,360 --> 00:05:04,460 this guy while driving, we can deny calls because we control it. 61 00:05:04,820 --> 00:05:08,880 So the first thing we need to do is we need to set up this guy. The guy that you see right 62 00:05:08,880 --> 00:05:12,260 there on the right, we need to set it up, right? So the first thing is we need to buy, 63 00:05:12,920 --> 00:05:17,560 by the way, this whole thing car, I drive that car. So I said I cannot test it in the 64 00:05:17,560 --> 00:05:19,640 car, so I want to get a test bench, right? 65 00:05:19,720 --> 00:05:23,400 So the first thing you need to do is you need to find a test bench. So eBay is a very good 66 00:05:24,440 --> 00:05:25,240 option for you guys. 67 00:05:25,520 --> 00:05:30,920 So lucky me, I found that the specific infotainment that is in eBay is exactly the same that 68 00:05:30,920 --> 00:05:36,900 I have that I'm driving. This has the information in the site. These are the pigtails. Those 69 00:05:36,900 --> 00:05:41,160 are very important for you guys. So anytime you want to buy something like that, make 70 00:05:41,160 --> 00:05:44,700 sure that you have the pigtails. If you don't have the pigtails, you don't have a way to 71 00:05:44,700 --> 00:05:49,220 connect it because it's just manufacturer-based. So you make sure to have that and ask for 72 00:05:49,220 --> 00:05:50,460 that. Otherwise, don't buy it. 73 00:05:51,000 --> 00:05:54,840 And this is how it looks in the car, right? This is the whole thing. So the first thing 74 00:05:54,840 --> 00:06:03,000 was to understand the internals. This guy runs Linux ARM, FreeScale, IMX6, Linux ARM, 75 00:06:03,160 --> 00:06:12,540 32 bits, kernel memory, display, Bluetooth, JTAG, Renesas, M1616C. This is more into 76 00:06:12,540 --> 00:06:19,500 the CAN-related messages. And it has GPS, of course, and the backup camera. And very 77 00:06:19,500 --> 00:06:24,720 important, guys, USB Ethernet. So the USB that we see in the car that you 78 00:06:24,720 --> 00:06:31,560 think is just to plug in and charge your phone or just to plug in for MP3 music, turns out 79 00:06:31,560 --> 00:06:32,480 that has Ethernet. 80 00:06:32,600 --> 00:06:35,880 That means you have an IP address and you can talk to the car. 81 00:06:36,660 --> 00:06:40,240 OK. So the next thing you need to do, guys, you need to find the wiring diagram. If you 82 00:06:40,240 --> 00:06:43,800 don't have the wiring diagram, you don't know how to connect the dots. And the wiring 83 00:06:43,800 --> 00:06:48,120 diagrams are only held by the manufacturers. So we were able to find this thing in leak 84 00:06:48,120 --> 00:06:52,760 in internet. And that helped us to connect all the dots. So the whole thing here is 85 00:06:52,760 --> 00:06:54,700 the audio system. We're going to use this to connect the gear in such a way that it's 86 00:06:54,700 --> 00:06:56,460 is talk to the connectivity master 87 00:06:56,460 --> 00:06:58,060 unit. The connectivity master unit 88 00:06:58,060 --> 00:07:00,480 is all we need to connect this 89 00:07:00,480 --> 00:07:02,600 guy and boot up. We don't care about other components. 90 00:07:02,800 --> 00:07:04,180 Just the component to boot up 91 00:07:04,180 --> 00:07:06,060 this guy, which is the radio, 92 00:07:06,280 --> 00:07:08,420 the Bluetooth, the SMS 93 00:07:08,420 --> 00:07:10,560 messages. So we connect this guy. 94 00:07:11,240 --> 00:07:12,640 This is how it looks in the back. 95 00:07:12,820 --> 00:07:13,480 It has 96 00:07:14,340 --> 00:07:16,100 specific can messages and accessory. 97 00:07:16,440 --> 00:07:18,460 The accessory, guys, I didn't even know what is 98 00:07:18,460 --> 00:07:19,860 accessory, but you guys, 99 00:07:19,940 --> 00:07:21,300 do you know what is accessory? 100 00:07:22,460 --> 00:07:23,480 Ignition part of it? 101 00:07:24,700 --> 00:07:26,660 When you plug your key 102 00:07:26,660 --> 00:07:28,340 in the car, you do one 103 00:07:29,160 --> 00:07:30,200 switch that 104 00:07:31,160 --> 00:07:32,660 releases the steering wheel. 105 00:07:32,860 --> 00:07:34,440 The second one releases 106 00:07:34,440 --> 00:07:36,500 the display with the 107 00:07:36,500 --> 00:07:38,400 lights. That's the accessory part. 108 00:07:38,820 --> 00:07:40,680 Then you turn on the car. That's the ignition 109 00:07:40,680 --> 00:07:42,440 starting. For us, 110 00:07:42,520 --> 00:07:44,660 we don't have the car, but we need to 111 00:07:44,660 --> 00:07:46,360 have that cable that mimics the 112 00:07:46,360 --> 00:07:48,600 accessory so that we can turn on 113 00:07:48,600 --> 00:07:50,340 the display. That's the accessory part 114 00:07:50,340 --> 00:07:51,500 that we find out here. 115 00:07:51,940 --> 00:07:53,540 We have everything up and running. 116 00:07:54,000 --> 00:07:54,560 Then we have 117 00:07:54,560 --> 00:07:54,680 the 118 00:07:54,700 --> 00:07:55,580 this guy ready. 119 00:07:55,880 --> 00:07:58,640 Then we need to start trying to get access 120 00:07:58,640 --> 00:08:00,700 to this guy. There are many ways 121 00:08:00,700 --> 00:08:02,740 to do that. One would be a serial access 122 00:08:03,700 --> 00:08:04,740 that we find out 123 00:08:04,740 --> 00:08:05,900 later. I'm going to explain you how. 124 00:08:06,420 --> 00:08:08,820 The second one is, as I said, it has a USB 125 00:08:08,820 --> 00:08:10,140 which gives you IP address. 126 00:08:10,460 --> 00:08:12,800 You can do brute force into the infotainment. 127 00:08:12,880 --> 00:08:14,100 It has really weak passwords. 128 00:08:15,100 --> 00:08:15,780 It's nothing 129 00:08:16,820 --> 00:08:18,480 difficult. But still, 130 00:08:18,620 --> 00:08:20,460 if you have serial access or 131 00:08:21,240 --> 00:08:22,520 USB connection, that 132 00:08:22,520 --> 00:08:24,520 doesn't work because you need to have something 133 00:08:24,520 --> 00:08:26,500 remotely. You need to have a way 134 00:08:26,500 --> 00:08:28,340 that the driver gets 135 00:08:28,340 --> 00:08:30,500 infected, not that you go to the car, 136 00:08:30,520 --> 00:08:32,360 open the car, and infect it. That doesn't work. 137 00:08:32,960 --> 00:08:34,460 Then we found a 138 00:08:34,460 --> 00:08:35,260 vulnerability, guys, 139 00:08:36,380 --> 00:08:38,200 like one year ago, that 140 00:08:38,200 --> 00:08:39,580 it works through the USB. 141 00:08:40,520 --> 00:08:42,600 Basically, what it does is it exploits 142 00:08:42,600 --> 00:08:44,500 the auto-run. I'm going to explain you that in a second. 143 00:08:45,420 --> 00:08:46,540 We started testing 144 00:08:46,540 --> 00:08:48,680 that one. This is how it works. 145 00:08:48,860 --> 00:08:50,540 When you plug in the USB 146 00:08:50,540 --> 00:08:52,500 into the car, it goes and 147 00:08:52,500 --> 00:08:54,160 checks if it exists any specific 148 00:08:54,160 --> 00:08:54,540 event. 149 00:08:55,760 --> 00:08:57,380 It calls what is called 150 00:08:57,380 --> 00:08:57,860 main 151 00:09:00,160 --> 00:09:01,720 instruction file. It's an 152 00:09:01,720 --> 00:09:03,780 INI file. It's going to plug the USB 153 00:09:03,780 --> 00:09:05,840 and if it finds the INI file, 154 00:09:05,980 --> 00:09:07,840 it's going to check it. Inside the 155 00:09:07,840 --> 00:09:10,220 INI file, it's going to check for an execute.ini 156 00:09:10,220 --> 00:09:12,000 file. Inside that one, it's going 157 00:09:12,000 --> 00:09:13,340 to check, okay, do you have a 158 00:09:13,340 --> 00:09:16,000 date retrieval information command? 159 00:09:16,360 --> 00:09:17,940 If it has that, it's going 160 00:09:17,940 --> 00:09:19,820 to call it. Basically, guys, 161 00:09:19,960 --> 00:09:21,500 this is just going to receive 162 00:09:21,500 --> 00:09:23,560 whatever is in that command line. 163 00:09:24,160 --> 00:09:25,380 As you can see here in the button, 164 00:09:25,900 --> 00:09:27,900 whatever you put in that command line is going 165 00:09:27,900 --> 00:09:29,840 to take it and execute it. So simple, 166 00:09:30,000 --> 00:09:32,000 nothing advanced. That is going 167 00:09:32,000 --> 00:09:33,840 to do a system on whatever you 168 00:09:33,840 --> 00:09:35,560 pass, and then you can start executing 169 00:09:35,560 --> 00:09:36,960 in the 170 00:09:37,980 --> 00:09:39,920 car, in the infotainment car. This was the 171 00:09:39,920 --> 00:09:41,200 vulnerability that these guys found. 172 00:09:41,860 --> 00:09:43,900 Then we tested, and it turns out that 173 00:09:43,900 --> 00:09:46,180 it was working fine. We got access to the infotainment. 174 00:09:46,680 --> 00:09:47,760 At this point, guys, 175 00:09:47,920 --> 00:09:49,920 we said, should we 176 00:09:49,920 --> 00:09:52,060 keep finding vulnerabilities 177 00:09:52,060 --> 00:09:54,040 to break into the car, or should we 178 00:09:54,040 --> 00:09:55,820 focus on what we can do 179 00:09:55,820 --> 00:09:57,300 once we are inside the car? 180 00:09:57,600 --> 00:09:59,800 Since it was too easy, as you 181 00:09:59,800 --> 00:10:01,500 can see, to break into the car, we decided 182 00:10:01,500 --> 00:10:03,760 let's work on what we can do once 183 00:10:03,760 --> 00:10:04,720 we are inside the car. 184 00:10:05,860 --> 00:10:07,720 This is just a quick demo, guys, so that 185 00:10:07,720 --> 00:10:09,520 you can see how it works. 186 00:10:10,080 --> 00:10:11,780 Basically, what you need to do 187 00:10:11,780 --> 00:10:13,760 is, as I said, we have the 188 00:10:13,760 --> 00:10:15,300 USB at the top. 189 00:10:16,120 --> 00:10:17,780 That USB is the one that 190 00:10:17,780 --> 00:10:19,700 you see in the car, right? Then you 191 00:10:19,700 --> 00:10:21,480 will go, as social engineering, 192 00:10:21,760 --> 00:10:23,520 you go to the guy and say, hey, 193 00:10:24,040 --> 00:10:25,880 free music, or free porn, or 194 00:10:25,880 --> 00:10:27,760 whatever it is, you know? 195 00:10:28,000 --> 00:10:29,880 I don't know. But, anyways, 196 00:10:30,100 --> 00:10:32,040 you convince this guy, right? Or you leave 197 00:10:32,040 --> 00:10:33,880 the USBs in the desk, 198 00:10:33,940 --> 00:10:35,720 whatever. This guy plug in the 199 00:10:35,720 --> 00:10:38,000 USB into the car, and then the 200 00:10:38,000 --> 00:10:39,740 other one that I just described is going to start 201 00:10:39,740 --> 00:10:41,880 executing. So we take around 202 00:10:41,880 --> 00:10:43,940 30 seconds to 203 00:10:43,940 --> 00:10:46,020 pop up, just because of this 204 00:10:46,020 --> 00:10:48,040 whole process of deciding what it's 205 00:10:48,040 --> 00:10:49,980 going to do. And eventually, what we are 206 00:10:49,980 --> 00:10:52,020 doing here is just popping up a screen, 207 00:10:52,260 --> 00:10:53,840 obviously, to show that 208 00:10:53,840 --> 00:10:55,780 it is infected. But, obviously, 209 00:10:55,860 --> 00:10:57,840 in a real scenario, you don't need to pop 210 00:10:57,840 --> 00:10:58,940 up anything. Yes? 211 00:11:02,240 --> 00:11:03,720 It's in the machine, in the operating system. 212 00:11:04,580 --> 00:11:05,300 There is a 213 00:11:06,160 --> 00:11:07,740 library, a dynamic library 214 00:11:07,740 --> 00:11:09,320 that triggers when you plug 215 00:11:09,320 --> 00:11:11,880 the USB, and it starts handling all the events. 216 00:11:17,960 --> 00:11:19,020 From the USB. 217 00:11:19,320 --> 00:11:21,560 So the USB has an ID file 218 00:11:21,560 --> 00:11:23,420 that this guy is going to read, 219 00:11:23,840 --> 00:11:25,860 pretending to update something, but it's 220 00:11:25,860 --> 00:11:27,160 a bash script that we can control. 221 00:11:27,900 --> 00:11:29,180 Yeah. So this is basically 222 00:11:29,780 --> 00:11:31,840 infecting this guy, right? So what is the motivation 223 00:11:31,840 --> 00:11:33,640 that, at this point, we said, should we 224 00:11:33,640 --> 00:11:35,560 move into attacking the 225 00:11:35,560 --> 00:11:37,560 car, the driver, or what should we do? 226 00:11:37,800 --> 00:11:39,860 So something very important that we realized, guys, 227 00:11:39,920 --> 00:11:42,280 is that this vulnerability was patched 228 00:11:42,280 --> 00:11:43,300 by the manufacturer. 229 00:11:44,180 --> 00:11:45,820 And then this, but 230 00:11:45,820 --> 00:11:47,840 this specific infotainment 231 00:11:47,840 --> 00:11:49,380 doesn't have that, it was 232 00:11:49,380 --> 00:11:51,740 vulnerable. But then when we, 233 00:11:52,400 --> 00:11:53,820 I went back and checked, 234 00:11:53,840 --> 00:11:55,760 checked my car, turns out that my car 235 00:11:55,760 --> 00:11:57,420 was also vulnerable. And 236 00:11:57,420 --> 00:11:59,780 even though I have been driving that 237 00:11:59,780 --> 00:12:01,680 car for more than one year and a half, 238 00:12:01,860 --> 00:12:03,640 so my firmware was also 239 00:12:03,640 --> 00:12:05,920 vulnerable. So that makes me think about 240 00:12:05,920 --> 00:12:06,980 that why the, 241 00:12:08,120 --> 00:12:09,840 it was not updated by the 242 00:12:09,840 --> 00:12:11,720 manufacturer. Keep in mind that this 243 00:12:11,720 --> 00:12:13,840 firmware is not like Windows updates. You cannot 244 00:12:13,840 --> 00:12:15,560 just get the update through internet. 245 00:12:15,820 --> 00:12:17,340 So you need to go to the manufacturer, 246 00:12:17,600 --> 00:12:19,780 they need to plug an SD card and update your 247 00:12:19,780 --> 00:12:21,580 firmware. So, but 248 00:12:21,580 --> 00:12:23,180 still, I don't know if you guys are 249 00:12:23,840 --> 00:12:24,980 familiar with what is called 250 00:12:26,080 --> 00:12:27,700 warning calls. In US, 251 00:12:27,880 --> 00:12:29,840 the warning call is when you get a letter 252 00:12:29,840 --> 00:12:31,740 that says, hey, we find something 253 00:12:31,740 --> 00:12:33,360 in your car, come to the 254 00:12:33,900 --> 00:12:35,520 dealership and we are going to fix it for you. 255 00:12:37,140 --> 00:12:37,780 Recalls, exactly. 256 00:12:38,240 --> 00:12:39,440 That's it in US. So 257 00:12:39,900 --> 00:12:41,740 for this specific thing, I would have 258 00:12:41,740 --> 00:12:43,820 expected these guys to send us a recall for this, 259 00:12:43,860 --> 00:12:45,820 right? I never get that, and for sure 260 00:12:45,820 --> 00:12:47,380 I didn't get that because I have the same car. 261 00:12:47,560 --> 00:12:49,700 So I was saying, hey, how many cars might be 262 00:12:49,700 --> 00:12:51,220 vulnerable with this specific thing? 263 00:12:51,460 --> 00:12:53,340 But these guys just doesn't even care. 264 00:12:53,840 --> 00:12:55,440 Even though they patched the firmware. So we said, 265 00:12:55,520 --> 00:12:57,640 let's do something inside the car so that 266 00:12:57,640 --> 00:12:59,540 that can help us to push into 267 00:12:59,540 --> 00:13:01,260 fixing these things and treat it seriously. 268 00:13:01,700 --> 00:13:03,560 Okay? And this is when, this is like 269 00:13:03,560 --> 00:13:05,600 an example of the safety recall notice 270 00:13:05,600 --> 00:13:07,220 that you might get into your 271 00:13:08,220 --> 00:13:09,620 house if your 272 00:13:09,620 --> 00:13:10,740 car has some problems. So, 273 00:13:11,340 --> 00:13:13,540 and as I said, potential targets, you know, 274 00:13:13,580 --> 00:13:15,460 rental cars, if we can infect the car with 275 00:13:15,460 --> 00:13:17,100 malware, it's going to be 276 00:13:17,100 --> 00:13:19,220 thousands or millions because this firmware 277 00:13:19,220 --> 00:13:20,360 is probably millions 278 00:13:20,360 --> 00:13:22,960 driving outside. You know, 279 00:13:24,560 --> 00:13:26,360 they are not updating. And when I 280 00:13:26,360 --> 00:13:28,100 went to the dealership, I tell him, hey, 281 00:13:28,220 --> 00:13:29,920 could you please upgrade my firmware? 282 00:13:30,160 --> 00:13:31,680 And the first answer was, 283 00:13:32,180 --> 00:13:34,060 what is firmware? So 284 00:13:34,060 --> 00:13:36,200 that was what the service guy told me. Then I talked 285 00:13:36,200 --> 00:13:38,300 to the manager, and he said, if you 286 00:13:38,300 --> 00:13:40,380 want me to update your firmware, first of all 287 00:13:40,380 --> 00:13:41,760 you need to have a problem in your car. 288 00:13:42,180 --> 00:13:44,340 Something is wrong with your car, we cannot do anything 289 00:13:44,340 --> 00:13:45,820 if you don't have any problems. So 290 00:13:45,820 --> 00:13:48,040 I went to another dealership and I said, you know 291 00:13:48,040 --> 00:13:49,380 what? You know what? 292 00:13:50,880 --> 00:13:51,260 So 293 00:13:52,060 --> 00:13:53,820 my car, the Bluetooth is not working. 294 00:13:53,840 --> 00:13:55,800 He said, why not? I said, I don't give a shit, 295 00:13:55,900 --> 00:13:57,460 man, it's not working. Just 296 00:13:57,900 --> 00:13:59,520 update my firmware, man. And then 297 00:13:59,520 --> 00:14:01,860 finally, you know, so you need 298 00:14:01,860 --> 00:14:03,880 to do a lot of stuff. So, back to the game, 299 00:14:03,960 --> 00:14:05,860 right? So we were playing with this guy. 300 00:14:05,940 --> 00:14:07,580 So let's focus on infecting the car 301 00:14:07,580 --> 00:14:09,800 and see some consequences so that we can prove 302 00:14:09,800 --> 00:14:11,360 that you need to take this seriously. 303 00:14:11,660 --> 00:14:13,220 So we were playing with the car, 304 00:14:13,320 --> 00:14:15,680 and then we lost access to the 305 00:14:15,680 --> 00:14:17,680 infotainment because we were playing with the services 306 00:14:18,120 --> 00:14:19,680 and then, unfortunately, 307 00:14:20,160 --> 00:14:21,920 we lost Ethernet connection, 308 00:14:22,100 --> 00:14:23,060 we lost Wi-Fi connection, 309 00:14:23,840 --> 00:14:25,340 so we found in a specific 310 00:14:25,340 --> 00:14:27,460 blog that there was a 311 00:14:27,460 --> 00:14:29,580 UART connectivity to this guy 312 00:14:29,580 --> 00:14:30,980 through two 313 00:14:31,600 --> 00:14:33,520 specific pins. So then 314 00:14:33,520 --> 00:14:35,380 we were trying to find 315 00:14:35,380 --> 00:14:37,700 those guys inside the infotainment, plug it in, 316 00:14:37,840 --> 00:14:39,700 and thanks God and Josh Gomez, 317 00:14:39,840 --> 00:14:40,620 we got that back. 318 00:14:40,960 --> 00:14:43,660 So we were able 319 00:14:43,660 --> 00:14:45,460 to get access to the infotainment. What we learned here, 320 00:14:45,540 --> 00:14:47,720 guys, is that when you're testing a device, 321 00:14:48,040 --> 00:14:49,760 make sure that you have a backdoor 322 00:14:49,760 --> 00:14:51,620 or some way to get in. So you cannot 323 00:14:51,620 --> 00:14:53,580 just, you know, start trying your stuff and suddenly 324 00:14:53,840 --> 00:14:55,800 get access, and you lose access, you get 325 00:14:55,800 --> 00:14:57,700 screwed. So you make sure you always 326 00:14:57,700 --> 00:14:59,320 have a way back to your 327 00:14:59,820 --> 00:15:01,760 device. Okay? So the next thing 328 00:15:01,760 --> 00:15:03,880 is persistence. As you know, we want to make sure 329 00:15:03,880 --> 00:15:05,940 that this guy runs every time the infotainment 330 00:15:05,940 --> 00:15:07,940 boots. Pretty easy. There is an SMS 331 00:15:07,940 --> 00:15:09,840 service running, and it has a specific 332 00:15:10,460 --> 00:15:11,880 XML file. We just 333 00:15:11,880 --> 00:15:13,880 add our RAT into the XML file. 334 00:15:14,040 --> 00:15:15,900 Pretty simple. Every time this guy runs, 335 00:15:16,600 --> 00:15:17,920 it's going to run 336 00:15:17,920 --> 00:15:19,880 our RAT. Obviously, it is read-only, 337 00:15:19,980 --> 00:15:21,480 but you can remount it as read-write. 338 00:15:21,660 --> 00:15:23,580 No issues, nothing that's 339 00:15:23,580 --> 00:15:25,540 stops you. Pretty easy. Okay? 340 00:15:25,660 --> 00:15:27,660 This is our lab setup. We are ready to go. 341 00:15:27,780 --> 00:15:29,120 We're ready to start playing with this guy. 342 00:15:29,520 --> 00:15:31,400 We have a U-Bus parade 343 00:15:31,400 --> 00:15:32,620 for the serial access. 344 00:15:33,200 --> 00:15:35,680 We have a BeagleBone where we compile 345 00:15:35,680 --> 00:15:37,700 our RAT. Every change we do, 346 00:15:37,860 --> 00:15:39,820 instead of doing toolchain cross-compiling, 347 00:15:39,960 --> 00:15:40,820 we just use 348 00:15:41,620 --> 00:15:43,540 our BeagleBone, which turns out to be 349 00:15:43,540 --> 00:15:45,580 exactly the same Linux ARM version 350 00:15:45,580 --> 00:15:47,840 that the infotainment is running. So we compile 351 00:15:47,840 --> 00:15:49,760 our changes there. And the USB 352 00:15:49,760 --> 00:15:51,960 hub, the USB hub, since we were three guys, 353 00:15:52,080 --> 00:15:53,060 we plug this hub. 354 00:15:53,580 --> 00:15:55,140 We have excellent access, all of us, 355 00:15:55,240 --> 00:15:57,460 especially for remote debugging, which is 356 00:15:57,460 --> 00:15:58,520 very slow through Wi-Fi. 357 00:15:59,720 --> 00:16:01,620 Okay. Once we were inside, guys, we found 358 00:16:01,620 --> 00:16:03,480 this test application. This test 359 00:16:03,480 --> 00:16:05,360 application is basically a debugging 360 00:16:05,360 --> 00:16:06,680 application that the manufacturer 361 00:16:07,260 --> 00:16:09,440 left inside this guy. So that 362 00:16:09,440 --> 00:16:11,240 helped us a lot because it's full of symbols 363 00:16:11,240 --> 00:16:13,280 and we only need to reverse that guy 364 00:16:13,280 --> 00:16:15,520 to understand how to interact with multiple 365 00:16:15,520 --> 00:16:17,500 components. It's a test app client that 366 00:16:17,500 --> 00:16:18,920 talks to a test app server, 367 00:16:19,120 --> 00:16:21,460 which has some XML commands, and then 368 00:16:21,460 --> 00:16:23,240 you can control the audio, you can control 369 00:16:23,580 --> 00:16:24,920 the Bluetooth, you can control configuration 370 00:16:24,920 --> 00:16:28,840 of the car, Wi-Fi settings, canvas. So we were 371 00:16:28,840 --> 00:16:30,840 analyzing this guy and we found the prefix, 372 00:16:31,100 --> 00:16:34,140 which is AT plus TMC. So if you talk to this 373 00:16:34,140 --> 00:16:36,240 guy through the client, do this prefix and put 374 00:16:36,240 --> 00:16:38,360 your own commands, you start interacting with 375 00:16:38,360 --> 00:16:40,800 the car without, I mean, it's going to save us 376 00:16:40,800 --> 00:16:43,800 too much time. And actually we use this for a 377 00:16:43,800 --> 00:16:45,780 specific reason, to reset the phone in the 378 00:16:45,780 --> 00:16:47,600 Bluetooth, as you're going to see in a demo in 379 00:16:47,600 --> 00:16:50,020 a second. It was pretty convenient. This is an 380 00:16:50,020 --> 00:16:52,580 example. So for example, you can see there, you 381 00:16:52,580 --> 00:16:55,980 have AT plus TMC. After that, you have commands 382 00:16:55,980 --> 00:16:58,620 to execute. Like you can see the firmware version, 383 00:16:58,840 --> 00:17:02,780 you can see the VIN number, you can see the 384 00:17:02,780 --> 00:17:06,000 build date, and of course, you can also control 385 00:17:06,000 --> 00:17:07,760 Bluetooth and those things that I'm going to show 386 00:17:07,760 --> 00:17:10,240 you later. But this was pretty good for us, very 387 00:17:10,240 --> 00:17:13,460 bad for the guys that are leaving debugging tools 388 00:17:13,460 --> 00:17:14,680 in the infotainment. 389 00:17:15,600 --> 00:17:17,980 Okay, next thing guys. So when you're analyzing 390 00:17:17,980 --> 00:17:20,440 these kind of things, you need to debug it. You 391 00:17:20,440 --> 00:17:22,320 cannot just go, I mean, might be some 392 00:17:22,580 --> 00:17:24,500 ninjas here, reverses, right? But I'm not a ninja 393 00:17:24,500 --> 00:17:27,980 reverser. So, but just looking statically, I need 394 00:17:27,980 --> 00:17:31,040 to, you know, do debugging information so that I 395 00:17:31,040 --> 00:17:33,920 can see exactly, it's an SMS message, we put a 396 00:17:33,920 --> 00:17:36,560 breakpoint, I need to see how it's going on, to 397 00:17:36,560 --> 00:17:38,060 understand every single step. So you need to have 398 00:17:38,060 --> 00:17:41,760 debugging thing. But this is Linux ARM in an 399 00:17:41,760 --> 00:17:43,940 infotainment, embedded. It's totally different than 400 00:17:44,340 --> 00:17:46,840 Windows. So the first thing that we got was 401 00:17:46,840 --> 00:17:50,320 watchdogs. The watchdogs means that if you stop 402 00:17:50,320 --> 00:17:52,720 a breakpoint after three seconds, it's going to 403 00:17:52,720 --> 00:17:56,220 reboot the infotainment. So we need to find a way 404 00:17:56,220 --> 00:17:58,440 to kill the watchdog. The second thing is that we 405 00:17:58,440 --> 00:18:00,580 were putting breakpoints in IDA, and it was not 406 00:18:00,580 --> 00:18:04,580 triggering at all. So we decided to look at it a 407 00:18:04,580 --> 00:18:07,940 little bit, and then we found that the service 408 00:18:07,940 --> 00:18:11,500 manager controlled all the other processes, and then 409 00:18:11,500 --> 00:18:14,180 as soon, it will trigger the watchdog. But funny 410 00:18:14,180 --> 00:18:16,700 thing is that we can kill that SMS service manager, 411 00:18:17,020 --> 00:18:19,500 no restrictions at all, and there is no watcher. 412 00:18:19,500 --> 00:18:23,300 Really simple. Second thing is via GPIO, we can put 413 00:18:23,300 --> 00:18:26,240 a flag there, and the watchdog is gone. That's the 414 00:18:26,240 --> 00:18:29,560 second approach. Now, talking about the GDB breakpoints. 415 00:18:29,800 --> 00:18:32,120 So we find out that there is an instruction. We didn't 416 00:18:32,120 --> 00:18:34,500 know about it. It's called undefined instruction. So 417 00:18:34,500 --> 00:18:37,520 the way it works is that this is the P-trace code, if 418 00:18:37,520 --> 00:18:40,040 you want to look at it. It's basically pretty simple. 419 00:18:40,360 --> 00:18:43,920 So what you're going to do is that in the instruction 420 00:18:43,920 --> 00:18:46,620 that you want to set your breakpoint, you just replace 421 00:18:46,620 --> 00:18:49,200 that with the on instruction, as you can see on the right 422 00:18:49,200 --> 00:18:51,920 side. Once you do that, it's going to trigger a 423 00:18:51,920 --> 00:18:54,720 trap. That trap is going to be caught by the application, 424 00:18:54,940 --> 00:18:57,520 but since we're debugging it, it's going to stop on us. 425 00:18:57,780 --> 00:19:01,540 After that, you just need to revert back the bytes on 426 00:19:01,540 --> 00:19:04,540 memory and keep going debugging. But it turns out, for us 427 00:19:04,540 --> 00:19:07,020 at least, this was the way for us to start debugging 428 00:19:07,020 --> 00:19:10,860 services, because this is services. If you are familiar 429 00:19:10,860 --> 00:19:14,580 with Windows services debugging, it's a pain, and Linux 430 00:19:14,580 --> 00:19:19,180 is the same. It's not as an standalone application. So this was the 431 00:19:19,200 --> 00:19:22,300 way for us to start debugging. So we are ready, and let's 432 00:19:22,300 --> 00:19:23,560 start looking into the main component. 433 00:19:23,820 --> 00:19:25,940 The way it works, this guy, it has a 434 00:19:25,940 --> 00:19:32,020 JavaScript based front end, it runs with Opera browser. It connects through web sockets 435 00:19:32,020 --> 00:19:39,160 to what is called a multimedia unit interface. That unit interface talks to all the components 436 00:19:39,160 --> 00:19:43,980 through D-Bus, through the phone updates, backup navigation, 437 00:19:44,720 --> 00:19:48,560 Bluetooth, everything. Then that guy connects to the service manager, which has all the 438 00:19:49,200 --> 00:19:56,380 inside the car. This is a total world. It has ignition camera, it has video related 439 00:19:56,380 --> 00:20:03,100 messaging and can DVD. So that you guys have an idea, we focus on this part only. But it�s 440 00:20:03,100 --> 00:20:09,520 huge. We just focus on the part of how we can control the messages coming in, going 441 00:20:09,520 --> 00:20:15,620 out of the infotainment, which is just the JavaScript side, MMU side and the MSG library 442 00:20:15,620 --> 00:20:21,300 which controls this whole thing. So let�s focus on SMS messaging. Let�s see how it 443 00:20:21,300 --> 00:20:26,740 works. So when you receive a message from this guy, right now it�s like one slide 444 00:20:26,740 --> 00:20:35,960 but it took us probably three weeks to understand this whole thing. So you send a message, from 445 00:20:37,180 --> 00:20:41,440 I am sending a message to the guy that is driving that car, right? The guy is driving 446 00:20:41,440 --> 00:20:45,600 that car, receives the message, Bluetooth takes it, it calls a blue message, and it 447 00:20:45,600 --> 00:20:51,100 goes to the service handler. That triggers through the bus, connects to the MSG which 448 00:20:51,100 --> 00:20:56,440 is the Linux library that is handled via specific communication. It triggers the SMS notification 449 00:20:56,440 --> 00:21:03,760 callback. Then it stores that message into a SQLite table. Then from there it talks 450 00:21:03,760 --> 00:21:10,260 to the multimedia interface which is going to talk through WebSocket to the GUI. Then 451 00:21:10,260 --> 00:21:15,580 the GUI is finally going to display through a JavaScript event. So JavaScript is going 452 00:21:15,600 --> 00:21:18,480 to appear in this list of two minutes. Then the SSC and the MMUI are talking through WebSocket, 453 00:21:18,660 --> 00:21:23,560 as you can see here. They are just waiting for the information coming in and out. Once 454 00:21:23,560 --> 00:21:28,840 they receive it, they pop up a message into the screen. That�s simple, but those are 455 00:21:28,840 --> 00:21:32,520 the main components that need to be understood if you want to control it. 456 00:21:33,500 --> 00:21:38,860 Then, sending a message. If you want to send a message out from this guy to the world, 457 00:21:39,040 --> 00:21:43,560 like you are driving, you got a message, you can put reply, send message, this guy 458 00:21:43,560 --> 00:21:45,580 is going to send a message out. The way it works is, this guy is going to put a reply. 459 00:21:45,580 --> 00:21:51,520 that this guy, again it's just a reverse order. It goes to the MMUI, JavaScript to MMUI through 460 00:21:51,520 --> 00:21:57,420 WebSockets, then this is like a portion of example of JavaScript, how it works. Basically 461 00:21:57,420 --> 00:22:03,480 you put the message that you want to send, it sets the state of MMUI, it's like a state 462 00:22:03,480 --> 00:22:07,980 machine so that it controls multiple events. You need to put it in a state, in this case 463 00:22:07,980 --> 00:22:12,740 to send an SMS message, you put an ID of the event, in this case SMS, and just trigger 464 00:22:12,740 --> 00:22:18,120 the event and it's going to connect to MSG component, which is the Linux library, which 465 00:22:18,120 --> 00:22:22,520 called the safe message. Keep in mind this one, safe message is the one that's going 466 00:22:22,520 --> 00:22:29,220 to allow us to use the bus to talk to the Bluetooth and send the message out finally 467 00:22:29,220 --> 00:22:33,340 to the guy, whoever is outside. This is the whole process receiving and sending. 468 00:22:34,760 --> 00:22:38,440 Now let's see a little bit very important for us, because we said okay, we understand 469 00:22:38,440 --> 00:22:42,200 now how it works. Now I want to send an SMS message to the 470 00:22:42,200 --> 00:22:42,720 infotainment. 471 00:22:42,740 --> 00:22:48,860 I want it to respond to me. I want my malware to know when a message is being received so 472 00:22:48,860 --> 00:22:53,860 that it can trigger whatever I want. The first thing is that I need to wake up my rat. 473 00:22:54,100 --> 00:23:02,420 We realized that the messages are being stored in a SMS database, SQLite, unencrypted, so 474 00:23:02,420 --> 00:23:07,800 you can just open it up. It has some tables. The interesting ones are the attachment and 475 00:23:07,800 --> 00:23:12,040 the message table. The attachment table is the one that every time you receive a message 476 00:23:12,040 --> 00:23:17,000 it stores the message in that table. The message table is the one that when you click 477 00:23:17,000 --> 00:23:22,020 read inside the infotainment, it's going to store that message into that table. That means 478 00:23:22,020 --> 00:23:28,500 that if we can monitor the attachment table we know exactly when a new message is coming 479 00:23:28,500 --> 00:23:32,880 to the infotainment, and as soon as we see a new message into that table we can wake 480 00:23:32,880 --> 00:23:39,260 up our rat and start executing what we want. There are some limitations when we are trying 481 00:23:39,260 --> 00:23:40,340 to do it with JavaScript. 482 00:23:42,040 --> 00:23:46,020 know JavaScript you need to start touching the screen, it's popping up so it's not something 483 00:23:46,020 --> 00:23:51,980 that is easy to see and it's so discouraging and also the driver or whoever is the target 484 00:23:51,980 --> 00:23:58,160 is going to realize that so it's not convenient. This is just a quick example guys that I want 485 00:23:58,160 --> 00:24:03,780 to show you. So here what we are doing is we have a message being sent through JavaScript. 486 00:24:04,160 --> 00:24:09,560 So the message is being triggered in a specific event. So as you can see here I'm going to 487 00:24:09,560 --> 00:24:14,860 be touching different parts of the infotainment but as long as I don't touch the part inside 488 00:24:14,860 --> 00:24:18,460 the infotainment that triggers the message nothing is going to happen. So I'm touching 489 00:24:18,460 --> 00:24:23,420 here, I'm going to different tabs in the infotainment, nothing happens because there is not a trigger 490 00:24:23,420 --> 00:24:29,040 right there but then suddenly I'm going to, you see I'm moving to the sound or to different 491 00:24:29,040 --> 00:24:34,080 places but then I'm going to move to a place where a message is going to be sent out by 492 00:24:34,080 --> 00:24:39,540 JavaScript without touching the send button. So we put the message inside a message and 493 00:24:39,560 --> 00:24:46,620 a specific event. The event is read message. So we go there, we click read message. Here 494 00:24:46,620 --> 00:24:51,260 you see the send button? We are not going to touch that button. When we click here any 495 00:24:51,260 --> 00:24:55,260 of those messages, checking the left side, the message is going to be sent automatically 496 00:24:55,260 --> 00:25:03,940 through JavaScript. Check that. The message is sent automatically and it is receiving 497 00:25:03,940 --> 00:25:09,140 the phone. So this was a way for us to send messages through JavaScript but as I said 498 00:25:09,560 --> 00:25:13,320 we are not going to touch that. It was there but it was not enough for us because it was 499 00:25:13,320 --> 00:25:21,140 too limited, it was not easy for us to wake up the driver. So we said okay let's focus 500 00:25:21,140 --> 00:25:26,880 on other options. WebSocket is one and then the MSG or the DBoss is the other option. 501 00:25:27,060 --> 00:25:31,200 So we are trying to find a way to send messages out but we saw that JavaScript it doesn't 502 00:25:31,200 --> 00:25:38,680 work for us. Okay, so in the WebSocket approach basically you can put a sniffer into the WebSocket 503 00:25:39,560 --> 00:25:44,580 see all the communication going back and forth between the JavaScript and the MMUI component. 504 00:25:44,980 --> 00:25:51,500 That way we can get that information and replay it. It's possible, but you need to convert 505 00:25:52,680 --> 00:26:01,460 this guy from this information in JSON into C, use the libraries to talk to the WebSockets. 506 00:26:01,980 --> 00:26:04,520 It's good, but still it's a lot of work. 507 00:26:04,520 --> 00:26:10,760 The second approach is using the Linux library APIs. In the left side you can see all the 508 00:26:10,760 --> 00:26:15,640 structure. When you're sending an SMS message we dump it from memory, and in the right side 509 00:26:15,640 --> 00:26:19,600 we'll start constructing the structures in order to understand how to send a message 510 00:26:19,600 --> 00:26:26,580 via C code. Still it's possible, but again this is just one simple event. If you want 511 00:26:26,580 --> 00:26:30,260 to do many other events, you're not going to be keep going adding and adding more events 512 00:26:30,260 --> 00:26:33,020 just to support a specific action. 513 00:26:33,580 --> 00:26:34,500 The final approach is to use the libraries to communicate with the WebSockets. If you're 514 00:26:34,520 --> 00:26:40,380 Another one was D-Bus. D-Bus is pretty cool because D-Bus has all these different implementations 515 00:26:40,380 --> 00:26:44,880 which means you have interfaces to talk to the Bluetooth, interfaces to talk to the radio, 516 00:26:45,160 --> 00:26:49,460 to talk to the GPS, everything. You don't need to do anything. You just need to call 517 00:26:49,840 --> 00:26:52,940 the D-Bus interface and method and that's it. 518 00:26:53,840 --> 00:26:58,540 We started exploring that information and then we decided that let's go through the 519 00:26:58,540 --> 00:27:04,060 D-Bus approach. At this point we said, okay, we have the guide that we need so let's focus 520 00:27:04,060 --> 00:27:11,200 on that. This is something to give an idea, guys, what it is. The D-Bus interface is exposed. 521 00:27:11,500 --> 00:27:17,160 You can see that we can do Bluetooth pairing operations, GPS, navigation, maps, network 522 00:27:17,160 --> 00:27:23,080 devices connection, system updates and the button SMS operations. That means if we are 523 00:27:23,080 --> 00:27:28,120 able to understand the SMS operations, we might be able to send and receive messages. 524 00:27:29,180 --> 00:27:34,040 A little bit fundamental about D-Bus, just quickly, it's a Linux IPC mechanism. It's 525 00:27:34,040 --> 00:27:40,340 just a channel to communicate information between processes. It is used by Lib D-Bus 526 00:27:40,340 --> 00:27:46,040 in Linux. It has specific policies. By the way, in this specific infotainment, there 527 00:27:46,040 --> 00:27:50,180 is no security policies. We're free to do everything. Actually, infotainment has a 528 00:27:50,180 --> 00:27:55,920 firewall that we can disable and we can talk to D-Bus also remotely. It is simple as take 529 00:27:55,920 --> 00:28:01,980 some parameters and you talk to it. It's pretty simple. We thought it was great, our 530 00:28:01,980 --> 00:28:03,680 feature, but probably not. 531 00:28:03,680 --> 00:28:09,840 Then we start understanding the D-Bus. The first thing is receive messages. This get 532 00:28:09,840 --> 00:28:14,740 message guy is going to allow us to receive messages, but turns out that this long line 533 00:28:15,080 --> 00:28:22,280 is very complicated, which means that it's a nested structure that the D-Bus send command 534 00:28:22,920 --> 00:28:26,880 inside the infotainment doesn't support. We were very happy. We said, let's send messages 535 00:28:26,880 --> 00:28:32,520 and receive. Turns out that it doesn't support these complex nested structures. Same for 536 00:28:32,520 --> 00:28:33,260 the other one. 537 00:28:33,680 --> 00:28:36,860 The second thing is to send messages. Same message as I said is to send messages out 538 00:28:37,360 --> 00:28:44,940 and also complex structures. We said, okay, we need to find a way to implement a D-Bus 539 00:28:44,940 --> 00:28:48,980 inside the infotainment. The D-Bus monitor, so that you guys know, is like a sniffer, 540 00:28:49,120 --> 00:28:56,940 but for D-Bus, D-Bus is to send the messages, but as I said, it is really limited. We start 541 00:28:56,940 --> 00:29:00,260 playing with different libraries. I'm going to go really fast in these three slides, 542 00:29:00,320 --> 00:29:00,500 guys. 543 00:29:00,680 --> 00:29:03,660 It's just a lot of effort by Gerardo. He's a genius. He's a genius. He's a genius. He's 544 00:29:03,680 --> 00:29:08,060 Gerardo, by the way, he spent probably three weeks trying to compile statically different 545 00:29:08,060 --> 00:29:14,040 D-Bus binaries because we want a binary that supports nested complex structures for us 546 00:29:14,040 --> 00:29:19,240 to use it in a scriptable way. Then turns out that it was not possible very hard. We 547 00:29:19,240 --> 00:29:24,580 tried like lib D-Bus. It was limited. It didn't work. We tried G-D-Bus. You need to 548 00:29:24,580 --> 00:29:30,860 compile everything statically. It didn't work. Then we found ROS bindings with D-Bus. Also 549 00:29:30,860 --> 00:29:33,660 didn't work. Godbus didn't work. DFIT didn't work. We tried G-D-Bus. We tried G-D-Bus. We 550 00:29:33,660 --> 00:29:36,040 tried D-Bus. We tried all these things. I think this is the one that we used. I'm going 551 00:29:36,040 --> 00:29:41,300 to give you a demo in a second. This works pretty well. We use it. It supports the nested 552 00:29:41,300 --> 00:29:47,420 structures that I said, but this is a GUI. DFIT is GUI. Still it works perfect, but it's 553 00:29:47,420 --> 00:29:48,040 not scriptable. 554 00:29:49,480 --> 00:29:54,380 Then PyID bus, turns out these guys also run some sort of Python, but it didn't work 555 00:29:54,380 --> 00:30:00,260 anyways. Finally, lib D-Bus. lib D-Bus, these guys, this is a solution for us. Turns out 556 00:30:00,260 --> 00:30:03,640 that it supports nested complex structures. I love the distance. I just want to make sure 557 00:30:03,640 --> 00:30:11,700 as I said, or container types. It has a toolchain created by some guys, I'm going to leave you 558 00:30:11,700 --> 00:30:18,360 guys the links. It's basically these guys created a toolchain specifically to this kind 559 00:30:18,360 --> 00:30:23,700 of card. For us, we don't need to deal with dependencies problems, with all those information 560 00:30:23,700 --> 00:30:29,340 problems. We just need to use this toolchain and works pretty well. You just define your 561 00:30:29,340 --> 00:30:36,860 XML D-Bus introspection information that you want to call through D-Bus and it's going 562 00:30:36,860 --> 00:30:41,620 to work. Here's an example. This example is one of our modules that I want to show you. 563 00:30:41,760 --> 00:30:47,480 It's just called Flickr. Flickr was compiled with this tool in a scriptable way in the 564 00:30:47,480 --> 00:30:53,020 infotainment. It's pretty simple. You connect to the D-Bus port and you establish a connection 565 00:30:53,020 --> 00:30:58,460 to the D-Bus, then set up the interface that you want to deal with D-Bus. It's called 566 00:30:58,460 --> 00:30:59,320 LBDS-2. 567 00:30:59,320 --> 00:31:06,720 LBDS-2 is a video related interface that we use to set the brightness, which basically 568 00:31:06,720 --> 00:31:12,300 means you can turn off the display, turn it on. That's simple, but this is the way that 569 00:31:12,300 --> 00:31:19,220 finally you run. If you have done some toolchain compilation, it's just a way to compile it 570 00:31:19,220 --> 00:31:22,180 and ready to go. We have the Flickr ready to use in the infotainment. 571 00:31:24,060 --> 00:31:29,300 We have everything ready, guys. Finally, before the demo, see here is how everything is going 572 00:31:29,300 --> 00:31:29,580 to work. 573 00:31:29,960 --> 00:31:36,900 We have all the components. Basically it's this lady driving the car, listening to music. 574 00:31:37,280 --> 00:31:46,200 She's already infected with the Salinas rat through social engineering. Sorry, not yet, 575 00:31:46,260 --> 00:31:49,140 guys. She was not infected. Now, she's infected. 576 00:31:49,400 --> 00:31:58,600 Then she plugs the USB and then this guy gets infected. Then we do the persistence. As you 577 00:31:58,600 --> 00:32:03,160 As you remember we put this guy into the services that I can boot up all the time, Salina Rath 578 00:32:03,160 --> 00:32:08,120 is running, then we start monitoring the SMS database so that new messages are coming, 579 00:32:08,340 --> 00:32:12,740 we start executing, then we launch the sniffer, which is the Dboss sniffer, which is like 580 00:32:12,740 --> 00:32:15,580 a Wireshark for TCP, it's the same for Dboss. 581 00:32:15,760 --> 00:32:21,540 We put the Dboss to start listening in specific events that we know are related to the SMS 582 00:32:21,540 --> 00:32:21,940 messages. 583 00:32:23,060 --> 00:32:26,620 And then the test app tool, do you guys remember the test app tool that these guys left into 584 00:32:26,620 --> 00:32:27,240 the infotainment? 585 00:32:27,240 --> 00:32:30,960 So we used that one to reset the connection to the infotainment. 586 00:32:31,100 --> 00:32:36,660 So what that means is that we understood that when you connect your phone to the infotainment, 587 00:32:36,740 --> 00:32:39,580 there is a session between your phone and the infotainment. 588 00:32:39,720 --> 00:32:46,000 So when we infect the car, that session already happened because this guy is already connected. 589 00:32:46,280 --> 00:32:52,000 So we need to find a way to reset that connection so that the session is established again and 590 00:32:52,000 --> 00:32:52,740 then we steal it. 591 00:32:52,880 --> 00:32:56,780 Once we steal that session, we can control the whole SMS messaging. 592 00:32:56,780 --> 00:33:02,520 That's why we use this test app tool in order to steal the session between the phone 593 00:33:02,520 --> 00:33:03,080 and the Bluetooth. 594 00:33:03,500 --> 00:33:10,000 By the way, this is not needed per se, I mean, we did it because you can do that on demand. 595 00:33:10,260 --> 00:33:16,240 Let's say that you have a 30 minutes shot to do this, you cannot wait for this guy to 596 00:33:16,240 --> 00:33:21,740 get a message, or a call, so that you can intercept the session, because that's when 597 00:33:21,740 --> 00:33:23,820 you're going to receive the session. 598 00:33:24,120 --> 00:33:25,940 But we reset it on demand. 599 00:33:25,940 --> 00:33:30,340 command so that it gets disconnected and we get the session. But the other option is we 600 00:33:30,340 --> 00:33:35,840 just wait and eventually when it receives a message we will still get the session. 601 00:33:36,860 --> 00:33:42,340 So we intercept the parent session. This is a JavaScript SMS that we saw. Even though 602 00:33:42,340 --> 00:33:49,220 it didn't work a lot it helped us as the first beacon because it just wants to send a message 603 00:33:49,220 --> 00:33:54,300 out to the attacker and the attacker will receive the phone where the rat is connected. 604 00:33:54,300 --> 00:34:00,620 So at this point we know what is the phone infected in a car and then from there we can 605 00:34:00,620 --> 00:34:05,700 start sending messages to the infotainment and it's going to start stealing SMS or whatever 606 00:34:05,700 --> 00:34:13,860 you want. This is the whole process guys. Let's do a demo. Here are other commands supported 607 00:34:13,860 --> 00:34:19,900 in the rat. We are implementing some of them. Ransomware is just put this guy on usable 608 00:34:19,900 --> 00:34:24,180 mode and you need to take it to the dealership. 609 00:34:24,180 --> 00:34:29,300 It's pretty simple. You just remove specific services and you lost connectivity as we did. 610 00:34:29,480 --> 00:34:33,600 Actually we implemented what we learned so that if you want to fix it you need to go 611 00:34:33,600 --> 00:34:40,400 to the dealership to get it fixed. This is a test server that we are running. This is 612 00:34:40,400 --> 00:34:46,920 the debugging tool. Wi-Fi, Ethernet and the Flickr. It's just an example. So let's do 613 00:34:46,920 --> 00:34:54,160 a demo guys. I'm going to move there and let me see. 614 00:34:57,900 --> 00:35:02,060 Let's do it here because I don't think I can move the laptop. Let's see. 615 00:35:07,640 --> 00:35:18,780 Here I am connected to the car. The first thing I'm going to do, I'm going to turn 616 00:35:18,780 --> 00:35:22,800 on the Bluetooth in the infotainment so that I can pair my phone. 617 00:35:36,340 --> 00:35:42,420 So I'm turning on the Bluetooth so that now my phone is, I'm the driver right now. So 618 00:35:42,420 --> 00:35:53,200 I'm playing the role of the driver. So my phone is going to be, it's right now connected 619 00:35:53,200 --> 00:35:53,780 to the car. 620 00:35:53,860 --> 00:35:53,980 Okay. 621 00:35:54,020 --> 00:35:54,160 Okay. 622 00:35:54,160 --> 00:36:00,800 So I'm the driver. I am driving this thing. I like born. Actually I don't like, but I'm 623 00:36:00,800 --> 00:36:01,600 just telling you guys. 624 00:36:03,080 --> 00:36:10,080 So I plug the USB, right? And then this guy is infected. So we are here inside the car 625 00:36:10,080 --> 00:36:17,280 in this screen. In the right side, I'm going to run the famous D-Bus monitor. Sorry, D-Bus 626 00:36:17,280 --> 00:36:17,580 monitor. 627 00:36:21,940 --> 00:36:23,420 Let me just open this. 628 00:36:23,420 --> 00:36:34,600 So here I have a specific guy, which is this. This is just D-Bus monitor. What you're doing 629 00:36:34,600 --> 00:36:40,060 here is you're saying, hey, monitor D-Bus on a specific event. The event is called get 630 00:36:40,060 --> 00:36:45,400 folder list. Why? Because we want to monitor that event only because we know that when the 631 00:36:45,400 --> 00:36:49,420 phone is connected or disconnected, this event is going to be called. So we don't want to 632 00:36:49,420 --> 00:36:53,200 sniff everything, right? We just want to put a filter. It's basically that. So I'm going 633 00:36:53,200 --> 00:36:56,520 to just run this guy. So it is ready. It is waiting, right? 634 00:36:56,700 --> 00:37:01,640 So now in the left side of the screen, I'm going to start running what is called the 635 00:37:02,900 --> 00:37:07,940 test observer. Do you remember the test observer that I told you guys? You don't remember 636 00:37:07,940 --> 00:37:08,180 it? 637 00:37:09,760 --> 00:37:10,160 Okay. 638 00:37:10,320 --> 00:37:11,380 My friend, good. Thanks. 639 00:37:13,120 --> 00:37:15,640 Okay, so see, we have treated test observer. 640 00:37:16,680 --> 00:37:22,140 Okay. This guy will learn. Obviously after doing the reverse in that, we need to call 641 00:37:22,140 --> 00:37:22,600 it with... 642 00:37:22,600 --> 00:37:23,180 Ms. . 643 00:37:23,180 --> 00:37:31,040 disable command because otherwise it's going to time out. We run this guy, it starts running 644 00:37:31,040 --> 00:37:37,520 there and it's ready. Right now we have this debugging service. What we're going to do 645 00:37:37,520 --> 00:37:42,520 is now we're going to query this guy. This is something that I'm doing here guys in front 646 00:37:42,520 --> 00:37:47,500 of you but obviously this is what's going on behind the scenes so that you guys can 647 00:37:47,500 --> 00:37:52,060 see exactly what the rat is doing. The rat is doing the monitor, the rat is running test 648 00:37:52,060 --> 00:37:56,560 observer, talking to this guy and querying the phone. The first thing we're going to 649 00:37:56,560 --> 00:38:07,760 do is we're going to say let's run this guy. We said you remember the prefix which was 650 00:38:07,760 --> 00:38:14,200 AT plus TMC equal. We're going to say hey, tell me what are the phones connected in this 651 00:38:14,200 --> 00:38:20,020 car. You are in Mexico City, you are not in US, you are just the drug cartel boss so you 652 00:38:20,020 --> 00:38:21,120 are waiting for this thing. 653 00:38:21,240 --> 00:38:21,940 I'm just okay. 654 00:38:21,940 --> 00:38:29,240 Give me what are the phones connected. It says okay so we have three phones that has 655 00:38:29,240 --> 00:38:36,320 been paired into the car. That's just pair phones. Now tell me what is the phone that 656 00:38:37,020 --> 00:38:44,140 is active right now. The phone that is being driven by the car, by the driver. It's right 657 00:38:44,140 --> 00:38:51,920 now there. We said 518 and it says okay so the one that is active right now which is 658 00:38:51,940 --> 00:38:58,400 my phone it this MAC address. Then we said reset that connection so that we can, as 659 00:38:58,400 --> 00:39:02,340 I said if you reset the connection, when the conection is established again we still 660 00:39:02,340 --> 00:39:07,300 decession of the Bluetooth and the phone and then we can control everything. We said 661 00:39:07,300 --> 00:39:14,320 okay so for this guy we do these commands and then we said reset the conection. 662 00:39:14,820 --> 00:39:20,100 What I want you guys to look at is the right side and then I execute this because in the 663 00:39:20,100 --> 00:39:24,500 In the right side, when we issue the connection reset, in the right side the device monitor 664 00:39:24,500 --> 00:39:28,300 is going to attach that new connection, let's see. 665 00:39:29,740 --> 00:39:31,580 We run it, let's see here. 666 00:39:44,680 --> 00:40:01,520 Let me check, no, we didn't get it here, let me check, 432, yeah, 80 plus, I think it was 667 00:40:01,580 --> 00:40:22,560 this, oh, sorry, no, this is, let me check the command quickly here, 432, yeah, that's 668 00:40:22,560 --> 00:40:27,640 the one, just let me quickly check, just a little bit. 669 00:40:31,400 --> 00:40:39,800 Well, it was getting everything here, but let me just give you, give you the connection. 670 00:40:46,920 --> 00:40:54,720 Yeah, yeah, it's working now. 671 00:40:55,240 --> 00:40:56,440 Checking the right side. 672 00:40:59,620 --> 00:41:00,180 Yeah. 673 00:41:00,600 --> 00:41:01,560 So, by the way. 674 00:41:01,580 --> 00:41:04,840 So, this is because I reset it manually, let's do it automatically, okay? 675 00:41:05,040 --> 00:41:09,360 So, what you see here is here is the connection ID and this is the context ID. 676 00:41:09,640 --> 00:41:13,720 So, all the other things we don't care about, we just need the connection ID and the context 677 00:41:13,720 --> 00:41:15,480 ID to start communicating with this guy. 678 00:41:15,680 --> 00:41:19,680 So, let's do it in our way, I do it manually there, but let's do it automatically here. 679 00:41:20,040 --> 00:41:27,600 So, I'm going to try to execute exactly the same command, which is, let me check, okay, 680 00:41:28,440 --> 00:41:29,880 I think it's this one. 681 00:41:34,000 --> 00:41:34,560 Let's see. 682 00:41:37,060 --> 00:41:37,460 Yeah. 683 00:41:37,560 --> 00:41:38,540 So, it's executing. 684 00:41:38,840 --> 00:41:39,240 Check. 685 00:41:40,000 --> 00:41:40,780 Check here, guys. 686 00:41:41,020 --> 00:41:41,580 Check here. 687 00:41:45,360 --> 00:41:45,760 Okay. 688 00:41:45,900 --> 00:41:47,480 So, this is in our way. 689 00:41:47,840 --> 00:41:52,720 So, we reset the connection and, unfortunately, you cannot see there, but you guys are very 690 00:41:52,720 --> 00:41:53,320 close there. 691 00:41:53,540 --> 00:41:58,380 So, it says disconnected, connected, disconnected, connected, but, you know, you are driving 692 00:41:58,380 --> 00:41:59,280 and you see it's disconnected. 693 00:41:59,500 --> 00:42:00,280 Well, that's all right. 694 00:42:00,360 --> 00:42:00,880 That's nothing, right? 695 00:42:00,960 --> 00:42:01,560 I mean, you don't have to worry about that. 696 00:42:01,560 --> 00:42:02,040 No, I don't even care. 697 00:42:03,640 --> 00:42:04,080 Okay. 698 00:42:04,200 --> 00:42:05,880 So, now, we got the session. 699 00:42:06,120 --> 00:42:07,360 So, what is the next step? 700 00:42:07,700 --> 00:42:11,540 With that session, let's take it and let's steal SMS messages. 701 00:42:13,500 --> 00:42:20,160 So, we take these two guys, as you can see, by the way, the sessions, sometimes, in this 702 00:42:20,160 --> 00:42:26,860 case, you just can see it's the same, but sometimes it change, actually, but this is 703 00:42:26,860 --> 00:42:27,620 the latest one, okay? 704 00:42:27,820 --> 00:42:31,520 So, let's go to my Ubuntu box. 705 00:42:31,540 --> 00:42:36,720 In this Ubuntu box, what I have is, I have the tool, you remember, the fit tool? 706 00:42:36,860 --> 00:42:40,040 This is the GUI, but, obviously, behind the scenes, we don't need the GUI. 707 00:42:40,180 --> 00:42:44,380 We just need the other option to compile it and execute it through tool chains, but this 708 00:42:44,380 --> 00:42:45,180 is for you guys to see. 709 00:42:45,380 --> 00:42:49,900 So, what I'm going to do is I'm going to connect to the infotainment through Wi-Fi to the 710 00:42:49,900 --> 00:42:51,060 port 3000. 711 00:42:51,400 --> 00:42:52,560 I don't know if it is still connected. 712 00:42:52,780 --> 00:42:53,520 Probably not. 713 00:42:53,740 --> 00:42:54,740 No, I don't think so. 714 00:42:54,760 --> 00:42:59,540 Let me just quickly reset the connection. 715 00:42:59,960 --> 00:43:01,020 I think it's this. 716 00:43:01,160 --> 00:43:01,520 Okay. 717 00:43:05,380 --> 00:43:05,860 Okay, so, let me check. 718 00:43:06,900 --> 00:43:08,060 You can see there. 719 00:43:08,280 --> 00:43:08,880 Okay, yeah. 720 00:43:09,040 --> 00:43:09,840 Let me just. 721 00:43:10,740 --> 00:43:12,300 It's the same thing. 722 00:43:13,400 --> 00:43:14,500 I see the three. 723 00:43:18,700 --> 00:43:19,180 Yeah. 724 00:43:19,260 --> 00:43:20,440 So, okay, we have connection. 725 00:43:20,720 --> 00:43:28,980 And so, okay, so, we connect through, we are connected to Dbus. 726 00:43:29,220 --> 00:43:30,700 Dbus has multiple ports. 727 00:43:30,780 --> 00:43:31,520 It depends on the port. 728 00:43:31,540 --> 00:43:37,000 the ports has the exposed interfaces. So we connect to this interface, we are here and 729 00:43:37,000 --> 00:43:43,240 we are interested on the MSG one, if you remember guys, this is the one that we are interested, 730 00:43:43,980 --> 00:43:49,780 MSG client. MSG client as you can see has all these exposed different methods for us 731 00:43:49,780 --> 00:43:55,140 to control SMS messages. So the first thing that I want to do is I want to use the get 732 00:43:55,140 --> 00:44:01,540 message list. This get message list is going to say, hey, pull out all the messages from 733 00:44:01,540 --> 00:44:07,340 the phone that you just give me the session. So what I'm going to do now then is I'm going 734 00:44:07,340 --> 00:44:15,780 to go here and I'm going to prepare my message. So basically here I'm just copying, you remember 735 00:44:16,260 --> 00:44:20,580 those two values that we got. Let me get them again. 736 00:44:25,140 --> 00:44:36,720 These two guys. So what I'm going to do is just I'm going to copy this guy to the command 737 00:44:36,720 --> 00:44:42,380 line below. This command line guys is just to interact with Dbus. So these are all the 738 00:44:42,380 --> 00:44:46,500 parameters that I need to pass. The first parameter is the connection ID, the second 739 00:44:46,500 --> 00:44:53,060 parameter is the context ID and then we are set. We pass the second parameter. 740 00:44:55,280 --> 00:45:00,080 And that's pretty much it. This is the whole information that we need. We just paste it 741 00:45:00,080 --> 00:45:05,880 into the tool. You can see here in the top, connection, context ID, timeout, all are the 742 00:45:05,880 --> 00:45:10,320 parameters for Dbus. Obviously during this exercise we need to realize what are those 743 00:45:10,320 --> 00:45:13,980 different parameters but after that it's simple. 744 00:45:14,300 --> 00:45:19,580 Now here this is the gray value. This four is the number of messages you want to get. 745 00:45:19,740 --> 00:45:24,760 I put three for example but we can put more. So what I want to do right now so that you 746 00:45:24,760 --> 00:45:31,740 can see that this is live. So I'm going to just send three messages to my, I'm the driver 747 00:45:31,740 --> 00:45:36,000 right? But I'm going to send, pretending that I am another guy, I'm going to send a message 748 00:45:36,000 --> 00:45:40,140 to me so that you can see it's popping up in that guy. So that guy is receiving messages 749 00:45:40,560 --> 00:45:50,040 and then we will steal those messages. So let's say we put, what is the name of your 750 00:45:50,040 --> 00:45:50,840 wife my friend? 751 00:45:55,700 --> 00:45:57,040 It's just a joke my friends. 752 00:45:59,980 --> 00:46:04,460 I send this messages to my phone but I don't think it's working. 753 00:46:13,500 --> 00:46:20,300 Josh I told you don't send me anything with bad words man. But anyways so I don't think 754 00:46:20,300 --> 00:46:23,900 it went through. If you see something popping up, let me know okay. But I don't think so. 755 00:46:24,800 --> 00:46:25,880 Let's do this. 756 00:46:26,020 --> 00:46:27,460 We said execute here. 757 00:46:27,960 --> 00:46:40,900 Let me just ... This display ... We click execute here, and then when we click execute 758 00:46:40,900 --> 00:46:47,460 ... I just need to click in source, and here in source, guys, we get the messages. 759 00:46:47,680 --> 00:46:49,160 Latest messages is three messages. 760 00:46:49,340 --> 00:46:50,460 You can see here, damn. 761 00:46:50,460 --> 00:46:54,980 This is my friend, Josh Gomez, a friend of mine. 762 00:46:55,460 --> 00:46:59,080 Then here is another message, all those messages. 763 00:46:59,300 --> 00:47:00,820 We just retrieved three messages. 764 00:47:01,080 --> 00:47:05,900 If we could put here four, we might get, obviously, more, but that's basically the idea. 765 00:47:06,140 --> 00:47:19,960 We do execute, and then we go to source, and I think I get another one. 766 00:47:20,160 --> 00:47:20,440 Okay. 767 00:47:20,440 --> 00:47:27,000 These are the messages, but what we did is now we get the messages from the phone, right? 768 00:47:27,780 --> 00:47:29,140 Now we need to send it out. 769 00:47:30,460 --> 00:47:31,540 Right now we get it. 770 00:47:31,600 --> 00:47:32,520 Now we need to send it out. 771 00:47:32,740 --> 00:47:37,960 I mean, we get it, but this message is in D-Bus, so we need to send it out to the attacker 772 00:47:37,960 --> 00:47:39,500 so the attacker can steal the messages. 773 00:47:39,960 --> 00:47:47,800 What we did here is we just created a small tool that we are basically parsing these messages 774 00:47:47,800 --> 00:47:50,420 and sending it to a second device. 775 00:47:50,440 --> 00:47:56,220 A second D-Bus interface, which is the one that sends the messages out. 776 00:47:56,600 --> 00:48:01,220 Whoever tells me what is that interface name, I'm going to give you the book. 777 00:48:01,480 --> 00:48:05,120 What is the interface name that we use to send the message out? 778 00:48:08,240 --> 00:48:09,760 Who's save message, my friend? 779 00:48:10,340 --> 00:48:11,320 That's yours, my friend. 780 00:48:11,780 --> 00:48:11,860 Okay. 781 00:48:11,980 --> 00:48:12,280 Yeah. 782 00:48:12,420 --> 00:48:13,560 It's called save message. 783 00:48:14,260 --> 00:48:18,540 With save message, it's the one interface that we use to send it out. 784 00:48:18,960 --> 00:48:19,000 Okay? 785 00:48:20,440 --> 00:48:28,740 Here, I need a volunteer that wants to play a role as an attacker so that ... Don't worry. 786 00:48:28,980 --> 00:48:30,860 I just want you to receive the message. 787 00:48:31,080 --> 00:48:33,200 I want to send this message to someone outside. 788 00:48:33,880 --> 00:48:38,840 If there is no volunteers, I can do it myself, but I mean, is there any volunteer? 789 00:48:39,820 --> 00:48:40,560 Okay, my friend. 790 00:48:40,820 --> 00:48:42,040 Come over, please. 791 00:48:46,120 --> 00:48:46,560 Okay. 792 00:48:48,620 --> 00:48:49,060 Okay. 793 00:48:49,120 --> 00:48:49,560 Okay. 794 00:48:49,980 --> 00:48:50,420 Okay. 795 00:48:52,240 --> 00:48:52,660 Okay. 796 00:48:52,660 --> 00:48:57,080 So, what we're going to do is we're gonna just ... Can you type your phone number? 797 00:48:57,840 --> 00:48:58,120 Yeah. 798 00:48:58,180 --> 00:48:58,360 Yeah. 799 00:48:58,780 --> 00:49:01,960 So, what we're gonna do here is, we're just gonna type a phone, right? 800 00:49:02,120 --> 00:49:03,240 This is obviously behind . 801 00:49:03,840 --> 00:49:07,340 It's attacker's phone, but here we're gonna use his phone. 802 00:49:07,520 --> 00:49:10,580 So, this message that we just saw there are gonna be sent out. 803 00:49:10,740 --> 00:49:12,460 It's just basically what we're gonna do. 804 00:49:12,500 --> 00:49:15,760 It's like the final step on this whole thing. 805 00:49:19,040 --> 00:49:19,460 Okay. 806 00:49:19,820 --> 00:49:20,380 So ... 807 00:49:20,380 --> 00:49:20,420 Yikes. 808 00:49:35,600 --> 00:49:42,560 I just need to, this is escaping thing, I remember that it's JSON thing, so it's just, 809 00:49:42,660 --> 00:49:44,280 we need to escape it, but anyway, it doesn't matter. 810 00:49:44,520 --> 00:49:46,620 Okay, so can you type it here, my friend? 811 00:49:46,620 --> 00:49:51,140 Here, one second, yeah, right there, please. 812 00:49:54,240 --> 00:49:55,160 Nobody called me. 813 00:50:05,040 --> 00:50:14,480 Okay, so, I think we need to have one, I guess, but anyways, so we have this phone, what's your name? 814 00:50:14,860 --> 00:50:15,300 Jeremy. 815 00:50:15,480 --> 00:50:15,920 Jeremy. 816 00:50:16,620 --> 00:50:26,240 So, we have the phone of, Jeremy is going to be the packet right now, so we're just going to execute this so that you guys can see how it looks like the message is out. 817 00:50:27,180 --> 00:50:28,460 Just give me one second. 818 00:50:29,560 --> 00:50:30,440 This, okay. 819 00:50:44,500 --> 00:50:44,980 Okay. 820 00:50:44,980 --> 00:50:48,340 So, let's execute that command, let me see if that works. 821 00:50:51,200 --> 00:51:06,040 Okay, so this is just, first of all, we're just passing the messages, here you can see in a more easier way the phones, and so, anyways, so here is the phones that we got, information here, information here, information here, right? 822 00:51:06,240 --> 00:51:12,160 So, this, you don't believe these guys, this is just a friend that really loves me, and actually it's my phone, it was just me, okay? 823 00:51:12,380 --> 00:51:14,900 So, then, we're going to send this message out. 824 00:51:14,900 --> 00:51:15,360 Okay? 825 00:51:15,700 --> 00:51:17,920 To the phone that we just decided. 826 00:51:18,160 --> 00:51:24,620 So, in order to do that, as my friends tell us, we're going to use a different interface, right? 827 00:51:24,760 --> 00:51:27,620 As you remember, so we're going to go to the save message interface. 828 00:51:28,040 --> 00:51:35,200 That save message interface is going to allow us to send the message out, and it's going to be sending the message out to this phone, which is the phone of Jeremy. 829 00:51:35,480 --> 00:51:37,280 So, Jeremy, can you just stand here? 830 00:51:37,640 --> 00:51:39,480 This is like a magic item, my friend, you know? 831 00:51:39,800 --> 00:51:44,180 So, just do like this, like the phone, like, no, you don't need to turn it on. 832 00:51:44,180 --> 00:51:45,500 Just put it like this. 833 00:51:45,620 --> 00:51:47,460 Just see if it receives the message. 834 00:51:48,460 --> 00:51:51,360 You know, the demo doesn't work, so don't worry, guys. 835 00:51:53,520 --> 00:51:54,040 Okay. 836 00:51:54,240 --> 00:51:55,140 I sent the message. 837 00:51:56,680 --> 00:51:57,320 Let's see. 838 00:51:58,900 --> 00:51:59,400 Oh, there. 839 00:52:02,540 --> 00:52:03,060 Okay. 840 00:52:09,040 --> 00:52:10,260 I told you, guys. 841 00:52:14,180 --> 00:52:14,980 Well, it's in the outbox. 842 00:52:15,060 --> 00:52:17,800 Actually, the command works, but... 843 00:52:19,960 --> 00:52:20,980 Yeah, I don't know. 844 00:52:21,100 --> 00:52:23,500 Let me try another phone here, also, since we're here. 845 00:52:29,280 --> 00:52:30,020 It's right away. 846 00:52:30,140 --> 00:52:33,720 I think there is some messaging here going on. 847 00:52:39,380 --> 00:52:39,820 63084906. 848 00:52:40,200 --> 00:52:40,640 Okay. 849 00:52:40,720 --> 00:52:41,680 That's my phone. 850 00:52:42,400 --> 00:52:43,480 And then, let's see. 851 00:52:45,020 --> 00:52:45,420 Execute. 852 00:52:48,180 --> 00:52:49,480 Do you need the country code? 853 00:52:49,620 --> 00:52:50,860 Would the country code be stirring it up? 854 00:52:52,460 --> 00:52:53,660 Well, I put the one. 855 00:52:54,400 --> 00:52:55,380 Do you need that? 856 00:52:55,860 --> 00:52:56,460 Plus one? 857 00:52:56,760 --> 00:52:58,000 No, I don't think so. 858 00:52:58,680 --> 00:52:59,080 Mexico? 859 00:53:01,640 --> 00:53:02,260 Oh, yeah. 860 00:53:02,440 --> 00:53:02,840 Mexico. 861 00:53:04,060 --> 00:53:04,800 What about Chile? 862 00:53:06,800 --> 00:53:07,960 No, but it's that way. 863 00:53:08,260 --> 00:53:09,260 But I think... 864 00:53:09,260 --> 00:53:12,640 Yeah, because I was not also receiving messages, so I don't know. 865 00:53:12,680 --> 00:53:13,300 Maybe it's something... 866 00:53:14,040 --> 00:53:16,500 What happens if you take the plus one out of the phone? 867 00:53:17,620 --> 00:53:18,320 Without one? 868 00:53:18,680 --> 00:53:19,600 Without the plus one. 869 00:53:19,740 --> 00:53:20,220 Okay. 870 00:53:20,620 --> 00:53:21,100 Yeah. 871 00:53:21,200 --> 00:53:21,740 Let's try that. 872 00:53:22,040 --> 00:53:24,360 Let me just grab, again, your... 873 00:53:25,100 --> 00:53:25,960 One second. 874 00:53:28,420 --> 00:53:28,900 Okay. 875 00:53:28,940 --> 00:53:29,600 Let's try that. 876 00:53:32,180 --> 00:53:36,040 Actually, I don't recall how I tested it, but yeah, let's try that. 877 00:53:37,120 --> 00:53:37,600 Copy. 878 00:53:39,800 --> 00:53:40,280 Okay. 879 00:53:41,880 --> 00:53:42,360 Okay. 880 00:53:42,360 --> 00:53:42,720 Okay. 881 00:53:42,720 --> 00:53:42,740 Okay. 882 00:53:42,740 --> 00:53:42,800 Okay. 883 00:53:42,800 --> 00:53:42,860 Okay. 884 00:53:47,520 --> 00:53:47,980 I got it. 885 00:53:47,980 --> 00:53:48,220 So you... 886 00:53:48,220 --> 00:53:49,740 Let's try to keep the... 887 00:53:50,330 --> 00:53:51,820 To remove the plus only, right? 888 00:53:52,300 --> 00:53:53,420 Oh, I said one, two... 889 00:53:53,420 --> 00:53:53,880 Okay. 890 00:53:53,960 --> 00:53:54,900 Let's try that. 891 00:53:56,560 --> 00:53:57,020 Like... 892 00:53:57,700 --> 00:53:58,420 Let's try that. 893 00:53:58,600 --> 00:53:59,300 Oh, it doesn't work. 894 00:53:59,640 --> 00:54:00,820 Because I tested... 895 00:54:00,820 --> 00:54:03,020 I think I tested it without that, and it works. 896 00:54:03,160 --> 00:54:03,480 So. 897 00:54:03,840 --> 00:54:04,300 Okay. 898 00:54:09,400 --> 00:54:09,860 Yeah. 899 00:54:29,120 --> 00:54:37,240 Let me quickly check here if I am connected properly, connected, yes, oh yeah, no, no, 900 00:54:37,240 --> 00:54:44,520 it's active, yeah, no, I don't think it's working, let's do something, man, if you receive it later 901 00:54:44,520 --> 00:54:50,260 during the day, tweet it, please, yes, so that these guys, yeah, sorry, guys, I don't know what's 902 00:54:50,260 --> 00:54:58,120 going on with the communication, but actually, I have a demo video here at the end, but we do, 903 00:54:58,200 --> 00:55:06,740 this is exactly the same, let me check here, no, no, but this is the same, yeah, it's exactly the 904 00:55:06,740 --> 00:55:20,520 same, so for some reason, it didn't send the message out, what is it, this, so, sorry, guys, 905 00:55:20,540 --> 00:55:25,640 for that last one, I don't know why it's not working, but well, anyways, that was the last 906 00:55:25,640 --> 00:55:29,780 step, so we'll steal the messages, and then we just call the same message, and then the 907 00:55:29,780 --> 00:55:36,140 messages are going out to whoever is the destination address, but I also tried with mine, and it 908 00:55:36,140 --> 00:55:36,500 didn't. 909 00:55:36,740 --> 00:55:43,480 I didn't receive anything, so there is something, oh, wait, no, I received it, actually, yeah, 910 00:55:43,580 --> 00:55:50,020 you didn't saw it pop up there, yeah, no, I received the message, yeah, why? 911 00:55:55,860 --> 00:56:02,060 If I receive the message, the message should be here in the infotainment, because I sent it to me 912 00:56:02,060 --> 00:56:02,340 also. 913 00:56:25,940 --> 00:56:32,400 Okay, guys, so, sorry for that communication there, but it was the last step, and just 914 00:56:32,400 --> 00:56:36,720 some takeaways here, hopefully, I'm going to connect it outside, we'll see if it works, 915 00:56:36,740 --> 00:56:42,220 if that sends the final message. I received the message here but for some reason it's 916 00:56:42,220 --> 00:56:52,000 not popping up there. Final recommendations, with this talk I hope that the recalls from 917 00:56:52,000 --> 00:56:59,540 the cars, they can take more seriously the fact that we can infect cars because I think 918 00:56:59,540 --> 00:57:05,800 that this kind of scenario is real and that can happen and I don't think that it's going 919 00:57:05,800 --> 00:57:07,340 to be a problem. 920 00:57:08,480 --> 00:57:17,700 Let's do the last demo. Can you send a message? We're going to send a message now outside. 921 00:57:18,100 --> 00:57:21,520 I'm going to send a message, let's say here is the attacker, he's going to send a message 922 00:57:21,520 --> 00:57:26,380 to my phone and then my phone is going to receive the message which is the rat inside 923 00:57:26,800 --> 00:57:29,180 and it's going to do some actions in the infotainment. 924 00:57:29,540 --> 00:57:33,280 Let's write that one as the final example. 925 00:58:10,580 --> 00:58:16,440 So he's going to send a message guys, it's file number 4, it's going to be receiving 926 00:58:16,440 --> 00:58:22,200 in the infotainment and it's going to execute. So if the message is received and it's working 927 00:58:22,740 --> 00:58:26,760 then we should receive the message there. If we don't even receive the message there, 928 00:58:26,900 --> 00:58:29,240 I mean there is something going on with the communication. 929 00:58:29,540 --> 00:58:32,940 So the infotainment is not receiving the message. So can you send a message? 930 00:58:34,300 --> 00:58:38,200 So if the message is received, we're going to get a pop-up window there. 931 00:58:48,820 --> 00:58:54,820 Yeah, there is something with the SMS messaging. It's not even, because you sent it, right? 932 00:58:55,240 --> 00:58:59,020 Yeah, it's sent out and let me just do something quickly. 933 00:58:59,540 --> 00:59:00,080 Yeah, we sent the Bluetooth. 934 00:59:02,560 --> 00:59:02,980 Yeah. 935 01:00:00,800 --> 01:00:03,880 Yeah, let's go reset it just to see if it receives the message. 936 01:00:04,400 --> 01:00:07,060 If it doesn't receive the message, I mean there is nothing we can do. 937 01:00:16,440 --> 01:00:23,200 No, right? Yeah. 938 01:00:25,300 --> 01:00:27,700 Okay, for some reason it's not receiving the message. 939 01:00:27,880 --> 01:00:28,260 Yeah, I know. 940 01:00:28,380 --> 01:00:28,780 Okay. 941 01:00:29,540 --> 01:00:36,760 So yeah guys, for some reason it's not working the SMS messages in this room for some reason. 942 01:00:36,980 --> 01:00:41,620 But anyways, so I apologize with that. That's pretty much it. 943 01:00:41,680 --> 01:00:44,440 Thank you so much to Alan Monk. Thank you guys. 944 01:00:44,580 --> 01:00:54,740 John McMaster and Josh Gomez for your work and obviously that's it. Thank you guys.