You are currently viewing a new version of our website. To view the old version click .
Symmetry
  • Article
  • Open Access

4 December 2024

Research on the Security of NC-Link Numerical Control Equipment Protocol Based on Colored Petri Net

,
,
and
School of Computer and Communication, Lanzhou University of Technology, Lanzhou 730050, China
*
Author to whom correspondence should be addressed.
This article belongs to the Section Computer

Abstract

The NC-Link protocol, as an integrated communication protocol in the Computerized Numerical Control (CNC) machine tool industry, has drawn significant attention regarding its security since its inception. Although there have been studies proposing improvements to address security issues related to key management and message transmission, systematic security analysis of the protocol remains relatively weak. To better investigate and enhance the security of the NC-Link protocol, our research introduces a formal modeling and analysis method based on Colored Petri Nets (CPN). By establishing a CPN model of the protocol, we analyze the security issues present during communication and propose improvement measures for verification and analysis. First, we developed a CPN model for the NC-Link protocol and verified the model’s feasibility through simulation analysis. Subsequently, we introduced an attacker model to analyze the protocol’s authentication interaction process, revealing security issues, such as authentication vulnerabilities and key management flaws. Finally, we proposed an improved scheme addressing these issues and conducted a security validation and cost analysis of this scheme. The results show that the improved protocol reduces the computational overhead by 75% during the connection and interaction phases. This indicates that the improved protocol can achieve interactions at a faster speed while maintaining higher security and reliability. The implementation of this scheme provides new reference ideas for related research.

1. Introduction

As the manufacturing industry continues to evolve, CNC equipment has gradually become an indispensable part of the modern industry. However, as machine tool control systems have become increasingly intelligent and networked, security issues have become more pronounced, presenting new challenges for the security of CNC machine tool control systems [1]. The communication protocol for CNC machine tools serves as the foundation for controlling and monitoring these machines, directly affecting production efficiency and product quality in the manufacturing sector [2]. Therefore, research on the security of CNC machine tool protocols is of significant practical importance and has far-reaching social implications. The NC-Link protocol, an important communication protocol widely used in CNC machine tool control systems, not only impacts the performance and stability of these systems, but is also directly related to production efficiency and product quality in the manufacturing industry. However, the NC-Link protocol currently faces several security issues such as data eavesdropping, tampering, and forgery [3]. The streamlined design of the NC-Link protocol, while enhancing its usability, has also introduced numerous security vulnerabilities [4]. These issues could lead to attacks on machine tool systems, affecting production efficiency and product quality in the manufacturing sector and potentially causing significant economic losses and personal harm. Although there has been extensive research on secure communication protocols in industrial environments, there is still relatively little literature on protocols that effectively integrate dynamic key exchange and advanced authentication techniques tailored to the specific needs of industrial systems, particularly concerning the security and interoperability of heterogeneous CNC machine protocols. This urgency makes the study of protocol security an immediate concern. Among the various methods for analyzing protocol security, formal analysis methods have demonstrated outstanding performance [5]. By introducing the Dolev-Yao attacker model [6], effective security analysis of the protocol can be achieved. In order to enhance the security of the NC-Link protocol and enable more effective analysis and validation, this study employs a Colored Petri Net (CPN) model for formal modeling and analysis. It investigates the security issues that arise during a protocol’s application by integrating the protocol’s characteristics with existing authentication solutions to analyze and improve its authentication and key management mechanisms. This approach effectively enhances the security of the NC-Link protocol and provides practical support and theoretical guidance for its security research. The research begins by introducing the characteristics of the NC-Link protocol and the current state of research. It then details the communication mechanism, data transmission process, and security issues associated with the NC-Link protocol. Next, the design principles and implementation process of the CPN-based verification model for the NC-Link protocol are presented. Following this, an analysis of the protocol’s security is conducted, and improvement proposals are made for the identified issues. Finally, the feasibility and effectiveness of the improvement proposals are validated through experiments, along with an analysis of the protocol’s computational overhead. The contributions of this research are as follows:
  • A formal analysis model for the security of the NC-Link protocol was established based on Colored Petri Nets (CPN), providing an in-depth analysis of the existing security issues and proposing corresponding security solutions.
  • By integrating the characteristics of the NC-Link protocol with existing authentication solutions, improved security mechanisms have been proposed to address issues in the protocol’s authentication and key management mechanisms, thereby enhancing the overall security of the NC-Link protocol.
  • The feasibility and effectiveness of the improvement proposals were validated through experimental modeling, and an analysis of the protocol overhead was conducted, offering practical support and theoretical guidance for security research on the NC-Link protocol.

