A Distributed Approach Based on Catboost,
BlockChain and Edge Computing for IoT
Security
Maryam Douiba1,*, Chaimae Hazman1, 2, Azidine Guezzaz1, Said Benkirane1, and Vinayakumar Ravi3
1
SISAR Team, LaRTiD Laboratory. Technology Higher School Essaouira, Cadi Ayyad University,
Marrakech, Morocco.
2
Research Team LAMIGE, EMSI-Marrakech, Morocco.
3
Center for Artificial Intelligence, Prince Mohammad Bin Fahd University, Khobar, Saudi Arabia
*Corresponding Author: Maryam Douiba (maryam.douiba5@[Link])
Abstract
Security has become a significant challenge, especially among the Internet of Things
(IoT) that expanded rapidly in addition to generated vast amounts of data. Various
connected devices, communication protocols, operating systems and hardware
configurations increase the risk of cyber threats, which can compromise data
confidentiality, integrity, and availability. Additionally, it makes attack detection more
challenging, as cloud computing has to deal with the high latency of IoT applications
which can make real-time processing difficult. Edge computing is the solution that
solves these problems by processing data at local nodes and improving quality of service
(QoS). As a result, real-time protection by integrating artificial intelligence (AI) and
BlockChain technologies is essential to strengthening security because AI enhances
attack detection through learning from data patterns. At the same time,BlockChain
secures data exchanges and ensures integrity in a decentralized manner. In this context,
we propose a distributed approach forsecuring IoT using BlockChain and Catboost in
Edge computing; we explore how AI and BlockChain can secure IoT services in
distributed Edge Computing.
Keywords: IoT Security; BlockChain; ML; Catboost;Edge Computing; Ethereum; Smart
Contract;
I. Introduction
The IoT is predicated on a vast network of intelligent objects equipped with actuators,
sensors and processors, interacting via various communication protocols. Choosing a
particular protocol depends on the constraints imposed by the specific IoT application,
particularly with regard to factors such as security, latency, bandwidth and energy
consumption [8, 9]. Moreover, IoT has become a vital part of our modern world because
it is key to collecting and analyzing data in real-time, offering significant benefits in
efficiency, management, and decision-making. Its networked infrastructure connects a
wide variety of smart devices across different sectors, including healthcare, industry,
agriculture, and smart cities; this engenders an elevated probability of cyberattacks,
which can impact the integrity, confidentiality and availability of sensitive [Link]
1
diversity poses significant challenges to network security, necessitating the development
of innovative solutions adapted to the constraints of distributed environments for secure
data exchanges especially when IoT devices are operating in an open and insecure
environments. So, It is imperative to ensure the security of IoT networks to facilitate
their effective operation [9,11].
On the other hand, Edge computing is represented as a transformative technology in the
field of IoT that offers services in real time through local data processing; This
innovation involves directly processing data at its source, such as routers, surveillance
cameras and devices to significantly reduce latency. Hence, The notable benefit of edge
computing is its about the thier potentials to enhance data security [8, 9, 11]. The
transmission of data to remote servers is a practice that should be avoided in order to
mitigate the risks of interception and information theft. Given the potentially
catastrophic consequences of any data leakage the significance is especially pronounced
in the context of critical infrastructures, including but not limited to power grids,
hospitals and financial institutions [8, 9, 10, 11].
To combat the challenges of IoT security, we propose an innovative approach to
detecting and responding to cyberattacks on the Edge. This approach is built on a
collaborative distributed intrusion detection system (IDS) deployed on the Edge, which
uses Blockchain to guarantee reliability and trust between interconnected
EdgeRaspberry Pi within a private network. The core of this model is an advanced IDS
that employs binary intrusion classification implemented via the CatBoost library
ensuring 99.2% accuracy and efficiency in detecting normal traffic and identifying any
anomalous traffic as an attack. Furthermore, a hybrid smart contract is integrated into
the BlockChain to secure the import of intrusion data, automate the execution of
security functions, and reduce latency in decision-making. This study represents a
substantial advancement by investigating the efficacy of collaborative IDS, the potential
of BlockChain technology and the capabilities of machine learning algorithms in edge
computing.
We structuredour paper as follows:Section 2 presents a related work about collaborative
IDS using BlockChain and machine learning (ML) in IoT networks. The subsequent
section, Section 3, outlines the proposed design, emphasizing its importance in
addressing the pressing security challenges of IoT. The results of the experiment are
discussed in section 4.
II. Related Work
Because of the rise of complex cyber threats, researchers explored BlockChain
as a potential solution in order to enhance security in collaborative IDS;
2
BlockChain has led to numerous studies proposing innovative strategies that
could significantly bolster data integrity, security and trust.
Selvarajan et al. [12] created a BlockChain-based security model for industrial
IoT systems. The model proposed by Selvarajanfocuses on privacy protection
and system efficiencyusing a simple proof-of-work consensus mechanism and a
machine learning-based neural network for attack classification. Their system is
secure, moreover it doesn't need a lot of computing power. Similarly, Truong et
al. [9] introduced Meta Collaborative IDS;we talk here about a decentralized
BlockChain-driven IDS that integrates two detection modules, first a multi-class
classifier that learns from labeled-data with an attention mechanism then an
anomaly detection module that uses a deep auto-encoder to find zeroday
attacks. Theexperiments of Truong et al. [9]showed a detection accuracy
between 96% and 99% across four different network intrusion datasets.
Alkadi et al. [5] developed a distributed intrusion detection system that uses
BlockChain and smart contracts to strengthen IoT security and privacy. To
enhance the accuracy of anomaly detection Alkadi et al. [5] incorporates deep
learning specifically a bi-directional LSTM algorithm. In a similar manner, Hu et
al. [6] presented a decentralized multimodal gateway system (MMG) that boosts
detection efficiency via BlockChain’s consensus mechanisms and correlation-
based anomaly detection techniques.
Aliyu et al. [8] proposed a federated learning BlockChain-based model for IDS in
networks powered by SDN. Their system utilizes the Ethereum BlockChain along
with Mininet simulation to enable manufacturers and end-users to engage in
model training while safeguarding sensitive information. Storing model hashes
on the BlockChain minimizes the risk of adversarial attacks and removes
individual points of failure.
Madhusekhar et al. [4] investigated how effective BlockChain-integrated
intrusion detection is during network blackout situations, utilizing Hyperledger
Fabric to evaluate security performance. Their analysis focused on execution
time, latency, throughput, and the efficiency of transaction processing using the
UNSW NB15 dataset. Liang et al. [10] investigated data clustering with
efficiency and within BlockChain networks, they found that merely reducing
clustering features did not adequately support dependable anomaly detection.
3
To address this issue, they suggested a collaborative IDS that operates on the
BlockChain, which systematically enhances attack detection patterns through
ongoing competition among cluster nodes, ultimately producing weighted
coefficients to improve classification.
III. Proposed Design
Developing innovative solutions for identifying and addressing cyber threats
imperative faces to IoT increasing security challenges, a particularly
encouraging approach involves the incorporation of technologies such as
BlockChain, Edge and artificial intelligence. This integration has the potential to
enhance the security of IoT infrastructures while optimizing system costs and
responsiveness.
The proposed approach features a collaborative IDS deployed directly at the
Edge, where devices like Raspberry Pi connect within a private network to work
together in identifying suspicious activity. BlockChain technology is essential in
this architecture because it provide dependable communication among devices
and enhancing trust in the detection process. In intrusion detection, a new IDS
model has been created, utilizing advanced binary classification techniques. We
utilized the Gradient Boosted Decision Trees (GBDT) algorithm through the
CatBoost open-source library to enables effective classification of normal traffic.
Our model is enhanced by incorporating a hybrid smart contract that
automatically uploads intrusion data to the BlockChain, performs security
functions independently, and consequently minimizes decision-making delays. At
present, the effectiveness of this approach is evaluated based on various criteria
such as detection accuracy, response time, and energy efficiency, particularly
with Raspberry Pi devices.
The proposed approach integrates collaborative IDS, BlockChain's reliability,
and machine learning algorithms' potency to furnish a robust solution for
securing IoT networks against emerging threats; This approach will improve
ability to detect and respond to attacks, optimize system performance, and
reduce the financial impact of cyberattacks on operational costs. The objective is
to enhance the resilience of IoT infrastructures by ensuring proactive IDS, and
rapid response to cyberattacks while guaranteeing optimal service continuity.
Integrating these technologies into an Edge environment has resulted in a
highly effective and scalable approach to meeting the demands of contemporary
4
IoT networks. Figure 1 offers a Visual representation of the process mentioned
above:
Figure 1: Proposed distributed intrusion detection architecture.
IV. Results and Discussions
We present an evaluation of the efficacy of our approach. The evaluation is
conducted, and the results of implementing our system on six nodes are
presentedin this section.
The proposed model has been implemented on the private network of the
Ethereum BlockChain. The implementation of our model necessitated the
utilization of Geth, Solidity, and Go, which are deemed essential components.
This implementation was used to deploy the smart contract and operate the
private BlockChain network. The private BlockChain network consists of six
nodes, all of which are designated as proposing authorities. The model test was
executed for a duration of 24 hours, during which the following results were
5
obtained on RPi: the various metrics generated by the nodes that were
monitored using Grafana and matplotlib. Collaborative IDS, a BlockChain-based
system, facilitates the establishment of connections and the exchange of data
among nodes, including alerts. This is achieved through an automatic script
where each node tracks its partners over a predefined period. The CICIOT2023
dataset was utilized for the model test, as illustrated in the subsequent table 1.
Table 1:CICIOT2023 dataset description
Attacks Traffic Normal Traffic
Dataset Total Samples
Samples (%) Samples (%)
CIC-IoT-2023 61.7% 38.3% 963773
Although the binary detection approach utilizing GBDT with CatBoost exhibited
superior performance metrics, as shown in figure 2, imposing a minimum
sample size constraint was necessary. This was driven by the necessity of
adhering to the processing time constraints inherent to each transaction. Our
tests highlight the impressive effectiveness of the model, demonstrating an
average accuracy of 99.2% in identifying anomalies during each transaction on
every Raspberry Pi; The result attained through the binary classification of
transactions, showcasing its advanced ability to detect anomalous behavior.
Figure 2: Training anomaly detection results
Figure 2 is about the Geth dashboard. It shows a stable linear progression of
block additions, indicating that transaction processing and block integration into
6
the BlockChain are proceeding smoothly, the node processed block 26712 with
associated headers, receipts, and transactions. The node appears to be
operating efficiently, continuously processing blocks and transactions without
interruption.
Figure 3: An exposition on the functional dynamics of blockchain.
Table 2 presents a comparison of machine learning-based anomaly detection
approaches in blockchain environments. Previous methods such as those by
Liang and Madhusekharutilize traditional models like SVM or combinations of
CNN, RF, and XG-Boostachieving about 97.7% of accuracy, although the
consensus mechanisms used are often unspecified. Hu et al. employ a simpler
model One-class SVMwith a Delegated Proof of Stake consensus reaching 96.3%
of accuracy. The ALIYU approach, based on Federated Forest and the Proof of
Authority consensus on Ethereum, achieves a notable 98.1% accuracy. Our
proposed approach which combines GBDT via CatBoost with the Proof of
Authority consensus on Ethereumreaching 99.2% accuracy. This demonstrates
7
superior anomaly detection capabilities and enhanced effectiveness in
blockchain-based environments.
Finally we conclude that our proposal on Ethereum outperformed all other
proposals and stands out by achieving an accuracy rate of 99.2%, as shown in
Table 2, this superior accuracy can be attributed to the use of an advanced IDS
based on GBDT, which is known for its ability to build highly accurate models, as
we have previously demonstrated in our publications [12]. Moreover, choosing
Ethereum with a proof-of-authority consensus for the BlockChain environment
enhances model performance. To summarize, the effectiveness of the proposed
model is showcased by its higher intrusion detection accuracy compared to all
other models shown in this table, thereby confirming its robustness and
efficiency in a BlockChain setting.
Table 2: A comparison of Distrusted Collaborative IDS.
Accuracy
ML Consensus BlockChain
%
Hyperledger
Liang et al. [10] SVM Not specified ≅ 90
Fabric
Delegated
Hu et al. [6] One-class SVM Simulation 96,3
proof of stake
Madhusekhar et CNN, RF, and XG- Hyperledger
Not specified 97,7
al. [4] boost Fabric
Proof of
ALIYU et al. [8] Federated Forest Ethereum 98,1
Authority
Proof of
Our Approach GBDT via Catboost Ethereum 99,2
Authority
V. Conclusion & Future Work
This document introduced an effective distributed method to encrypt IoT
settings by merging BlockChain technology with the CatBoost algorithm in Edge
computing. Our collaborative IDS, utilizing Ethereum's Proof of Authority
consensus, achieved an impressive accuracy of 99.2%, greatly surpassing
8
current solutions. This success underscores the power of integrating
BlockChain's dependability with cutting-edge machine learning techniques.
Looking ahead, we intend to enhance our approach by addressing scalability
challenges and assessing our model in broader, diverse IoT networks while
evaluating its performance across different network conditions.
References
1. Selvarajan, S., Srivastava, G., &Khadidos, A. O. (2023). An artificial intelligence
lightweight BlockChain security model for security and privacy in IIoT systems. Journal
of Cloud Computing, 12(1), 38. [Link]
2. Truong, V. T., & Le, L. B. (2023). MetaCIDS: Privacy-preserving collaborative intrusion
detection for metaverse based on BlockChain and online federated learning. IEEE
Open Journal of the Computer Society, 4, 253–266.
[Link]
3. Alkadi, O., Moustafa, N., Turnbull, B., & Choo, K.-K. R. (2021). A deep BlockChain
framework-enabled collaborative intrusion detection for protecting IoT and cloud
networks. IEEE Internet of Things Journal, 8(12), 9463–9472.
[Link]
4. Hu, B., Zhou, C., Tian, Y., Qin, Y., &Junping, X. (2019). A collaborative intrusion detection
approach using BlockChain for multi-microgrid systems. IEEE Transactions on
Systems, Man, and Cybernetics: Systems, 49(8), 1720–1730.
[Link]
5. Aliyu, I., Feliciano, M. C., Van Engelenburg, S., Kim, D. O., & Lim, C. G. (2021). A
BlockChain-based federated forest for SDN-enabled in-vehicle network intrusion
detection system. IEEE Access, 9, 102593–102608.
[Link]
6. Madhusekhar, Y., Priyanka, S., Mandru, D. B., & Srikanth, T. (2023). BlockChain: A safe
way to transfer signatures in a distributed intrusion detection system. In A. R.
Manchuri, D. Marla, & V. V. Rao (Eds.), Intelligent Manufacturing and Energy
Sustainability (Vol. 334, pp. xxx–xxx). Springer. [Link]
8742-3_6
7. Liang, W., Xiao, L., Zhang, K., Tang, M., He, D., & Li, K.-C. (2021). Data fusion approach
for collaborative anomaly intrusion detection in BlockChain-based systems. IEEE
Internet of Things Journal. [Link]
8. Huong, T. T., Bac, T. P., Long, D. M., Thang, B. D., Binh, N. T., Luong, T. D., & Phuc, T. K.
(2020). LocKedge: Low-Complexity Cyberattack Detection in IoT Edge Computing.
9. Spadaccino, P., & Cuomo, F. (2020). Intrusion detection systems for IoT: Opportunities
and challenges offered by edge computing and machine learning. arXiv preprint
arXiv:2012.01174. [Link]
9
10. Hafeez, I., Antikainen, M., Ding, A. Y., &Tarkoma, S. (2018). IoT-KEEPER: Securing IoT
communications in edge networks. arXiv preprint arXiv:1810.08415.
[Link]
11. Hosseininoorbin, S., Layeghy, S., Sarhan, M., Jurdak, R., & Portmann, M. (2021).
Exploring Edge TPU for network intrusion detection in IoT. arXiv preprint
arXiv:2103.16295. [Link]
12. Douiba, M., Benkirane, S., Guezzaz, A., &Azrour, M. (2023). An improved anomaly
detection model for IoT security using decision tree and gradient boosting. The Journal
of Supercomputing, 79, 3392–3411. [Link]
10