start	end	text
0	4340	Hi, I'm Specters. Uh, my talk is just on infotainment system hacking. I was going to
4340	8740	initially hack ten infotainment systems and then show you guys all of them. Um, but
8740	12840	then, you know, responsible disclosure and I did it in a bad time frame. So, I'm
12840	18600	just going to teach you guys how to hack it. So, um, uh, my sponsors for this event
18600	23660	are, uh, Ghost Express. Um, it's actually a meme. They sell ghosts in a box and you
23660	29760	can ship it to your friends. Um, yeah. Uh, once again, I'm Specters. I'm a
29760	34880	security enthusiast. Um, I really want to hack a Tesla. So, BitQuirk, please, let
34880	39280	me hack your Teslas. And, uh, you know, shout out to Thug Crowd because, uh, they
39280	43160	really, like, helped out with, like, the putting together of, like, these slides.
44240	48140	So, uh, just a quick overview. I have 30 minutes to give you guys a talk on all of
48140	52900	this. So, I may, like, have to cut it short. I may have to skip stuff. Um, but
52900	55620	pretty much we're just going to go over Q and X hacking and we're going to go over
55620	59160	Android hacking and then we're going to do some, like, a, some basic hardware
59160	63040	techniques. Um, and then, like, kind of one advanced one that I learned online
63040	68960	from some Russians. So, uh, first off, Q and X is made by Blackberry. Uh, just
68960	73420	kind of an interesting fact. Uh, when we go through the Q and X high overview, we
73420	77620	can see, like, your actual update package manager. Uh, this is just, like, how it
77620	82260	works somewhat. So, uh, BSP is a board support package and, uh, essentially all
82260	87740	it does is just updates, uh, your Q and X system. Uh, car companies will take
87740	90560	this and, like, integrate their own software into this to do, like, over the
90560	94740	air updates or, like, physical updates via USB. Uh, but when you're going in
94740	98520	there and you're updating it, essentially it's going to go BSP and then the Q and
98520	102080	X, uh, operating system. And if you have, like, something that's supposed to work
102080	104540	with your phone, it'll go through the device gateway and then it'll go and
104540	108220	update, like, any of the following, like, above it. Um, and then, like, the
108220	113120	middleware is just pretty much made to, um, essentially, like, uh, mitigate, like,
113120	118820	where these packages and things go. So, part of the Q and X update, Q and X
118820	122480	update process is you need, like, a physical, uh, device. Uh, you're pretty
122480	125980	much gonna take this package, you're gonna plug it in. The system's actually
125980	129640	going to enumerate the device and look for this specific package. Um, if they're
129640	135200	cert signing or if they're doing anything else, uh, SWUD, um, is pretty
135200	140120	much going to, uh, read that cert and then it's either going to update or reject
140120	145540	it. Um, after that, it'll pretty much send it on to the, uh, Q and X file
145540	150060	system and it will start a reboot process. But when you start the reboot
150060	153920	process, essentially, all your active, like, major car parts will still be
153920	159120	working in the background. Um, and they'll just always be active. So, one of
159120	162560	the big attack vectors is, uh, like, dosing vehicles. So, if you're able to,
162560	167240	like, dos a Q and X system on a car, if you're able to, uh, dos, like, one of
167240	171220	the other systems on a car, um, companies usually, uh, don't like that stuff
171220	178520	because you can cause people to die. Sorry. Cool. So, uh, these are just co-
178520	183680	some of the binaries that, uh, oh, wow, are, uh, on the system. So, uh, USB
183680	190520	launcher is just made to, like, detect when you plug in your USB. Um, MCD is
190880	196020	a, uh, it just mounts your file system. MM detect is multimedia detection. So,
196020	200660	it'll detect, uh, which files are on that system. And QDB is the Q and X
200660	205800	database server that it, uh, reaches out to. So, some of the ways to start off
205800	209360	enumeration for Q and X, uh, let's say your radio system has, like, the whole
209360	212400	nine yards. You, like, buy the most expensive car and you get, you know,
212400	217860	GSM, Wi-Fi, Bluetooth, uh, custom ap- applications that the, uh, car
218260	221600	manufacturer's made. Uh, you also get USB for, like, loading your songs and
221600	225460	other files, like, maybe movies or something onto it. Um, some of the things
225460	228300	that you're able to do once you get onto their system is, like, you know,
228300	232080	connect to the Wi-Fi, do a port scan. I- it's not as common as much anymore.
232080	235320	They've been starting to, like, push them out, but there's still some things
235320	238860	out there that exist where, like, you'll have Telnet open. Oh, Telnet drops me
238860	243580	into a root shell. That's kind of dumb. Uh, and then, like, for hotspot GSM
243580	247240	stuff, like, if you ex- if you, like, scan external IPs or, like, you man the
247240	251000	middle of a socket connection, uh, sometimes you're able to just, like, get
251000	254400	unencrypted data that, like, goes to a backend server and now you're, like,
254400	258940	able to find that backend server and poke at that, which is also very cool.
259200	264180	Uh, for Bluetooth, uh, BTLE jack, uh, form of DOS, which cause operator
264180	268800	distraction, and then, uh, custom applications. There's a ton of people
268800	271920	that are storing, like, passwords and stuff in custom applications, endpoints.
271920	277280	Uh, once again, just more things to poke at, uh, things to get onto, um, things
277280	283260	to, like, kind of distract from. So, one of my big tests, uh, after this was
283260	288120	released, just in general, is to, like, kind of enumerate which files work on a
288120	292460	system. So, uh, this is a quick script, uh, you can add more file headers to it
292460	296020	pretty much, and all you're doing pretty much is just testing which file headers
296020	299940	work on a system, which files read, which files don't, uh, like, which ones show
299940	304880	up and which ones don't. So, this will pretty much just, like, uh, go to, like,
304880	308320	a single, like, data file or just any text file and it'll just, like, change,
308320	311480	like, the first couple bytes. And then you go onto your system and it'll just
311480	319420	error out, um, which is kind of interesting as well. So, Android hacking, I've
319420	324140	done a lot of bug bounties with this, so I'm trying to, like, steer away from all
324140	328380	my, like, personal research and, like, my own research and stuff. Uh, so we're
328380	334000	gonna try our best here. So, pretty much, um, Android is really different from
334000	338720	QNX and other, like, Linux systems in the, like, in the sense that, like, first
338720	344700	off, it replaced Glipsy with Bionic and it really utilizes SE Linux to separate,
344700	349340	uh, user privileges and application privileges and things like that. Um, and
349340	352820	even, like, when you get onto a system, like, some things are virtualized with,
352820	358160	uh, can't remember that hardware, software. Um, but pretty much, like, there's
358160	361760	just a couple other things where, like, they have custom versions of init, uh,
361760	366480	you have, like, your own custom versions of, like, the startup daemons. Uh, and
367000	372840	although you have Android that, like, uses a heavy, like, SE Linux, like, uh,
372840	378960	like, uh, god, like, customized file, essentially, to, like, show you the rules
378960	382480	that you're able to do, uh, all your, like, native binaries for Linux are still
382480	385540	on that system, so you're still able to take advantage of some of those things.
385560	388540	Uh, most of the time, Sue is not on that system, though, so escalating
388540	394840	privileges is not as easy. So, we're gonna talk about SE Linux a little bit.
395420	400600	Uh, pretty much, SE Linux is just, like, an enforcing of, like, the Mac policy.
400600	405300	So, uh, pretty much, you have users, you have groups, um, and you're just, like,
405300	409440	strictly assigning those user and groups together, together. Uh, once you drop,
409440	413380	like, a shell onto their system, you can see if SE Linux is enabled with those
413380	419240	three commands at the bottom left, uh, which is get enforce, uh, cse status,
419240	423920	and if that doesn't work, uh, you can try to get to the SE Linux config file,
423920	428920	um, but once again, like, dropping into the shell and getting access to that is
428920	436020	not as easy, so, don't worry, I'll show you how to do that in a second. Um, so,
436020	440520	we're gonna start off by downloading ADB, first off, um, and usually when you
440520	443120	download ADB, you're gonna have to go to your device and put it into developer
443120	446420	mode, right? So, if you have initial access and you're researching the device,
446420	450880	uh, you can go into your car, open up the settings, put the car into developer
450880	457280	mode, uh, download ADB onto your, you know, Mac, Windows, Linux laptop, um, and
457280	461420	then you connect either USB, uh, through the Wi-Fi or through your own hotspot,
461420	465720	and then, like, the car has to connect through that. Um, and then after that,
465720	469820	you go to, like, ADB start server, and that'll pretty much start your Android
469820	473320	bridge to the device, list your devices, make sure it's authenticating properly,
473320	478160	make sure it's authorized, um, you can drop an ADB shell, and then you can also
478160	482880	do those other commands I showed you earlier to see, like, if, uh, SE Linux is
482880	487660	enabled, and you kinda wanna, like, pray for permissive, I spelled that wrong, um,
487660	491140	and then you also wanna see who you are, but usually the response that I get is
491140	497140	shell, um, and, you know, we just sell, like, we can just drop any ADB shell, any
497140	500900	Linux command that's on the system, and we can, like, out that to a file, so we're
500900	505680	actually able to go and enumerate the system pretty quickly with that. So, uh,
505680	511520	some of the eight Android, like, users, uh, these are known as Android IDs. So,
511520	514980	uh, some Android users, pretty straightforward, you have root, you have
514980	517700	system, you have app, you have user, and then you also have shell for when you
517700	521500	drop the Android shell. Um, something interesting about ADB is it actually
521500	525680	starts off as root, so when you're first getting onto the system and, you know,
525680	531620	you ADB into, you know, your radio system or whatever it may be, um, you're
531620	536140	actually going to, like, initially start off as ADB root starts process, and then
536140	540020	it lowers its privileges, and then it just makes you a shell user. So, if you
540020	544280	find a way to interrupt that, um, then you can pretty much get onto the system
544280	547860	and, you know, start a root shell, or if you find a way to, like, configure the
547860	551900	files in the process because I see Linux isn't, like, mandating properly, it's
552280	555760	going to allow you to just, uh, write onto, like, file, like, specific file
555760	560240	systems, and then, you know, once again, you get root shell. Um, some of the
560240	564820	Android groups on the system, just for network configuration, and, uh, you'll
564820	567920	also see, like, something that looks like users, but are actually just read and
567920	573780	write access to SD cards and other, like, hardware devices on that system. So,
573780	578980	abusing ADB. Um, so some of the things I usually try is, uh, I go to, like,
578980	584860	datalocal.prop, and I try to see if rrosecure is set to one, um, because if
584860	590920	it is, then, uh, I'm pretty much, like, kind of screwed. So, if I can modify
590920	595260	that, then I can actually go in and drop an ADB shell that is add- as root. So,
595260	599480	if I set rrosecure to zero, um, I can get on there as root, or if I go to
600560	604380	rocolonelkimu, uh, and set it to one, then I can also drop a shell as root.
604580	608080	And, um, this is kind of interesting because there's just, like, a ton of
608080	611400	attack vectors that you could use to try to get to this point, such as, like,
611400	615860	you drop a, uh, application onto the system that, you know, gives you a shell,
616280	620900	and then that shell is, uh, able to modify a couple of other files and, like,
620900	626500	rewrite files, right? So, by doing this, you're able to, like, traverse file
626500	632460	systems, but at this point, if you're able to modify those files, then, uh, you
632460	635980	know, you're probably able to just drop a root shell in the first place. Uh, but
635980	639780	this will give you, like, persistent ADB root privileges if you wanted to go and
639780	647580	change those. So, um, a couple of ways to, uh, you know, get root again is you
647580	651020	can go online and find an unlocked bootloader, which is way more prominent
651020	656240	than usual. Um, you can configure your device to be in fast boot mode, and then
656240	661080	once you go into fast boot mode and you update the bootloader, um, you can
661080	665780	compile a binary, like supersu, onto their system, and then you can either
665780	670680	privask or do anything else, or once again, you can modify, uh, local.prop to
670680	676540	allow root, uh, once ADB is active. So, we're going to go into a little bit of
676540	679600	hardware hacking, because hardware hacking also has some, like, very
679600	684700	interesting stuff that usually drops you into root shells. Um, so, you are, it's
685760	689680	a very big hardware hacking one. This is actually a picture I took of, uh, one of
689680	694880	the things I had to do, and it's, like, awful, um, but bear with me. So, uh, when
694880	699100	do you try hardware hacking? Um, I wish I could say it was at the end of
699100	703980	everything else I've done in these slides, um, but usually I go right for it
703980	707640	right at the start, and I always break something, and it, like, ends up never
707640	712880	working at the end, um, so that's why you buy multiple systems. And, like, a
712880	716900	little bit about UART is, uh, uh, like, UART was probably my first introduction
716900	720940	to hardware hacking in general. Um, identifying TX and RX, uh, and ground
720940	725360	pads are pretty straightforward. Um, more examples will be on the way. And,
725360	729260	uh, pretty much when you, like, set up UART, you're, all you're gonna do is,
729260	736260	like, solder a couple pins onto a board, and, uh, connect a UART to USB cable,
736620	740480	and pretty much, um, find, like, a specific baud rate, which is, like, a
740480	744120	clock speed for this, and then drop into some type of system shell, or you're
744120	746980	gonna have to, like, interrupt the boot process to, like, drop into some system
746980	752220	shell. So, uh, for example, this was one of the UARTs I found in a specific
752220	757040	infotainment system owned by JVC. Um, and pretty much you have TX, RX, and then
757040	760740	you have ground up on the top. This was before I touched it. This is what it
760740	766660	looked like after I touched it, um, because I suck at soldering. So, I tried
766660	770940	to, I tried to solder just TX and RX, and I thought I'd be good soldering
770940	774380	ground to somewhere else because the pads were just way too close to a lot of
774380	777900	things on the board. And then when I went to go finally solder the, uh, ground
777900	783560	pin, I actually broke off the pad and the pin that I, uh, soldered onto RX
783560	788340	before. So, I had to pretty much, uh, scratch out, uh, this line right here,
788340	794420	and then I had to solder pins directly to that copper spot, um, just to try to
794420	798200	get, like, the flow of traffic again, uh, which actually worked, surprisingly.
798200	802060	And I got the advice, uh, from someone on Twitter, which is, uh, fairly
802060	807680	interesting. Uh, and I mean, usually once I drop into a shell, this always
807680	810520	drops me into a rich shell. This is why I, like, go for this attack vector
810520	815380	first because I could waste, like, 20, 25 minutes, like, enumerating a bunch
815380	820700	of stuff, like, uh, like via ADB or, like, via, like, some QNX system or,
820700	823740	like, uh, enumerating, like, wireless connections that it's making or trying
823740	827440	to intercept sockets traffic to a web server. Um, but a hardware attack is
827440	833320	just so much faster sometimes. So, why waste the time? Um, and the reason you
833320	835640	want to waste the time, like, looking for is just because of, uh,
835640	838500	documentation. You can go through and, like, document literally everything
838500	841420	from beginning to end once you do this. But if you want to drop into a rich
841420	844220	shell immediately, you just get more system access and you get to see what
844220	847880	everything is doing when you're trying to enumerate everything else, uh, which
847880	852380	is really nice. So, another big method that, uh, I actually learned on a
852380	856160	Russian forum was reflashing chips. So, that chip that's actually right in
856160	860080	front of the, uh, pins that I soldered on or, uh, the wires I soldered on,
860080	863760	pretty much. Uh, you can actually remove that and you can buy a device on
863760	869020	Amazon for, like, $40. And pretty much all you do is you have to, like, take
869020	873120	that cable, connect it to it, uh, take this clip, put it on top of the chip or
873120	876120	you can desolder the chip and put it into this, uh, nice little setup here
876620	880520	and you're pretty much able to just dump all the flash from it. So, on that
880520	885260	flash, you pretty much get, like, the whole file system and you're pretty
885260	889100	much able to modify parts of it. Um, you can dump it, you can binwalk it, you
889100	894760	can extract stuff, um, like Yass file system, things like that. And after
894760	898840	that, you can just re-upload it because this also writes to that flash. Um, so
898840	902180	you're able to just re-write the file system if you wanted to. Um, but to do
902180	904980	that, you want to kind of do it in, like, the least, uh, evasive way as
904980	908580	possible so you don't re-write the whole file system and, uh, screw a ton
908580	914900	of stuff up. But, uh, yeah, that's, uh, that's pretty much it. So, I kind of
914900	918340	have, like, a couple more minutes for questions or anything if anyone wants
918340	921720	to ask some. This is my first talk, so I'm, like, very nervous. So, if I went
921720	950500	too fast, please let me know. Thank you. What's up? Thank you. Right. That's a
950500	953440	good question. Um, so, getting, like, the SC Linux policy is probably going to
953440	956760	be your best bet. Um, other than that, finding global read and write files
956760	960300	that are, like, running under, uh, certain users. So, like, looking at, like,
960300	963440	processes, finding out which users are running which processes, and then
963440	966120	seeing if those files are just global read and write is also a big attack
966120	971660	vector that a lot of people use. Um, so, like, I've seen, try not to break
971660	975800	NDA once again, uh, I've seen some systems from some very big
975800	981660	manufacturers, uh, run a shell script that, uh, pretty much is able, is, like,
981660	985040	global read and write, and when you, like, put an APK that has a reverse
985040	988540	shell that drops you to a system app shell, um, you're able to write to that
988540	993040	shell script file and then just, like, pivot into a root shell after that. Um,
993040	997260	which is weird. I don't know why people set it up that way, but it's mostly
997260	1000660	just going after, like, small misconfigurations like that within SC
1000660	1005300	Linux because SC Linux is so strong if you can implement the policy properly.
1005820	1008920	Um, but yeah, mostly just going for, like, global read and write files is
1008920	1013080	going to be, like, the best way to, like, pivot to a root shell on a system
1013080	1018360	after you upload a malicious APK. Yeah, or you can, like, uh, like, try to find
1018360	1023340	ways to, like, unlock the bootloader and, like, uh, pretty much upload, like,
1023340	1029420	super sue APK and then try to sue. Um, that's also a good one. So, yeah. Any
1029420	1034020	other questions? Alright, thank you.
