A Cybersecurity Knowledge Graph Completion Method for Penetration Testing
Abstract
:1. Introduction
- We design a knowledge graph completion model called CSNT. It uses recurrent neural network to enhance interaction. It models entities and relationships in cyberspace based on neural networks and tensor decomposition. At the same time, it uses the Pearson correlation coefficient between them to design Pearson Mix Net to obtain joint vectors.
- We design the Progressive-Replay-SA self-distillation strategy for model training. This strategy adopts the methods of sample replay and progressive learning to solve the catastrophic forgetting problem and prevent model degradation. At the same time, the simulated annealing algorithm is used to adaptively adjust the distillation temperature to gradually increase the difficulty of the course learning.
- We use the real cybersecurity data to build the cybersecurity knowledge graph to provide support for the penetration testing. We carry out the completion experiment based on the cybersecurity knowledge graph. The experiment shows that our model has a good effect on the cybersecurity knowledge graph completion and can be better used to assist the penetration testing.
2. Related Work
2.1. Research on Cybersecurity Data
2.2. Research on Knowledge Graph Completion
3. Our Method
3.1. Problem Description
3.2. Problem Modeling
3.2.1. Knowledge Graph Completion Model
3.2.2. Progressive-Replay-SA Self-Distillation
Algorithm 1: Adaptive Distillation Temperature Optimization Algorithm | |
Input: The initialized temperature | |
The temperature growth directions | |
The big fixed constant T | |
The small fixed constant , | |
The loss of previous training step | |
The loss of current training steps | |
Output: The temperature | |
4. Experiment
4.1. Cybersecurity Knowledge Graph
4.2. Experimental Evaluation Metrics and Settings
4.3. Experimental Results and Analysis
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Endsley, M.R. Toward a Theory of Situation Awareness in Dynamic Systems. Hum. Factors J. Hum. Factors Ergon. Soc. 1995, 37, 32–64. [Google Scholar] [CrossRef]
- Guo, Q.; Cao, S.; Yi, Z. A medical question answering system using large language models and knowledge graphs. Int. J. Intell. Syst. 2022, 37, 8548–8564. [Google Scholar] [CrossRef]
- Zehra, S.; Mohsin, S.F.M.; Wasi, S.; Jami, S.I.; Siddiqui, M.S.; Raazi, S.M.K. Financial Knowledge Graph Based Financial Report Query System. IEEE Access 2021, 9, 69766–69782. [Google Scholar] [CrossRef]
- Li, N.; Shen, Q.; Song, R.; Chi, Y.; Xu, H. MEduKG: A Deep-Learning-Based Approach for Multi-Modal Educational Knowledge Graph Construction. Information 2022, 13, 91. [Google Scholar] [CrossRef]
- Chhetri, T.R.; Kurteva, A.; Adigun, J.G.; Fensel, A. Knowledge Graph Based Hard Drive Failure Prediction. Sensors 2022, 22, 985. [Google Scholar] [CrossRef] [PubMed]
- Sakurai, K.; Togo, R.; Ogawa, T.; Haseyama, M. Controllable Music Playlist Generation Based on Knowledge Graph and Reinforcement Learning. Sensors 2022, 22, 3722. [Google Scholar] [CrossRef] [PubMed]
- Xing, X.; Wang, S.; Liu, W. An Improved DDPG and Its Application in Spacecraft Fault Knowledge Graph. Sensors 2023, 23, 1223. [Google Scholar] [CrossRef] [PubMed]
- Bordes, A.; Usunier, N.; García-Durán, A.; Weston, J.; Yakhnenko, O. Translating Embeddings for Modeling Multi-relational Data. In Proceedings of the Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 5–8 December 2013; pp. 787–2795. [Google Scholar]
- Wang, Z.; Zhang, J.; Feng, J.; Chen, Z. Knowledge Graph Embedding by Translating on Hyperplanes. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, Québec City, QC, Canada, 27–31 July 2014; pp. 1112–1119. [Google Scholar]
- Lin, Y.; Liu, Z.; Sun, M.; Liu, Y.; Zhu, X. Learning Entity and Relation Embeddings for Knowledge Graph Completion. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015; pp. 2181–2187. [Google Scholar]
- Ji, G.; He, S.; Xu, L.; Liu, K.; Zhao, J. Knowledge Graph Embedding via Dynamic Mapping Matrix. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, Beijing, China, 26–31 July 2015; Volume 1: Long Papers, pp. 687–696. [Google Scholar] [CrossRef]
- Sun, Z.; Deng, Z.H.; Nie, J.Y.; Tang, J. RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Space. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Zhang, S.; Tay, Y.; Yao, L.; Liu, Q. Quaternion Knowledge Graph Embeddings. In Proceedings of the Advances in Neural Information Processing Systems, NeurIPS 2019, Vancouver, BC, Canada, 8–14 December 2019; pp. 2731–2741. [Google Scholar]
- Yu, M.; Bai, C.; Yu, J.; Zhao, M.; Xu, T.; Liu, H.; Li, X.; Yu, R. Translation-Based Embeddings with Octonion for Knowledge Graph Completion. Appl. Sci. 2022, 12, 3935. [Google Scholar] [CrossRef]
- Balazevic, I.; Allen, C.; Hospedales, T.M. Multi-relational Poincaré Graph Embeddings. In Proceedings of the Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, Vancouver, BC, Canada, 8–14 December 2019; pp. 4465–4475. [Google Scholar]
- Nickel, M.; Tresp, V.; Kriegel, H. A Three-Way Model for Collective Learning on Multi-Relational Data. In Proceedings of the 28th International Conference on Machine Learning, ICML 2011, Bellevue, Washington, DC, USA, 28 June–2 July 2011; pp. 809–816. [Google Scholar]
- Yang, B.; Yih, W.; He, X.; Gao, J.; Deng, L. Embedding Entities and Relations for Learning and Inference in Knowledge Bases. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Trouillon, T.; Welbl, J.; Riedel, S.; Gaussier, É.; Bouchard, G. Complex Embeddings for Simple Link Prediction. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York, NY, USA, 19–24 June 2016; Volume 48, pp. 2071–2080. [Google Scholar]
- Balazevic, I.; Allen, C.; Hospedales, T.M. TuckER: Tensor Factorization for Knowledge Graph Completion. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, 3–7 November 2019; pp. 5184–5193. [Google Scholar] [CrossRef] [Green Version]
- Dettmers, T.; Minervini, P.; Stenetorp, P.; Riedel, S. Convolutional 2D Knowledge Graph Embeddings. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), New Orleans, LA, USA, 2–7 February 2018; pp. 1811–1818. [Google Scholar]
- Vashishth, S.; Sanyal, S.; Nitin, V.; Agrawal, N.; Talukdar, P.P. InteractE: Improving Convolution-Based Knowledge Graph Embeddings by Increasing Feature Interactions. In Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, 7–12 February 2020; pp. 3009–3016. [Google Scholar]
- Che, F.; Zhang, D.; Tao, J.; Niu, M.; Zhao, B. ParamE: Regarding Neural Network Parameters as Relation Embeddings for Knowledge Graph Completion. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020. [Google Scholar]
- Hinton, G.; Vinyals, O.; Dean, J. Distilling the Knowledge in a Neural Network. Comput. Sci. 2015, 14, 38–39. [Google Scholar]
- Kim, K.; Ji, B.; Yoon, D.; Hwang, S. Self-Knowledge Distillation with Progressive Refinement of Targets. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision, ICCV 2021, Montreal, QC, Canada, 10–17 October 2021; pp. 6547–6556. [Google Scholar] [CrossRef]
- Zhang, L.; Song, J.; Gao, A.; Chen, J.; Bao, C.; Ma, K. Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillation. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 3712–3721. [Google Scholar] [CrossRef] [Green Version]
- Shen, Y.; Xu, L.; Yang, Y.; Li, Y.; Guo, Y. Self-Distillation from the Last Mini-Batch for Consistency Regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, 18–24 June 2022; pp. 11933–11942. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Rashid, T.; Samvelyan, M.; de Witt, C.S.; Farquhar, G.; Foerster, J.N.; Whiteson, S. QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning. In Proceedings of the Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmässan, Stockholm, Sweden, 10–15 July 2018; Proceedings of Machine Learning Research. Volume 80, pp. 4292–4301. [Google Scholar]
- Li, Z.; Li, X.; Yang, L.; Zhao, B.; Song, R.; Luo, L.; Li, J.; Yang, J. Curriculum Temperature for Knowledge Distillation. arXiv 2022, arXiv:2211.16231. [Google Scholar]
#E | #R | #TR | #VA | #TE |
---|---|---|---|---|
103,993 | 30 | 285,295 | 15,850 | 15,866 |
Relationships | Head→Tail |
---|---|
Address | DNS→IP, subdomain→IP |
IsAddressOf | IP→DNS, IP→subdomain |
BePlatformOf | OS→EXP |
AffectPlatform | EXP→OS |
BeAuxOf | AUX→EXP |
BeExpOf | EXP→CVE |
BePostOf | Post→EXP |
Connect | subdomain→subdomain |
Control | DNS→subdomain |
ControlledBy | subdomain→DNS |
Exist | CVE→IP, CVE→subdomain |
HasAux | EXP→AUX |
HasCve | IP→CVE, subdomain→CVE |
HasExp | CVE→EXP |
HasPost | EXP→Post |
LocArea | IP→Region |
LocContinent | IP→Continent |
LocatedIn | Region→Continent |
OpenPort | IP→Port |
OpenedBy | Port→IP |
RelatedTo | Port→Service, Service→Port |
InstanceOf | CVE→CWE |
ObservedExample | CWE→CVE |
PeerOf | CWE→CWE, CAPEC→CAPEC |
AttackTo | CAPEC→CWE |
TargetOf | CWE→CAPEC |
CanFollow | CWE→CWE, CAPEC→CAPEC |
CanPrecede | CWE→CWE, CAPEC→CAPEC |
Childof | CWE→CWE, CAPEC→CAPEC |
ParentOf | CWE→CWE, CAPEC→CAPEC |
Model | MRR | Hits@1 | Hits@3 | Hits@10 |
---|---|---|---|---|
TransE [8] | 0.487 | 0.450 | 0.509 | 0.547 |
DistMult [17] | 0.481 | 0.462 | 0.490 | 0.514 |
TuckER [19] | 0.629 | 0.584 | 0.653 | 0.695 |
ConvE [20] | 0.689 | 0.670 | 0.704 | 0.715 |
CSNT | 0.767 | 0.728 | 0.825 | 0.835 |
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. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, P.; Liu, J.; Zhong, X.; Zhou, S. A Cybersecurity Knowledge Graph Completion Method for Penetration Testing. Electronics 2023, 12, 1837. https://doi.org/10.3390/electronics12081837
Wang P, Liu J, Zhong X, Zhou S. A Cybersecurity Knowledge Graph Completion Method for Penetration Testing. Electronics. 2023; 12(8):1837. https://doi.org/10.3390/electronics12081837
Chicago/Turabian StyleWang, Peng, Jingju Liu, Xiaofeng Zhong, and Shicheng Zhou. 2023. "A Cybersecurity Knowledge Graph Completion Method for Penetration Testing" Electronics 12, no. 8: 1837. https://doi.org/10.3390/electronics12081837
APA StyleWang, P., Liu, J., Zhong, X., & Zhou, S. (2023). A Cybersecurity Knowledge Graph Completion Method for Penetration Testing. Electronics, 12(8), 1837. https://doi.org/10.3390/electronics12081837