Skip to Content
SensorsSensors
  • Article
  • Open Access

7 November 2022

A Hybrid Spider Monkey and Hierarchical Particle Swarm Optimization Approach for Intrusion Detection on Internet of Things

and
Department of Networking and Communications, SRM Institute of Science and Technology (SRMIST), Kattankulathur Campus, Kattankulathur 603203, India
*
Author to whom correspondence should be addressed.

Abstract

The Internet of Things (IoT) network integrates physical objects such as sensors, networks, and electronics with software to collect and exchange data. Physical objects with a unique IP address communicate with external entities over the internet to exchange data in the network. Due to a lack of security measures, these network entities are vulnerable to severe attacks. To address this, an efficient security mechanism for dealing with the threat and detecting attacks is necessary. The proposed hybrid optimization approach combines Spider Monkey Optimization (SMO) and Hierarchical Particle Swarm Optimization (HPSO) to handle the huge amount of intrusion data classification problems and improve detection accuracy by minimizing false alarm rates. After finding the best optimum values, the Random Forest Classifier (RFC) was used to classify attacks from the NSL-KDD and UNSW-NB 15 datasets. The SVM model obtained accuracy of 91.82%, DT of 98.99%, and RFC of 99.13%, and the proposed model obtained 99.175% for the NSL-KDD dataset. Similarly, SVM obtained accuracy of 85.88%, DT of 88.87%, RFC of 91.65%, and the proposed model obtained 99.18% for the UNSW NB-15 dataset. The proposed model achieved accuracy of 99.175% for the NSL-KDD dataset which is higher than the state-of-the-art techniques such as DNN of 97.72% and Ensemble Learning at 85.2%.

1. Introduction

The Internet of Things (IoT) provides services for different fields for data exchange in the infrastructure [1]. There are various applications of IoT, including smart homes, smart cities, hospitals, supply chain system, smart grid systems, intelligent transportation systems, etc. The IoT includes embedded sensor networks, physical objects, electronics, software connection, and embedded electronics to exchange the data [2]. The IoT connection helps significantly with data exchange, improving human lives, and thus, the crucial part of the IoT is the cyber security problem, which affects the development of applications [3]. The IoT applications are more vulnerable to the malicious agents, so the IoT devices for processing have reduced capacity. As the number of IoT devices grows, there is a greater risk of security vulnerabilities, such as data theft and the possibility of Distributed Denial of Service (DDoS) attacks [4]. The DDoS attacks will usually damage the node availability via signal jamming or resource exhausting in the node’s battery. There are two types of DDoS attack. One crashes the services and other floods the services [5]. The Denial of Service (DoS) characterizes the attackers based on an explicit attempt at services prevention that deploys the IoT devices to reach the goals. The server is compromised when the attacks occur, and the IoT devices of the network are affected, resulting in an industrial loss [6]. There are various attacks present which target IoT devices, such Mirai, Hajime, Hide and Seek, Bashlite, Tsunami, Brickerbot, and Luabot. There have been various attacks initiated in the computer networks such as Port Scanning, Brute Force, Remote to Local (R2L), Denial of Service (DoS), User to Root (U2R), and Probing, etc. Figure 1 shows the representations of IoT towards the attackers. Network-based Intrusion Detection System (NIDS) are useful for monitoring the network infrastructure, and malicious activities are detected [7,8,9]. The open literature is studied when an intruder launches a network in which the intruder has the potential to determine the attacks that use system vulnerabilities. They gain unauthorized access to users’ information in order to take the system down.
Figure 1. Pictorial Representation of attackers towards IoT devices.
Various Machine Learning algorithms are applied to perform NIDS such as Artificial Neural Networks (ANN) [10], K-Nearest Neighbor (KNN) [11], Naive Bayesian (NB), and Support Vector Machine (SVM) [12]. However, the algorithms require the data to process the missing values of unstable results, and they run slowly because of the large amount of data. Therefore, optimization methods such as Particle Swarm Optimization (PSO), Whale Optimization Algorithm (WOA), Dolphin Swarm Algorithm (DSA), Gray Wolf Optimization (GWO), etc., were used to select the appropriate features for IoT attacks classification in the environment. Feature selection was used to discard the redundant and irrelevant features and choose the optimal feature subset to improve the pattern definition that belongs to dissimilar classes [13,14,15]. The extraction of appropriate features was used to minimize the amount of training and guarantee accuracy during the detection [16]. A cooperative classification model was developed by choosing a top set of attributes using the feature selection [17,18]. The prior models did not provide effective feature representation and did not extract the features required to obtain the random Fourier feature needed to fit the linear classifier. The changes in the large size of data and the unnecessary changes increased the operating time; hence, the desired results were not achieved during the intrusion detection.
From the literature, it is concluded that various security challenges and issues were present in the IoT application. The key challenges faced are as follows:
  • Designing a security framework for the IoT application is a problematic task because of the dynamic IoT network nature.
  • The security mechanism for IoT is ensured by using an appropriate tool for distribution of architecture, which has the ability to analyze a huge amount of data. This was a challenge.
  • The network environment has interconnected devices, which includes poorly designed sensors and authentication measures.
