DDoS Defense Strategy Based on Blockchain and Unsupervised Learning Techniques in SDN
Abstract
1. Introduction
- To address DDoS attacks, we propose utilizing the high-performance consortium blockchain FISCO BCOS as a container for storing SDN flow tables at the northbound interface of Pox-based SDN switches. We design a cross-domain data flow transmission scheme based on smart contracts, which enhances the security of flow table storage while satisfying the high-frequency access requirements of the SDN controller. This approach ensures that data storage security becomes an integral part of our DDoS attack defense strategy, under the premise of minimizing the impact on the flow table forwarding efficiency within the SDN network topology.
- We consider DDoS attack detection as a binary classification problem, categorizing data transmissions in SDN networks into two classes: benign network flows and malicious network flows. To simulate real-world scenarios as closely as possible, we use the public DDoS dataset CIC-DDoS2019 as data support for attack source data. This dataset contains 77 statistical features based on network flows from 11 different types of DDoS attacks. We propose a composite feature selection method that utilizes Recursive Feature Elimination, Random Forest, and Mutual Information to calculate correlation coefficients and perform correlation ranking on the data. This method determines seven highly correlated data features within a data flow for attack source detection.
- Malicious network flows are divided into two categories: easily detectable and difficult-to-detect. A two-tier defense method is proposed to address both types. The first tier combines time series analysis and the token bucket algorithm to monitor the frequency of network flow access, thereby defending against easily detectable attacks. The second tier employs the Isolation Forest algorithm, an unsupervised machine learning technique, to calculate anomalies based on seven highly correlated data features identified in the data flows stored on the blockchain, thus detecting difficult-to-detect attacks. Compared with similar defense strategies, the proposed method ensures high accuracy while reducing detection time.
2. Related Work
3. System Model and Problem Formulation
3.1. Problem Description
3.2. System Model
3.2.1. The Processing of Flow Table Data Using Blockchain Technology
3.2.2. The DDoS Detection Strategy
3.2.3. Verification System
3.3. Problem Formulation
3.3.1. The First-Layer Defense Strategy
3.3.2. The Second-Layer Defense Strategy
4. Detailed Methodology
4.1. Flow Table Data Processing
- The owner of the smart contract needs to possess the capability to determine whether a participant is authorized to access the blockchain.
- Authorized participants of the contract can update local flow table information.
Algorithm 1 IsCollaborator—Collaborator Verification Function. |
Input: user—External participant’s account address Output: Boolean—true if authorized, false otherwise Function: Validates external account’s blockchain access permission
|
Algorithm 2 GetKeyOrValue—Bidirectional Data Retrieval Function. |
Input: queryType (string), key (uint) or value (string) Output: Query result—corresponding value or key, error message if not found Function: Enables bidirectional lookup in blockchain storage
|
Algorithm 3 SetOrUpdateString—Dynamic Storage Management Function. |
Input: operationType (string), index (uint), newValue (string) Output: Operation result—success or failure message Function: Updates existing entries or appends new data
|
Algorithm 4 DeleteStringOrClearAll—Flexible Data Removal Function. |
Input: index (uint), clearAll (Boolean) Output: Operation result—success or failure message Function: Removes specific entries or reinitializes storage
|
4.2. Detection Strategy
- Calculate the importance score with MI and RF for each feature in .
- Train a model on the current set of features .
- Remove the feature with the lowest importance score: .
- Repeat steps 2 to 3 until the desired number of features is reached.
5. Experimental Results and Discussion
5.1. Simulation Environment and Network Topology
5.2. Comparison of Flow Table Data Forwarding with the Original Controller
5.3. Scalability Testing of SDN Network Topology
5.4. DDoS Attack Detection Accuracy
5.5. Comparison of Anomalous Network Flow Determination Time with Similar Defense Strategies
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Nisar, K.; Jimson, E.R.; Hijazi, M.H.A.; Welch, I.; Hassan, R.; Aman, A.H.M.; Sodhro, A.H.; Pirbhulal, S.; Khan, S. A survey on the architecture, application, and security of software defined networking: Challenges and open issues. Internet Things 2020, 12, 100289. [Google Scholar] [CrossRef]
- Luo, S.; Wu, J.; Li, J.; Pei, B. A defense mechanism for distributed denial of service attack in software-defined networks. In Proceedings of the 2015 Ninth International Conference on Frontier of Computer Science and Technology, Dalian, China, 26–28 August 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 325–329. [Google Scholar]
- McKeown, N.; Anderson, T.; Balakrishnan, H.; Parulkar, G.; Peterson, L.; Rexford, J.; Shenker, S.; Turner, J. OpenFlow: Enabling innovation in campus networks. ACM SIGCOMM Comput. Commun. Rev. 2008, 38, 69–74. [Google Scholar] [CrossRef]
- Kaur, P.; Kumar, M.; Bhandari, A. A review of detection approaches for distributed denial of service attacks. Syst. Sci. Control Eng. 2017, 5, 301–320. [Google Scholar] [CrossRef]
- Sutrala, A.K.; Obaidat, M.S.; Saha, S.; Das, A.K.; Alazab, M.; Park, Y. Authenticated key agreement scheme with user anonymity and untraceability for 5G-enabled softwarized industrial cyber-physical systems. IEEE Trans. Intell. Transp. Syst. 2021, 23, 2316–2330. [Google Scholar] [CrossRef]
- Kaur, S.; Sandhu, A.K.; Bhandari, A. Investigation of application layer DDoS attacks in legacy and software-defined networks: A comprehensive review. Int. J. Inf. Secur. 2023, 22, 1949–1988. [Google Scholar] [CrossRef]
- Tian, J.; Shu, Z.; Chen, S.; Xie, H.; Liu, X.; Qiu, C. Enhanced DDoS Defense in SDN: Double-Layered Strategy with Blockchain Integration. In Proceedings of the 2024 IEEE the 13th International Conference on Communications, Circuits, and Systems (ICCCAS 2024), Xiamen, China, 10–12 May 2024; pp. 380–384. [Google Scholar]
- Latah, M.; Kalkan, K. When SDN and blockchain shake hands. Commun. ACM 2022, 65, 68–78. [Google Scholar] [CrossRef]
- Saha, S.; Chattaraj, D.; Bera, B.; Kumar Das, A. Consortium blockchain-enabled access control mechanism in edge computing based generic Internet of Things environment. Trans. Emerg. Telecommun. Technol. 2021, 32, e3995. [Google Scholar] [CrossRef]
- Abou El Houda, Z.; Hafid, A.; Khoukhi, L. Co-IoT: A collaborative DDoS mitigation scheme in IoT environment based on blockchain using SDN. In Proceedings of the 2019 IEEE Global Communications Conference (GLOBECOM), Waikoloa, HI, USA, 9–13 December 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–6. [Google Scholar]
- Chattaraj, D.; Saha, S.; Bera, B.; Das, A.K. On the design of blockchain-based access control scheme for software defined networks. In Proceedings of the IEEE INFOCOM 2020—IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Toronto, ON, Canada, 6–9 July 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 237–242. [Google Scholar]
- Abuhashim, A.; Tan, C.C. Smart contract designs on blockchain applications. In Proceedings of the 2020 IEEE Symposium on Computers and Communications (ISCC), Rennes, France, 7–10 July 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1–4. [Google Scholar]
- Giotis, K.; Apostolaki, M.; Maglaris, V. A reputation-based collaborative schema for the mitigation of distributed attacks in SDN domains. In Proceedings of the NOMS 2016—2016 IEEE/IFIP Network Operations and Management Symposium, Istanbul, Turkey, 25–29 April 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 495–501. [Google Scholar]
- Wani, S.; Imthiyas, M.; Almohamedh, H.; Alhamed, K.M.; Almotairi, S.; Gulzar, Y. Distributed denial of service (DDoS) mitigation using blockchain—A comprehensive insight. Symmetry 2021, 13, 227. [Google Scholar] [CrossRef]
- Valdovinos, I.A.; Pérez-Díaz, J.A.; Choo, K.K.R.; Botero, J.F. Emerging DDoS attack detection and mitigation strategies in software-defined networks: Taxonomy, challenges and future directions. J. Netw. Comput. Appl. 2021, 187, 103093. [Google Scholar] [CrossRef]
- Gao, Y.; Chen, Y.; Hu, X.; Lin, H.; Liu, Y.; Nie, L. Blockchain based IIoT data sharing framework for SDN-enabled pervasive edge computing. IEEE Trans. Ind. Inform. 2020, 17, 5041–5049. [Google Scholar] [CrossRef]
- Núñez-Gómez, C.; Carrión, C.; Caminero, B.; Delicado, F.M. S-HIDRA: A blockchain and SDN domain-based architecture to orchestrate fog computing environments. Comput. Netw. 2023, 221, 109512. [Google Scholar] [CrossRef]
- Zeng, Z.; Zhang, X.; Xia, Z. Intelligent blockchain-based secure routing for multidomain SDN-enabled IoT networks. Wirel. Commun. Mob. Comput. 2022, 2022, 5693962. [Google Scholar] [CrossRef]
- Ma, R.; Wang, Q.; Bu, X.; Chen, X. Real-Time Detection of DDoS Attacks Based on Random Forest in SDN. Appl. Sci. 2023, 13, 7872. [Google Scholar] [CrossRef]
- Marvi, M.; Arfeen, A.; Uddin, R. An augmented K-means clustering approach for the detection of distributed denial-of-service attacks. Int. J. Netw. Manag. 2021, 31, e2160. [Google Scholar] [CrossRef]
- Lian, W.; Li, Z.; Guo, C.; Wei, Z.; Peng, X. FRChain: A blockchain-based flow-rules-oriented data forwarding security scheme in SDN. KSII Trans. Internet Inf. Syst. (TIIS) 2021, 15, 264–284. [Google Scholar]
- Su, J.; Jiang, M. A hybrid entropy and blockchain approach for network security defense in SDN-based IIoT. Chin. J. Electron. 2023, 32, 531–541. [Google Scholar] [CrossRef]
- Li, W.; Wang, Y.; Meng, W.; Li, J.; Su, C. BlockCSDN: Towards blockchain-based collaborative intrusion detection in software defined networking. IEICE TRANSACTIONS Inf. Syst. 2022, 105, 272–279. [Google Scholar] [CrossRef]
- Hassan, A.I.; El Reheem, E.A.; Guirguis, S.K. An entropy and machine learning based approach for DDoS attacks detection in software defined networks. Sci. Rep. 2024, 14, 18159. [Google Scholar] [CrossRef] [PubMed]
- Saiyed, M.F.; Al-Anbagi, I. A Genetic Algorithm and t-Test Based System for DDoS Attack Detection in IoT Networks. IEEE Access 2024, 12, 25623–25641. [Google Scholar] [CrossRef]
- Arvind, T.; Radhika, K. XGBoost Machine Learning Model-Based DDoS Attack Detection and Mitigation in an SDN Environment. Int. J. Eng. Trends Technol. 2023, 71, 349–361. [Google Scholar] [CrossRef]
- Hamarshe, A.; Ashqar, H.I.; Hamarsheh, M. Detection of DDoS Attacks in Software Defined Networking Using Machine Learning Models. In Proceedings of the 2023 International Conference on Advances in Computing Research (ACR’23), Orlando, FL, USA, 8–10 May 2023; Springer: Berlin/Heidelberg, Germany, 2023; Volume 700, pp. 620–636, Lecture Notes in Networks and Systems. [Google Scholar] [CrossRef]
- Butt, H.A.; Harthy, K.S.A.; Shah, M.A.; Hussain, M.; Amin, R.; Rehman, M.U. Enhanced DDoS Detection Using Advanced Machine Learning and Ensemble Techniques in Software Defined Networking. Comput. Mater. Contin. 2024, 81, 3003–3031. [Google Scholar] [CrossRef]
- Wang, R.; Ye, K.; Meng, T.; Xu, C.Z. Performance evaluation on blockchain systems: A case study on Ethereum, Fabric, Sawtooth and Fisco-Bcos. In Proceedings of the Services Computing—SCC 2020: 17th International Conference, Held as Part of the Services Conference Federation, SCF 2020, Honolulu, HI, USA, 18–20 September 2020; Proceedings 17. Springer: Berlin/Heidelberg, Germany, 2020; pp. 120–134. [Google Scholar]
- Zheng, Z.; Xie, S.; Dai, H.N.; Chen, W.; Chen, X.; Weng, J.; Imran, M. An overview on smart contracts: Challenges, advances and platforms. Future Gener. Comput. Syst. 2020, 105, 475–491. [Google Scholar] [CrossRef]
- Sharafaldin, I.; Lashkari, A.H.; Hakak, S.; Ghorbani, A.A. Developing realistic distributed denial of service (DDoS) attack dataset and taxonomy. In Proceedings of the 2019 International Carnahan Conference on Security Technology (ICCST), Chennai, India, 1–3 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–8. [Google Scholar]
- Hariri, S.; Kind, M.C.; Brunner, R.J. Extended isolation forest. IEEE Trans. Knowl. Data Eng. 2019, 33, 1479–1489. [Google Scholar] [CrossRef]
- Estévez, P.A.; Tesmer, M.; Perez, C.A.; Zurada, J.M. Normalized mutual information feature selection. IEEE Trans. Neural Netw. 2009, 20, 189–201. [Google Scholar] [CrossRef]
- Biau, G.; Scornet, E. A random forest guided tour. Test 2016, 25, 197–227. [Google Scholar] [CrossRef]
- Chen, X.; Jeong, J.C. Enhanced recursive feature elimination. In Proceedings of the Sixth International Conference on Machine Learning and Applications (ICMLA 2007), Cincinnati, OH, USA, 13–15 December 2007; IEEE: Piscataway, NJ, USA, 2007; pp. 429–435. [Google Scholar]
- De Oliveira, R.L.S.; Schweitzer, C.M.; Shinoda, A.A.; Prete, L.R. Using mininet for emulation and prototyping software-defined networks. In Proceedings of the 2014 IEEE Colombian Conference on Communications and Computing (COLCOM), Bogota, Colombia, 4–6 June 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 1–6. [Google Scholar]
- Tripathy, D.N.; Reed, W.M. Pox. In Diseases of Poultry; Wiley: New York, NY, USA, 2013; pp. 333–349. [Google Scholar]
- Cano-Benito, J.; Cimmino, A.; García-Castro, R. Toward the ontological modeling of smart contracts: A solidity use case. IEEE Access 2021, 9, 140156–140172. [Google Scholar] [CrossRef]
- Yacouby, R.; Axman, D. Probabilistic extension of precision, recall, and f1 score for more thorough evaluation of classification models. In Proceedings of the First Workshop on Evaluation and Comparison of NLP Systems, Online, 20 November 2020; pp. 79–91. [Google Scholar]
Literature | Security of Storage | Active Detection | ML/DL | Methodology |
---|---|---|---|---|
Gao et al. [16] | √ | − | − | Blockchain and proxy encryption |
Núñez-Gómez et al. [17] | √ | − | − | BS-HIDRA blockchain architecture |
Zeng et al. [18] | √ | − | − | Blockchain-based secure routing |
Ma et al. [19] | − | √ | √ | Heterogeneous feature selection + RF |
Marvi et al. [20] | − | √ | √ | Augmented K-means clustering |
Lian et al. [21] | √ | √ | − | FRChain with voting mechanism |
Jian et al. [22] | √ | √ | − | Hybrid entropy and blockchain |
Li et al. [23] | √ | √ | − | BlockCSDN framework |
Hassan et al. [24] | − | √ | √ | Entropy-based detection with ML |
Saiyed and Al-Anbagi [25] | − | √ | √ | Genetic algorithm with t-test |
Ma et al. [19] | − | √ | √ | Edge computing with Random Forest |
Arvind and Radhika [26] | − | √ | √ | XGBoost-based detection |
Hamarshe et al. [27] | − | √ | √ | Multiple ML models comparison |
Butt et al. [28] | − | √ | √ | Ensemble RF + XGBoost |
Our proposed | √ | √ | √ | Dual-layer: blockchain + Isolation Forest |
Notation | Definition |
---|---|
Source MAC address | |
t | Timestamp |
T | Time window length |
Frequency of at time t | |
Anomaly threshold | |
Number of tokens in the bucket at time t | |
R | Token generation rate |
Number of data packets to be forwarded by | |
Feature set | |
Feature importance score | |
Weight of the i-th feature selection method | |
Importance score of feature f from the i-th feature selection method | |
i-th data point | |
Average path length of sample | |
Isolation score of sample | |
Isolation score threshold | |
Classification threshold | |
Normalization constant | |
i-th harmonic number | |
Euler constant |
Variables | Explanation |
---|---|
user | Types of accounts for external participants |
collaboratorsAddr | Addresses of collaborative strategy participants |
collaborators | The set of mappings from the addresses of collaborating participants to the corresponding structures |
data | A network data message |
index | Refers to the serial number of the target object |
values | An array to store all string values |
fixedLength | The fixed length of the input value for comparison |
storedValue | A value from the array to be compared with the input value |
prefix | The extracted part of the stored value for comparison |
Algorithm | Definition |
---|---|
Mutual Information | Reciprocal information measures how much information the presence/absence of a feature has to make a correct prediction for Y. |
Random Forest | The generalization of the model is improved by constructing multiple decision trees to reduce the risk of overfitting a single decision tree. |
Recursive Feature Elimination | By recursively training the model and removing unimportant features, the optimal subset of features is selected. |
Feature | Role |
---|---|
ACK Flag Count | ACK (Acknowledgment) flag count. |
Avg Packet Size | The average size of packets in a flow. |
Subflow Fwd Bytes | The number of bytes forwarded in subflows. |
Total Backward Packets | Number of packets per second in the flow. |
Idle Mean | Indicates the average idle time between packets. |
Flow Packets/s | Measures packet transmission rate. |
Packet Length Mean | Number of packets per second in the flow. |
Feature Filtering Algorithm | Prediction Accuracy (%) |
---|---|
Proposed method | 97.66 |
Lasso | 89.63 |
Pearson | 88.74 |
Spearman | 87.55 |
Kernel | 86.12 |
Distance corr | 85.22 |
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. |
© 2025 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
Peng, S.; Tian, J.; Zheng, X.; Chen, S.; Shu, Z. DDoS Defense Strategy Based on Blockchain and Unsupervised Learning Techniques in SDN. Future Internet 2025, 17, 367. https://doi.org/10.3390/fi17080367
Peng S, Tian J, Zheng X, Chen S, Shu Z. DDoS Defense Strategy Based on Blockchain and Unsupervised Learning Techniques in SDN. Future Internet. 2025; 17(8):367. https://doi.org/10.3390/fi17080367
Chicago/Turabian StylePeng, Shengmin, Jialin Tian, Xiangyu Zheng, Shuwu Chen, and Zhaogang Shu. 2025. "DDoS Defense Strategy Based on Blockchain and Unsupervised Learning Techniques in SDN" Future Internet 17, no. 8: 367. https://doi.org/10.3390/fi17080367
APA StylePeng, S., Tian, J., Zheng, X., Chen, S., & Shu, Z. (2025). DDoS Defense Strategy Based on Blockchain and Unsupervised Learning Techniques in SDN. Future Internet, 17(8), 367. https://doi.org/10.3390/fi17080367