OPC UA Security Analysis
Total Page:16
File Type:pdf, Size:1020Kb
OPC UA Security Analysis 02/03/2017 Authors The OPC UA security analysis study was commissioned by the Federal Office for Information Security (BSI) and performed under the consortium leadership of TÜV SÜD Rail from 14 January 2015 until 2 December 2015. Listed in alphabetical order, the other companies and people involved in the consortium were as follows: ascolab Mr. Damm Mr. Gappmeier Mr. Zugfil SIGNON Mr. Plöb TÜV SÜD Mr. Fiat (project manager) Mr. Störtkuhl Acknowledgements The authors would like to thank the OPC Foundation for the open and constructive cooperation. All suggestions for improvement presented in this study were taken up by the OPC Foundation and discussed intensively. This study led to an adjustment of specification and reference implementation which will be incorporated into the next updates. An overview of the OPC Foundation's feedback on this study can be found at the following address: https://opcfoundation.org/security/ Federal Office for Information Security P.O.B. 20 03 63 D-53133 Bonn (Germany) Phone: +49 22899 9582-0 E-mail: [email protected] Internet: https://www.bsi.bund.de © Federal Office for Information Security (BSI) 2016 Content AUTHORS .................................................................................................................................................................... 2 ACKNOWLEDGEMENTS ............................................................................................................................................... 2 1 MANAGEMENT SUMMARY ................................................................................................................................. 6 2 SUBJECT OF THE ANALYSIS .................................................................................................................................. 8 2.1 SUBJECT UNDER EXAMINATION ................................................................................................................................... 8 2.2 OBJECTIVES OF THE ANALYSIS ................................................................................................................................... 10 2.3 SCOPE OF THE ANALYSIS .......................................................................................................................................... 10 2.3.1 Analysis of the OPC UA Specification ........................................................................................................... 11 2.3.2 Performing of security tests on a reference implementation ....................................................................... 13 2.4 EXCLUSION AND ASPECTS THAT ARE NOT TAKEN INTO ACCOUNT ....................................................................................... 13 2.4.1 Exclusions ..................................................................................................................................................... 13 2.4.2 Uncertainties ................................................................................................................................................ 14 3 METRIC FOR ASSESSING THE CRITICALITY OF VULNERABILITIES .........................................................................15 3.1 BASE METRIC GROUP ............................................................................................................................................ 15 3.2 TEMPORAL METRIC ............................................................................................................................................... 16 3.3 ENVIRONMENTAL METRICS ..................................................................................................................................... 16 3.4 CALCULATION OF THE SCORE .................................................................................................................................... 16 4 DESCRIPTION OF THE TEST ENVIRONMENT ........................................................................................................18 5 INVENTORY OF THE LEVEL OF KNOWLEDGE WITH RESPECT TO THE IT SECURITY OF OPC UA .............................21 6 EDITORIAL COMMENTS AND SUGGESTIONS FOR CORRECTION ..........................................................................24 7 RESULTS OF THE SPECIFICATION ANALYSIS .........................................................................................................38 7.1 REVIEW OF SECURITY OBJECTIVES AND THREAT TYPES .................................................................................................... 38 7.1.1 Analysis by means of STRIDE ........................................................................................................................ 38 7.1.2 Review of the security objective definitions ................................................................................................. 40 7.1.3 Review of the threat type definitions ........................................................................................................... 41 7.1.4 Review of the assignment of security objectives versus threats .................................................................. 42 7.1.5 Results .......................................................................................................................................................... 42 7.2 THREAT ANALYSIS FOR THE OPC UA PROTOCOL ........................................................................................................... 45 7.2.1 Analysis according to the threats from Part 2.............................................................................................. 45 7.2.2 Analysis of the threats for elements of the OPC UA infrastructure .............................................................. 55 7.2.3 Results .......................................................................................................................................................... 58 7.3 ANALYSIS OF THE PROTECTION MECHANISMS ON THE PARAMETER LEVEL ........................................................................... 58 7.3.1 Explanation of the analysis table ................................................................................................................. 58 7.3.2 Detailed explanation of the results of the analysis table ............................................................................. 60 7.3.3 Conclusion .................................................................................................................................................... 63 7.4 FURTHER OBSERVATIONS REGARDING THE DESIGN ........................................................................................................ 64 7.5 SUMMARY OF THE OVERALL ANALYSIS RESULTS ............................................................................................................ 65 8 RESULTS OF THE REFERENCE IMPLEMENTATION ANALYSIS.................................................................................71 8.1 DESCRIPTION OF THE OPC UA COMMUNICATION STACK TESTED ..................................................................................... 71 8.2 ATTACKS TO VULNERABILITIES IDENTIFIED IN THE SPECIFICATION ANALYSIS ......................................................................... 71 8.3 PROCEDURE ......................................................................................................................................................... 71 8.4 CERTIFICATE TESTS ................................................................................................................................................. 73 8.4.1 Description of the tests ................................................................................................................................ 73 8.4.2 Analysis of the results .................................................................................................................................. 75 8.5 STATIC CODE ANALYSIS ............................................................................................................................................ 78 8.6 FUZZING .............................................................................................................................................................. 80 Federal Office for Information Security 3 Error! Use the Home tab to apply Überschrift 1 to the text that you want to appear here. 8.6.1 Programming in Peach ................................................................................................................................. 80 8.6.2 Choice of fuzzing tests .................................................................................................................................. 83 8.6.3 Results .......................................................................................................................................................... 83 8.7 DYNAMIC CODE ANALYSIS ........................................................................................................................................ 86 8.7.1 Results: ......................................................................................................................................................... 86 8.8 CODE COVERAGE ................................................................................................................................................... 91 8.8.1 Measurement ..............................................................................................................................................