[00:00.000 --> 00:04.340] Hi, I'm Specters. Uh, my talk is just on infotainment system hacking. I was going to [00:04.340 --> 00:08.740] initially hack ten infotainment systems and then show you guys all of them. Um, but [00:08.740 --> 00:12.840] then, you know, responsible disclosure and I did it in a bad time frame. So, I'm [00:12.840 --> 00:18.600] just going to teach you guys how to hack it. So, um, uh, my sponsors for this event [00:18.600 --> 00:23.660] are, uh, Ghost Express. Um, it's actually a meme. They sell ghosts in a box and you [00:23.660 --> 00:29.760] can ship it to your friends. Um, yeah. Uh, once again, I'm Specters. I'm a [00:29.760 --> 00:34.880] security enthusiast. Um, I really want to hack a Tesla. So, BitQuirk, please, let [00:34.880 --> 00:39.280] me hack your Teslas. And, uh, you know, shout out to Thug Crowd because, uh, they [00:39.280 --> 00:43.160] really, like, helped out with, like, the putting together of, like, these slides. [00:44.240 --> 00:48.140] So, uh, just a quick overview. I have 30 minutes to give you guys a talk on all of [00:48.140 --> 00:52.900] this. So, I may, like, have to cut it short. I may have to skip stuff. Um, but [00:52.900 --> 00:55.620] pretty much we're just going to go over Q and X hacking and we're going to go over [00:55.620 --> 00:59.160] Android hacking and then we're going to do some, like, a, some basic hardware [00:59.160 --> 01:03.040] techniques. Um, and then, like, kind of one advanced one that I learned online [01:03.040 --> 01:08.960] from some Russians. So, uh, first off, Q and X is made by Blackberry. Uh, just [01:08.960 --> 01:13.420] kind of an interesting fact. Uh, when we go through the Q and X high overview, we [01:13.420 --> 01:17.620] can see, like, your actual update package manager. Uh, this is just, like, how it [01:17.620 --> 01:22.260] works somewhat. So, uh, BSP is a board support package and, uh, essentially all [01:22.260 --> 01:27.740] it does is just updates, uh, your Q and X system. Uh, car companies will take [01:27.740 --> 01:30.560] this and, like, integrate their own software into this to do, like, over the [01:30.560 --> 01:34.740] air updates or, like, physical updates via USB. Uh, but when you're going in [01:34.740 --> 01:38.520] there and you're updating it, essentially it's going to go BSP and then the Q and [01:38.520 --> 01:42.080] X, uh, operating system. And if you have, like, something that's supposed to work [01:42.080 --> 01:44.540] with your phone, it'll go through the device gateway and then it'll go and [01:44.540 --> 01:48.220] update, like, any of the following, like, above it. Um, and then, like, the [01:48.220 --> 01:53.120] middleware is just pretty much made to, um, essentially, like, uh, mitigate, like, [01:53.120 --> 01:58.820] where these packages and things go. So, part of the Q and X update, Q and X [01:58.820 --> 02:02.480] update process is you need, like, a physical, uh, device. Uh, you're pretty [02:02.480 --> 02:05.980] much gonna take this package, you're gonna plug it in. The system's actually [02:05.980 --> 02:09.640] going to enumerate the device and look for this specific package. Um, if they're [02:09.640 --> 02:15.200] cert signing or if they're doing anything else, uh, SWUD, um, is pretty [02:15.200 --> 02:20.120] much going to, uh, read that cert and then it's either going to update or reject [02:20.120 --> 02:25.540] it. Um, after that, it'll pretty much send it on to the, uh, Q and X file [02:25.540 --> 02:30.060] system and it will start a reboot process. But when you start the reboot [02:30.060 --> 02:33.920] process, essentially, all your active, like, major car parts will still be [02:33.920 --> 02:39.120] working in the background. Um, and they'll just always be active. So, one of [02:39.120 --> 02:42.560] the big attack vectors is, uh, like, dosing vehicles. So, if you're able to, [02:42.560 --> 02:47.240] like, dos a Q and X system on a car, if you're able to, uh, dos, like, one of [02:47.240 --> 02:51.220] the other systems on a car, um, companies usually, uh, don't like that stuff [02:51.220 --> 02:58.520] because you can cause people to die. Sorry. Cool. So, uh, these are just co- [02:58.520 --> 03:03.680] some of the binaries that, uh, oh, wow, are, uh, on the system. So, uh, USB [03:03.680 --> 03:10.520] launcher is just made to, like, detect when you plug in your USB. Um, MCD is [03:10.880 --> 03:16.020] a, uh, it just mounts your file system. MM detect is multimedia detection. So, [03:16.020 --> 03:20.660] it'll detect, uh, which files are on that system. And QDB is the Q and X [03:20.660 --> 03:25.800] database server that it, uh, reaches out to. So, some of the ways to start off [03:25.800 --> 03:29.360] enumeration for Q and X, uh, let's say your radio system has, like, the whole [03:29.360 --> 03:32.400] nine yards. You, like, buy the most expensive car and you get, you know, [03:32.400 --> 03:37.860] GSM, Wi-Fi, Bluetooth, uh, custom ap- applications that the, uh, car [03:38.260 --> 03:41.600] manufacturer's made. Uh, you also get USB for, like, loading your songs and [03:41.600 --> 03:45.460] other files, like, maybe movies or something onto it. Um, some of the things [03:45.460 --> 03:48.300] that you're able to do once you get onto their system is, like, you know, [03:48.300 --> 03:52.080] connect to the Wi-Fi, do a port scan. I- it's not as common as much anymore. [03:52.080 --> 03:55.320] They've been starting to, like, push them out, but there's still some things [03:55.320 --> 03:58.860] out there that exist where, like, you'll have Telnet open. Oh, Telnet drops me [03:58.860 --> 04:03.580] into a root shell. That's kind of dumb. Uh, and then, like, for hotspot GSM [04:03.580 --> 04:07.240] stuff, like, if you ex- if you, like, scan external IPs or, like, you man the [04:07.240 --> 04:11.000] middle of a socket connection, uh, sometimes you're able to just, like, get [04:11.000 --> 04:14.400] unencrypted data that, like, goes to a backend server and now you're, like, [04:14.400 --> 04:18.940] able to find that backend server and poke at that, which is also very cool. [04:19.200 --> 04:24.180] Uh, for Bluetooth, uh, BTLE jack, uh, form of DOS, which cause operator [04:24.180 --> 04:28.800] distraction, and then, uh, custom applications. There's a ton of people [04:28.800 --> 04:31.920] that are storing, like, passwords and stuff in custom applications, endpoints. [04:31.920 --> 04:37.280] Uh, once again, just more things to poke at, uh, things to get onto, um, things [04:37.280 --> 04:43.260] to, like, kind of distract from. So, one of my big tests, uh, after this was [04:43.260 --> 04:48.120] released, just in general, is to, like, kind of enumerate which files work on a [04:48.120 --> 04:52.460] system. So, uh, this is a quick script, uh, you can add more file headers to it [04:52.460 --> 04:56.020] pretty much, and all you're doing pretty much is just testing which file headers [04:56.020 --> 04:59.940] work on a system, which files read, which files don't, uh, like, which ones show [04:59.940 --> 05:04.880] up and which ones don't. So, this will pretty much just, like, uh, go to, like, [05:04.880 --> 05:08.320] a single, like, data file or just any text file and it'll just, like, change, [05:08.320 --> 05:11.480] like, the first couple bytes. And then you go onto your system and it'll just [05:11.480 --> 05:19.420] error out, um, which is kind of interesting as well. So, Android hacking, I've [05:19.420 --> 05:24.140] done a lot of bug bounties with this, so I'm trying to, like, steer away from all [05:24.140 --> 05:28.380] my, like, personal research and, like, my own research and stuff. Uh, so we're [05:28.380 --> 05:34.000] gonna try our best here. So, pretty much, um, Android is really different from [05:34.000 --> 05:38.720] QNX and other, like, Linux systems in the, like, in the sense that, like, first [05:38.720 --> 05:44.700] off, it replaced Glipsy with Bionic and it really utilizes SE Linux to separate, [05:44.700 --> 05:49.340] uh, user privileges and application privileges and things like that. Um, and [05:49.340 --> 05:52.820] even, like, when you get onto a system, like, some things are virtualized with, [05:52.820 --> 05:58.160] uh, can't remember that hardware, software. Um, but pretty much, like, there's [05:58.160 --> 06:01.760] just a couple other things where, like, they have custom versions of init, uh, [06:01.760 --> 06:06.480] you have, like, your own custom versions of, like, the startup daemons. Uh, and [06:07.000 --> 06:12.840] although you have Android that, like, uses a heavy, like, SE Linux, like, uh, [06:12.840 --> 06:18.960] like, uh, god, like, customized file, essentially, to, like, show you the rules [06:18.960 --> 06:22.480] that you're able to do, uh, all your, like, native binaries for Linux are still [06:22.480 --> 06:25.540] on that system, so you're still able to take advantage of some of those things. [06:25.560 --> 06:28.540] Uh, most of the time, Sue is not on that system, though, so escalating [06:28.540 --> 06:34.840] privileges is not as easy. So, we're gonna talk about SE Linux a little bit. [06:35.420 --> 06:40.600] Uh, pretty much, SE Linux is just, like, an enforcing of, like, the Mac policy. [06:40.600 --> 06:45.300] So, uh, pretty much, you have users, you have groups, um, and you're just, like, [06:45.300 --> 06:49.440] strictly assigning those user and groups together, together. Uh, once you drop, [06:49.440 --> 06:53.380] like, a shell onto their system, you can see if SE Linux is enabled with those [06:53.380 --> 06:59.240] three commands at the bottom left, uh, which is get enforce, uh, cse status, [06:59.240 --> 07:03.920] and if that doesn't work, uh, you can try to get to the SE Linux config file, [07:03.920 --> 07:08.920] um, but once again, like, dropping into the shell and getting access to that is [07:08.920 --> 07:16.020] not as easy, so, don't worry, I'll show you how to do that in a second. Um, so, [07:16.020 --> 07:20.520] we're gonna start off by downloading ADB, first off, um, and usually when you [07:20.520 --> 07:23.120] download ADB, you're gonna have to go to your device and put it into developer [07:23.120 --> 07:26.420] mode, right? So, if you have initial access and you're researching the device, [07:26.420 --> 07:30.880] uh, you can go into your car, open up the settings, put the car into developer [07:30.880 --> 07:37.280] mode, uh, download ADB onto your, you know, Mac, Windows, Linux laptop, um, and [07:37.280 --> 07:41.420] then you connect either USB, uh, through the Wi-Fi or through your own hotspot, [07:41.420 --> 07:45.720] and then, like, the car has to connect through that. Um, and then after that, [07:45.720 --> 07:49.820] you go to, like, ADB start server, and that'll pretty much start your Android [07:49.820 --> 07:53.320] bridge to the device, list your devices, make sure it's authenticating properly, [07:53.320 --> 07:58.160] make sure it's authorized, um, you can drop an ADB shell, and then you can also [07:58.160 --> 08:02.880] do those other commands I showed you earlier to see, like, if, uh, SE Linux is [08:02.880 --> 08:07.660] enabled, and you kinda wanna, like, pray for permissive, I spelled that wrong, um, [08:07.660 --> 08:11.140] and then you also wanna see who you are, but usually the response that I get is [08:11.140 --> 08:17.140] shell, um, and, you know, we just sell, like, we can just drop any ADB shell, any [08:17.140 --> 08:20.900] Linux command that's on the system, and we can, like, out that to a file, so we're [08:20.900 --> 08:25.680] actually able to go and enumerate the system pretty quickly with that. So, uh, [08:25.680 --> 08:31.520] some of the eight Android, like, users, uh, these are known as Android IDs. So, [08:31.520 --> 08:34.980] uh, some Android users, pretty straightforward, you have root, you have [08:34.980 --> 08:37.700] system, you have app, you have user, and then you also have shell for when you [08:37.700 --> 08:41.500] drop the Android shell. Um, something interesting about ADB is it actually [08:41.500 --> 08:45.680] starts off as root, so when you're first getting onto the system and, you know, [08:45.680 --> 08:51.620] you ADB into, you know, your radio system or whatever it may be, um, you're [08:51.620 --> 08:56.140] actually going to, like, initially start off as ADB root starts process, and then [08:56.140 --> 09:00.020] it lowers its privileges, and then it just makes you a shell user. So, if you [09:00.020 --> 09:04.280] find a way to interrupt that, um, then you can pretty much get onto the system [09:04.280 --> 09:07.860] and, you know, start a root shell, or if you find a way to, like, configure the [09:07.860 --> 09:11.900] files in the process because I see Linux isn't, like, mandating properly, it's [09:12.280 --> 09:15.760] going to allow you to just, uh, write onto, like, file, like, specific file [09:15.760 --> 09:20.240] systems, and then, you know, once again, you get root shell. Um, some of the [09:20.240 --> 09:24.820] Android groups on the system, just for network configuration, and, uh, you'll [09:24.820 --> 09:27.920] also see, like, something that looks like users, but are actually just read and [09:27.920 --> 09:33.780] write access to SD cards and other, like, hardware devices on that system. So, [09:33.780 --> 09:38.980] abusing ADB. Um, so some of the things I usually try is, uh, I go to, like, [09:38.980 --> 09:44.860] datalocal.prop, and I try to see if rrosecure is set to one, um, because if [09:44.860 --> 09:50.920] it is, then, uh, I'm pretty much, like, kind of screwed. So, if I can modify [09:50.920 --> 09:55.260] that, then I can actually go in and drop an ADB shell that is add- as root. So, [09:55.260 --> 09:59.480] if I set rrosecure to zero, um, I can get on there as root, or if I go to [10:00.560 --> 10:04.380] rocolonelkimu, uh, and set it to one, then I can also drop a shell as root. [10:04.580 --> 10:08.080] And, um, this is kind of interesting because there's just, like, a ton of [10:08.080 --> 10:11.400] attack vectors that you could use to try to get to this point, such as, like, [10:11.400 --> 10:15.860] you drop a, uh, application onto the system that, you know, gives you a shell, [10:16.280 --> 10:20.900] and then that shell is, uh, able to modify a couple of other files and, like, [10:20.900 --> 10:26.500] rewrite files, right? So, by doing this, you're able to, like, traverse file [10:26.500 --> 10:32.460] systems, but at this point, if you're able to modify those files, then, uh, you [10:32.460 --> 10:35.980] know, you're probably able to just drop a root shell in the first place. Uh, but [10:35.980 --> 10:39.780] this will give you, like, persistent ADB root privileges if you wanted to go and [10:39.780 --> 10:47.580] change those. So, um, a couple of ways to, uh, you know, get root again is you [10:47.580 --> 10:51.020] can go online and find an unlocked bootloader, which is way more prominent [10:51.020 --> 10:56.240] than usual. Um, you can configure your device to be in fast boot mode, and then [10:56.240 --> 11:01.080] once you go into fast boot mode and you update the bootloader, um, you can [11:01.080 --> 11:05.780] compile a binary, like supersu, onto their system, and then you can either [11:05.780 --> 11:10.680] privask or do anything else, or once again, you can modify, uh, local.prop to [11:10.680 --> 11:16.540] allow root, uh, once ADB is active. So, we're going to go into a little bit of [11:16.540 --> 11:19.600] hardware hacking, because hardware hacking also has some, like, very [11:19.600 --> 11:24.700] interesting stuff that usually drops you into root shells. Um, so, you are, it's [11:25.760 --> 11:29.680] a very big hardware hacking one. This is actually a picture I took of, uh, one of [11:29.680 --> 11:34.880] the things I had to do, and it's, like, awful, um, but bear with me. So, uh, when [11:34.880 --> 11:39.100] do you try hardware hacking? Um, I wish I could say it was at the end of [11:39.100 --> 11:43.980] everything else I've done in these slides, um, but usually I go right for it [11:43.980 --> 11:47.640] right at the start, and I always break something, and it, like, ends up never [11:47.640 --> 11:52.880] working at the end, um, so that's why you buy multiple systems. And, like, a [11:52.880 --> 11:56.900] little bit about UART is, uh, uh, like, UART was probably my first introduction [11:56.900 --> 12:00.940] to hardware hacking in general. Um, identifying TX and RX, uh, and ground [12:00.940 --> 12:05.360] pads are pretty straightforward. Um, more examples will be on the way. And, [12:05.360 --> 12:09.260] uh, pretty much when you, like, set up UART, you're, all you're gonna do is, [12:09.260 --> 12:16.260] like, solder a couple pins onto a board, and, uh, connect a UART to USB cable, [12:16.620 --> 12:20.480] and pretty much, um, find, like, a specific baud rate, which is, like, a [12:20.480 --> 12:24.120] clock speed for this, and then drop into some type of system shell, or you're [12:24.120 --> 12:26.980] gonna have to, like, interrupt the boot process to, like, drop into some system [12:26.980 --> 12:32.220] shell. So, uh, for example, this was one of the UARTs I found in a specific [12:32.220 --> 12:37.040] infotainment system owned by JVC. Um, and pretty much you have TX, RX, and then [12:37.040 --> 12:40.740] you have ground up on the top. This was before I touched it. This is what it [12:40.740 --> 12:46.660] looked like after I touched it, um, because I suck at soldering. So, I tried [12:46.660 --> 12:50.940] to, I tried to solder just TX and RX, and I thought I'd be good soldering [12:50.940 --> 12:54.380] ground to somewhere else because the pads were just way too close to a lot of [12:54.380 --> 12:57.900] things on the board. And then when I went to go finally solder the, uh, ground [12:57.900 --> 13:03.560] pin, I actually broke off the pad and the pin that I, uh, soldered onto RX [13:03.560 --> 13:08.340] before. So, I had to pretty much, uh, scratch out, uh, this line right here, [13:08.340 --> 13:14.420] and then I had to solder pins directly to that copper spot, um, just to try to [13:14.420 --> 13:18.200] get, like, the flow of traffic again, uh, which actually worked, surprisingly. [13:18.200 --> 13:22.060] And I got the advice, uh, from someone on Twitter, which is, uh, fairly [13:22.060 --> 13:27.680] interesting. Uh, and I mean, usually once I drop into a shell, this always [13:27.680 --> 13:30.520] drops me into a rich shell. This is why I, like, go for this attack vector [13:30.520 --> 13:35.380] first because I could waste, like, 20, 25 minutes, like, enumerating a bunch [13:35.380 --> 13:40.700] of stuff, like, uh, like via ADB or, like, via, like, some QNX system or, [13:40.700 --> 13:43.740] like, uh, enumerating, like, wireless connections that it's making or trying [13:43.740 --> 13:47.440] to intercept sockets traffic to a web server. Um, but a hardware attack is [13:47.440 --> 13:53.320] just so much faster sometimes. So, why waste the time? Um, and the reason you [13:53.320 --> 13:55.640] want to waste the time, like, looking for is just because of, uh, [13:55.640 --> 13:58.500] documentation. You can go through and, like, document literally everything [13:58.500 --> 14:01.420] from beginning to end once you do this. But if you want to drop into a rich [14:01.420 --> 14:04.220] shell immediately, you just get more system access and you get to see what [14:04.220 --> 14:07.880] everything is doing when you're trying to enumerate everything else, uh, which [14:07.880 --> 14:12.380] is really nice. So, another big method that, uh, I actually learned on a [14:12.380 --> 14:16.160] Russian forum was reflashing chips. So, that chip that's actually right in [14:16.160 --> 14:20.080] front of the, uh, pins that I soldered on or, uh, the wires I soldered on, [14:20.080 --> 14:23.760] pretty much. Uh, you can actually remove that and you can buy a device on [14:23.760 --> 14:29.020] Amazon for, like, $40. And pretty much all you do is you have to, like, take [14:29.020 --> 14:33.120] that cable, connect it to it, uh, take this clip, put it on top of the chip or [14:33.120 --> 14:36.120] you can desolder the chip and put it into this, uh, nice little setup here [14:36.620 --> 14:40.520] and you're pretty much able to just dump all the flash from it. So, on that [14:40.520 --> 14:45.260] flash, you pretty much get, like, the whole file system and you're pretty [14:45.260 --> 14:49.100] much able to modify parts of it. Um, you can dump it, you can binwalk it, you [14:49.100 --> 14:54.760] can extract stuff, um, like Yass file system, things like that. And after [14:54.760 --> 14:58.840] that, you can just re-upload it because this also writes to that flash. Um, so [14:58.840 --> 15:02.180] you're able to just re-write the file system if you wanted to. Um, but to do [15:02.180 --> 15:04.980] that, you want to kind of do it in, like, the least, uh, evasive way as [15:04.980 --> 15:08.580] possible so you don't re-write the whole file system and, uh, screw a ton [15:08.580 --> 15:14.900] of stuff up. But, uh, yeah, that's, uh, that's pretty much it. So, I kind of [15:14.900 --> 15:18.340] have, like, a couple more minutes for questions or anything if anyone wants [15:18.340 --> 15:21.720] to ask some. This is my first talk, so I'm, like, very nervous. So, if I went [15:21.720 --> 15:50.500] too fast, please let me know. Thank you. What's up? Thank you. Right. That's a [15:50.500 --> 15:53.440] good question. Um, so, getting, like, the SC Linux policy is probably going to [15:53.440 --> 15:56.760] be your best bet. Um, other than that, finding global read and write files [15:56.760 --> 16:00.300] that are, like, running under, uh, certain users. So, like, looking at, like, [16:00.300 --> 16:03.440] processes, finding out which users are running which processes, and then [16:03.440 --> 16:06.120] seeing if those files are just global read and write is also a big attack [16:06.120 --> 16:11.660] vector that a lot of people use. Um, so, like, I've seen, try not to break [16:11.660 --> 16:15.800] NDA once again, uh, I've seen some systems from some very big [16:15.800 --> 16:21.660] manufacturers, uh, run a shell script that, uh, pretty much is able, is, like, [16:21.660 --> 16:25.040] global read and write, and when you, like, put an APK that has a reverse [16:25.040 --> 16:28.540] shell that drops you to a system app shell, um, you're able to write to that [16:28.540 --> 16:33.040] shell script file and then just, like, pivot into a root shell after that. Um, [16:33.040 --> 16:37.260] which is weird. I don't know why people set it up that way, but it's mostly [16:37.260 --> 16:40.660] just going after, like, small misconfigurations like that within SC [16:40.660 --> 16:45.300] Linux because SC Linux is so strong if you can implement the policy properly. [16:45.820 --> 16:48.920] Um, but yeah, mostly just going for, like, global read and write files is [16:48.920 --> 16:53.080] going to be, like, the best way to, like, pivot to a root shell on a system [16:53.080 --> 16:58.360] after you upload a malicious APK. Yeah, or you can, like, uh, like, try to find [16:58.360 --> 17:03.340] ways to, like, unlock the bootloader and, like, uh, pretty much upload, like, [17:03.340 --> 17:09.420] super sue APK and then try to sue. Um, that's also a good one. So, yeah. Any [17:09.420 --> 17:14.020] other questions? Alright, thank you.