# Automotive Cybersecurity Application Based on CARDIAN
## 1 Introduction  
As we can seen in CARDIAN project [1], the CAN protocol was conceived in the 1980s by Robert Bosch GmbH for connecting ECUs and is still the main communication protocol used in the automotive environment today [2]. The standard that regulates the protocol defines the physical level and the data-link level; the other levels of the ISO/OSI model are therefore established by the network designer. The type of communication is serial and asynchronous; furthermore, it allows multi-master type communication. The communication system is of a differential type, and based on the configuration, the dominant or recessive bit level can be chosen; in fact, we speak of wired and coding when the dominant bit is 0 and wired or decoding when the dominant bit is 1. This type of coding occurs by connecting the various nodes of the network in parallel through ports. The communication protocol is based on sending messages, which will always be equipped with an ID field and which can be equipped with a data field. The ID field intrinsically contains the concept of priority, as it is the first part of the message to be transmitted, depending on the coding installed on the bus; a higher (wired or) or lower (wired and) ID may have a higher priority than another. Each ECU can participate in the communication both in transmission and in reception. In the event that two messages are produced simultaneously, the message with the highest priority will be sent, while the \"conflicting\" message will be blocked and sent as soon as the bus is free again. The CAN architecture was designed to be lightweight and robust, unencrypted, unsegmented and authentication-free, so that CAN messages can flow freely to and from each ECU. In each vehicle, there are 2 CAN buses: one at high speed, with a baud rate ranging from 40 kbit/s up to 1 Mbit/s, used for communication between the nodes critical for the safety of the vehicle and the driver, and for command transmission, and one at low speed, with a baud rate ranging from 40 kbit/s to 125 kbit/s, used for all other ECUs. Cars and light vehicles must comply with the SAE J1979 standard [3], which defines the transmission and decoding of the parameters necessary for vehicle diagnostic operations. Heavy vehicles (buses, trucks, etc.) must, however, comply with the SAE J1939 protocol [4]. These standards define the communication protocol, the connector to use, the data format and their decoding using dedicated dbc files. The integration of services and functions inside a car has introduced the presence of numerous attack surfaces [5]. These interfaces can be divided according to their access point and according to their range of action:  
* Physical access point: access occurs by connecting a device directly to the CAN network; this can occur via a USB port connected to the infotainment system, by accessing the OBD port, etc. * Short-range access points: access occurs via a connection with a device that can be located up to a maximum of 300 m away. * Long-range access points: access occurs via connection to the Internet; the device connected to the network can be attacked, and controlled, by devices very distant from it. A connected vehicle can be connected to the Internet to provide services linked to the manufacturer's proprietary platform or third-party platforms. Based on what was previously stated, the CAN bus presents numerous vulnerabilities [6], in particular:  
* Due to the lack of authentication, every device connected to the bus can transmit and receive all data on the CAN bus. Given its nature, it is not able to prevent unauthorized devices from connecting to the bus and sending harmful messages to all control units. By accessing the bus, hackers can send malicious messages to any ECU on the network. Security in this context is only guaranteed by the lack of documentation: hackers must dedicate time and resources to decode the CAN protocol before they can launch malicious attacks on a particular vehicle. * All control units are connected to the same network.