Generating Payloads of Power Monitoring Systems Compliant with Power Network Protocols Using Generative Adversarial Networks
Abstract
:1. Introduction
1.1. Literature Review
1.2. Related Work
1.2.1. Payload Generation
1.2.2. Generative Adversarial Networks
1.2.3. Bayesian Optimization
2. Payload Generation Framework Using Generative Adversarial Networks
2.1. Framework and Procedure
2.2. Invalid Payload Filter
2.3. SubseqGANs: Subsequence Generative Adversarial Networks
2.4. Sequence Concatenation
Algorithm 1. Subsequence set concatenation algorithm |
Input: N sets of generated subsequence sets (Subseq) |
Output: Complete payload set (Payload_result) |
1. Function combine (Subseq_i, Subseq_j): |
2. Ret = [] |
3. // Iterate through the subsequences of Subseq_i |
4. For seq_i in Subseq_i: |
5. For seq_j in Subseq_j: |
6. // concatenate to form long subsequences |
7. Ret.append(seq_i + seq_j) |
8. Return Ret |
9. Payload_result = combine (Subseq_0, Subseq_1) |
10. // concatenate all subsequence sets. |
11. For i in [2..N]: |
12. Payload_result = combine (Payload_result, Subseq_i) |
13. Return Payload_result |
3. Automatic Segmentation Algorithm Designed for Network Payloads
3.1. Experiments on the Information Entropy
3.2. Experimental Results
3.3. Collection of the Best Segmentation Results
Algorithm 2. LoadCut algorithm |
Input: Network communication payload collection (Origin_Payloads) |
Output: Subsequence collection of network communication payloads after best segmentation (Best_Subseqs) |
1. Function Cut(Origin_Payload, TH_ENT, LEN_WND, SEQ_CNT): |
2. Ret = [] |
3. Cut_pos = 0 |
4. For i in 0 .. Len_payload – LEN_WND: |
5. // get window content |
6. Wnd = Origin_Payload[i:i + LEN_WND] |
7. Len_payload = len(Origin_Payload) |
8. // Calculate the entropy of window content |
9. Entropy_wnd = Calculate_info_entropy(Wnd) |
10. // If the entropy exceeds the threshold, perform segmentation. |
11. If Entropy_wnd > TH_ENT: |
12. Ret.append(Origin_Payload[Cut_pos:i + LEN_WND]) |
13. i += LEN_WND |
14. Cut_pos = i |
15. If len(Ret) >= SEQ_CNT – 1: |
16. Ret.append(Origin_Payload[Cut_pos:]) |
17. Break |
18. // Fill the segmented subsequences with blank spaces |
19. Ret.padding(SEQ_CNT) |
20. Return Ret |
21. // initialize hyperparameters randomly |
22. TH_ENT = random(), LEN_WND = random(), SEQ_CNT = random() |
23. Subseqs = [] |
24. Best_Subseqs = [] |
25. Best_Reward = 0 |
26. // iterate 20 times |
27. N_iter = 20 |
28. For _ in range(N_iter): |
29. For Origin_Payload in Origin_Payloads: |
30. Slices = Cut(Origin_Payload, TH_ENT, LEN_WND, SEQ_CNT) |
31. Subseqs.append(Slices) |
32. // concatenate the subsequence sets into complete payloads |
33. Payloads = Combine(Subseqs) |
34. // calculate the proportion of valid payloads |
35. Reward = OCSVM(Payloads) |
36. If Reward > Best_Reward: |
37. Best_Reward = Reward |
38. Best_Subseqs = Subseqs |
39. // use Bayesian optimization to find optimal hyperparameters |
40. TH_ENT,LEN_WND,SEQ_CNT= |
41. Bayesian_Opt(Reward,TH_ENT,LEN_WND,SEQ_CNT) |
42. Return Best_Subseqs |
4. Experiments and Evaluation
4.1. Experiment Setups
4.1.1. Problem Statement
4.1.2. Experimental Environment
4.1.3. Dataset
4.2. Validity Evaluation
4.2.1. Validity Evaluation Procedures
- A1: Validity evaluation experiment (answering RQ1).
- Directly use the payload samples to train GANs without the payload segmentation module, then filter out invalid ones using an invalid payload filter (denoted as scheme 1).
- Use the LoadCut algorithm to cut payloads into sequences, and then train seqGANs, respectively. Concatenate all generated payload segments to form complete payloads (denoted as scheme 2).
- Generate payloads as (2), and then filter out invalid samples using an invalid payload filter (denoted as scheme 3).
4.2.2. Experimental Results of the Validity Evaluation
4.3. Comparative Experimental Evaluation
4.3.1. Comparative Evaluation Procedures
- A2: The following comparative experiment was designed to discuss the performances of three payload generation methods in generating payloads in the Mozi botnet environment, addressing RQ2.
4.3.2. Experimental Results of Comparative Evaluation
5. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
GANs | generative adversarial networks |
SVM | support vector machine |
OCSVM | one-class support vector machine |
LoadGAN | the payload generation model using GANs |
LoadCut | the payload segmentation algorithm |
SeqGANs | existing types of GANs |
SubseqGANs | payload segment sequences based on entropy thresholds |
References
- Li, Z.; Chen, Z.; Wang, C.; Xu, Z.; Ye, L. Network security threat tracing technology of power monitoring system. Electr. Power Eng. Technol. 2020, 39, 166–172. [Google Scholar]
- Qiu, Q.; Cui, L.; Yang, L. Maintenance policies for energy systems subject to complex failure processes and power purchasing agreement. Comput. Ind. Eng. 2018, 119, 193–203. [Google Scholar] [CrossRef]
- Chen, T.Y.; Cheung, S.C.; Yiu, S.M. Metamorphic testing: A new approach for generating next test cases. arXiv 2020, arXiv:2002.12543. [Google Scholar]
- Pleshakova, E.; Osipov, A.; Gataullin, S.; Gataullin, T.; Vasilakos, A. Next gen cybersecurity paradigm towards artificial general intelligence: Russian market challenges and future global technological trends. J. Comput. Virol. Hacking Tech. 2024, 20, 429–440. [Google Scholar] [CrossRef]
- Fowler, D.S.; Bryans, J.; Cheah, M.; Wooderson, P.; Shaikh, S.A. A method for constructing automotive cybersecurity tests, a CAN fuzz testing example. In Proceedings of the IEEE International Conference on Software Quality, Reliability and Security Companion, Sofia, Bulgaria, 22–26 July 2019; pp. 1–8. [Google Scholar]
- Song, C.; Yu, B.; Zhou, X.; Yang, Q. SPFuzz: A hierarchical scheduling framework for stateful network protocol fuzzing. IEEE Access 2019, 7, 18490–18499. [Google Scholar] [CrossRef]
- Gambi, A.; Mueller, M.; Fraser, G. Automatically testing self-driving cars with search-based procedural content generation. In Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis, Beijing, China, 15–19 July 2019; pp. 318–328. [Google Scholar]
- Osipov, A.V.; Pleshakova, E.S.; Gataullin, S.T. Production processes optimization through machine learning methods based on geophysical monitoring data. Comput. Opt. 2024, 48, 633–642. [Google Scholar]
- Osipov, A.; Pleshakova, E.; Bykov, A.; Kuzichkin, O.; Surzhik, D.; Suvorov, S.; Gataullin, S. Machine Learning Methods Based on Geophysical Monitoring Data in Low Time Delay Mode for Drilling Optimization. IEEE Access 2023, 11, 60349–60364. [Google Scholar] [CrossRef]
- Dai, H.; Sun, C.; Jin, H.; Xiao, M. Research progress in fuzzy testing technology for deep learning systems. J. Softw. Sci. 2023, 34, 5008–5028. [Google Scholar]
- Niu, S.; Li, P.; Zhang, Y. Survey on fuzzy testing technologies. Comput. Eng. Sci. 2022, 44, 2173–2186. [Google Scholar]
- You, W.; Zong, P.; Chen, K.; Wang, X.; Liao, X.; Bian, P.; Liang, B. SemFuzz: Semantics-based automatic generation of proof-of-concept exploits. In Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, Dallas, TA, USA, 30 October–3 November 2017; pp. 2139–2154. [Google Scholar]
- Zhao, W.; Lu, K.; Wu, Q.; Qi, Y. Semantic-informed driver fuzzing without both the hardware devices and the emulators. In Proceedings of the Network and Distributed Systems Security Symposium, San Diego, CA, USA, 24–28 April 2025. [Google Scholar]
- Zhang, P.; Ren, B.; Dong, H.; Dai, Q. Cagfuzz: Coverage-guided adversarial generative fuzzing testing for image-based deep learning systems. IEEE Trans. Softw. Eng. 2021, 48, 4630–4646. [Google Scholar] [CrossRef]
- Demir, S.; Eniser, H.F.; Sen, A. DeepSmartFuzzer: Reward Guided Test Generation For Deep Learning; American Fuzzy Lop, Zalewski, M., Eds.; CEUR-WS: Anissaras, Greece, 2020. [Google Scholar]
- Zalewski, M. American Fuzzy Lop. Available online: http://lcamtuf.coredump.cx/afl/ (accessed on 1 March 2020).
- Huang, W.; Gu, Z.; Guo, J. Research on Power Cyberspace Surveying and Penetration. Electr. Power Inf. Commun. Technol. 2021, 19, 49–54. [Google Scholar]
- Li, W.; Wang, X.B.; Xu, Y. Recognition of CRISPR Off-target cleavage sites with SeqGAN. Curr. Bioinform. 2022, 17, 101–107. [Google Scholar] [CrossRef]
- Garnett, R. Bayesian Optimization; Cambridge University Press: New York, NY, USA, 2023. [Google Scholar]
- Greenhill, S.; Rana, S.; Gupta, S.; Vellanki, P.; Venkatesh, S. Bayesian optimization for adaptive experimental design: A review. IEEE Access 2020, 8, 13937–13948. [Google Scholar] [CrossRef]
- Subramanian, M.; Lv, N.P.; VE, S. Hyperparameter optimization for transfer learning of VGG16 for disease identification in corn leaves using Bayesian optimization. Big Data 2022, 10, 215–229. [Google Scholar] [CrossRef] [PubMed]
- Wainer, J.; Fonseca, P. How to tune the RBF SVM hyperparameters? An empirical evaluation of 18 search algorithms. Artif. Intell. Rev. 2021, 54, 4771–4797. [Google Scholar] [CrossRef]
- Ngoc, T.T.; Le Van Dai CM, T.; Thuyen, C.M. Support vector regression based on grid search method of hyperparameters for load forecasting. Acta Polytech. Hung. 2021, 18, 143–158. [Google Scholar] [CrossRef]
- Turner, R.; Eriksson, D.; McCourt, M.; Kiili, J.; Laaksonen, E.; Xu, Z.; Guyon, I. Bayesian optimization is superior to random search for machine learning hyperparameter tuning: Analysis of the black-box optimization challenge 2020. In Proceedings of the NeurIPS 2020 Competition and Demonstration Track, Virtual, 6–12 December 2021; pp. 3–26. [Google Scholar]
- Deringer, V.L.; Bartók, A.P.; Bernstein, N.; Wilkins, D.M.; Ceriotti, M.; Csányi, G. Gaussian process regression for materials and molecules. Chem. Rev. 2021, 121, 10073–10141. [Google Scholar] [CrossRef] [PubMed]
- Du, Z.; Chai, H.; Yin, X.; Liu, C.; Shi, M. A method for PPP ambiguity resolution based on Bayesian posterior probability. In China Satellite Navigation Conference (CSNC) 2020 Proceedings; Springer: Singapore, 2020; pp. 324–337. [Google Scholar]
- Nguyen, V.; Osborne, M.A. Knowing the what but not the where in Bayesian optimization. In Proceedings of the International Conference on Machine Learning, Virtual, 13–18 July 2020; pp. 7317–7326. [Google Scholar]
- Yang, X.; Huang, P.; An, L.; Feng, P.; Wei, B.; He, P.; Peng, K. A Growing Model-Based OCSVM for Abnormal Student Activity Detection from Daily Campus Consumption. New Gener. Comput. 2022, 40, 915–933. [Google Scholar] [CrossRef]
- Hu, Z.; Shi, J.; Huang, Y.; Xiong, J.; Bu, X. GANFuzz: A GAN-based industrial network protocol fuzzing framework. In Proceedings of the ACM International Conference on Computing Frontiers, Ischia, Italy, 8–10 May 2018; pp. 138–145. [Google Scholar]
Offset | Content | Entropy | Offset | Content | Entropy |
---|---|---|---|---|---|
0 | “attackip” | 2.7219281 | 8 | p”:”202.10 | 2.7219281 |
1 | attackip”: | 2.9219281 | 9 | “:”202.102 | 2.4464393 |
2 | ttackip”:” | 2.9219281 | 10 | :”202.102. | 2.4464393 |
3 | tackip”:”2 | 3.1219281 | 11 | “202.102.1 | 2.2464393 |
4 | ackip”:”20 | 3.1219281 | 12 | 202.102.19 | 2.2464393 |
5 | ckip”:”202 | 2.9219281 | 13 | 02.102.19. | 2.2464393 |
6 | kip”:”202. | 2.9219281 | 14 | 2.102.19.5 | 2.4464393 |
7 | ip”:”202.1 | 2.9219281 | 15 | .102.19.5” | 2.4464393 |
Schemes | Total Payloads | Effective Payloads | Ratio (%) |
---|---|---|---|
1 | 400 | 204 | 51 |
2 | 400 | 342 | 85.5 |
3 | 400 | 198 | 49.5 |
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. |
© 2024 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
Zhang, H.; Liang, Y.; Zhang, J.; Wang, J.; Zhang, H.; Xu, T.; Wang, Q. Generating Payloads of Power Monitoring Systems Compliant with Power Network Protocols Using Generative Adversarial Networks. Energies 2024, 17, 5068. https://doi.org/10.3390/en17205068
Zhang H, Liang Y, Zhang J, Wang J, Zhang H, Xu T, Wang Q. Generating Payloads of Power Monitoring Systems Compliant with Power Network Protocols Using Generative Adversarial Networks. Energies. 2024; 17(20):5068. https://doi.org/10.3390/en17205068
Chicago/Turabian StyleZhang, Hao, Ye Liang, Jun Zhang, Jing Wang, Hao Zhang, Tong Xu, and Qianshi Wang. 2024. "Generating Payloads of Power Monitoring Systems Compliant with Power Network Protocols Using Generative Adversarial Networks" Energies 17, no. 20: 5068. https://doi.org/10.3390/en17205068
APA StyleZhang, H., Liang, Y., Zhang, J., Wang, J., Zhang, H., Xu, T., & Wang, Q. (2024). Generating Payloads of Power Monitoring Systems Compliant with Power Network Protocols Using Generative Adversarial Networks. Energies, 17(20), 5068. https://doi.org/10.3390/en17205068