Therefore, the above issues are addressed by using a Hybrid SMO-HPSO that analyzed the huge amount of data via IoT devices. The IDS has the advantages of mitigating the attacks in IoT and ensures the security mechanism by using an appropriate tool. The proposed method uses the hybrid feature selection algorithm that identified the appropriate features for discarding the irrelevant features. Therefore, the hybrid feature selection is used to obtain the subset of features that results with improvement in the performances. The RF classifier is employed to classify and identifies the attacks as normal and abnormal attack observations.
Thus, the main contributions of this study are mentioned as follows:
  • The hybrid feature selection that combines SMO and HPSO is developed to solve the massive intrusion data classification problem and improve the accuracy rate of attack detection. The local searching phase of conventional SMO is operated in a random manner, which affects the optimal score value. In order to overcome this issue, the hierarchical PSO’s velocity is combined with SMO’s searching process to obtain the optimal feature subset.
  • Further, the feature importance with Rosenbrock function is included as gradient for Hybrid SMO-HPSO. Rosenbrock is a parabolic mathematical function which represents the probability density function of any events. In this research, the probability of features contributing to the target class is defined by the Rosenbrock function, so the Hybrid SMO-HPSO does not require any classified instance output to compute the fitness.
  • To enhance the accuracy that shows lower classification error, the attacks for NSL-KDD are classified into four types of attack, including DoS, U2R, R2L, and probing attack. The UNSW Dataset classifies the attacks into normal and abnormal classes.
The structure of this study is as follows: Section 2 examines related studies of IDS detection for IoT attack categorization. Section 3 elaborates on the methodology used for the development of the hybrid model. Section 4 presents a simulation comparison and performance evaluation to demonstrate the efficacy of the suggested model. The conclusion is given in Section 5.

3. Proposed Methodology

NSL-KDD and UNSW NB-15 are the datasets utilized in this research work. The unwanted data are eliminated in the datasets after data preprocessing has been performed. In SMO-HPSO, SMO deliberate the features from which the leader determines whether to divide or merge, resulting in the optimum feature value being selected. Similarly, HPSO will organize the particles hierarchically depending on their best function and then use RFC to classify the attacks. The flow chart of SMO-HPSO is presented in Figure 2.
Figure 2. The block diagram of proposed SMO-HPSO feature selection method.

3.1. Data Collection

The NSL-KDD dataset is applied to the IoT context, which is based on the original KDD Cup 99 datasets that are obtained by removing the duplications and redundancies presented in them. The NSL-KDD dataset has 41 labeled characteristics, which include attack types. The NSL-KDD is proposed to alleviate the issues occurring in the KDD’99 datasets [29]. The training and test sets consist of a reasonable number of recordings. This benefit makes it possible to perform the tests on the entire collection without having to randomly choose a tiny piece. As a consequence, the assessment outcomes of various research projects will be uniform and equivalent.
The NSL-KDD has four attacks, which are outlined as follows: DoS, U2R, R2L, and probing Attack.
Probe attack:
During the scanning process, the probe attack occurs, which involved gathering abuse of data and information from the network.
R2L: The packets acquired are sent and computer detects the flaws present in the network.
U2R: Once the ordinary account is obtained, U2R has access to the root account. Load module, Buffer overflow, Xterm, Rootkit, Perl, Ps, and Sql attack are some of the assaults in U2R.
DoS: Due to increased network traffic use, the system is unable to offer a service, resulting in a DoS attack. DoS attacks include Back, Apache2, Udp Storm, Smurf, Neptune, Pod, Land, Teardrop, and Worm, all of which which can steal data via the internet.
The dataset consists of 53,873 records for KDD Train+ for training and validation of the subset. It has 6735 normal records, and 6735 for the test subset which contains anomalous data.
In addition, the UNSW NB-15 dataset is utilized to evaluate the suggested technique, which is made up of 15 datasets generated based on the IXIA Perfect Storm tool. The Cyber Range Lab of University of New South Wales (UNSW), Canberra, generates a mix of actual and regular activities for identifying attack behaviors. The dataset comprises nine different attacks, including backdoors and denial-of-service attacks. Generic, Exploits, Generic, Shellcode, Reconnaissance, Fuzzers, and Worms are also examples of generics. The Argus and Bro-IDS are exploited in 12 methods to create a total of 49 class-labeled features. The Argus and Bro-IDS tools generate them using 12 methods, and a total of 540,044 records are saved in CSV files. From the UNSW NB-1515 GT.csv, the ground truth images are taken. The event list is known as the ground truth, also called UNSW NB-1515 GT.csv, where the event list is called UNSW-NB15 LIST EVENTS.csv. For training and testing, the partition is taken from the configured dataset. There are a total of 175,341 training set records and 82,332 testing set records from different sorts of attacks from regular attacks [30]. The information of UNSW and NSL-KDD dataset is provided in Table 1, which includes statistical information.
Table 1. NSL-KDD dataset and UNSW dataset.

3.2. Preprocessing