4. Security Analysis of the Protocol

4.1. Attacker Model for the NC-Link Protocol

In the NC-Link protocol model, an attacker model is introduced in the network transmission layer. To avoid state-space explosion issues resulting from the introduction of the attacker model, a series of optimizations are performed on the model. Information unrelated to the attack is removed, and the maximum number of attack reconstructions is limited. Functions and arc expressions are added to control the number of dead transitions and dead nodes, and session keys are incorporated to improve the model’s resistance to key leakage attacks. The attacker model for the NC-Link protocol is illustrated in Figure 15. In the figure, the blue section represents replay attacks. When the value of “Reattack” is set to “true”, the attacker executes a replay attack, during which messages are stored in places P12 and P13 and then sent to the output place for replay via transitions T13 and T14. The green section indicates the tampering attacks. Due to the existence of a pre-shared key for devices, the device information and ID are encrypted, preventing the attacker from directly tampering with them; thus, tampering attacks in the model occur after key leakage attacks. During the registration phase of the NC-Link protocol, although an RSA key is generated after registration, all devices share the same pre-shared key, making the key particularly susceptible to leakage. The red section of the attacker model represents key leakage attacks. Once the attacker obtains the pre-shared key, they can not only decrypt the client’s device registration information but also intercept the device’s RSA private key, which provides the attacker with many avenues to exploit the protocol. In the model, when “Diattack” is set to “true”, the attacker executes a tampering attack, and when “Keattack” is set to “true”, the attacker performs a key leakage attack.
Figure 15. Attacker model of the NC-Link protocol.

4.2. Verification Result Analysis

In the NC-Link protocol model, the attacker employs different methods to attack the protocol, including replay attacks, tampering attacks, key leakage attacks, and combined key leakage and tampering attacks. The state spaces of the model under different attacks are shown in Table 3.
Table 3. Comparison of state paces of the NC-Link protocol model under different attacks.
Through the state-space analysis report, it can be observed that without key leakage, the attacker is unable to execute tampering attacks. The results of dead transitions in the state-space analysis report are shown in Figure 16a,b. From Figure 16a, it is evident that the model stops before the parties establish an interaction. Further investigation reveals in Figure 16b that after the client sends the encrypted registration information, it is tampered with by the attacker, resulting in the server’s failure to decrypt the registration information with the key, and consequently, a registration failure. The state-space report results when the attacker only performs a replay attack are shown in Figure 16c. The results indicate that all dead transitions arise from untriggered attacks. Inspecting the client message reception location reveals two tokens, indicating that the attacker successfully launched an attack on the protocol. When the attacker obtains the pre-shared key and conducts a key leakage attack, the state-space report results are displayed in Figure 16d. The results show that all dead transitions arise from untriggered attacks. Checking the attacker’s knowledge location, which stores the correctly decrypted interaction information, confirms that the attacker has successfully executed a key leakage attack. After acquiring the key, the attacker initiates a tampering attack during the protocol authentication phase. The state-space report results are illustrated in Figure 16e, showing that an inactive transition is related to the attacker’s failure to perform a replay attack. Upon inspecting the server registration information location, it was found to contain tampered information, indicating that the attacker successfully executed a tampering attack. When the attacker simultaneously conducts three types of attacks, the state-space report results are presented in Figure 16f. At this point, the number of dead nodes is 1 and the number of dead transitions is 0, confirming that the attacker successfully launched an attack on the protocol.
Figure 16. (af) Query results of state space analysis reports under different attacks.
Based on the analysis above, the NC-Link protocol’s message format is characterized by simplicity, good extensibility, and ease of understanding and implementation. However, it also has significant security issues. Attackers can intercept transmitted messages to carry out tampering or replay attacks. The message acknowledgment mechanism in the NC-Link protocol employs a simple confirmation or denial approach using message IDs to implement this mechanism. This acknowledgment system does not guarantee message security and requires additional security measures to prevent attackers from intercepting, tampering with, or replaying messages sent by the NC program. Furthermore, the key generation method in the NC-Link protocol is overly simplistic, making it vulnerable to key theft attacks. A more secure key exchange method and robust key update mechanism are necessary to mitigate the risk of key leakage on time.

6. Conclusions

