1 00:00:00,000 --> 00:00:01,280 Hi, I'm Specters. 2 00:00:01,280 --> 00:00:03,640 Uh, my talk is just on infotainment system hacking. 3 00:00:03,640 --> 00:00:08,100 I was going to initially hack ten infotainment systems and then show you guys all of them. 4 00:00:08,260 --> 00:00:12,540 Um, but then, you know, responsible disclosure and I did it in a bad time frame. 5 00:00:12,540 --> 00:00:14,240 So, I'm just going to teach you guys how to hack it. 6 00:00:15,300 --> 00:00:20,080 So, um, uh, my sponsors for this event are, uh, Ghost Express. 7 00:00:20,300 --> 00:00:21,860 Um, it's actually a meme. 8 00:00:21,860 --> 00:00:25,000 They sell ghosts in a box and you can ship it to your friends. 9 00:00:25,240 --> 00:00:26,460 Um, yeah. 10 00:00:27,980 --> 00:00:29,540 Uh, once again, I'm Specters. 11 00:00:29,540 --> 00:00:31,060 I'm a security enthusiast. 12 00:00:31,200 --> 00:00:33,740 Um, I really want to hack a Tesla. 13 00:00:33,780 --> 00:00:35,960 So, BitQuirk, please, let me hack your Teslas. 14 00:00:36,140 --> 00:00:43,160 And, uh, you know, shout out to Thug Crowd because, uh, they really, like, helped out with, like, the putting together of, like, these slides. 15 00:00:44,240 --> 00:00:45,820 So, uh, just a quick overview. 16 00:00:45,840 --> 00:00:48,380 I have 30 minutes to give you guys a talk on all of this. 17 00:00:48,380 --> 00:00:50,620 So, I may, like, have to cut it short. 18 00:00:50,760 --> 00:00:52,160 I may have to skip stuff. 19 00:00:52,420 --> 00:00:59,920 Um, but pretty much we're just going to go over Q and X hacking and we're going to go over Android hacking and then we're going to do some, like, a, some basic hardware techniques. 20 00:01:00,360 --> 00:01:04,060 Um, and then, like, kind of one advanced one that I learned online from some Russians. 21 00:01:05,420 --> 00:01:07,940 So, uh, first off, Q and X is made by Blackberry. 22 00:01:08,080 --> 00:01:10,320 Uh, just kind of an interesting fact. 23 00:01:10,980 --> 00:01:15,840 Uh, when we go through the Q and X high overview, we can see, like, your actual update package manager. 24 00:01:15,960 --> 00:01:18,360 Uh, this is just, like, how it works somewhat. 25 00:01:18,360 --> 00:01:25,940 So, uh, BSP is a board support package and, uh, essentially all it does is just updates, uh, your Q and X system. 26 00:01:26,060 --> 00:01:33,280 Uh, car companies will take this and, like, integrate their own software into this to do, like, over the air updates or, like, physical updates via USB. 27 00:01:33,680 --> 00:01:40,080 Uh, but when you're going in there and you're updating it, essentially it's going to go BSP and then the Q and X, uh, operating system. 28 00:01:40,080 --> 00:01:46,880 And if you have, like, something that's supposed to work with your phone, it'll go through the device gateway and then it'll go and update, like, any of the following, like, above it. 29 00:01:47,200 --> 00:01:54,920 Um, and then, like, the middleware is just pretty much made to, um, essentially, like, uh, mitigate, like, where these packages and things go. 30 00:01:56,200 --> 00:02:01,740 So, part of the Q and X update, Q and X update process is you need, like, a physical, uh, device. 31 00:02:01,740 --> 00:02:04,760 Uh, you're pretty much gonna take this package, you're gonna plug it in. 32 00:02:04,840 --> 00:02:08,940 The system's actually going to enumerate the device and look for this specific package. 33 00:02:08,940 --> 00:02:20,720 Um, if they're cert signing or if they're doing anything else, uh, SWUD, um, is pretty much going to, uh, read that cert and then it's either going to update or reject it. 34 00:02:20,860 --> 00:02:28,940 Um, after that, it'll pretty much send it on to the, uh, Q and X file system and it will start a reboot process. 35 00:02:28,940 --> 00:02:35,020 But when you start the reboot process, essentially, all your active, like, major car parts will still be working in the background. 36 00:02:35,560 --> 00:02:38,540 Um, and they'll just always be active. 37 00:02:38,540 --> 00:02:41,940 So, one of the big attack vectors is, uh, like, dosing vehicles. 38 00:02:41,940 --> 00:02:53,040 So, if you're able to, like, dos a Q and X system on a car, if you're able to, uh, dos, like, one of the other systems on a car, um, companies usually, uh, don't like that stuff because you can cause people to die. 39 00:02:53,100 --> 00:02:53,940 Sorry. 40 00:02:55,100 --> 00:02:55,980 Cool. 41 00:02:56,920 --> 00:03:03,020 So, uh, these are just co- some of the binaries that, uh, oh, wow, are, uh, on the system. 42 00:03:03,020 --> 00:03:08,080 So, uh, USB launcher is just made to, like, detect when you plug in your USB. 43 00:03:08,340 --> 00:03:13,300 Um, MCD is a, uh, it just mounts your file system. 44 00:03:13,600 --> 00:03:15,680 MM detect is multimedia detection. 45 00:03:15,680 --> 00:03:18,980 So, it'll detect, uh, which files are on that system. 46 00:03:18,980 --> 00:03:23,140 And QDB is the Q and X database server that it, uh, reaches out to. 47 00:03:24,400 --> 00:03:30,100 So, some of the ways to start off enumeration for Q and X, uh, let's say your radio system has, like, the whole nine yards. 48 00:03:30,100 --> 00:03:39,180 You, like, buy the most expensive car and you get, you know, GSM, Wi-Fi, Bluetooth, uh, custom ap- applications that the, uh, car manufacturer's made. 49 00:03:39,180 --> 00:03:44,180 Uh, you also get USB for, like, loading your songs and other files, like, maybe movies or something onto it. 50 00:03:44,360 --> 00:03:50,180 Um, some of the things that you're able to do once you get onto their system is, like, you know, connect to the Wi-Fi, do a port scan. 51 00:03:50,180 --> 00:03:52,080 I- it's not as common as much anymore. 52 00:03:52,080 --> 00:03:57,820 They've been starting to, like, push them out, but there's still some things out there that exist where, like, you'll have Telnet open. 53 00:03:57,820 --> 00:03:59,640 Oh, Telnet drops me into a root shell. 54 00:03:59,640 --> 00:04:00,740 That's kind of dumb. 55 00:04:00,820 --> 00:04:13,780 Uh, and then, like, for hotspot GSM stuff, like, if you ex- if you, like, scan external IPs or, like, you man the middle of a socket connection, uh, sometimes you're able to just, like, get unencrypted data that, like, goes to a backend server and now you're, 56 00:04:13,780 --> 00:04:18,940 like, able to find that backend server and poke at that, which is also very cool. 57 00:04:19,200 --> 00:04:27,580 Uh, for Bluetooth, uh, BTLE jack, uh, form of DOS, which cause operator distraction, and then, uh, custom applications. 58 00:04:27,600 --> 00:04:31,920 There's a ton of people that are storing, like, passwords and stuff in custom applications, endpoints. 59 00:04:31,920 --> 00:04:39,220 Uh, once again, just more things to poke at, uh, things to get onto, um, things to, like, kind of distract from. 60 00:04:39,220 --> 00:04:48,480 So, one of my big tests, uh, after this was released , just in general, is to, like, kind of enumerate which files work on a system . 61 00:04:49,000 --> 00:05:00,980 So, uh, this is a quick script, uh, you can add more file headers to it pretty much, and all you're doing pretty much is just testing which file headers work on a system, which files read, which files don't, uh, like, which ones show up and which ones don't. 62 00:05:01,540 --> 00:05:09,520 So, this will pretty much just, like, uh, go to, like, a single , like, data file or just any text file and it'll just, like, change, like, the first couple bytes. 63 00:05:09,520 --> 00:05:14,280 And then you go onto your system and it'll just error out, um, which is kind of interesting as well. 64 00:05:15,700 --> 00:05:27,500 So, Android hacking, I've done a lot of bug bounties with this, so I'm trying to, like, steer away from all my, like, personal research and, like, my own research and stuff. 65 00:05:27,620 --> 00:05:29,500 Uh, so we're gonna try our best here. 66 00:05:30,260 --> 00:05:47,860 So, pretty much, um, Android is really different from QNX and other, like, Linux systems in the, like, in the sense that, like, first off, it replaced Glipsy with Bionic and it really utilizes SE Linux to separate, uh, user privileges and application privileges and things like that. 67 00:05:48,180 --> 00:05:55,420 Um, and even, like, when you get onto a system, like, some things are virtualized with, uh , can't remember that hardware, software. 68 00:05:55,420 --> 00:06:05,200 Um, but pretty much, like, there's just a couple other things where, like, they have custom versions of init, uh, you have, like, your own custom versions of, like, the startup daemons. 69 00:06:05,280 --> 00:06:23,160 Uh, and although you have Android that, like, uses a heavy, like, SE Linux, like, uh, like, uh, god, like, customized file, essentially, to, like, show you the rules that you're able to do, uh, all your, like, native binaries for Linux are still on that system, 70 00:06:23,160 --> 00:06:25,540 so you're still able to take advantage of some of those things. 71 00:06:25,560 --> 00:06:30,920 Uh, most of the time, Sue is not on that system, though, so escalating privileges is not as easy. 72 00:06:31,860 --> 00:06:34,840 So, we're gonna talk about SE Linux a little bit. 73 00:06:35,420 --> 00:06:40,600 Uh, pretty much, SE Linux is just, like, an enforcing of, like, the Mac policy. 74 00:06:40,600 --> 00:06:48,180 So, uh, pretty much, you have users, you have groups, um, and you're just, like, strictly assigning those user and groups together, together. 75 00:06:48,180 --> 00:07:03,920 Uh, once you drop, like, a shell onto their system, you can see if SE Linux is enabled with those three commands at the bottom left, uh, which is get enforce, uh, cse status, and if that doesn't work, uh, you can try to get to the SE Linux config file, 76 00:07:03,920 --> 00:07:14,280 um, but once again, like, dropping into the shell and getting access to that is not as easy, so, don't worry, I'll show you how to do that in a second. 77 00:07:14,580 --> 00:07:23,820 Um, so, we're gonna start off by downloading ADB, first off, um, and usually when you download ADB, you're gonna have to go to your device and put it into developer mode, right? 78 00:07:23,820 --> 00:07:38,840 So, if you have initial access and you're researching the device, uh, you can go into your car, open up the settings, put the car into developer mode, uh, download ADB onto your, you know, Mac, Windows, Linux laptop, um, and then you connect either USB, 79 00:07:38,840 --> 00:07:43,760 uh, through the Wi-Fi or through your own hotspot, and then, like, the car has to connect through that. 80 00:07:44,320 --> 00:08:00,580 Um, and then after that, you go to, like, ADB start server, and that'll pretty much start your Android bridge to the device, list your devices, make sure it's authenticating properly, make sure it's authorized, um, you can drop an ADB shell, and then you can also do those other commands I showed you earlier to see, 81 00:08:00,580 --> 00:08:17,040 like, if, uh, SE Linux is enabled, and you kinda wanna, like, pray for permissive, I spelled that wrong, um, and then you also wanna see who you are, but usually the response that I get is shell, um, and, you know, we just sell, like, we can just drop any ADB shell, 82 00:08:17,040 --> 00:08:23,640 any Linux command that's on the system, and we can, like, out that to a file, so we're actually able to go and enumerate the system pretty quickly with that. 83 00:08:24,620 --> 00:08:30,000 So, uh, some of the eight Android, like, users, uh, these are known as Android IDs. 84 00:08:30,680 --> 00:08:39,000 So, uh, some Android users, pretty straightforward, you have root, you have system, you have app, you have user, and then you also have shell for when you drop the Android shell. 85 00:08:39,020 --> 00:08:55,960 Um, something interesting about ADB is it actually starts off as root, so when you're first getting onto the system and, you know, you ADB into, you know, your radio system or whatever it may be, um, you're actually going to, like, initially start off as ADB root starts process, 86 00:08:55,960 --> 00:08:59,580 and then it lowers its privileges, and then it just makes you a shell user. 87 00:08:59,720 --> 00:09:13,460 So, if you find a way to interrupt that, um, then you can pretty much get onto the system and, you know, start a root shell, or if you find a way to, like, configure the files in the process because I see Linux isn't, like, mandating properly, it's going to allow you to just, 88 00:09:13,460 --> 00:09:18,300 uh, write onto, like, file, like, specific file systems, and then, you know, once again, you get root shell. 89 00:09:18,680 --> 00:09:31,920 Um, some of the Android groups on the system, just for network configuration, and, uh, you'll also see, like, something that looks like users, but are actually just read and write access to SD cards and other, like, hardware devices on that system. 90 00:09:32,940 --> 00:09:34,980 So, abusing ADB. 91 00:09:35,500 --> 00:09:49,680 Um, so some of the things I usually try is, uh, I go to, like, datalocal.prop, and I try to see if rrosecure is set to one, um, because if it is, then, uh, I'm pretty much, like, kind of screwed. 92 00:09:49,700 --> 00:09:55,120 So, if I can modify that, then I can actually go in and drop an ADB shell that is add- as root. 93 00:09:55,120 --> 00:10:04,380 So, if I set rrosecure to zero, um, I can get on there as root, or if I go to rocolonelkimu, uh, and set it to one, then I can also drop a shell as root. 94 00:10:04,580 --> 00:10:18,120 And, um, this is kind of interesting because there's just, like, a ton of attack vectors that you could use to try to get to this point, such as, like, you drop a, uh, application onto the system that, you know, gives you a shell, and then that shell is, 95 00:10:18,120 --> 00:10:22,180 uh, able to modify a couple of other files and, like, rewrite files, right? 96 00:10:22,360 --> 00:10:35,480 So, by doing this, you're able to, like, traverse file systems, but at this point, if you're able to modify those files, then, uh, you know, you're probably able to just drop a root shell in the first place. 97 00:10:35,480 --> 00:10:40,780 Uh, but this will give you, like, persistent ADB root privileges if you wanted to go and change those. 98 00:10:42,200 --> 00:10:52,220 So, um, a couple of ways to, uh, you know, get root again is you can go online and find an unlocked bootloader, which is way more prominent than usual. 99 00:10:52,280 --> 00:11:08,560 Um, you can configure your device to be in fast boot mode, and then once you go into fast boot mode and you update the bootloader, um, you can compile a binary, like supersu, onto their system, and then you can either privask or do anything else, or once again, 100 00:11:08,560 --> 00:11:13,140 you can modify, uh, local.prop to allow root, uh, once ADB is active. 101 00:11:14,860 --> 00:11:22,020 So, we're going to go into a little bit of hardware hacking, because hardware hacking also has some, like, very interesting stuff that usually drops you into root shells. 102 00:11:22,380 --> 00:11:27,580 Um, so, you are, it's a very big hardware hacking one. 103 00:11:27,580 --> 00:11:33,660 This is actually a picture I took of, uh, one of the things I had to do, and it's, like, awful, um, but bear with me. 104 00:11:34,080 --> 00:11:36,340 So, uh, when do you try hardware hacking? 105 00:11:36,440 --> 00:11:51,300 Um, I wish I could say it was at the end of everything else I've done in these slides, um, but usually I go right for it right at the start, and I always break something, and it, like, ends up never working at the end, um, so that's why you buy multiple systems. 106 00:11:52,060 --> 00:11:58,260 And, like, a little bit about UART is, uh, uh, like, UART was probably my first introduction to hardware hacking in general. 107 00:11:58,380 --> 00:12:02,360 Um, identifying TX and RX, uh, and ground pads are pretty straightforward. 108 00:12:02,660 --> 00:12:04,500 Um, more examples will be on the way. 109 00:12:04,500 --> 00:12:21,640 And, uh, pretty much when you, like, set up UART, you're, all you're gonna do is, like, solder a couple pins onto a board, and, uh, connect a UART to USB cable, and pretty much, um, find, like, a specific baud rate, which is, like, a clock speed for this, 110 00:12:21,640 --> 00:12:27,660 and then drop into some type of system shell, or you're gonna have to, like, interrupt the boot process to, like, drop into some system shell. 111 00:12:27,900 --> 00:12:34,240 So, uh, for example, this was one of the UARTs I found in a specific infotainment system owned by JVC. 112 00:12:34,480 --> 00:12:38,300 Um, and pretty much you have TX, RX, and then you have ground up on the top. 113 00:12:38,300 --> 00:12:39,560 This was before I touched it. 114 00:12:40,020 --> 00:12:43,800 This is what it looked like after I touched it, um, because I suck at soldering. 115 00:12:45,420 --> 00:12:55,420 So, I tried to, I tried to solder just TX and RX, and I thought I'd be good soldering ground to somewhere else because the pads were just way too close to a lot of things on the board. 116 00:12:55,420 --> 00:13:04,200 And then when I went to go finally solder the, uh, ground pin, I actually broke off the pad and the pin that I, uh, soldered onto RX before. 117 00:13:04,240 --> 00:13:18,200 So, I had to pretty much, uh, scratch out, uh, this line right here, and then I had to solder pins directly to that copper spot, um, just to try to get, like, the flow of traffic again, uh, which actually worked, surprisingly. 118 00:13:18,200 --> 00:13:22,880 And I got the advice, uh, from someone on Twitter, which is, uh, fairly interesting. 119 00:13:24,000 --> 00:13:28,840 Uh, and I mean, usually once I drop into a shell, this always drops me into a rich shell. 120 00:13:28,840 --> 00:13:45,860 This is why I, like, go for this attack vector first because I could waste, like, 20, 25 minutes, like, enumerating a bunch of stuff, like, uh, like via ADB or, like, via, like, some QNX system or, like, uh, enumerating, like, wireless connections that it's making or trying to intercept sockets traffic to a web server. 121 00:13:46,160 --> 00:13:49,100 Um, but a hardware attack is just so much faster sometimes. 122 00:13:49,820 --> 00:13:51,680 So, why waste the time? 123 00:13:51,820 --> 00:13:56,420 Um, and the reason you want to waste the time, like, looking for is just because of, uh, documentation. 124 00:13:56,440 --> 00:14:00,120 You can go through and, like, document literally everything from beginning to end once you do this. 125 00:14:00,120 --> 00:14:09,340 But if you want to drop into a rich shell immediately, you just get more system access and you get to see what everything is doing when you're trying to enumerate everything else, uh, which is really nice. 126 00:14:09,480 --> 00:14:14,560 So, another big method that, uh, I actually learned on a Russian forum was reflashing chips. 127 00:14:14,640 --> 00:14:20,840 So, that chip that's actually right in front of the, uh, pins that I soldered on or, uh, the wires I soldered on, pretty much. 128 00:14:20,840 --> 00:14:26,060 Uh, you can actually remove that and you can buy a device on Amazon for, like, $40. 129 00:14:26,320 --> 00:14:39,640 And pretty much all you do is you have to, like, take that cable, connect it to it, uh, take this clip, put it on top of the chip or you can desolder the chip and put it into this, uh, nice little setup here and you're pretty much able to just dump all the flash from it. 130 00:14:39,640 --> 00:14:47,160 So, on that flash, you pretty much get, like, the whole file system and you're pretty much able to modify parts of it. 131 00:14:47,160 --> 00:14:53,080 Um, you can dump it, you can binwalk it, you can extract stuff, um, like Yass file system, things like that. 132 00:14:53,700 --> 00:14:58,240 And after that, you can just re-upload it because this also writes to that flash. 133 00:14:58,240 --> 00:15:01,340 Um, so you're able to just re-write the file system if you wanted to. 134 00:15:01,400 --> 00:15:09,360 Um, but to do that, you want to kind of do it in, like, the least, uh, evasive way as possible so you don't re-write the whole file system and, uh, screw a ton of stuff up. 135 00:15:09,520 --> 00:15:14,240 But, uh, yeah, that's, uh, that's pretty much it. 136 00:15:14,240 --> 00:15:18,860 So, I kind of have, like, a couple more minutes for questions or anything if anyone wants to ask some. 137 00:15:18,860 --> 00:15:21,260 This is my first talk, so I'm, like, very nervous. 138 00:15:21,260 --> 00:15:24,000 So, if I went too fast, please let me know. 139 00:15:28,460 --> 00:15:29,300 Thank you. 140 00:15:31,900 --> 00:15:32,820 What's up? 141 00:15:34,300 --> 00:15:35,280 Thank you. 142 00:15:42,250 --> 00:15:42,970 Right. 143 00:15:50,020 --> 00:15:51,000 That's a good question. 144 00:15:51,000 --> 00:15:54,460 Um, so, getting, like, the SC Linux policy is probably going to be your best bet. 145 00:15:54,460 --> 00:15:58,960 Um, other than that, finding global read and write files that are, like, running under, uh, certain users. 146 00:15:58,960 --> 00:16:08,060 So, like, looking at, like, processes, finding out which users are running which processes, and then seeing if those files are just global read and write is also a big attack vector that a lot of people use. 147 00:16:08,060 --> 00:16:27,200 Um, so, like, I've seen, try not to break NDA once again, uh, I've seen some systems from some very big manufacturers, uh, run a shell script that, uh, pretty much is able, is, like, global read and write, and when you, like, put an APK that has a reverse shell that drops you to a system app shell, 148 00:16:27,200 --> 00:16:32,040 um, you're able to write to that shell script file and then just, like, pivot into a root shell after that. 149 00:16:32,320 --> 00:16:34,100 Um, which is weird. 150 00:16:34,100 --> 00:16:45,300 I don't know why people set it up that way, but it's mostly just going after, like, small misconfigurations like that within SC Linux because SC Linux is so strong if you can implement the policy properly. 151 00:16:45,820 --> 00:16:55,240 Um, but yeah, mostly just going for, like, global read and write files is going to be, like, the best way to, like, pivot to a root shell on a system after you upload a malicious APK. 152 00:16:55,520 --> 00:17:05,260 Yeah, or you can, like, uh, like, try to find ways to, like, unlock the bootloader and, like, uh, pretty much upload, like, super sue APK and then try to sue. 153 00:17:05,540 --> 00:17:07,540 Um, that's also a good one. 154 00:17:07,740 --> 00:17:08,360 So, yeah. 155 00:17:09,060 --> 00:17:10,520 Any other questions? 156 00:17:12,840 --> 00:17:14,020 Alright, thank you.