Several data preprocessing methods are used, including data cleaning, normalization, and data integration. The data cleaning process involves actions such as removing duplicated data points, standardized datasets, and syntax errors, as well as missing codes, empty fields, and finding missing codes. The cleaning of the data from the datasets is standardized to perform data analysis and it can be conveniently accessed for finding the appropriate data. In normalization, data vectors are introduced as new vectors. The key advantages of data normalization are enhanced consistency and a reduced risk of data inconsistency. The Min–Max normalization model is critical for the integration and normalization process. Every feature value has minimum value that converts to zero and one as the maximum value. The normalisation procedure is expressed by Equation (1).
X n o r m = X i X m i n X m a x X m i n
where X i is the data point, X m i n and X m a x is referred as minimum and maximum value of the data point with batch instances. The main importance of Recursive Feature Elimination (RFE) is that it provides importance values by ranking the most important features. It is supposed that data redundancy is eliminated and yields more compact feature subsets. The features are arranged from high importance to low importance, and thus the ranking of features will be obtained.

3.3. Feature Selection

After the data have been extracted, the feature selection process occurs to detect low-rate attacks using a hybrid method combining SMO and H-PSO. The hybrid algorithm enhances the accuracy and includes lower classification error, and classifies the attacks among Probe, DoS, R2L, and U2R. The outcomes are verified using various performance measures that are explained in the next section. In Hierarchical PSO (H-PSO), the motion of H-PSO is affected by three aspects: movement induced by swarm individuals, foraging activity, and physical diffusion motion, which are explained using the flow chart in Figure 3. The HPSO is known as the meta-heuristic technique that is similar to Spider Monkeys (SM). The SMs activities are found on social formation and foraging behaviour. The fission–fusion features are extracted based on the algorithm where the leader is from the group dependent on social organisation.
Figure 3. Steps involved in hybrid feature selection algorithm.

3.3.1. Spider Monkey Optimisation Algorithm

SMO is an algorithm that is designed based on the swarm intelligence which has a small group of SMs that are inspired by an intelligent foraging SMs behavior. The fission is created for single group that contains fewer monkeys, which defines the time for fusion. The algorithm is dependent on the social organization of a group of features from the leader, which makes a decision whether to combine or split to search for food. The leader of overall groups is the global leader and leader for each group is the local leader.

3.3.2. Particle Swarm Optimization

The social activities are stimulated through the fundamental and primary behavior of fish schooling and bird flocking. The food searching is performed for the scattered data or settled on the position based on the place where the food is found. The food is searched for by the agents that move from one place to another, and the agents search the feature subset from its position that moves towards it to find and managing it. The useful messages are transmitted, and the food for the agent is searched from one location to another; thus, it is found. The animals’ behavior calculated on the basis of optimization because of the crowd or swarm is called the particle. For each partner’s position, the PSO algorithm finds it from the crowd and searches for the space globally, and it is updated based on Equations (2) and (3).
v i k + 1 = v i k + c 1 r 1 p b e s t x i k + c 2 r 2 g b e s t x i k
x i k + 1 = x i k + v i k + 1
where, x i k is the current position, v i k is the current velocity for i th particle for k th iteration, p b e s t x i k is the distance among its current and best position, g b e s t x i k   is the distance among the current and global best position, x i k + 1 is the upcoming position of the particle, v i k is the upcoming velocity of the particle.   c 1 and c 2 are the positive constants, r 1 and r 2 are the two random variables ranges between 0 and 1.

3.3.3. Proposed Hybrid Optimization Algorithm

