WEBVTT

00:00.000 --> 00:01.280
Hi, I'm Specters.

00:01.280 --> 00:03.640
Uh, my talk is just on infotainment system hacking.

00:03.640 --> 00:08.100
I was going to initially hack ten infotainment systems and then show you guys all of them.

00:08.260 --> 00:12.540
Um, but then, you know, responsible disclosure and I did it in a bad time frame.

00:12.540 --> 00:14.240
So, I'm just going to teach you guys how to hack it.

00:15.300 --> 00:20.080
So, um, uh, my sponsors for this event are, uh, Ghost Express.

00:20.300 --> 00:21.860
Um, it's actually a meme.

00:21.860 --> 00:25.000
They sell ghosts in a box and you can ship it to your friends.

00:25.240 --> 00:26.460
Um, yeah.

00:27.980 --> 00:29.540
Uh, once again, I'm Specters.

00:29.540 --> 00:31.060
I'm a security enthusiast.

00:31.200 --> 00:33.740
Um, I really want to hack a Tesla.

00:33.780 --> 00:35.960
So, BitQuirk, please, let me hack your Teslas.

00:36.140 --> 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.

00:44.240 --> 00:45.820
So, uh, just a quick overview.

00:45.840 --> 00:48.380
I have 30 minutes to give you guys a talk on all of this.

00:48.380 --> 00:50.620
So, I may, like, have to cut it short.

00:50.760 --> 00:52.160
I may have to skip stuff.

00:52.420 --> 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.

01:00.360 --> 01:04.060
Um, and then, like, kind of one advanced one that I learned online from some Russians.

01:05.420 --> 01:07.940
So, uh, first off, Q and X is made by Blackberry.

01:08.080 --> 01:10.320
Uh, just kind of an interesting fact.

01:10.980 --> 01:15.840
Uh, when we go through the Q and X high overview, we can see, like, your actual update package manager.

01:15.960 --> 01:18.360
Uh, this is just, like, how it works somewhat.

01:18.360 --> 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.

01:26.060 --> 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.

01:33.680 --> 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.

01:40.080 --> 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.

01:47.200 --> 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.

01:56.200 --> 02:01.740
So, part of the Q and X update, Q and X update process is you need, like, a physical, uh, device.

02:01.740 --> 02:04.760
Uh, you're pretty much gonna take this package, you're gonna plug it in.

02:04.840 --> 02:08.940
The system's actually going to enumerate the device and look for this specific package.

02:08.940 --> 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.

02:20.860 --> 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.

02:28.940 --> 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.

02:35.560 --> 02:38.540
Um, and they'll just always be active.

02:38.540 --> 02:41.940
So, one of the big attack vectors is, uh, like, dosing vehicles.

02:41.940 --> 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.

02:53.100 --> 02:53.940
Sorry.

02:55.100 --> 02:55.980
Cool.

02:56.920 --> 03:03.020
So, uh, these are just co- some of the binaries that, uh, oh, wow, are, uh, on the system.

03:03.020 --> 03:08.080
So, uh, USB launcher is just made to, like, detect when you plug in your USB.

03:08.340 --> 03:13.300
Um, MCD is a, uh, it just mounts your file system.

03:13.600 --> 03:15.680
MM detect is multimedia detection.

03:15.680 --> 03:18.980
So, it'll detect, uh, which files are on that system.

03:18.980 --> 03:23.140
And QDB is the Q and X database server that it, uh, reaches out to.

03:24.400 --> 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.

03:30.100 --> 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.

03:39.180 --> 03:44.180
Uh, you also get USB for, like, loading your songs and other files, like, maybe movies or something onto it.

03:44.360 --> 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.

03:50.180 --> 03:52.080
I- it's not as common as much anymore.

03:52.080 --> 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.

03:57.820 --> 03:59.640
Oh, Telnet drops me into a root shell.

03:59.640 --> 04:00.740
That's kind of dumb.

04:00.820 --> 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,

04:13.780 --> 04:18.940
like, able to find that backend server and poke at that, which is also very cool.

04:19.200 --> 04:27.580
Uh, for Bluetooth, uh, BTLE jack, uh, form of DOS, which cause operator distraction, and then, uh, custom applications.

04:27.600 --> 04:31.920
There's a ton of people that are storing, like, passwords and stuff in custom applications, endpoints.

04:31.920 --> 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.

04:39.220 --> 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 .

04:49.000 --> 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.

05:01.540 --> 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.

05:09.520 --> 05:14.280
And then you go onto your system and it'll just error out, um, which is kind of interesting as well.

05:15.700 --> 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.

05:27.620 --> 05:29.500
Uh, so we're gonna try our best here.

05:30.260 --> 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.

05:48.180 --> 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.

05:55.420 --> 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.

06:05.280 --> 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,

06:23.160 --> 06:25.540
so you're still able to take advantage of some of those things.

06:25.560 --> 06:30.920
Uh, most of the time, Sue is not on that system, though, so escalating privileges is not as easy.

06:31.860 --> 06:34.840
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: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.

06:48.180 --> 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,

07:03.920 --> 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.

