WEBVTT

00:00.000 --> 00:01.760
Hello everyone.

00:02.040 --> 00:04.580
Thank you for attending this presentation.

00:04.820 --> 00:11.940
This is my first time presenting in English, so I appreciate your understanding if there are any mistakes.

00:11.940 --> 00:15.500
Today, we will discuss the topic Inside Dash Cam.

00:16.840 --> 00:18.200
Thank you.

00:18.300 --> 00:21.400
Before we begin, let's introduce ourselves.

00:21.400 --> 00:25.520
I am Hyojin Lee, and the other speaker is Hanyeol Park.

00:25.520 --> 00:30.580
We are researchers at Xi'an, the XIOT security convergence company.

00:30.660 --> 00:40.320
We have been conducting research and development on automated Xi'an firmware SECA solutions and are continuously advancing our work.

00:41.700 --> 00:45.020
Our agenda for today is as follows.

00:45.020 --> 00:55.740
First, we will provide an overview of dash cams, including market size, reasons for choosing this topic, and general information about dash cams.

00:55.740 --> 01:00.880
Following that, we will explain the method used to analyze dash cams.

01:02.720 --> 01:11.900
And then, we will describe the features of dash cams and explore potential zero-day scenarios that may arise from these features.

01:11.900 --> 01:17.400
Finally, we will propose future countermeasures and wrap up the presentation.

01:18.400 --> 01:23.900
Let's begin by providing some preliminary information about dash cams.

01:23.900 --> 01:31.820
There are several dash cam vendors, such as Mobidian, Blackview, Nextbase, and HL Mando.

01:33.200 --> 01:40.060
The global dash cam market was valued at $4.03 billion in 2023.

01:40.180 --> 01:47.820
Experts project a compound annual growth rate of 9.6% from 2024 to 2030.

01:48.220 --> 01:59.960
Unlike in the past, when only SD cards were used, most modern dash cams now use networks for connectivity and are controlled via dedicated apps.

02:00.000 --> 02:06.080
This convenience has played a significant role in contributing to the dash cam market's growth.

02:06.080 --> 02:12.160
However, this technological advancement introduces new security threats.

02:13.820 --> 02:20.060
Despite this, only three CVEs have been reported in the past three years.

02:20.060 --> 02:27.960
To raise awareness about dash cam security and contribute to a safer market, we have chosen this topic.

02:28.500 --> 02:30.600
It looks delicious, right?

02:31.340 --> 02:39.260
We analyzed a total of nine dash cams, four from Korea, one from China, and four built-in models.

02:39.500 --> 02:42.500
Here are the features we discovered by type.

02:42.720 --> 02:50.220
Korean dash cams generally provide firmware downloads on their official websites and some offer cloud services.

02:50.340 --> 02:57.940
Chinese dash cam also offers firmware downloads on their official websites, and we found 10 airports open.

02:58.280 --> 03:06.500
Built-in dash cams typically do not provide firmware downloads on their official websites and use the RTSP protocol.

03:07.040 --> 03:16.860
Many of built-in dash cams are OEM devices, which means they are manufactured by one company and sold under another company's brand.

03:17.140 --> 03:30.060
For OEM devices, if a vulnerability is discovered in one device, it can potentially affect devices, highlighting the critical importance of implementing robust security measures.

03:31.480 --> 03:43.040
Dash cam connectivity can be categorized into three types, connecting via Bluetooth and dash cam Wi-Fi, connecting through a phone's hotspot, and communicating via the cloud.

03:43.080 --> 03:47.400
We'll explore these categories in detail on the next slide.

03:48.500 --> 03:56.000
First, the app connects to the dash cam via Bluetooth, then the dash cam activates AP mode.

03:56.180 --> 04:04.100
Once the app connects to the dash cam's Wi-Fi, communication between the app and the dash cam is established.

04:05.360 --> 04:17.080
By configuring the phone's hotspot to align with the dash cam's Wi-Fi settings, and activating the hotspot, the dash cam can establish and communicate through it.

04:18.440 --> 04:26.700
In cloud communication, the dash cam's AP mode remains activated, and no need Bluetooth connection.

04:26.760 --> 04:38.400
Begin by connecting to the dash cam's Wi-Fi, then translate the router's SSID and password to connect the dash cam to the internet and enable cloud functionality.