There are various hybridization variants present for the heuristic algorithm. There are two main variants that are low-level and high-level relay or evolutionary techniques which would be heterogeneous of homogeneous techniques used to obtain the solution. The SMO algorithm will represent the potential solutions for SM. The SMO usually comprises six phases, such as Global Leader phase, Local Leader phase, Global Leader Learning phase, Local Leader Decision phase, Leader Learning Phase, and Global Leader Decision phase.
Population Initialization
The population P from the SMO is initialized and distributed as 50, which is represented as S M p   ( w h e r e   p = 1 ,   2   P ). The p th monkey is among the S M p population, and the monkeys present have M dimension vectors. These vectors or the variables overcome the problem as the S M p receives the solution. Thus, the problem option showed by the initialized S M p is expressed as shown in Equation (4):
S M p q = S M m i n q + U R 0 ,   1 × S M m a x q S M m i n q
where S M p q is known as the p th SM with a q th dimension; S M m i n q and S M m a x q is known as the upper and lower bounds that are moving in the direction of q th ; the term q is equal to 1, 2,…M and the random numbers range among U R 0 , 1 as it is distributed uniformly that it ranges between [0, 1].
Local Leader Phase (LLP)
The SM position is updated as a new position that assigns the fitness value to obtain the higher value, which is compared with the previous locations. The location updated for the l th local group for the p th SM is expressed as shown in Equation (5)
S M n e w p q = S M p q + U R 0 ,   1 × L L l q S M p q + U R 1 ,   1 × S M r q S M p q
where,   L L l q is the q th dimension of l th local group leader location; S M r q is the q th dimension, which chooses randomly at the l th local group of SM and r p .
Global Leader Phase (GLP)
The initialization of LLP is processed, and the SM’s location is computed by using Equation (6). The updating of the location is calculated by using Equation (6):
S M n e w p q = S M p q + U R 0 ,   1 × G L l q S M p q + U R 1 ,   1 × S M r q S M p q
where G L q is called the GLL, which is the dimension of q = 1 ,   2 ,   3 ,   M that selects the indexes arbitrarily. The calculation of fitness function for SM is evaluated based on p r b p , which is based on the location of S M p , is updated. The proposed method selects a total of 11 features out of 43 features from the NSL-KDD and 11 features out of 49 from UNSW dataset. The candidate’s location is better, and access to the number of possibilities is made better. The proposed result selects a total of 22 features that are relevant to the 92 features processed for feature selection. The 22 features are designated by means of proposed HPSO-SMO, which identifies a features-based 80-20 rule. It finds inputs that most probably have feature importance, which prioritize accessing the possibilities. The working of SMO is based on Rule-based priority, which is expressed as i ϵ S f i t n e s s f e a t u r e i m p o r t a n c e 0.8 condition.
From the mentioned condition, S is known as the chosen feature value that is obtained by feeding the data to the tree. The features for attacks classifications are not deliberated. The maximum feature value is obtained for fitness function that is based on the subsequent condition. The probability for the condition calculation is expressed as shown in Equation (7).
p r b p = f n p   N p = 1 f n p  
where, f n p is called the p th SM fitness value, which is the fitness value as N further, and the calculation of new location is calculated using Equation (6). The value obtained is related by the old location, and it is implemented on the basis of fitness value function.
Global Leader Learning (GLL) Phase
Under the GLL stage, the selection of features is updated and undergone for the selection using the greedy model. The value of fitness function is selected and generated from the population. The location is based on its optimum value, which assigns the value for the global leader. The update is not performed, and the value is incremented from one to GlobalLimitCount.
Local Leader Learning (LLL) Phase
For the local group, the LLL is updated in SM location based on the fitness values from a local group and the location is optimum. It has the value which is assigned for the local leader. A further update is not provided, as it increments to one and will be added with the LLC.
Local Leader Decision (LLD) Phase
The leaders from the local groups were fixed and updated the local group is present and the candidates randomly modifies location. From the step 1, the local leader and leader group uses the information using Equation (8)
S M n e w p q = S M p q + U R 0 ,   1 × G L l q S M p q + U R 0 ,   1 × S M r q L L p q
Global Leader Decision (GLD) Phase
The global leader position is not updated due to GlobalLeaderLimit. Populations are split into groups based on the global leader decision. The process of splitting is continued up to the groups until maximum group numbers are reached. For every 10 iterations, the selection of local leader is performed to shape the newly formed group. The groups are allowed at the maximum number to create the global leader, which does not allow a position update unless the boundary decides the entire group from one group. The population from the SMO is based on the actions performed by SMs, which improve the efficiency and deal with the complexity in the real world. In the real world, an optimization algorithm uses a fitness function which is represented pictorially in Figure 4.
Figure 4. Pictorial representation of the proposed hybrid SMO-HPSO for selecting g-best feature.
The value of fitness is computed using the value of feature importance. This assigns scores for each of the input features on the basis of target variables to perform the prediction. The importance of the feature is computed on the basis of node impurity with the weights, which decreases the probability before the node is reached. The probability for the node is calculated with the ratio of sampled numbers for the overall number of samples. Equation (9) is used to compute the fitness function to select the best features.
f i t n e s s f e a t u r e i m p o r t a n c e =   N u m b e r   o f   s a m p l e s   t h a t   r e a c h e s   t h e   n o d e s     T o t a l   n u m b e r   o f   s a m p l e s
The hybridization of SMO with the PSO algorithm generates the hybrid mixed functionality based on the low-level co-evolutionary features. The low-level hybrid functionality features merge and combine variants. The co-evolutionary is used because the variants are used one after the other, running in parallel. The two distinct variants are mixed and are involved in the generation of solutions to overcome the problems. Based on this modification, the hierarchical PSO has the ability to explore SMO to produce the variants with its strength. The PSO and SMO variants are combined, updating the velocity as proposed in Equations (10) and (11)
v i k + 1 = w v i k + c 1 r 1 x 1 x i k + c 2 r 2 x 2 x i k + c 3 r 3 x 3 x i k
x i k + 1 = x i k + v i k + 1 .
The value of the fitness function is utilized to select the best optimum value. The Rosenbrock function, which is known as the objective function, is used in the suggested approach. The Rosenbrock function is efficiently optimized using a suitable coordinate system without exploiting the gradient data, and uses the built-in local without approximation model using Equation (12)
f x = i = 1 N 1 [ 100 x i + 1 x i 2 2 + ( 1 x i ) 2 ]
where x = ( x 1 , , x N ) N .
The objective function from each variable is contributed, which optimizes the value. The general form for the objective function is expressed as shown in Equation (13)
M i n i m i z e   o r   Z   o r   g b e s t = i = 1 n c i X i
where, c i is known as the objective function coefficient for the i th variable and X i is known as the i th decision variable.
The following Algorithm 1 represents the proposed Hybrid SMO-HPSO algorithm.
Algorithm 1: Hybrid SMO-HPSO
1:  Input: Intrusion detection feature set and population size
2:  Output: Optimal feature set
3:  Initialize SM Population, Probability, Parameters, Local Leader limit and Global leader limit particles with hierarchy in the population.
4:  Calculate the importance of each feature.
5:  Evaluate the fitness of all SM.
6:  Compute leaders of global and local level leader agents for feature subset.
7:  While iteration I > M a x i m u m   i t e r a t i o n s
8:   For I = 1   t o   n
9:     Calculate fitness for every particle using Equation (9).
10:     Update particle’s local best position as per hierarchical position.
11:     Based on hierarchical particle velocity update position of all spider monkeys.
12:   End for
13:  Select group members by applying greedy selection method
14:  Update SM’s global optimal position
15:  For I = 1   t o   n
16:   Perform local and global leader learning phase using Equations (5) and (6).
17:   Update particle’s velocity with hierarchy using Equation (2).
18:   Update SM’s global best position.
19:  End for
20:  End while
Therefore, the selection of best set of features from the subset is functioned and if any uncertainty among the features is present, then information gain is evaluated.