07:14.580 --> 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?

07:23.820 --> 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,

07:38.840 --> 07:43.760
uh, through the Wi-Fi or through your own hotspot, and then, like, the car has to connect through that.

07:44.320 --> 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,

08:00.580 --> 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,

08:17.040 --> 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.

08:24.620 --> 08:30.000
So, uh, some of the eight Android, like, users, uh, these are known as Android IDs.

08:30.680 --> 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.

08:39.020 --> 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,

08:55.960 --> 08:59.580
and then it lowers its privileges, and then it just makes you a shell user.

08:59.720 --> 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,

09:13.460 --> 09:18.300
uh, write onto, like, file, like, specific file systems, and then, you know, once again, you get root shell.

09:18.680 --> 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.

09:32.940 --> 09:34.980
So, abusing ADB.

09:35.500 --> 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.

09:49.700 --> 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.

09:55.120 --> 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.

10:04.580 --> 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,

10:18.120 --> 10:22.180
uh, able to modify a couple of other files and, like, rewrite files, right?

10:22.360 --> 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.

10:35.480 --> 10:40.780
Uh, but this will give you, like, persistent ADB root privileges if you wanted to go and change those.

10:42.200 --> 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.

10:52.280 --> 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,

11:08.560 --> 11:13.140
you can modify, uh, local.prop to allow root, uh, once ADB is active.

11:14.860 --> 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.

11:22.380 --> 11:27.580
Um, so, you are, it's a very big hardware hacking one.

11:27.580 --> 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.

11:34.080 --> 11:36.340
So, uh, when do you try hardware hacking?

11:36.440 --> 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.

11:52.060 --> 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.

11:58.380 --> 12:02.360
Um, identifying TX and RX, uh, and ground pads are pretty straightforward.

12:02.660 --> 12:04.500
Um, more examples will be on the way.

12:04.500 --> 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,

12:21.640 --> 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.

12:27.900 --> 12:34.240
So, uh, for example, this was one of the UARTs I found in a specific infotainment system owned by JVC.

12:34.480 --> 12:38.300
Um, and pretty much you have TX, RX, and then you have ground up on the top.

12:38.300 --> 12:39.560
This was before I touched it.

12:40.020 --> 12:43.800
This is what it looked like after I touched it, um, because I suck at soldering.

12:45.420 --> 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.

12:55.420 --> 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.

13:04.240 --> 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.

13:18.200 --> 13:22.880
And I got the advice, uh, from someone on Twitter, which is, uh, fairly interesting.

13:24.000 --> 13:28.840
Uh, and I mean, usually once I drop into a shell, this always drops me into a rich shell.

13:28.840 --> 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.

13:46.160 --> 13:49.100
Um, but a hardware attack is just so much faster sometimes.

13:49.820 --> 13:51.680
So, why waste the time?

13:51.820 --> 13:56.420
Um, and the reason you want to waste the time, like, looking for is just because of, uh, documentation.

13:56.440 --> 14:00.120
You can go through and, like, document literally everything from beginning to end once you do this.

14:00.120 --> 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.

14:09.480 --> 14:14.560
So, another big method that, uh, I actually learned on a Russian forum was reflashing chips.

14:14.640 --> 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.

14:20.840 --> 14:26.060
Uh, you can actually remove that and you can buy a device on Amazon for, like, $40.

14:26.320 --> 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.

14:39.640 --> 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.

14:47.160 --> 14:53.080
Um, you can dump it, you can binwalk it, you can extract stuff, um, like Yass file system, things like that.

14:53.700 --> 14:58.240
And after that, you can just re-upload it because this also writes to that flash.

14:58.240 --> 15:01.340
Um, so you're able to just re-write the file system if you wanted to.

15:01.400 --> 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.

15:09.520 --> 15:14.240
But, uh, yeah, that's, uh, that's pretty much it.

15:14.240 --> 15:18.860
So, I kind of have, like, a couple more minutes for questions or anything if anyone wants to ask some.

15:18.860 --> 15:21.260
This is my first talk, so I'm, like, very nervous.

15:21.260 --> 15:24.000
So, if I went too fast, please let me know.

15:28.460 --> 15:29.300
Thank you.

15:31.900 --> 15:32.820
What's up?

15:34.300 --> 15:35.280
Thank you.

15:42.250 --> 15:42.970
Right.

15:50.020 --> 15:51.000
That's a good question.

15:51.000 --> 15:54.460
Um, so, getting, like, the SC Linux policy is probably going to be your best bet.

15:54.460 --> 15:58.960
Um, other than that, finding global read and write files that are, like, running under, uh, certain users.

15:58.960 --> 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.

16:08.060 --> 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,

16:27.200 --> 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.

16:32.320 --> 16:34.100
Um, which is weird.

16:34.100 --> 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.

16:45.820 --> 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.

16:55.520 --> 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.

17:05.540 --> 17:07.540
Um, that's also a good one.

17:07.740 --> 17:08.360
So, yeah.

17:09.060 --> 17:10.520
Any other questions?

17:12.840 --> 17:14.020
Alright, thank you.

