start	end	text
0	7020	Hello everyone. Thank you for attending this presentation. This is my first time presenting in
7020	13220	English, so I appreciate your understanding if there are any mistakes. Today, we will discuss
13220	22800	the topic Inside Dash Cam. Thank you. Before we begin, let's introduce ourselves. I am Hyojin Lee,
22800	28680	and the other speaker is Hanyeol Park. We are researchers at Xi'an, the XIOT security
28680	34940	convergence company. We have been conducting research and development on automated Xi'an
34940	40320	firmware SECA solutions and are continuously advancing our work.
41700	48620	Our agenda for today is as follows. First, we will provide an overview of dash cams,
48620	55740	including market size, reasons for choosing this topic, and general information about dash cams.
55740	60880	Following that, we will explain the method used to analyze dash cams.
62720	69020	And then, we will describe the features of dash cams and explore potential zero-day scenarios
69020	75900	that may arise from these features. Finally, we will propose future countermeasures and wrap up
75900	83900	the presentation. Let's begin by providing some preliminary information about dash cams.
83900	91820	There are several dash cam vendors, such as Mobidian, Blackview, Nextbase, and HL Mando.
93200	102340	The global dash cam market was valued at $4.03 billion in 2023. Experts project a compound annual
102340	112540	growth rate of 9.6% from 2024 to 2030. Unlike in the past, when only SD cards were used,
112540	118640	most modern dash cams now use networks for connectivity and are controlled via dedicated
118640	124980	apps. This convenience has played a significant role in contributing to the dash cam market's
124980	132160	growth. However, this technological advancement introduces new security threats.
133820	140060	Despite this, only three CVEs have been reported in the past three years.
140060	145800	To raise awareness about dash cam security and contribute to a safer market,
145800	154580	we have chosen this topic. It looks delicious, right? We analyzed a total of nine dash cams,
154580	161500	four from Korea, one from China, and four built-in models. Here are the features we discovered by
161500	167160	type. Korean dash cams generally provide firmware downloads on their official websites
167160	173780	and some offer cloud services. Chinese dash cam also offers firmware downloads on their
173780	180840	official websites, and we found 10 airports open. Built-in dash cams typically do not provide
180840	188200	firmware downloads on their official websites and use the RTSP protocol. Many of built-in dash
188200	194620	cams are OEM devices, which means they are manufactured by one company and sold under
194620	202140	another company's brand. For OEM devices, if a vulnerability is discovered in one device,
202140	208080	it can potentially affect devices, highlighting the critical importance of implementing robust
208080	215560	security measures. Dash cam connectivity can be categorized into three types,
215560	220360	connecting via Bluetooth and dash cam Wi-Fi, connecting through a phone's hotspot,
220360	227400	and communicating via the cloud. We'll explore these categories in detail on the next slide.
228500	236000	First, the app connects to the dash cam via Bluetooth, then the dash cam activates AP mode.
236180	242560	Once the app connects to the dash cam's Wi-Fi, communication between the app and the dash cam
242560	250340	is established. By configuring the phone's hotspot to align with the dash cam's Wi-Fi settings,
250360	257080	and activating the hotspot, the dash cam can establish and communicate through it.
258440	265260	In cloud communication, the dash cam's AP mode remains activated, and no need Bluetooth
265260	272180	connection. Begin by connecting to the dash cam's Wi-Fi, then translate the router's SSID
272180	278400	and password to connect the dash cam to the internet and enable cloud functionality.
279040	284860	Communication between the app and the dash cam is managed through the cloud.
285480	291360	Now, let's review the method we employed to analyze the dash cams.
292520	301140	Before beginning the analysis, it's essential to obtain the firmware. This is crucial for tasks
301140	307560	such as decompiling code, analyzing the file system, and understanding the boot logic.
307560	311420	There are four primary methods to obtain firmware.
311940	317380	The first method is to download it from the official website.
318580	326540	The second method involves using debugging ports such as UART or JTAG. During our analysis,
326540	332440	we found the UART port as illustrated in the picture, soldered connecting cables,
332440	341880	and accessed the shell. Here are the statistics for UART shells found in the analyzed devices.
341940	348720	Out of nine devices, five had UART shells, and four of these allowed shell access without a
348720	357620	password. One of these four had a custom shell. Using the debugging shell obtained earlier,
357620	363880	you can copy the firmware to an SD card, connect the SD card to a laptop, and extract the firmware.
365480	372920	All the analyzed dashcams have firmware upgrade functionality. The third method involves analyzing
372920	379860	this functionality to either obtain the firmware download URL or capture package to get the latest
379860	389300	firmware. The final method involves extracting firmware from APK files. Many recent dashcams
389300	395560	come with dedicated apps. By installing the app and accessing the ADB shell, you can find
395560	401800	firmware-related APK files in the app's installation directory. Extracting and
401800	410300	decompressing these files can provide access to the firmware. Most of the analyzed dashcams
410300	417060	allowed us to obtain firmware from their official websites. We successfully retrieved firmware for
417060	425060	all devices, and none of the firmware was encrypted. The next step is to extract the
425060	433360	file system from the obtained firmware. Tools such as binoc and 7zip can be used for this purpose
433360	441860	as illustrated in the picture. The second step in the analysis process is port scanning. Using
441860	448300	the nmap tool, we can identify open ports on the dashcam, analyze services, and discover potential
448820	457100	security vulnerabilities. For instance, if port 21 is open, we might attempt an FTP connection.
457100	464780	Similarly, if port 80 is open, it suggests the presence of a web service. Here are the statistics
464780	473520	for open ports on the analyzed devices. Among the well-known ports, FTP, telnet, DNS, HTTP,
473520	482360	RPC, and RTSP ports were frequently open. The third step in the analysis process is analyzing
482360	490300	boot logic. We examine files in etc-init-daemon, etc-rc-local, and system-daemon configuration
490300	498820	files to identify and analyze the scripts executed during boot. For example, the picture shows the
498820	506720	RCS file in etc-init-daemon, which runs all files starting with S in etc-init-daemon.
506960	515480	We analyze the code of all S files to understand the boot logic. Next, we access the shell obtained
515480	522740	via UART, JTAG, or other vulnerabilities. By using the ps command, we can identify running
522740	530140	processes and understand how service operations and main binaries. The nested command helps us
530140	538040	identify open ports and the binaries using those ports. This information provides valuable insights
538040	542840	into the current state of the system and the services that are running.
544160	549340	Now, he will discuss the process of debugging the main binary.
553840	559720	Hi, I'm Hanyeol Park. I'll continue the presentation by discussing the next topic.
560440	566520	For convenience, tools such as GDB and BusyBox can be stored in the SD card directory for easy
566520	573620	access. We decompiled the main binary and tracked vulnerable functions such as system,
573620	580920	beopen, string copy, get, and scanf for code analysis. Using our R&D solution,
580920	585880	gIoT, we were to quickly and easily visualize and analyze the vulnerabilities.
587960	592880	Using the UART shell, we proceeded with debugging by utilizing the GDB binary
592880	599420	stored on the SD card. The example code is a script that gets the PID of the running main
599420	607000	binary and executes GDB. Running this script connects directly to GDB for debugging.
608180	614440	This allows us to analyze the main binary's behavior in real time and debug any vulnerabilities.
616280	621860	During debugging, the watchdog timer, which detects system unresponsiveness,
621860	629040	caused the device to reboot. We tried many things, but it was quite challenging to bypass the
629040	636800	watchdog. Even though we made it, we managed to crack it in three cases, and we'd like to share
636800	644900	those with you. In the first case, the initial script executed at boot contained a function
644900	650600	to stop the watchdog. We used this function to execute the corresponding command.
651360	657860	For instance, writing the value 1A3A to test register stops the watchdog, allowing us to
657860	667180	dynamically debug the main binary with GDB. In the second case, we repeatedly pressed Ctrl-G
667180	673640	during boot to interrupt the boot script. Then, we executed the code to disable the watchdog
673640	680820	and resume the script, enabling dynamic debugging of the binary with GDB.
683370	688850	In the third case, we entered the boot loader and modified the boot arguments.
689190	694550	By repeatedly pressing ESC and F1, we accessed the boot loader.
695270	702070	In the boot arguments, we modified the init value from Linux.hash to bin.sh and added the value
702070	709990	no-watchdog. After that, we manually executed the initial script line by line and used GDB
709990	719320	to debug the main binary. Protocol analysis capturing the analyzing communication
719320	726280	packets between the app and the dashcam, or analyzing APK code and dashcam binary code.
727240	732720	Among the analyzed devices, six used custom protocols, four had web interfaces,
733260	737500	two supported cloud services, and one used encrypted communication.
738520	746000	For encrypted communication, we can use Frida to hook the app and inspect plain text packets.
749340	755760	Among the analyzed dashcams, here are the custom protocol formats for four devices.
757540	762100	Custom protocol formats are mainly divided into HEX and JSON formats.
762480	767840	Bvendor's request format is in HEX, consisting of four bytes for dummy data,
767840	773180	two bytes for the command number, two bytes for command number, and four or more bytes for the
773180	779820	parameters. In this example, since there are no parameters, four bytes of data are sent to
779820	787200	represent null values. And vendor's request format consists of four bytes of command number,
787200	792020	four bytes for packet length, four bytes for command number, and four or more bytes for
792020	799100	the parameters. In this example, the parameter is sent as cmd equals set semicolon.
801660	807440	Next, tvendor's request format is in JSON and consists of three keys.
807640	813080	A token generated at the session start, a command number labeled message underscore id,
813080	820300	and a parameter labeled param. Hvendor's request format is similar to tvendor's,
820300	827660	but has slight differences. It consists of a token incremented by one from the previous request
827660	835600	token, a command number labeled message id, and a parameter labeled param. Each vendor's custom
835600	841720	protocol format has a unique structure, and analyzing these formats helps us understand
841720	848320	the communication content. Now, we will discuss zero-day scenarios.
850460	856300	Dash cams have the following features. They use SD cards for video strategy,
856300	860160	and they employ the RTSP protocol for live view functionality.
861800	867360	They offer settings for Wi-Fi, ADAS, GPS, firmware updates, and communication via
867360	873740	custom protocols. Let's explore which vulnerabilities are associated with these
873740	882640	features in the next slide. The use of SD card is associated with the shell script execution
882640	890000	vulnerabilities. Let's explore this scenario. The boot script includes code that executes
890000	896740	test shell from the SD card path. An attacker can create a test shell file on the SD card
896740	904960	with a script using a tele-demon binary to open a tele-connection. When the SD card is inserted
904960	910840	into the dash cam and the device is booted, the boot script runs test shell, which enables
910840	918920	tele-access and allows the attacker to gain a share. The live view feature provided through
918920	924160	the RTSP protocol is associated with the stack buffer overflow vulnerabilities.
925280	931980	An attacker crafts an RTSP request for live view and hooks the app library to modify the RTSP
931980	939020	header data. If the dash cam does not properly check the request length when receiving data,
939140	943780	a stack buffer overflow can occur and potentially altering the PC register.
945220	949480	By gathering gadgets for the buffer overflow attack and performing gadget chaining,
950100	953080	the attacker can exploit this vulnerability to gain a share.
956050	962170	The settings for Wi-Fi, ADAS, GPS, and other features can lead to OS command injection
962170	969870	vulnerabilities. When sending device configuration packets, an attacker can manipulate the data
969870	977890	using a proxy tool with backticks and $(). If the dash cam does not validate special characters
977890	984390	and uses this data as parameters for system functions, OS command injection can occur.
985910	989230	This can allow the attacker to take control of the system.
991290	996370	The feature of app and dash cam communication via custom protocols can lead to improper
996370	1002470	authentication vulnerabilities. Capturing a packet requesting the file list from the app
1002470	1009470	shows the data in hex format. The packet consists of four bytes representing the command number
1010040	1014570	for the file list request, followed by four bytes for the packet length,
1014570	1019050	another four bytes for the command number, and finally four bytes for the parameter,
1019050	1026990	which is null in this case. By replicating the same packet and sending it to the dash cam,
1026990	1036630	the response will yield the file list. After capturing the SD card format packet,
1036630	1043530	you can perform a replay attack to execute the function. Additionally, all functions can be
1043530	1047610	accessed without authentication, and you can try a replay attack.
1050760	1053420	Finally, let's move on to the conclusion.
1056510	1062070	Across the nine analyzed dash cams, we discovered eight types of CWEs.
1064430	1069570	Based on these findings, we have outlined our recommendations and future work.
1069850	1076650	First, we need to remove script execution code. Remove script execution code from the SD card
1076650	1083910	path used for developer testing. Second, enhance communication security.
1084230	1088470	Add authentication and verification processes during communication.
1089430	1096550	Third, input validation. Implement thorough input validation for special characters and
1096550	1105980	length values to prevent security vulnerabilities. In closing, throughout this presentation,
1105980	1112040	we aim to raise awareness about the potential security threats associated with dash cams.
1112200	1116700	We hope to encourage dash cam manufacturers to develop more secure products,
1116700	1124500	ultimately leading to safer and more reliable devices for consumers. Due to our limited ability
1124500	1130740	to provide prompt answers, we are unable to open the floor for real-time Q&A during this
1130740	1138800	presentation. However, please use the QR code displayed above to contact our company or send
1138800	1146040	an email with your inquiries. We are committed to provide detailed responses to your questions.
1149040	1154580	We extend our gratitude to the IoT Village team for giving us this opportunity to present.
1154580	1157260	Thank you for listening to our presentation.