3.4. Classification Using Random Forest

The best results from the feature selection process are provided to the RF classifier, which uses them to classify the attacks. The decision trees in the RF, an ensemble classifier designed to increase accuracy of the model, operate with smaller classification errors than the models that are currently being used. The number of trees with the smallest node size is also taken into account, and each node is split based on the number of features. The usage of RF classifier in the research work is given as follows:
  • The trees are grown and are saved as a future reference.
  • The RF classifier overcomes the problem of overfitting.
  • The important features developed in the model show improvements in accuracy that are generated automatically to classify the attacks.
Each tree is built from scratch using a bootstrap sample that contains the raw data. Every object that makes up the developed forest is referred to as a tree. Following the values of a tree, decisions are made. In order to classify things, the optimal decision for the tree is made, and every object is then voted on. The class is chosen from the forest with the highest amount of object votes. For the selection of the random variables used to construct the tree, the RF employs both the bagging and boosting processes. The characteristics of RF are as follows:
The generalization error is bound in the RF as it is dependent on the tree strengths among them with a correlation. Preceding the source of maximum voting approach, the maximum number of votes for the RFC is conducted, which classifies the attacks based on Equation (14)
p r o x i , j = t = 1 n t r e e I   h t i = h t j n t r e e
From Equation (14), I · is known as the indicator function, and h t is tree from forest.
h t i is a predicted value.
If p r o x i , j = 1 then i and j are of the same classes for classification, the RF provides important ranks or the variables for important feature selection.

4. Results and Discussion

The proposed hybrid SMO-HPSO uses Python 3.6 tool with Anaconda Navigator. The windows 10 version with 128 GB RAM running with intel i9 operating at 3GHz and the hardware drive capacity of 4TB is preferable. The following are the performances evaluated for the proposed SMO-HPSO represented by Equations (15)–(22).
Accuracy
A c c u r a c y = T P + T N T P + T N + F P + F N  
Precision
P r e c i s i o n = T P T P + F P
Recall
R e c a l l = T P T P + F N
F1-Measure
F 1 m e a s u r e = 2 P r e c i s i o n R e c a l l P r e c i s i o n + R e c a l l
Error Rate
E r r o r   R a t e = a p p r o x e x a c t e x a c t
Area Under the Curve
A U C = a b f x d x
y = f x is the curve equation; where, x = a   and x = b .
False Alarm Rate (FAR)
F A R = F P F P + T N
Matthews Correlation Coefficient (MCC)
M C C = T P × T N F P × F N T P + F P T P + F N T N + F P T N + F N
FN—False Negatives.
TP—True positives.
FP—False Positive.
TP—True Positive.

4.1. Quantitative Analysis for NSL-KDD Dataset

The results obtained of the proposed Hybrid optimization model in terms of performance are tabulated in Table 2. These outcomes are for binary classification with respect to the NSL-KDD-experiment.
Table 2. Performance evaluation for the proposed SMO-HPSO for NSL-KDD dataset to binary attack classes.
Table 2 displays the performance measure values attained for the proposed Hybrid optimization method, which is related to the existing models such as SVM, DT, and RFC. For example, the value of Precision is obtained as 88.81%, 98.22%, 98.56%, and 98.61% for the SVM, DT, RFC, and the proposed model. Figure 5 shows the evaluation of performances for the proposed SMO-HPSO model, SVM, DT, RFC, for NSL-KDD. The overall outcomes presented that proposed hybrid optimization attained superior outcomes when related to traditional methods, which is shown in Table 2.
Figure 5. Evaluation of performances for the SVM, DT, RFC, and the proposed method for the NSL-KDD dataset.
In Table 3, we show the multi attacks classification evaluated for the NSL-KDD dataset, which validates results attack types such as DoS, Probe, R2D and U2R. The results are evaluated for the attacks in terms precision, accuracy, F-measure, and recall. The SVM was used to evaluate the results, as it uses the hyper plane parameters to tune, which fails to perform well. The dataset that has more targets overlaps the class with the NSL-KDD dataset. The RF classifier uses the data to consider the feature sets that are irrespective of scales, which shows better performances. The RFC overcomes the multi class problems that are dependent, and it considers the factors of the dataset. For example, the tabulations show that the U2R attack achieves better accuracy of 99.96% values compared with other attacks. Similarly, the DoS attack achieves better precision of 99.89% when compared with other Probe, R2L, and U2R attacks. Figure 6 shows the performance evaluation for SMO-HPSO for NSL-KDD dataset to multiple attack classes.
Table 3. Performance evaluation for the proposed SMO-HPSO for NSL-KDD dataset to multiple attack classes.
Figure 6. Performance evaluation for the proposed SMO-HPSO for NSL-KDD dataset to multiple attack classes.