This article primarily focuses on the security issues of the NC-Link machine tool protocol, employing a formal modeling approach based on Colored Petri Nets (CPN). By establishing a CPN model and incorporating the Dolev-Yao attacker model, the security of the NC-Link protocol is formally analyzed. The analysis reveals vulnerabilities in identity authentication and key management, rendering the NC-Link protocol weak against attacks such as data eavesdropping, tampering, and forgery. In response to these issues, we propose an improved scheme that combines zero-knowledge proofs with key exchange, optimizing both the authentication and key management mechanisms. The experimental results demonstrate that the improved scheme reduces computational overhead while enhancing security. A 75% reduction in computational overhead during the connection and interaction phases is more conducive to increasing the frequency of updating the interaction keys during the interaction phase, making the improved scheme more secure and reliable. This research not only provides a practical solution for enhancing the security of the NC-Link protocol but also opens new avenues for the study of communication protocol security in the CNC machine tool industry. Future research could further explore other potential security issues based on this study and integrate advanced security technologies into the NC-Link protocol to strengthen its resilience against attacks in complex network environments.

Author Contributions

Conceptualization, T.F.; Methodology, J.S. and T.F.; Validation, J.S., L.Z. and Y.W.; Formal analysis, J.S., L.Z. and Y.W.; Investigation, J.S.; Writing — original draft, J.S.; Writing — review & editing, J.S.; Supervision, T.F.; Project administration, T.F.; Funding acquisition, T.F. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the National Natural Science Foundation of China (Grant No. 62162039, 61762060). This work was supported by the Natural Science Foundation of Gansu Province, China (Grant No. 23YFGA0060, 23JRRA837, and 24YFFA016).

Data Availability Statement

All relevant data are included in the paper.

Acknowledgments

