MICROSAR Cyber Security
Total Page:16
File Type:pdf, Size:1020Kb
MICROSAR Cyber Security 4Th VECTOR INDIA CONFERENCE 2019 V0.2 | 2019-07-25 Cybersecurity Realization in u Automotive Systems Basics of Cryptography Use Cases Secure Onboard Communication Cybersecurity Architecture Secured Communication Configuration Configuration of Security Manager in CANoe Vector Company Overview Cybersecurity Realization in Automotive Systems © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Goals of Cyber Security u Authenticity: u Confidentiality: Allows to determine whether someone or Ensures that the necessary level of secrecy is something is, in fact, who or what it is declared enforced and prevents unauthorized disclosure of to be. information. u Integrity: u Availability: Allows to assure the accuracy and reliability of Availability protection ensured reliability and information and allows to prevent or detect timely access to data and resources to authorized unauthorized modification individuals 3 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Layered Security Concept – The logical view Associated Security Concepts Secure External Communication u Secure communication to services outside the vehicle Secure External Secure Off Board Com. Communication u Intrusion detection mechanisms u Firewalls Secure Gateways u Key Infrastructure / Vehicle PKI Secure In-Vehicle u Authenticity of messages Communication u Integrity and freshness of messages Secure On Board Com. u Confidentiality of messages u Key storage u Secure boot and secure flash Secure Platform u Crypto library u HW trust anchor (HTA) u E.g. : HSM ( Hardware Security Modules ) 4 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Security Mechanisms in Vehicle Architecture Diagnostic Interface Head Unit Instrument DSRC 4G LTE Cluster Powertrain CU DC Central Connectivity Gateway Gateway Chassis DC Laptop Body Tablet DC Smart- phone ADAS Smart DC Charging Firewall Monitoring / Logging Secure On Board Com. Secure Flash/Boot Key Infrastructure Hypervisor Secure Off Board Com. Crypto Primitives Intrusion Detection / Prevention Download Manager 5 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Cyber Security Lifecycle Asset Definition Security Validation Threat and Risk Assessment Penetration Testing Derivation of Security Goals Fuzz Testing Security Architecture Design & Analysis Functional Security Testing Cyber Security does Security Mechanisms not start or end with Design & Analysis cryptography: Similar to Safety, Secure Implementation of Nominal Function and Security needs to be Security Mechanisms an integrated part of the development Incident Management and Response process 6 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Safety & Security - Interdependency Dependable Automotive Systems Accident Attack Functional Safety Cyber Security Protection against risks Protection against risks from technical failures from malicious actions 7 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Cybersecurity Realization in Automotive Systems Hardware Support - Hardware Trust Anchors Hardware Security Module (HSM) Secure Hardware Extension (SHE) Controller Secure Zone SHE – Secure Hardware Extension AES Control CPU Logic RAM + Flash + ROM Peripherals (CAN, UART, ...) 8 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Agenda Cybersecurity Realization in Automotive Systems u Basics of Cryptography Use Cases Secure Onboard Communication Cybersecurity Architecture Secured Communication Configuration Configuration of Security Manager in CANoe Vector Company Overview 9 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Hash Functions Symmetric Cryptography 100110110001101 001001010110011 110011000110011 0101110… 101101101.. 101101101.. Enc(x) Dec(x) Q?“D/7L$§.. Q?“D/7L$§.. Q?“D/7L$§.. H(x) Message Authentication Code (MAC) Hashed Message-Authentication-Code (HMAC): Uses a hash function and a secret (symmetric) key. Cipher-based Message-Authentication-Code (CMAC): |10011011001101110| Use a block cipher (e.g. AES) and the key 10 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Asymmetric Cryptography u Asymmetric cryptosystems are based on a key pair owned by a party. u The key pair consists of a public key and a private key. u Public key can be known by the public. u A Private Key shall never be shared. u Messages can be 101101101.. u encrypted with the public key and the cipher function M‘=E(M, Kpub). k D(M’) E(M) public u decrypted with the decryption function and the private key M=D(M‘, Kpriv) kprivate u There is no way the private key can be calculated. Q?“D/7L$§.. 11 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Asymmetric vs. Symmetric Cryptography Symmetric Asymmetric Key One single secret key Key pair (One public and one private key) Key length Relatively short Relatively long Data throughput rate Very fast especially with HW support Always much slower than symmetric Secrecy Secret has to be shared with each Secret (private key) is kept to its involved communication partner owner, public key is shared Key management Complexity grows with number of Complexity is linear with number involved communication partners of number of communication partners 12 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Digital Signature - Principles Goals : authenticity and integrity of data u The originator needs to have a generated Public-Private key pair. u The originator uses the following process to generate a signature u Calculate Hash Value for the Data u Resulting hash value is encrypted using the private key of the originator u Signature is appended to the data and sent over to the user u The user uses the following signature verification process u Decrypts the hashed value with the originator's public key u calculates the hash of the data u compares the hashed data and decrypted hashed value u If they are the same, then the authenticity and integrity of data can be assured [1] u Standards for Digital Signatures are set forth in FIPS 186 13 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Certificates Certificates u … used to identify communication partners u … contains signed personal characteristics of the owner (name, place, …) u … can be restricted to a limited period of time, service and location. u … can be provided by a „Trusted Authority“ (TA) or „Certificate Authority“ (CA)), which is the trust anchor and has built the signature within the certificate. TA C T1 T2 14 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Certificates - Example for Automotive PKI OEM Root Certificate, Root CA Kpub CA Self signed Issuer tbsCert Kpub CA Kpriv CA Signature C Sign(Root CA) = SignAlgo( tbsCert (Root CA), K(Priv RootCA) ) Platform CA Tester CA K K Issuer pub PCA Issuer pub TCA Kpub PCA Kpub TCA K K Signature C priv PCA Signature C priv TCA Sign(PlatformCA) = SignAlgo( tbsCert (PlatformCA), K(Priv RootCA) ) Sign(TesterCA) = SignAlgo( tbsCert (TesterCA), K(Priv RootCA) ) Car Cert Tester Cert K K Issuer pub car Issuer pub Tester K pub car … Kpub Tester … K K Signature C priv car Signature C priv Tester Sign(CarCA) = SignAlgo( tbsCert (CarCA), K(Priv PlatformCA) ) Sign(CarCA) = SignAlgo( tbsCert (CarCA), K(Priv TesterCA) ) 15 © 2019. Vector Informatik India Private Limited. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.2 | 2019-07-25 Basics of Cryptography Transport Layer Security (TLS 1.2) u Application data can be reliably exchanged on an IP based Network by the Transport Control Protocol (TCP), but, TCP does neither ensure privacy, nor integrity of the exchanged data. u To protect a TCP connection, the Transport Layer Security Protocol (TLS 1.2, RFC5246) can be used. u Privacy is ensured by Symmetric Cryptography (e.g. AES). u Data integrity is ensured by a Hash-based Message