4.2. Quantitative Analysis for UNSW NB-15 Dataset

The classification of attacks for overall attacks are evaluated for the UNSW NB-15, which validates the results, as shown in Table 4. The evaluation of the results is in terms of AUC, FAR, and MCC. The SMO-HPSO achieves better results compared to the existing methods SVM, DT, RFC, and SMO-HPSO classifier. The tabulations attack achieves better accuracy of 92% values when compared with other attacks. Similarly, 89% of accuracy was obtained via SVM classifier. The DT has obtained 99% accuracy and AUC of 95%, 99% of accuracy by the RFC classifier and AUC of 95%. The small changes in DT affect the overall structure; therefore, it provides inaccurate results. Similarly, the large number of trees in RFC causes ineffective predictions and reduced accuracy. The SMO-HPSO attained higher accuracy of 99% and AUC of 99.9% values better when compared with other attacks, which is shown in Figure 7.
Table 4. Performance evaluation for the proposed SMO-HPSO for UNSW NB-15 Dataset.
Figure 7. Performance evaluation for the proposed SMO-HPSO for UNSW NB-15 Dataset.
Similarly, Table 4 displays the performance evaluation metrics for SMO-HPSO for the UNSW NB-15 dataset. The proposed SMO-HPSO obtained better FAR and MCC values of 0.15 and 0.19 compared to existing SVM, DT, and RFC models.

4.3. Comparative Analysis

Table 5 shows the comparison results of Hybrid SMO-HPSO with the existing classifiers such as DNN, LSTM-RNN, BAT-MC, ensemble learning, stacking-ensemble technique, optimized deep neural network architecture, LSTM-based CNN, integrated rule based model, and pigeon-inspired optimizer. The existing models utilized a deep learning DBN model to investigate the performance differences during classification [11]. However, the increments in training and testing are not acceptable for all scenarios [12]. Similarly, the BAT algorithm showed the most misclassification instances because they failed to appear often in both the training and test datasets [19]. Similarly, an ensemble-based algorithm was developed that showed effective feature representation and not extracted features [20]. The existing Optimized deep neural network architecture obtained accuracy of 98%, precision of 98%, Recall of 98%, and F-measure 98% as the features vanished and exploded the gradients [26]. LSTM-Based CNN [28] easily over fitted the data, and thus obtained an accuracy of 98.64%. However, the large datasets required time to process the model, which was prolonged to obtain the best performance. This means that the more you train your data on the same points, it will start to treat the noise as data and will just imitate the entire pattern, since it is the same structure dataset used for training and testing and the imbalance in the classes results in an increased detection rate. Similarly, the results are evaluated for the UNSW NB-15 dataset with the existing models, as shown in Table 5. In Kumar et al. [22], an integrated rule-based classifier was used for the classification of attacks. Moreover, feature selection based on the PIO algorithm [25] was used for feature reduction that obtained better accuracy values of 86.9% when compared with the classifier model that obtained 83.8%. The accuracy of the hybrid SMO-HPSO for NSL-KDD dataset outperformed the other existing methods. The F-measure of the hybrid SMO-HPSO was 98.87% for the NSL-KDD dataset, whereas the LSTM-RNN [11] achieved the F-measure of 98.94%. This F-measure analysis shows that the hybrid SMO-HPSO achieves acceptable F-measure with better classification accuracy, even though it is processed with fewer features. The proposed hybrid SMO-HPSO obtained better accuracy of 99.18% for the UNSW NB-15 dataset, which is high when compared to existing models. The classification accuracy for SMO-HPSO increased because of the optimal feature subset selection from overall features. Redundant and irrelevant features that cause the misclassification are avoided by considering the feature importance with the Rosenbrock function as the gradient in the Hybrid SMO-HPSO. The searching process of Hybrid SMO-HPSO for optimal features is improved by combining the hierarchical PSO’s velocity with SMO’s searching process. Therefore, the proposed Hybrid SMO-HPSO provides better classification in the intrusion detection over IoT.
Table 5. Comparative analysis.

5. Conclusions