04:39.040 --> 04:44.860
Communication between the app and the dash cam is managed through the cloud.

04:45.480 --> 04:51.360
Now, let's review the method we employed to analyze the dash cams.

04:52.520 --> 04:59.400
Before beginning the analysis, it's essential to obtain the firmware.

04:59.400 --> 05:07.560
This is crucial for tasks such as decompiling code, analyzing the file system, and understanding the boot logic.

05:07.560 --> 05:11.420
There are four primary methods to obtain firmware.

05:11.940 --> 05:17.380
The first method is to download it from the official website.

05:18.580 --> 05:24.760
The second method involves using debugging ports such as UART or JTAG.

05:24.760 --> 05:34.120
During our analysis, we found the UART port as illustrated in the picture, soldered connecting cables, and accessed the shell.

05:36.720 --> 05:41.880
Here are the statistics for UART shells found in the analyzed devices.

05:41.940 --> 05:49.340
Out of nine devices, five had UART shells, and four of these allowed shell access without a password .

05:49.620 --> 05:52.480
One of these four had a custom shell.

05:54.480 --> 06:03.880
Using the debugging shell obtained earlier, you can copy the firmware to an SD card, connect the SD card to a laptop, and extract the firmware.

06:05.480 --> 06:10.620
All the analyzed dashcams have firmware upgrade functionality.

06:10.840 --> 06:21.240
The third method involves analyzing this functionality to either obtain the firmware download URL or capture package to get the latest firmware.

06:22.420 --> 06:28.140
The final method involves extracting firmware from APK files.

06:28.140 --> 06:31.520
Many recent dashcams come with dedicated apps.

06:31.520 --> 06:40.480
By installing the app and accessing the ADB shell, you can find firmware-related APK files in the app's installation directory.

06:40.820 --> 06:46.480
Extracting and decompressing these files can provide access to the firmware.

06:47.880 --> 06:54.700
Most of the analyzed dashcams allowed us to obtain firmware from their official websites.

06:54.700 --> 07:01.080
We successfully retrieved firmware for all devices, and none of the firmware was encrypted.

07:02.860 --> 07:08.000
The next step is to extract the file system from the obtained firmware.

07:08.200 --> 07:15.800
Tools such as binoc and 7zip can be used for this purpose as illustrated in the picture.

07:16.720 --> 07:21.520
The second step in the analysis process is port scanning.

07:21.520 --> 07:30.700
Using the nmap tool, we can identify open ports on the dashcam, analyze services, and discover potential security vulnerabilities.

07:30.880 --> 07:37.100
For instance, if port 21 is open, we might attempt an FTP connection.

07:37.100 --> 07:42.840
Similarly, if port 80 is open, it suggests the presence of a web service.

07:43.400 --> 07:48.100
Here are the statistics for open ports on the analyzed devices.

07:48.100 --> 07:57.760
Among the well-known ports, FTP, telnet, DNS, HTTP, RPC, and RTSP ports were frequently open.

07:58.760 --> 08:03.860
The third step in the analysis process is analyzing boot logic.

08:03.860 --> 08:16.120
We examine files in etc-init-daemon, etc-rc-local, and system-daemon configuration files to identify and analyze the scripts executed during boot.

08:16.120 --> 08:26.720
For example, the picture shows the RCS file in etc-init-daemon, which runs all files starting with S in etc-init-daemon.

08:26.960 --> 08:32.320
We analyze the code of all S files to understand the boot logic.

08:32.700 --> 08:39.180
Next, we access the shell obtained via UART, JTAG, or other vulnerabilities.

08:39.320 --> 08:48.220
By using the ps command, we can identify running processes and understand how service operations and main binaries.

08:48.260 --> 08:55.320
The nested command helps us identify open ports and the binaries using those ports.

08:55.480 --> 09:02.840
This information provides valuable insights into the current state of the system and the services that are running.

09:04.160 --> 09:09.340
Now, he will discuss the process of debugging the main binary.

09:13.840 --> 09:16.480
Hi, I'm Hanyeol Park.

09:16.480 --> 09:19.720
I'll continue the presentation by discussing the next topic.

