Wireless Sensor Networks (WSNs) are widely used for monitoring and data collection in various environments. However, these networks are vulnerable to attacks from malicious nodes, which can compromise the integrity and reliability of the system. In this work, I propose a model that combines blockchain-based registration and authentication with machine learning for real-time malicious node detection. The system uses the Histogram Gradient Boost (HGB) classifier to identify threats and stores legitimate data in the Interplanetary File System (IPFS), with hashes recorded on the blockchain. To keep the system efficient, I use the Verifiable Byzantine Fault Tolerance (VBFT) consensus instead of Proof of Work (PoW). My results, based on the WSN-DS dataset, show that this approach not only improves detection accuracy but also reduces transaction costs compared to traditional methods.
Introduction
Context:
Wireless Sensor Networks (WSNs) consist of numerous small sensor nodes deployed in open or hostile environments for tasks like environmental monitoring and surveillance. These networks are vulnerable to malicious nodes that can disrupt communication or send false data. Traditional centralized authentication methods create single points of failure and are unsuitable for WSNs’ resource constraints.
Proposed Solution:
A decentralized security framework combining blockchain technology and machine learning to ensure secure node registration, data storage, and malicious node detection:
Blockchain is used for decentralized authentication of sensor nodes (SNs) and cluster heads (CHs), preventing unauthorized access without relying on a central authority.
IPFS (InterPlanetary File System) provides efficient, decentralized data storage, while blockchain stores secure hashes of the data to ensure integrity and tamper-proof auditing.
The consensus algorithm used is Verifiable Byzantine Fault Tolerance (VBFT), which reduces transaction costs and improves throughput compared to traditional Proof of Work (PoW).
A Histogram Gradient Boosting (HGB) classifier runs on powerful base stations (BSs) to detect malicious nodes in real-time, outperforming other classifiers like AdaBoost and Gradient Boosting.
System Architecture & Workflow:
Sensor Nodes (SNs): Resource-limited nodes that collect data and register via blockchain.
Cluster Heads (CHs): Intermediate nodes that aggregate data from SNs and forward it to base stations.
Base Stations (BSs): High-capacity nodes that manage blockchain operations, run the HGB classifier for anomaly detection, and coordinate data storage on IPFS.
Customers: Registered users who access sensor data by retrieving hashes from the blockchain and data from IPFS.
Nodes must register on the blockchain before joining the network; malicious nodes detected by the classifier are promptly revoked from registration to maintain network security.
Machine Learning Details:
The HGB classifier demonstrated superior accuracy, precision, recall, and F1-score for detecting malicious activity compared to other tested models.
Dataset: WSN-DS with 18 features across five classes (normal and four attack types).
SMOTE technique applied to balance the dataset and improve classifier training.
Results:
VBFT consensus significantly lowered blockchain transaction costs, especially for node registration.
IPFS efficiently handled file uploads and downloads even for large data volumes.
HGB classifier showed excellent performance in malicious node detection, ensuring real-time threat response and network integrity.
Conclusion
This work presents a secure and efficient framework for detecting malicious nodes in WSNs using machine learning and blockchain. The combination of HGB for detection and VBFT for consensus achieves high accuracy and low transaction costs. In the future, I plan to explore ensemble models and smart contract vulnerability analysis to further enhance the system.
References
[1] Nouman, U. Qasim, H. Nasir, A. Almasoud, M. Imran, and N. Javaid,
“Malicious Node Detection Using Machine Learning and Distributed Data Storage Using Blockchain in WSNs,”
IEEE Access, vol. 11, pp. 6105–6122, Jan. 2023.
DOI: 10.1109/ACCESS.2023.3236983.
[2] [2]L. Xiong, N. Xiong, C. Wang, X. Yu, and M. Shuai, ‘‘An efficientlightweight authentication scheme with adaptive resilience of asynchronization attacks for wireless sensor networks,’’ IEEE Trans. Syst.,Man, Cybern., Syst., vol. 51, no. 9, pp. 5626–5638, Sep. 2021, doi:10.1109/TSMC.2019.2957175.
[3] [3] H. Wang, P. Tu, P. Wang, and J. Yang, ‘‘A redundant and energyefficientclusterhead selection protocol for wireless sensor network,’’ in Proc. 2nd Int. Conf. Commun. Softw. Netw., 2010, pp. 554–558, doi:10.1109/ICCSN.2010.46
[4] [4] S. A. Sert, E. Onur, and A. Yazici, ‘‘Security attacks and countermeasures in surveillance wireless sensor networks,’’ in Proc. 9th Int. Conf. Appl. Inf.Commun. Technol. (AICT), Oct. 2015, pp. 201–205.
[5] [5] S. A. Sert, C. Fung, R. George, and A. Yazici, ‘‘An efficient fuzzy pathselection approach to mitigate selective forwarding attacks in wirelesssensor networks,’’ in Proc. IEEE Int. Conf. Fuzzy Syst. (FUZZ-IEEE),Jul. 2017, pp. 1–6.
[6] [6] R. Alkhudary, ‘‘Blockchain technology between Nakamoto and supply chain management: Insights from academia and practice,’’ SSRN Electron.J., pp. 1–12, Jul. 2020, doi: 10.2139/ssrn.3660342.
[7] [7]Z. Abubaker, N. Javaid, A. Almogren, M. Akbar, M. Zuair, andJ. Ben-Othman, ‘‘Blockchained service provisioning and malicious nodedetection via federated learning in scalable internet of sensor things networks,’’Comput. Netw., vol. 204, Feb. 2022, Art. no. 108691.
[8] [8]A. S. Yahaya, N. Javaid, M. U. Javed, A. Almogren, and A. Radwan,‘‘Blockchain based secure energy trading with mutual verifiable fairness in a smart community,’’ IEEE Trans. Ind. Informat., vol. 18, no. 11,pp. 7412–7422, Nov. 2022.
[9] [9]O. J. Pandey, V. Gautam, S. Jha, M. K. Shukla, and R. M. Hegde, ‘‘Time synchronized node localization using optimal H-node allocation in a small world WSN,’’ IEEE Commun. Lett., vol. 24, no. 11, pp. 2579–2583,Nov. 2020, doi: 10.1109/LCOMM.2020.3008086.
[10] [10] Z. Abubaker, A. U. Khan, A. Almogren, S. Abbas, A. Javaid, A. Radwan,and N. Javaid, ‘‘Trustful data trading through monetizing IoT data usingBlockChain based review system,’’ Concurrency Comput., Pract. Exper.,vol. 34, no. 5, p. e6739, Feb. 2022.