A Comprehensive Formal Security Analysis of OPC UA
Vincent Diemunsch, Lucca Hirschi, Steve Kremer
摘要
OPC UA is a standardized Industrial Control System (ICS) protocol, deployed in critical infrastructures, that aims to ensure security. The forthcoming version 1.05 includes major changes in the underlying cryptographic design, including a Diffie-Hellmann based key exchange, as opposed to the previous RSA based version. Version 1.05 is supposed to offer stronger security, including Perfect Forward Secrecy (PFS). We perform a formal security analysis of the security protocols specified in OPC UA v1.05 and v1.04, for the RSA-based and the new DH-based mode, using the state-of-the-art symbolic protocol verifier ProVerif. Compared to previous studies, our model is much more comprehensive, including the new protocol version, combination of the different sub-protocols for establishing secure channels, sessions and their management, covering a large range of possible configurations. This results in one of the largest models ever studied in ProVerif raising many challenges related to its verification mainly due to the complexity of the state machine. We discuss how we mitigated this complexity to obtain meaningful analysis results. Our analysis uncovered several new vulnerabilities, that have been reported to and acknowledged by the OPC Foundation. We designed and proposed provably secure fixes, most of which are included in the upcoming version of the standard. We analyze OPC UA using ProVerif. Given the size and the complexity of our model, and the large number of possible configurations, we provide tooling (Section 4.2) that allows to (i) generate ProVerif models for a particular set of configurations, and threat model; (ii) efficiently explore the lattice of configurations and threat models, and automatically find maximal configurations in which a property holds, as well as minimal configurations in which we find attacks (or reach the limits of ProVerif). Moreover, we used many advanced features of ProVerif [7] to fine tune the model and guide the proof search, to be able to conclude in complex configurations (Section 4.3). We believe that this is among the most complex analyses performed with ProVerif, both due to the size of the model as well as the complexity of the state machine, e.g., the model requires a lot of information to be stored in a global state. To the best of our knowledge, it is the largest ProVerif model in terms of LoC and initial clauses (the internal protocol representation on which ProVerif reasons) ever analyzed. Our analysis allowed to discover 8 new vulnerabilities and other weaknesses in OPC UA v1.05 (Section 5), 6 of these also affect v1.04. Each of these have been responsibly disclosed to and acknowledged by the OPC UA Foundation. We proposed provably secure fixes and other mitigations, most of them are now included in the specification. Finally, we draw more general lessons for the future of OPC UA (Section 5.7). Artifacts. All models, results, and instructions to reproduce them are provided in the companion artifact [17] . OPC UA Protocol Overview We start by presenting the OPC UA protocol version 1.05.03 with a high-level overview of the sub-protocols and their interactions. In this work, we cover the security sub-protocols, namely the secure channel and the session sub-protocols. They are specified in the OPC UA standard, mostly in [26, Parts 4, 6, 7] . They involve three kinds of agents: clients (e.g., user workstations), servers (e.g., SCADA), and users (e.g., humans operating user workstations). Each agent is assumed to be enrolled in a Public Key Infrastructure (PKI) and possesses a certificate that describes its identity and role (e.g., a client certificate 𝐶 cert ) with the associated private key (e.g., 𝐶 sk ); users store them on a smart card or may alternatively use a login password pair. The main flow is depicted in Fig. 1 : a client opens a secure communication channel with a server and creates a session inside this channel. A user on this client can then log in, i.e., activate a previously created session, and use this session to send/receive requests to/from the server. We now briefly present those sub-protocols. User: 𝑈 + (𝑈 pwd | (𝑈 cert ,𝑈 sk )) Client: 𝐶 cert , 𝐶 sk Server: 𝑆 cert , 𝑆 sk OpenChannel (RSA | ECC + Enc | Sign | None) 𝑖𝑑 𝑐 , sk 𝑖𝑑 𝑐 , sk ‖CreateSession(𝑖𝑑 𝑠 , 𝑡𝑜𝑘 𝑠 )‖ 𝑖𝑑 𝑐 ,sk (SSec | SNoAA) 𝑖𝑑 𝑐 , sk, 𝑖𝑑 𝑠 𝑖𝑑 𝑐 , sk, 𝑖𝑑 𝑠 ‖ActivateSession(𝑖𝑑 𝑠 , 𝑡𝑜𝑘 𝑠 , U)‖ 𝑖𝑑 𝑐 ,sk
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Component-Based Formal Analysis of 5G-AKA: Channel Assumptions and Session Confusion 引用了 A Comprehensive Symbolic Analysis of TLS 1.3
- Refinement-based Verification of Cryptographic Protocols with Quantitative Values 引用了 A Comprehensive Symbolic Analysis of TLS 1.3
- Refinement-based Verification of Cryptographic Protocols with Quantitative Values 引用了 The EMV Standard: Break, Fix, Verify
- A Comprehensive Symbolic Analysis of TLS 1.3 引用了 Verified Models and Reference Implementations for the TLS 1.3 Standard Candidate
- The EMV Standard: Break, Fix, Verify 引用了 A Comprehensive Symbolic Analysis of TLS 1.3
- The EMV Standard: Break, Fix, Verify 引用了 A Formal Analysis of 5G Authentication
- A Formal Analysis of 5G Authentication 引用了 A Comprehensive Symbolic Analysis of TLS 1.3
- A Formal Analysis of 5G Authentication 引用了 Verified Models and Reference Implementations for the TLS 1.3 Standard Candidate
引用它的顶会 Paper1
它引用的 Paper9
- A Formal Analysis of 5G AuthenticationDavid A. Basin, Jannik Dreier, Lucca Hirschi, Sasa Radomirovic 等CCS 2018 · 428 次引用
- A Comprehensive Symbolic Analysis of TLS 1.3Cas Cremers, Marko Horvat, Jonathan Hoyland, Sam Scott 等CCS 2017 · 247 次引用
- Verified Models and Reference Implementations for the TLS 1.3 Standard CandidateKarthikeyan Bhargavan, Bruno Blanchet, Nadim KobeissiS&P 2017 · 233 次引用
- Component-Based Formal Analysis of 5G-AKA: Channel Assumptions and Session ConfusionCas Cremers, Martin Dehnel-WildNDSS 2019 · 131 次引用
- The EMV Standard: Break, Fix, VerifyDavid A. Basin, Ralf Sasse, Jorge Toro-PozoS&P 2021 · 69 次引用
相关 Paper
- A comprehensive, formal and automated analysis of the EDHOC protocolCharlie Jacomme, Elise Klein, Steve Kremer, Maïwenn RacouchotUSENIX Security 2023
- ProVerif with Lemmas, Induction, Fast Subsumption, and Much MoreBruno Blanchet, Vincent Cheval, Véronique CortierS&P 2022 · 61 次引用
- Symbolic Protocol Verification modulo XOR in ProVerifVincent Cheval, Stéphanie DelauneCCS 2026 · 1 次引用
- Formal Model-Driven Discovery of Bluetooth Protocol Design VulnerabilitiesJianliang Wu, Ruoyu Wu, Dongyan Xu, Dave Jing Tian 等S&P 2022 · 36 次引用
- Hash Gone Bad: Automated discovery of protocol attacks that exploit hash function weaknessesVincent Cheval, Cas Cremers, Alexander Dax, Lucca Hirschi 等USENIX Security 2023