09:20.440 --> 09:27.360
For convenience, tools such as GDB and BusyBox can be stored in the SD card directory for easy access.

09:28.520 --> 09:38.360
We decompiled the main binary and tracked vulnerable functions such as system, beopen, string copy, get, and scanf for code analysis.

09:39.440 --> 09:45.880
Using our R&D solution, gIoT, we were to quickly and easily visualize and analyze the vulnerabilities.

09:47.960 --> 09:55.360
Using the UART shell, we proceeded with debugging by utilizing the GDB binary stored on the SD card.

09:55.680 --> 10:02.120
The example code is a script that gets the PID of the running main binary and executes GDB.

10:03.340 --> 10:07.000
Running this script connects directly to GDB for debugging.

10:08.180 --> 10:14.440
This allows us to analyze the main binary's behavior in real time and debug any vulnerabilities.

10:16.280 --> 10:23.960
During debugging, the watchdog timer, which detects system unresponsiveness, caused the device to reboot.

10:25.100 --> 10:30.020
We tried many things, but it was quite challenging to bypass the watchdog.

10:31.140 --> 10:38.240
Even though we made it, we managed to crack it in three cases, and we'd like to share those with you.

10:40.080 --> 10:46.480
In the first case, the initial script executed at boot contained a function to stop the watchdog.

10:46.800 --> 10:50.600
We used this function to execute the corresponding command.

10:51.360 --> 11:01.060
For instance, writing the value 1A3A to test register stops the watchdog, allowing us to dynamically debug the main binary with GDB.

11:03.720 --> 11:10.300
In the second case, we repeatedly pressed Ctrl-G during boot to interrupt the boot script.

11:10.360 --> 11:20.820
Then, we executed the code to disable the watchdog and resume the script, enabling dynamic debugging of the binary with GDB.

11:23.370 --> 11:28.850
In the third case, we entered the boot loader and modified the boot arguments.

11:29.190 --> 11:34.550
By repeatedly pressing ESC and F1, we accessed the boot loader.

11:35.270 --> 11:43.630
In the boot arguments, we modified the init value from Linux.hash to bin.sh and added the value no-watchdog.

11:44.530 --> 11:52.190
After that, we manually executed the initial script line by line and used GDB to debug the main binary.

11:56.300 --> 12:06.280
Protocol analysis capturing the analyzing communication packets between the app and the dashcam, or analyzing APK code and dashcam binary code.

12:07.240 --> 12:17.500
Among the analyzed devices, six used custom protocols, four had web interfaces, two supported cloud services, and one used encrypted communication.

12:18.520 --> 12:26.000
For encrypted communication, we can use Frida to hook the app and inspect plain text packets.

12:29.340 --> 12:35.760
Among the analyzed dashcams, here are the custom protocol formats for four devices.

12:37.540 --> 12:42.100
Custom protocol formats are mainly divided into HEX and JSON formats.

12:42.480 --> 12:54.020
Bvendor's request format is in HEX, consisting of four bytes for dummy data, two bytes for the command number, two bytes for command number, and four or more bytes for the parameters.

12:54.780 --> 13:01.800
In this example, since there are no parameters, four bytes of data are sent to represent null values.

13:03.120 --> 13:13.160
And vendor's request format consists of four bytes of command number, four bytes for packet length, four bytes for command number, and four or more bytes for the parameters.

13:13.680 --> 13:19.100
In this example, the parameter is sent as cmd equals set semicolon.

13:21.660 --> 13:27.440
Next, tvendor's request format is in JSON and consists of three keys.

13:27.640 --> 13:35.380
A token generated at the session start, a command number labeled message underscore id, and a parameter labeled param.

13:37.200 --> 13:42.520
Hvendor's request format is similar to tvendor's, but has slight differences.

13:42.820 --> 13:53.680
It consists of a token incremented by one from the previous request token, a command number labeled message id, and a parameter labeled param.

13:54.580 --> 14:03.640
Each vendor's custom protocol format has a unique structure, and analyzing these formats helps us understand the communication content.

14:04.920 --> 14:08.320
Now, we will discuss zero-day scenarios.

14:10.460 --> 14:13.240
Dash cams have the following features.

14:13.600 --> 14:20.160
They use SD cards for video strategy, and they employ the RTSP protocol for live view functionality.