The present research work performs a hybrid SMO-HPSO algorithm to detect the attack and is classified based on the UNSW NB-15 and NSL-KDD datasets. A hybrid feature selection model is developed using Hybrid SMO-HPSO, which solves the massive intrusion detection on improving the accuracy. The hybrid SMO-HPSO selects the optimal feature subset from overall features based on the incorporation of feature importance with the Rosenbrock function. The searching process of SMO-HPSO is improved by integrating the velocity of hierarchical PSO with SMO’s searching process. Therefore, the developed Hybrid SMO-HPSO enhances the classification accuracy and achieves a lower classification error while classifying the attacks. The SVM model obtained accuracy of 91.82%, DT of 98.99%, and RFC of 99.13%, and the proposed model obtained 99.175% for the NSL-KDD dataset. Similarly, SVM obtained accuracy of 85.88%, DT of 88.87%, RFC of 91.65%, and the proposed model obtained 99.18% for the UNSW-NB 15 dataset. The proposed SMO-HPSO obtained accuracy of 99.175% compared to the existing Deep (DNN) of 97.72%. The Ensemble Learning model showed 85.2% for the NSL-KDD dataset. Additionally, the proposed SMO-HPSO showed average better accuracy of 99.178% and an integrated model that obtained accuracy of 86.9% and 83.8%. However, the soft computing of the hybrid optimization process showed complexity in the system. Yet, identification of the new unknown activities for overcoming the system complexity problem is needed in the future.

Author Contributions