I would like to express my heartfelt gratitude to everyone who contributed to this research. First and foremost, I thank my academic advisor for their invaluable guidance and support throughout this process. I also appreciate the collaborative spirit and shared expertise of my colleagues in the research team. Additionally, I am grateful to the funding agencies whose support made this research possible. Lastly, I extend my deepest thanks to my family and friends for their unwavering encouragement and understanding during this journey. This work would not have been possible without the contributions and support of each of these individuals. Thank you all.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Eckhart, M.; Brenner, B.; Ekelhart, A.; Weippl, E. Quantitative security risk assessment for industrial control systems: Research opportunities and challenges. J. Internet Serv. Inf. Secur. (JISIS) 2019, 9, 52–73. [Google Scholar]
  2. Drias, Z.; Serhrouchni, A.; Vogel, O. Analysis of cyber security for industrial control systems. In Proceedings of the 2015 International Conference on Cyber Security of Smart Cities, Industrial Control System and Communications (SSIC), Shanghai, China, 5–7 August 2015; IEEE: New York, NY, USA, 2015; pp. 1–8. [Google Scholar]
  3. Martinov, G.; Pushkov, R.; Evstafieva, S. Collecting Data from Variable Kinematic Machine Tools with OPC UA Protocol. In Proceedings of the 2022 International Russian Automation Conference (RusAutoCon), Sochi, Russian Federation, 4–10 September 2022; IEEE: New York, NY, USA, 2022; pp. 465–470. [Google Scholar]
  4. Fan, Y.; Yang, J.; Chen, J.; Hu, P.; Wang, X.; Xu, J.; Zhou, B. A digital-twin visualized architecture for Flexible Manufacturing System. J. Manuf. Syst. 2021, 60, 176–201. [Google Scholar] [CrossRef]
  5. Babich, F.; Deotto, L. Formal methods for specification and analysis of communication protocols. IEEE Commun. Surv. Tutor. 2002, 4, 2–20. [Google Scholar] [CrossRef]
  6. Rocchetto, M.; Tippenhauer, N.O. CPDY: Extending the Dolev-Yao attacker with physical-layer interactions. In Proceedings of the 18th International Conference on Formal Engineering Methods and Software Engineering (ICFEM 2016), Tokyo, Japan, 14–18 November 2016; Springer International Publishing: Berlin/Heidelberg, Germany, 2016; pp. 175–192. [Google Scholar]
  7. Edrington, B.; Zhao, B.; Hansel, A.; Mori, M.; Fujishima, M. Machine monitoring system based on MTConnect technology. Procedia CIRP 2014, 22, 92–97. [Google Scholar] [CrossRef]
  8. Liu, C.; Vengayil, H.; Lu, Y.; Xu, X. A cyber-physical machine tools platform using OPC UA and MTConnect. J. Manuf. Syst. 2019, 51, 61–74. [Google Scholar] [CrossRef]
  9. Gönnheimer, P.; Ströbel, R.; Dörflinger, R.; Mattes, M.; Fleischer, J. Interoperable system for automated extraction and identification of machine control data in brownfield production. Manuf. Lett. 2023, 35, 915–925. [Google Scholar] [CrossRef]
  10. Kwon, H.; Kim, Y.; Yoon, H.; Choi, D. Optimal Cluster Expansion-Based Intrusion Tolerant System to Prevent Denial of Service Attacks. Appl. Sci. 2017, 7, 1186. [Google Scholar] [CrossRef]
  11. Chen, Q.; He, Y.; Dai, C. NC-Link: A Communication Protocol for Interconnected CNC Machine Tools in Intelligent Manufacturing. Met. Process. (Cold Process.) 2024, 37, 86–92. [Google Scholar] [CrossRef]
  12. Lu, S.; Li, Y.; Tu, X.; Zhou, J.; Zhu, J.; Wu, J. Modeling Method for CNC Equipment Information Models Based on Knowledge Graphs. J. Huazhong Univ. Sci. Technol. (Nat. Sci. Ed.) 2022, 50, 39–47. [Google Scholar] [CrossRef]
  13. Li, Y. Design and Implementation of an NC-Link Access Control Scheme Based on Symmetric Homomorphic Encryption. Master’s Thesis, Huazhong University of Science and Technology, Wuhan, China, 2023. [Google Scholar] [CrossRef]
  14. Dong, Z.; Qin, Y.; Li, Z.; Wang, H. A Security and Trust Protection Framework for Open CNC Production Line. In Proceedings of the 2022 China Automation Congress (CAC), Xiamen, China, 25–27 November 2022; IEEE: New York, NY, USA, 2022; pp. 6481–6486. [Google Scholar]
  15. Yang, Y.; Ma, W.; Liu, W.; Yu, Y.; Gu, J. An Effective Automated Detection System for Multi-Protocol Attacks. J. Chongqing Univ. Nat. Sci. Ed. 2012, 35, 71–77. [Google Scholar]
  16. Qing, S. Research Progress on Security Protocols over the Past 20 Years. J. Softw. 2003, 14, 1740–1752. [Google Scholar]
  17. Delov, D.; Yao, A. On the security of public key protocols. Inf. Theory IEEE Trans. 1983, 29, 198–208. [Google Scholar]
  18. Zhao, Q.; Krogh, B.H. Formal verification of statecharts using finite-state model checkers. IEEE Trans. Control. Syst. Technol. 2006, 14, 943–950. [Google Scholar] [CrossRef]
  19. Ahmadon, M.A.B.; Yamaguchi, S.; Gupta, B.B. Petri net-based verification of security protocol implementation in software evolution. Int. J. Embed. Syst. 2018, 10, 503–517. [Google Scholar] [CrossRef]
  20. Li, X.; Zhang, X.; Yang, M.; Yan, B. Research on a Modular Model Checking Method Based on SPIN. J. Electron. Inf. Technol. 2011, 33, 902–907. [Google Scholar] [CrossRef]
  21. Zhang, T.; Xie, H.; Huang, S. Model Checking Method for Multi-Agent Interaction Strategy. J. Electron. Sci. Technol. Univ. 2016, 45, 802–807. [Google Scholar]
  22. Yang, F.; Yang, G.; Hao, Y. Security Analysis of Semi-Quantum Cryptographic Protocol Based on Model Checking. J. Electron. Sci. Technol. Univ. 2017, 46, 716–721. [Google Scholar]
  23. Gong, X.; Feng, T.; Du, J. Formal modeling and security analysis method of security protocol based on CPN. Tongxin Xuebao/J. Commun. 2021, 42, 240–253. [Google Scholar]
  24. Cervesato, I. The Dolev-Yao intruder is the most powerful attacker. In Proceedings of the 16th Annual Symposium on Logic in Computer Science—LICS, Boston, MA, USA, 16–19 June 2001; Volume 1, pp. 1–2. [Google Scholar]
  25. Ram, S.B.; Odelu, V. Security analysis of a key exchange protocol under dolev-yao threat model using tamarin prover. In Proceedings of the 2022 IEEE 12th Annual Computing and Communication Workshop and Conference (CCWC), Virtual, 26–29 January 2022; IEEE: New York, NY, USA, 2022; pp. 667–672. [Google Scholar]
  26. Zheng, L.; Feng, T. Research on a vehicle authentication and key transmission protocol based on CPN. Symmetry 2022, 14, 2398. [Google Scholar] [CrossRef]
  27. Du, J.; Tang, R.; Feng, T. Security analysis and improvement of vehicle Ethernet SOME/IP protocol. Sensors 2022, 22, 6792. [Google Scholar] [CrossRef] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.