14:21.800 --> 14:29.300
They offer settings for Wi-Fi, ADAS, GPS, firmware updates, and communication via custom protocols.

14:29.940 --> 14:36.400
Let's explore which vulnerabilities are associated with these features in the next slide.

14:38.340 --> 14:43.900
The use of SD card is associated with the shell script execution vulnerabilities.

14:44.460 --> 14:46.520
Let's explore this scenario.

14:47.720 --> 14:52.880
The boot script includes code that executes test shell from the SD card path.

14:53.780 --> 15:02.480
An attacker can create a test shell file on the SD card with a script using a tele-demon binary to open a tele-connection.

15:03.400 --> 15:14.640
When the SD card is inserted into the dash cam and the device is booted, the boot script runs test shell, which enables tele-access and allows the attacker to gain a share.

15:16.700 --> 15:24.160
The live view feature provided through the RTSP protocol is associated with the stack buffer overflow vulnerabilities.

15:25.280 --> 15:33.240
An attacker crafts an RTSP request for live view and hooks the app library to modify the RTSP header data.

15:34.260 --> 15:43.780
If the dash cam does not properly check the request length when receiving data, a stack buffer overflow can occur and potentially altering the PC register.

15:45.220 --> 15:53.080
By gathering gadgets for the buffer overflow attack and performing gadget chaining, the attacker can exploit this vulnerability to gain a share.

15:56.050 --> 16:03.770
The settings for Wi-Fi, ADAS, GPS, and other features can lead to OS command injection vulnerabilities.

16:04.850 --> 16:13.490
When sending device configuration packets, an attacker can manipulate the data using a proxy tool with backticks and $().

16:14.750 --> 16:24.390
If the dash cam does not validate special characters and uses this data as parameters for system functions, OS command injection can occur.

16:25.910 --> 16:29.230
This can allow the attacker to take control of the system.

16:31.290 --> 16:38.290
The feature of app and dash cam communication via custom protocols can lead to improper authentication vulnerabilities.

16:39.510 --> 16:44.930
Capturing a packet requesting the file list from the app shows the data in hex format.

16:46.250 --> 17:01.090
The packet consists of four bytes representing the command number for the file list request, followed by four bytes for the packet length, another four bytes for the command number, and finally four bytes for the parameter, which is null in this case.

17:03.050 --> 17:09.470
By replicating the same packet and sending it to the dash cam, the response will yield the file list.

17:13.210 --> 17:20.650
After capturing the SD card format packet, you can perform a replay attack to execute the function.

17:21.610 --> 17:27.610
Additionally, all functions can be accessed without authentication, and you can try a replay attack.

17:30.760 --> 17:33.420
Finally, let's move on to the conclusion.

17:36.510 --> 17:42.070
Across the nine analyzed dash cams, we discovered eight types of CWEs.

17:44.430 --> 17:49.570
Based on these findings, we have outlined our recommendations and future work.

17:49.850 --> 17:53.270
First, we need to remove script execution code.

17:53.770 --> 17:59.950
Remove script execution code from the SD card path used for developer testing.

18:00.130 --> 18:03.910
Second, enhance communication security.

18:04.230 --> 18:08.470
Add authentication and verification processes during communication.

18:09.430 --> 18:12.330
Third, input validation.

18:12.770 --> 18:20.350
Implement thorough input validation for special characters and length values to prevent security vulnerabilities.

18:22.780 --> 18:32.040
In closing, throughout this presentation, we aim to raise awareness about the potential security threats associated with dash cams.

18:32.200 --> 18:41.900
We hope to encourage dash cam manufacturers to develop more secure products, ultimately leading to safer and more reliable devices for consumers.

18:42.980 --> 18:51.960
Due to our limited ability to provide prompt answers, we are unable to open the floor for real-time Q&A during this presentation.

18:52.520 --> 19:00.880
However, please use the QR code displayed above to contact our company or send an email with your inquiries.

19:01.440 --> 19:06.040
We are committed to provide detailed responses to your questions.

19:09.040 --> 19:14.580
We extend our gratitude to the IoT Village team for giving us this opportunity to present.

19:14.580 --> 19:17.260
Thank you for listening to our presentation.

