Added [in-progress] Developer Guides
[AGL/documentation.git] / docs / 2_Architecture_Guides / 2.2_Security_Blueprint / 7_Connectivity / 1.2.7.1_Bus_And_Connectors.md
1 ---
2 title: Bus and connectors
3 ---
4
5 # Bus
6
7 We only speak about the **CAN** bus to take an example, because the different
8 attacks on bus like _FlewRay_, _ByteFlight_, _Most_ and _Lin_ use retro
9 engineering and the main argument to improve their security is to encrypt data
10 packets. We just describe them a bit:
11
12 - **CAN**: Controller Area Network, developed in the early 1980s, is an
13   event-triggered controller network for serial communication with data rates up
14   to one MBit/s. **CAN** messages are classified over their respective
15   identifier. **CAN** controller broadcast their messages to all connected nodes
16   and all receiving nodes decide independently if they process the message.
17 - **FlewRay**: Is a deterministic and error-tolerant high-speed bus. With a data
18   rate up to 10 MBit/s.
19 - **ByteFlight**: Is used for safety-critical applications in motor vehicles
20   like air-bags. Byteflight runs at 10Mbps over 2 or 3 wires plastic optical
21   fibers.
22 - **Most**: Media Oriented System Transport, is used for transmitting audio,
23   video, voice, and control data via fiber optic cables. The speed is, for the
24   synchronous way, up to 24 MBit/s and asynchronous way up to 14 MBit/s.
25   **MOST** messages include always a clear sender and receiver address.
26 - **LIN**: Local Interconnect Network, is a single-wire subnet work for
27   low-cost, serial communication between smart sensors and actuators with
28   typical data rates up to 20 kBit/s. It is intended to be used from the year
29   2001 on everywhere in a car, where the bandwidth and versatility of a **CAN**
30   network is not required.
31
32 On just about every vehicle, **ECU**s (**E**lectronic **C**ontrol **U**nits)
33 communicate over a CAN bus, which is a two-wire bus using hardware arbitration
34 for messages sent on the shared medium. This is essentially a *trusted* network
35 where all traffic is visible to all controllers and any controller can send any
36 message.
37
38 A malicious **ECU** on the CAN bus can easily inject messages destined for any
39 other device, including things like the instrument cluster and the head unit.
40 There are common ways for hardware to do USB to CAN and open source software to
41 send and receive messages. For example, there is a driver included in the Linux
42 kernel that can be used to send/receive CAN signals. A malicious device on the
43 CAN bus can cause a great number of harmful things to happen to the system,
44 including: sending bogus information to other devices, sending unintended
45 commands to ECUs, causing DOS (Denial Of Service) on the CAN bus, etc.
46
47 <!-- section-config -->
48
49 Domain                             | Tech name | Recommendations
50 ---------------------------------- | --------- | --------------------------------------------------------------------------
51 Connectivity-BusAndConnector-Bus-1 | CAN       | Implement hardware solution in order to prohibit sending unwanted signals.
52
53 <!-- end-section-config -->
54
55 See [Security in Automotive Bus
56 Systems](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.728&rep=rep1&type=pdf)
57 for more information.
58
59 # Connectors
60
61 For the connectors, we supposed that they were disabled by default. For example,
62 the **USB** must be disabled to avoid attacks like BadUSB. If not, configure the
63 Kernel to only enable the minimum require **USB** devices. The connectors used
64 to diagnose the car like **OBD-II** must be disabled outside garages.
65
66 <!-- section-config -->
67
68 Domain                                    | Tech name | Recommendations
69 ----------------------------------------- | --------- | ----------------------------------------------------------------------
70 Connectivity-BusAndConnector-Connectors-1 | USB       | Must be disabled. If not, only enable the minimum require USB devices.
71 Connectivity-BusAndConnector-Connectors-2 | USB       | Confidential data exchanged with the ECU over USB must be secure.
72 Connectivity-BusAndConnector-Connectors-3 | USB       | USB Boot on a ECU must be disable.
73 Connectivity-BusAndConnector-Connectors-4 | OBD-II    | Must be disabled outside garages.
74
75 <!-- end-section-config -->