The paper investigation, resources, data curation, writing—original draft preparation, writing—review and editing, and visualization, paper conceptualization, and software were conducted by S.E. The validation, formal analysis, methodology, supervision, project administration, and funding acquisition of the version to be published were conducted by A.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The datasets generated during and/or analyzed during the current study are available in the [UNSW-NB 15 datasets] and [NSL-KDD datasets] repositories, UNSW-NB 15 datasets available link: https://www.unsw.adfa.edu.au/unsw-canberra-cyber/cybersecurity/ADFA-NB15-Datasets/, accessed on 12 August 2022. NSL-KDD datasets available link: https://www.unb.ca/cic/datasets/nsl.html, accessed on 12 August 2022.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Jia, Y.; Zhong, F.; Alrawais, A.; Gong, B.; Cheng, X. Flowguard: An intelligent edge defense mechanism against IoT DDoS attacks. IEEE Internet Things J. 2020, 7, 9552–9562. [Google Scholar] [CrossRef]
  2. McDermott, C.D.; Majdani, F.; Petrovski, A.V. Botnet detection in the internet of things using deep learning approaches. In Proceedings of the 2018 International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 8–13 July 2018; IEEE: Piscataway, NJ, USA, 2018. [Google Scholar] [CrossRef]
  3. Meidan, Y.; Bohadana, M.; Mathov, Y.; Mirsky, Y.; Shabtai, A.; Breitenbacher, D.; Elovici, Y. N-baiot—Network-based detection of IoT botnet attacks using deep autoencoders. IEEE Pervasive Comput. 2018, 17, 12–22. [Google Scholar] [CrossRef]
  4. Imamverdiyev, Y.; Abdullayeva, F. Deep learning method for denial of service attack detection based on restricted Boltzmann machine. Big Data 2018, 6, 159–169. [Google Scholar] [CrossRef]
  5. Habib, M.; Aljarah, I.; Faris, H. A modified multi-objective particle swarm optimizer-based Lévy flight: An approach toward intrusion detection in Internet of Things. Arab. J. Sci. Eng. 2020, 45, 6081–6108. [Google Scholar] [CrossRef]
  6. Deshmukh-Bhosale, S.; Sonavane, S.S. Design of intrusion detection system for wormhole attack detection in internet of things. In Advanced Computing and Intelligent Engineering: Proceedings of the ICACIE, Bhubaneswar, India, 22–24 December 2018; Pati, B., Panigrahi, C., Buyya, R., Li, K.C., Eds.; Springer: Singapore, 2018; Volume 1, pp. 513–523. [Google Scholar] [CrossRef]
  7. Jaramillo, L.E.S. Malware detection and mitigation techniques: Lessons learned from Mirai DDOS attack. J. Inf. Syst. Eng. Manag. 2018, 3, 19. [Google Scholar] [CrossRef]
  8. Aldaej, A. Enhancing cyber security in modern internet of things (IoT) using intrusion prevention algorithm for IoT (IPAI). IEEE Access 2019. [Google Scholar] [CrossRef]
  9. Li, J.; Liu, M.; Xue, Z.; Fan, X.; He, X. RTVD: A real-time volumetric detection scheme for DDoS in the Internet of Things. IEEE Access 2020, 8, 36191–36201. [Google Scholar] [CrossRef]
  10. De Souza, C.A.; Westphall, C.B.; Machado, R.B.; Sobral, J.B.M.; dos Santos Vieira, G. Hybrid approach to intrusion detection in fog-based IoT environments. Comput. Netw. 2020, 180, 107417. [Google Scholar] [CrossRef]
  11. Elmasry, W.; Akbulut, A.; Zaim, A.H. Evolving deep learning architectures for network intrusion detection using a double PSO metaheuristic. Comput. Netw. 2020, 168, 107042. [Google Scholar] [CrossRef]
  12. Su, T.; Sun, H.; Zhu, J.; Wang, S.; Li, Y. BAT: Deep learning methods on network intrusion detection using NSL-KDD dataset. IEEE Access 2020, 8, 29575–29585. [Google Scholar] [CrossRef]
  13. Kareem, S.S.; Mostafa, R.R.; Hashim, F.A.; El-Bakry, H.M. An effective feature selection model using hybrid metaheuristic algorithms for iot intrusion detection. Sensors 2022, 22, 1396. [Google Scholar] [CrossRef] [PubMed]
  14. Awotunde, J.B.; Chakraborty, C.; Adeniyi, A.E. Intrusion detection in industrial internet of things network-based on deep learning model with rule-based feature selection. Wirel. Commun. Mob. Comput. 2021, 2021, 7154587. [Google Scholar] [CrossRef]
  15. Keserwani, P.K.; Govil, M.C.; Pilli, E.S.; Govil, P. A smart anomaly-based intrusion detection system for the Internet of Things (IoT) network using GWO–PSO–RF model. J. Reliab. Intell. Environ. 2021, 7, 3–21. [Google Scholar] [CrossRef]
  16. Nie, L.; Wu, Y.; Wang, X.; Guo, L.; Wang, G.; Gao, X.; Li, S. Intrusion detection for secure social internet of things based on collaborative edge computing: A generative adversarial network-based approach. IEEE Transact. Comput. Soc. Syst. 2021, 9, 134–145. [Google Scholar] [CrossRef]
  17. Jeyaselvi, M.; Dhanaraj, R.K.; Sathya, M.; Memon, F.H.; Krishnasamy, L.; Dev, K.; Ziyue, W.; Qureshi, N.M.F. A highly secured intrusion detection system for IoT using EXPSO-STFA feature selection for LAANN to detect attacks. Clust. Comput. 2022, 1–16. [Google Scholar] [CrossRef]
  18. Nimbalkar, P.; Kshirsagar, D. Feature selection for intrusion detection system in Internet-of-Things (IoT). ICT Express 2021, 7, 177–181. [Google Scholar] [CrossRef]
  19. Gao, X.; Shan, C.; Hu, C.; Niu, Z.; Liu, Z. An adaptive ensemble machine learning model for intrusion detection. IEEE Access 2019, 7, 82512–82521. [Google Scholar] [CrossRef]
  20. Çavuşoğlu, Ü. A new hybrid approach for intrusion detection using machine learning methods. Appl. Intell. 2019, 49, 2735–2761. [Google Scholar] [CrossRef]
  21. Wu, Y.; Lee, W.; Xu, Z.; Ni, M. Large-scale and robust intrusion detection model combining improved deep belief network with feature-weighted SVM. IEEE Access 2020, 8, 98600–98611. [Google Scholar] [CrossRef]
  22. Kumar, V.; Sinha, D.; Das, A.K.; Pandey, S.C.; Goswami, R.T. An integrated rule based intrusion detection system: Analysis on UNSW-NB15 data set and the real time online dataset. Clust. Comput. 2020, 23, 1397–1418. [Google Scholar] [CrossRef]
  23. Ramaiah, M.; Chandrasekaran, V.; Ravi, V.; Kumar, N. An intrusion detection system using optimized deep neural network architecture. Transact. Emerg. Telecommun. Technol. 2021, 32, e4221. [Google Scholar] [CrossRef]
  24. Ajdani, M.; Ghaffary, H. Design network intrusion detection system using support vector machine. Int. J. Commun. Syst. 2021, 34, e4689. [Google Scholar] [CrossRef]
  25. Hsu, C.M.; Azhari, M.Z.; Hsieh, H.Y.; Prakosa, S.W.; Leu, J.S. Robust network intrusion detection scheme using long-short term memory based convolutional neural networks. Mob. Netw. Appl. 2021, 26, 1137–1144. [Google Scholar] [CrossRef]
  26. Kasongo, S.M.; Sun, Y. A deep learning method with filter based feature engineering for wireless intrusion detection system. IEEE Access 2019, 7, 38597–38607. [Google Scholar] [CrossRef]
  27. Jiang, H.; He, Z.; Ye, G.; Zhang, H. Network intrusion detection based on PSO-XGboost model. IEEE Access 2020, 8, 58392–58401. [Google Scholar] [CrossRef]
  28. Alazzam, H.; Sharieh, A.; Sabri, K.E. A feature selection algorithm for intrusion detection system based on pigeon inspired optimizer. Exp. Syst. Appl. 2020, 148, 113249. [Google Scholar] [CrossRef]
  29. Ingre, B.; Yadav, A. Performance analysis of NSL-KDD dataset using ANN. In Proceedings of the 2015 International Conference on Signal Processing and Communication Engineering Systems, Guntur, India, 2–3 January 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 92–96. [Google Scholar] [CrossRef]
  30. Janarthanan, T.; Zargari, S. Feature selection in UNSW-NB15 and KDDCUP’99 datasets. In Proceedings of the 2017 IEEE 26th International Symposium on Industrial Electronics (ISIE), Edinburgh, UK, 19–21 June 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1881–1886. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.