<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Detection of DDoS Attacks with Gaussian Mixture Model</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessandro Cecchetto</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppa Conte</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Napoli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computational Intelligence, Czestochowa University of Technology</institution>
          ,
          <addr-line>42-201 Czestochowa</addr-line>
          ,
          <country country="PL">Poland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computer, Control and Management Engineering, Sapienza University of Rome</institution>
          ,
          <addr-line>Via Ariosto 25, Roma, 00185</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Institute for Systems Analysis and Computer Science, Italian National Research Council</institution>
          ,
          <addr-line>Via dei Taurini 19, Roma, 00185</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>A Distributed Denial of Service (DDoS) is an attack which aim is to stop or tamper with an online service incapacitating a server with a lfood of packages or requests, using internet or intranet. The main aim of the DDoS attack is to collapse the network or server with abnormal trafic to make the service unavailable for the legitimate users. This problem is particularly profound, due to the development of emerging technologies, such as cloud computing, the Internet of Things or artificial intelligence techniques, from which attackers can take advantage by launching a huge volume of DDoS attacks at a lower cost, and it is much harder to detect and prevent DDoS attacks, because DDoS trafic is similar to normal trafic. In this paper we implement a novel technique implementing an unsupervised Gaussian Mixture Model (GMM) based algorithm. Using a real trafic dataset, the CIC-DDoS2019, for benchmark, the proposed GMM can achieve recall, precision, and accuracy up to 99%. Experiments reveal that this can be a promising solution for the detection of DDoS attacks.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Distributed Denial of Service (DDoS)</kwd>
        <kwd>Gaussian Mixture Model (GMM)</kwd>
        <kwd>Machine Learning</kwd>
        <kwd>Detection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        DoS (Denial of Service) attacks deplete the network
bandwidth and computing resources of a targeted system by
lfooding malicious trafic, preventing the target system from
ofering regular services to legitimate users. DDoS
(Distributed Denial of Service) goes even further on a much
larger scale. DDoS attacks can take over a large number
of compromised systems called bots, constituting a botnet,
which are used to launch coordinated attacks on the victim
system, from this kind of attack behavior, DDoS attacks can
be devided in several branches as reported in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Along with
the emergence and advancement of Internet technologies
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], DDoS attacks are evolving and proliferating in scale,
frequency, and sophistication. Organizations face
potential threats to their network environment that may cause
severe impacts to their operations, such as business
downtime, data breaches, or even ransom demands from
hackers [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The detection of DDoS attacks is essential before
any mitigation approaches can be taken. In the early era, the
alarm of DDoS attacks was triggered by rules programmed
by trafic engineers, but in the current cybersecurity
scenario, the application of artificial intelligence and, more
specifically, machine learning (ML) ofers new and
promising perspectives. Training predictive models to recognize
anomalous patterns in network trafic provides a more agile
and proactive means of detecting attacks. The Gaussian
Mixture Model (GMM) is one such model, used for its ability
to model complex distributions of data, such as those that
characterize network trafic. In this paper, we propose a
novel ML (Machine Learning) method based on GMM, for
detecting DDoS malicious packets. The remaining part of
this paper is organized as follows: Section II describes and
analyze the related DDoS detection works with some
proposed solutions. Section III describes and analyze the used
dataset. Section IV explain all the steps that belongs to the
workflow from the feature pre-processing to the GMM.
Section V denotes the implementation of the project. Section VI
resume the obtained results of the project also taking into
account the phase of Cross-Validation. Finally, conclusions
and future implementations are discussed in Section VII.
Various ML technologies have been employed, mainly as
classifiers, in the detection of DDoS attacks. Meng Wang
et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] proposed a dynamic multilayer perceptron (MLP)
combined with a feature selection technique to detect DDoS
attacks, where a feedback mechanism is applied to promote
and reconstruct the detector system when detection is not
accurate. In their model, as the complexities of trafic
network increase and change, some of the selected features
will not be able to distinguish the trafic and normal
attacks and determine the failure therein. Nhu-Ngoc Dao
et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] proposed the approach of source based IP
filtering technique to defeat DDoS attacks. The approach try to
distinguish three kinds of Users. The malicious user who
has fix source IP address and injects spoofed packets to the
switch infinitely. The DDoS attacking user sends spoofed
packets to the switch infinitely. The frequent user acts as
normal user. The method distinguishes them and processes
diferently according to diferent users. It works well when
the attack trafic is not very huge, and if the attack type
it is mainly a flooding one. But to use it, we need to
survey the network first and initiate two parameters for the
detection method, so it is necessary a kind of "setup" time
in order to fix such parameters. The efect of the method
may be afected by the artificial parameters. When involved
with the behavior of the artificial, the uncertainty of the
detecting result will increase. Seyed Mohammad Mousavi
et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] proposed a solution to detect DDoS attacks based
on the entropy variation of the destination IP address.
Although it is a lightweight and efective detection method, in
detecting DDoS attacks, we cannot only take one factor into
consideration, since there are many factors that can be used
to identify DDoS attacks, which can manifest themselves
in very diferent ways beyond the proposed control. The
detection method lacks of comprehensive consideration of
multi-factors. Uygar Dincalp et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] proposed a method
based on the clustering algorithm DBSCAN for analyzing
the network trafic in order to catch the changes and
varieties in attack vectors for showing what the attack and
where the attack is based on. The proposed methodology
strongly depends on a fixed threshold in order to send an
alarm of a possible attack, it is not clearly explained how the
threshold is defined but the results shows that the proposed
system worked well with chosen attributes in their
experiments. Akella et al. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] proposed a detection mechanism
where each intermediate router detects trafic anomalies
using profiles of normal trafic. Each router keeps track of
destinations whose trafic occupies greater than a fraction of
the capacity of the outgoing link, and sends this information
to its neighbors. Attack detection is determined by
intermediate routers if the gathered trafic information on a specific
destination system exceeds the predefined threshold. This
scheme cannot distinguish the flash crowds provided by a
spike of normal trafic from the DDoS attacks. Hence, false
alarm rate will be increased.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Dataset</title>
      <p>
        The proposed model is trained and validated on the dataset
released by the Canadian Institute for Cybersecurity (CIC),
namely CIC-DDoS2019 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The dataset ofers an extended
set of Distributed Denial of Service attacks, most of which
employ some form of amplification through reflection. This
type of attacks are conducted concealing the attacker's
identity thanks to the IP spoofing technique in which packets
are sent to reflector servers by attackers with the source
IP address set to the target victim's. The dataset contains
benign and the most up-to-date common DDoS attacks, this
two classes are divided as reported in Figure 1, with a total
amount of data of 431,371 records described by 88 features.
A slight imbalance is highlighted in the composition of the
dataset, where the connections associated with the attacks
represent approximately 77% of the total dataset, this slight
lack of data for the benign connections would have been
possible to fix through oversampling algorithms, creating
artificial data based on characteristics of the original ones,
the choice in this experiment was not to make changes in
this sense, as the imbalance present between the two classes
was not too accentuated, equally allowing correct training
of the model, the model performance evaluation is validated
by applying the cross-validation step.
      </p>
      <p>The following types of attacks are present: UDP, MSSQL,
Portmap, Syn, NetBIOS, UDPLag, LDAP, DrDoS_DNS,
UDPlag, WebDDoS, TFTP, DrDoS_UDP, DrDoS_SNMP,
DrDoS_NetBIOS, DrDoS_LDAP, DrDoS_MSSQL, DrDoS_NTP.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Implementation</title>
      <p>The proposed work (Figure 2) consists of two main phases:
data phase and model phase.</p>
      <p>
        During data phase, the following points are developed:
Feature pre-processing, Feature selection, Dimensionality
reduction. During the model phase, relating to the
development of the Gaussian mixture model, the following points
are addressed: Model training, Performance evaluation,
Cross-Validation.
3.1. Feature pre-processing
The eficiency of classification techniques have to be
improved through adequate data manipulation which concerns
diferent types of actions. Additionally, models trained on
manually prepared data exhibited better performance
compared to those trained on non-prepared data according to
[
        <xref ref-type="bibr" rid="ref10 ref11 ref12">10, 11, 12</xref>
        ].
      </p>
      <sec id="sec-3-1">
        <title>3.1.1. Feature Scaling</title>
        <p>
          Feature scaling is a vital step in pre-processing data before
building a model using machine learning [
          <xref ref-type="bibr" rid="ref13 ref14 ref15 ref16">13, 14, 15, 16</xref>
          ].
The dataset used for model training in machine learning
often contain unpredictable values that may have varying
scales. This can result in inequalities in comparing these
values. Feature scaling techniques can address these
challenges by adjusting the values and promoting easy and fair
comparisons among values.
        </p>
        <p>The ML algorithm observes only numbers, and if there is
a significant diference in range, it assumes that numbers
in the upper ranges are superior such that features with
larger numerical values have a greater efect on the distance
between data and dominate other features when
calculating distances. As a result, these more significant numbers
play a more critical role during model training. The scaling
technique used in the experiment is the Normalization, also
known as Min-Max scaling, a technique in which values
are shifted and rescaled to a range between 0 and 1
without distorting diferences in the ranges of values or losing
information.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.1.2. Encoding</title>
        <p>Many statistical learning algorithms require as input a
numerical feature matrix, as the case of GMM. When
categorical variables are present in the data, feature engineering
is needed to encode the diferent categories into a suitable
feature vector.</p>
        <p>
          Feature encoding is the process of transforming textual data
into numerical values so they may be applied to ML
algorithms, resulting in improved model accuracy. Researchers
have used many approaches to convert textual data into
numerical values, in this work is used the “Label Encoding”
technique [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], in such work this process is applied to the
target feature of the dataset in which there are two diferent
values, Attack and Benign. Label encoding has the
advantage that it is straightforward, yet it has the disadvantage
that the numeric values can be “misinterpreted” by the
machine learning algorithms since it uses number sequencing.
The problem using the number is that they introduce
relation/comparison between them. Apparently, there is no
relation between Attack and Benign, but when looking at
the number, ’Benign’ which is encoded using 1 has higher
precedence over ‘Attack’ which is encoded using 0, this kind
of problem in this work does not occur.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.1.3. Feature selection</title>
        <p>
          Many ML models experience dificulty working with a high
presence of features in input, generally, features can be
categorized as: relevant, irrelevant, or redundant, the last two
categories only increase the size of the input space [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]
resulting in dificulty to process data further thus not
contributing to the learning process. To generate the best
performing model, feature selection plays a major role, which
process a subset from available features data are selected
for the process of learning algorithm. The best subset is the
one with least number of dimensions that most contribute
to learning accuracy, since an irrelevant feature does not
afect describing the target concept in any way, a redundant
feature does not add anything new to describing the target
concept. Redundant features might possibly add more noise
than useful information in describing the concept of
interest. The main benefits of feature selection are follows: (i)
reducing the measurement cost and storage requirements,
(ii) coping with the degradation of the classification
performance due to the finite size of training sample sets, (iii)
reducing training and utilization time, (iv) facilitating data
visualization and data understanding, (V) reducing the risk
of overfitting .
        </p>
        <p>
          This process can be carried out into three ways [
          <xref ref-type="bibr" rid="ref19 ref20">19, 20</xref>
          ]:
iflter, wrapper, and embedded.
        </p>
        <p>
          The feature selection process of the proposed work uses a
iflter approach based on the Random Forest Classifier (RFC)
as in according with [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ], since it shows the most suitable
performance among other filtering approaches, before the
application of the model, the dataset is divided into train
and test sets in the ratio of 80:20, since feature selection
using only the training data (train set) rather than the entire
dataset, is particularly important in order to avoid so-called
"data leakage". The main reason behind this choice is that,
when selecting features, you want the selection to be based
only on the information available during the model training
phase. If you also use data from the test set during the
feature selection phase, you may run the risk of using future
information to guide feature selection, introducing a bias
into the results. The RFC takes the training dataset and
resample it according to a procedure called “bootstrap”. Each
sample contains a random subset of the original columns
and is used to fit a decision tree. Each tree of the random
forest can calculate the importance of a feature according to
its ability to increase the pureness of the leaves. The higher
the increment in leaves purity, the higher the importance
of the feature. This is done for each tree, then is averaged
among all the trees and, finally, normalized to 1. So, the sum
of the importance scores calculated by a Random Forest is 1.
In this paper Information Gain (IG) criteria is used for
feature selection by RFC. To use Information Gain for feature
selection an entropy value of each attribute of the data has
to be calculated. The entropy value is used for ranking
features that afect data classification. A feature which does not
have much efect on the data classicfiation has very small
information gain and it can be ignored without afecting
the detection accuracy of a classifier [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ].It calculates the
amount of entropy (uncertainty) that is reduced as a result
of dividing the data by a specific property. Hence for each
splitting attribute, information gain is calculated and the
attribute with highest gain is chosen as splitting attribute.
This attribute is such that it creates minimum impurity or
randomness in the generated splits and hence it minimizes
the information needed to classify the tuples. The entropy
of a subset S is determined as follows:

() = ∑︁( · 2())
        </p>
        <p>=1
Here c = 1, .., C are the diferent classes in S,  is
probability that an arbitrary tuple in S belongs to class . Let A
be a feature in S and 1, 2, . . . ,  are diferent values of
attribute A in S such that 1, . . . ,  are partitions
generated based on these values. These partitions are likely to
be impure. How much more information is still needed to
arrive at an exact classification or pure partition is given as:

() = ∑=︁1( |||| · ())
The smaller is this additional information the greater the
purity of the partition.</p>
        <p>() = () − ()
(3)</p>
        <p>Once the IG relating to all the features of the dataset has
been defined via RFC, the Select From Model class is applied
(1)
(2)
to the results for the selection of the main important features
by defining a threshold based on the average of the values
coming from the RFC. Then, the features that have the IG
above the threshold are selected, which are shown in Figure
3.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.1.4. Dimensionality reduction</title>
        <p>
          The dataset, after having gone through a pre-processing and
feature selection phases, still has a high dimensionality with
the presence of 28 features. In this regard, a reduction of
the latter is necessary, as we want to have a representation
of the data. Dimensionality reduction has been made using
Principal Component Analysis (PCA) [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. Principal
Component Analysis (PCA) simplifies the complexity in
highdimensional data while retaining trends and patterns. It does
this by transforming the data into fewer dimensions with
minimal loss of overall dispersion, which act as summaries
of features. PCA reduces data by geometrically projecting
them onto lower dimensions called principal components
(PCs) defined as a linear combination of the data 's original
variables, with the goal of finding the best summary of the
data using a limited number of PCs. The first PC is chosen
to minimize the total distance between the data and their
projection onto the PC. By minimizing this distance, we
also maximize the variance of the projected points. The
second (and subsequent) PCs are selected similarly, with
the additional requirement that they be orthogonal (proving
to be uncorrelated) with all previous PCs. Hence,
principal components represents the directions of the data that
explain a maximal amount of variance, or rather, the lines
that capture most information of the data. The relationship
between variance and information here, is that, the larger
the variance carried by a line, the larger the dispersion of
the data points along it, and the larger the dispersion along
a line, the more information it has. Hence, PCs are new
axes that provide the best angle to see and evaluate the
data, so that the diferences between the observations are
better visible. Given the dealing of the PCs with distance, a
fundamental step required in order to avoid falsification of
measurements is data standardization, since heterogeneous
data representations going to influence the PCs
constructions, given that in case of small set of variables has a much
larger magnitude than others, the components in the PCA
analysis are heavily weighted along those variables, while
other variables are ignored. As a consequence, the PCA
simply recovers the values of these high-magnitude variables
for this reason standardise the scale of features variation
is essential, the consequence that this aspect can have is
shown in Figure 4 with a comparison on the first principal
component whether features are standardized or not. The
ifrst application of PCA shown in Figure 5 is performed by
defining a number of 10 PCs to see and analyze how the
cumulative variance is distributed over a larger number of
components. Subsequently, 3 components were extracted
from the results obtained, since with 3 components it is
possible to visualize the data, reduce the computational power,
ifnding only a data loss of 8%.
3.2. GMM
Gaussian Mixture Model (GMM) [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] is a probabilistic model
to describe subsets of data within a general population,
that can be represented as a combination of normally
distributed subpopulations. It is commonly used for
unsupervised learning to learn the subpopulations models that can
be also automatically divided. On the other hand within a
supervised approach, such models can be used in order to
determine the boundaries of diferent subpopulations for
classification purposes. In this latter case, the goal is to
assign each data point to one of G preexisting unordered
classes (or populations) taking into account  observed
variables, . The problem amounts to define a function that
maps an arbitrary observation  ∈  to a prediction of
the class from which it stems. This function, named
allocation rule, has to be estimated from the training data
{,  = 1, ...,    = 1, ..., }, which consist
of the observations of vector  and class membership for
 = ∑︀
        </p>
        <p>=1  items. In supervised classification, their use
is related to the Bayes allocation rule, which is known to
minimize the expected error rate in class membership
prediction. The Bayes rule suggests to allocate  to the class ˆ
having the highest posterior probability among the other
classes C, that is:
where  (|Θ) is the chosen model,  is the number of
parameters to be estimated and  is the number of sample data
points. Models with smaller values of BIC are preferable.</p>
        <p>Notice as sample size increases, BIC provides an
increasingly larger penalty per parameter and thus tends to select
ˆ =  =1,...,{  ()} =  =1,...,{ ()  (|)} more parsimonious models. In fact, BIC tends to overly
(4) penalize complex models, so the goal is to find the model
Where  denotes the a priori probability of class  which for which the result is minimized, preferring the point of
are known or estimated from the training data, and () the first "elbow" of the function.
denotes the class-conditional probability distribution of .</p>
        <p>For continuous predictors mixtures of multivariate normal
densities are preferred, because of their computational con- 4. Experimental setup
venience:
 = − 2 log  (|Θ) +
 log ,
(6)

() = ∑︁(ℎ ( |  ℎ, Σ ℎ))
ℎ=1</p>
        <p>
          (5)
In mixture (5) the components (· ) are  d-dimensional
Gaussian densities, each parameterized by its mean
vector  ℎ and covariance matrix Σ ℎ. The parameters
ℎ (ℎ = 1, ..., ) are mixing proportions named also
mixture coeficient, which are constrained to be
positive quantities that sum to 1. These parameters are
determined by fitting model (5) to the data {,  =
1, ...,    = 1, ..., }, usually by maximum
likelihood via the expectation-maximization (EM) algorithm [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ].
        </p>
        <p>Then, the model is plugged into rule (4).</p>
      </sec>
      <sec id="sec-3-5">
        <title>3.2.1. Components estimation</title>
        <p>
          In order to improve the performance of GMM as a classifier,
we need to define correctly how many Gaussian
components should be used to approximate the data distribution,
a GMM with too many Gaussian components may overfit
the data [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ], while a GMM with too few components may
not be flexible enough to approximate the true underlying
density distribution, observing an underfitting of the data.
The correct components estimation it was done using the
Bayesian Information Criterion (BIC) [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ], which is a
criterion for grading models based on the posteriori probability
of the models being compared. The Bayesian information
criterion (BIC) is given by:
        </p>
      </sec>
      <sec id="sec-3-6">
        <title>4.0.1. Model implementation</title>
        <p>In order to have a better prevision on the data, two GMMs
are implemented in two diferent ways, one regards only
Benign data type while the other one regards only Attack
data type. Hence, for extracting the correct number of
components of each one of the model, the BIC is applied for
each case and the change for diferent component values
is presented in Figure 6. Given the obtained results, for
what concern the GMM related to Attack data, is chosen
ifve as number of components, though corresponding to six
components there is the lowest BIC value, performances
are equal as using five, so even in terms of computational
complexity five was chosen, on the other hand GMM related
to Benign data is developed using three components given
the clear result. Hence, the two diferent models are defined
as follows:
() = ∑︁(, ( |  ,, Σ ,))
=1
() = ∑︁(, ( |  ,, Σ ,))
=1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. Results</title>
      <p>For the classification of a new point, the posterior probability
of belonging to the two classes is calculated:</p>
      <p>(|)
∈{,}
=  (|) () ,
 ()
then, the point is associated with the class ˆ with the
maximum posterior probability:</p>
      <p>ˆ =  ∈{,} { ()  (|)}
The metric used for evaluating the quality of a model’s
predictions is the balanced accuracy, which is the mean of
Sensitivity and Specificity. Where Sensitivity (True Positive
Rate) is the probability of a positive case being accurately
classed as being positive, and Specificity (True Negative
Rate) is the probability of a negative case being accuracy
classed as negative. This specifications helps the metric
perform well with the slightly imbalanced dataset used,
(7)
(8)
(9)
(10)</p>
      <p>Cross-validation performance</p>
      <p>Standard deviation
98.7%
returning the average accuracy per class. Using the average
of Sensitivity and Specificity, we are able to account for
imbalanced datasets as a model will receive a worse balanced
accuracy score if it only predicts accurately for the majority
class in the dataset. As a result, the balanced accuracy report
an accuracy equal to 99%. Following is presented a resume
of the obtained result using a confusion matrix and then a
classification report, over 86275 samples used as a test data:</p>
      <sec id="sec-4-1">
        <title>5.0.1. Cross-Validation</title>
        <p>Cross-validation is one of the most widely used data
resampling methods to estimate the true prediction error of
models. The Cross-validation technique used in the experiment
is the Stratified k-fold, in which the available learning set is
partitioned into  disjoint subsets of approximately equal
size, where the presence of data typology is the same as the
original dataset. The word “fold” refers to the number of
resulting subsets. This partitioning is performed by randomly
sampling cases from the learning set without replacement.
The model is trained using  − 1 subsets, which, together,
represent the training set. Then, the model is applied to
the remaining subset, which is denoted as the validation
set, and the performance is measured. This procedure is
repeated until each of the  subsets has served as
validation set. Consequently, the average of the  performances
on the  validation sets is calculated, which represents the
cross-validation performance and subsequently the
standard deviation is also calculated considering the result of
each validation set compared to the performance score.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusions</title>
      <p>In this paper, a procedure for fitting Gaussian mixture
models (GMM) oriented to supervised classification has been
proposed for classifying DDoS attacks. The proposed method
demonstrates exceptional adaptability, flexibility, and
performance in detecting DDoS attacks, making it a promising
solution for enhancing cybersecurity in critical infrastructures.
Starting from the raw data taken from the CIC-DDoS2019
dataset, a pre-processing phase was necessary in which the
latter were processed with a subsequent selection of the
characteristics relevant to the purpose. The results from the
test data, provides an accuracy of 99% which is confirmed
even by the Cross-Validation with a 98.7% accuracy,
highlighting a reliable result without problems like overfitting
that in some scenario can conceal the real performance. As
part of our future work, first of all, we will be focusing on
improving the DDoS attack data, increasing the diversity of
the training data to keeps as much types of attack as possible,
but even including the normal network trafic data in order
to reach a more balanced dataset. This component plays
a crucial role in the success of our strategy, as it needs to
have a deep understanding of DDoS attacks. To achieve this
goal, we plan to automate the process as much as possible.
Subsequently, The GMM could be implemented to classify
more than two classes, e.g. trying to classify each kind of
DDoS attack or trying to model a multi-class problem where
the classes could be diferent kinds of cyberattacks.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work has been developed at is.Lab() Intelligent
Systems Laboratory at the Department of Computer, Control,
and Management Engineering, Sapienza University of Rome
(https:// islab.diag.uniroma1.it). The work has also been
partially supported from Italian Ministerial grant PRIN 2022
“ISIDE: Intelligent Systems for Infrastructural Diagnosis in
smart-concretE”, n. 2022S88WAY - CUP B53D2301318, and
by the Age-It: Ageing Well in an ageing society project,
task 9.4.1 work package 4 spoke 9, within topic 8
extended partnership 8, under the National Recovery and
Resilience Plan (PNRR), Mission 4 Component 2 Investment
1.3—Call for tender No. 1557 of 11/10/2022 of Italian
Ministry of University and Research funded by the European
Union—NextGenerationEU, CUP B53C22004090006.
1–8</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Hoque</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. K.</given-names>
            <surname>Bhattacharyya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Kalita</surname>
          </string-name>
          ,
          <article-title>Botnet in ddos attacks: trends and challenges</article-title>
          ,
          <source>IEEE Communications Surveys &amp; Tutorials</source>
          <volume>17</volume>
          (
          <year>2015</year>
          )
          <fpage>2242</fpage>
          -
          <lpage>2270</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S. I.</given-names>
            <surname>Illari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Avanzato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <article-title>A cloudoriented architecture for the remote assessment and follow-up of hospitalized patients</article-title>
          , volume
          <volume>2694</volume>
          ,
          <year>2020</year>
          , pp.
          <fpage>29</fpage>
          -
          <lpage>35</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Genie-Networks</surname>
          </string-name>
          ,
          <source>Ddos attack statistics and trends report for</source>
          <year>2020</year>
          (
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Qin</surname>
          </string-name>
          ,
          <article-title>A dynamic mlp-based ddos attack detection method using feature selection and feedback</article-title>
          ,
          <source>Computers &amp; Security</source>
          <volume>88</volume>
          (
          <year>2020</year>
          )
          <fpage>101645</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>N.-N.</given-names>
            <surname>Dao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Park</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Park</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Cho</surname>
          </string-name>
          ,
          <article-title>A feasible method to combat against ddos attack in sdn network</article-title>
          ,
          <source>in: 2015 International Conference on Information Networking (ICOIN)</source>
          , IEEE,
          <year>2015</year>
          , pp.
          <fpage>309</fpage>
          -
          <lpage>311</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Mousavi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>St-Hilaire</surname>
          </string-name>
          ,
          <article-title>Early detection of ddos attacks against sdn controllers</article-title>
          ,
          <source>in: 2015 international conference on computing, networking and communications (ICNC)</source>
          , IEEE,
          <year>2015</year>
          , pp.
          <fpage>77</fpage>
          -
          <lpage>81</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>U.</given-names>
            <surname>Dincalp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Güzel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Sevine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Bostanci</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Askerzade</surname>
          </string-name>
          ,
          <article-title>Anomaly based distributed denial of service attack detection and prevention with machine learning</article-title>
          ,
          <source>in: 2018 2nd International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT)</source>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Aditya</surname>
          </string-name>
          ,
          <article-title>Detecting ddos attacks on isp networks</article-title>
          ,
          <source>in: Proc. of ACM SIGMOD Workshop on Management and Processing of Data Streams</source>
          ,
          <year>2003</year>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>I.</given-names>
            <surname>Sharafaldin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. H.</given-names>
            <surname>Lashkari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Hakak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Ghorbani</surname>
          </string-name>
          ,
          <article-title>Developing realistic distributed denial of service (ddos) attack dataset and taxonomy</article-title>
          , in: 2019
          <source>international carnahan conference on security technology (ICCST)</source>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>B.</given-names>
            <surname>Xue</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Zhang,</surname>
          </string-name>
          <article-title>Evolutionary feature manipulation in data mining/big data</article-title>
          ,
          <source>ACM SIGEVOlution 10</source>
          (
          <year>2017</year>
          )
          <fpage>4</fpage>
          -
          <lpage>11</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>V.</given-names>
            <surname>Ponzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Bianco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wajda</surname>
          </string-name>
          ,
          <article-title>Psychoeducative social robots for an healthier lifestyle using artificial intelligence: a case-study</article-title>
          , volume
          <volume>3118</volume>
          ,
          <year>2021</year>
          , pp.
          <fpage>26</fpage>
          -
          <lpage>33</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>G.</given-names>
            <surname>Lo Sciuto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <article-title>A cloud-based flexible solution for psychometric tests validation, administration and evaluation</article-title>
          , volume
          <volume>2468</volume>
          ,
          <year>2019</year>
          , pp.
          <fpage>16</fpage>
          -
          <lpage>21</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>G.</given-names>
            <surname>Capizzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Sciuto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Tramontana</surname>
          </string-name>
          ,
          <article-title>A multithread nested neural network architecture to model surface plasmon polaritons propagation</article-title>
          ,
          <source>Micromachines</source>
          <volume>7</volume>
          (
          <year>2016</year>
          ). doi:
          <volume>10</volume>
          .3390/mi7070110.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>M. M. Ahsan</surname>
            ,
            <given-names>M. P.</given-names>
          </string-name>
          <string-name>
            <surname>Mahmud</surname>
            ,
            <given-names>P. K.</given-names>
          </string-name>
          <string-name>
            <surname>Saha</surname>
            ,
            <given-names>K. D.</given-names>
          </string-name>
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Siddique</surname>
          </string-name>
          ,
          <article-title>Efect of data scaling methods on machine learning algorithms</article-title>
          and model performance,
          <source>Technologies</source>
          <volume>9</volume>
          (
          <year>2021</year>
          )
          <fpage>52</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Capizzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Sciuto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Shikler</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Wozniak, Optimizing the organic solar cell manufacturing process by means of afm measurements and neural networks</article-title>
          ,
          <source>Energies</source>
          <volume>11</volume>
          (
          <year>2018</year>
          ). doi:
          <volume>10</volume>
          .3390/ en11051221.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>S.</given-names>
            <surname>Pepe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tedeschi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Brandizzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Iocchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <article-title>Human attention assessment using a machine learning approach with gan-based data augmentation technique trained using a custom dataset</article-title>
          ,
          <source>OBM Neurobiology 6</source>
          (
          <year>2022</year>
          ). doi:
          <volume>10</volume>
          .21926/ obm.neurobiol.
          <volume>2204139</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>F.</given-names>
            <surname>Pargent</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pfisterer</surname>
          </string-name>
          , J. Thomas,
          <string-name>
            <given-names>B.</given-names>
            <surname>Bischl</surname>
          </string-name>
          ,
          <article-title>Regularized target encoding outperforms traditional methods in supervised machine learning with high cardinality features</article-title>
          ,
          <source>Computational Statistics</source>
          <volume>37</volume>
          (
          <year>2022</year>
          )
          <fpage>2671</fpage>
          -
          <lpage>2692</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>B.</given-names>
            <surname>Bhattacharya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Solomatine</surname>
          </string-name>
          ,
          <article-title>Machine learning in sedimentation modelling</article-title>
          ,
          <source>Neural Networks</source>
          <volume>19</volume>
          (
          <year>2006</year>
          )
          <fpage>208</fpage>
          -
          <lpage>214</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Jović</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Brkić</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Bogunović</surname>
          </string-name>
          ,
          <article-title>A review of feature selection methods with applications, in: 2015 38th international convention on information and communication technology, electronics and microelectronics (MIPRO)</article-title>
          , Ieee,
          <year>2015</year>
          , pp.
          <fpage>1200</fpage>
          -
          <lpage>1205</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>V.</given-names>
            <surname>Ponzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wajda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Brociek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <article-title>Analysis pre and post covid-19 pandemic rorschach test data of using em algorithms and gmm models</article-title>
          , volume
          <volume>3360</volume>
          ,
          <year>2022</year>
          , pp.
          <fpage>55</fpage>
          -
          <lpage>63</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Salam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. T.</given-names>
            <surname>Azar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Elgendy</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. M. Fouad</surname>
          </string-name>
          ,
          <article-title>The efect of diferent dimensionality reduction techniques on machine learning overfitting problem</article-title>
          ,
          <source>Int. J. Adv. Comput. Sci. Appl</source>
          <volume>12</volume>
          (
          <year>2021</year>
          )
          <fpage>641</fpage>
          -
          <lpage>655</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>B.</given-names>
            <surname>Azhagusundari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Thanamani</surname>
          </string-name>
          , et al.,
          <source>Feature selection based on information gain</source>
          ,
          <source>International Journal of Innovative Technology and Exploring Engineering (IJITEE) 2</source>
          (
          <year>2013</year>
          )
          <fpage>18</fpage>
          -
          <lpage>21</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>F. L.</given-names>
            <surname>Gewers</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. R.</given-names>
            <surname>Ferreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. F. D.</given-names>
            <surname>Arruda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. N.</given-names>
            <surname>Silva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. H.</given-names>
            <surname>Comin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. R.</given-names>
            <surname>Amancio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. d. F.</given-names>
            <surname>Costa</surname>
          </string-name>
          ,
          <article-title>Principal component analysis: A natural approach to data exploration, ACM Computing Surveys (CSUR) 54 (</article-title>
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          , et al.,
          <article-title>Gaussian mixture models</article-title>
          .,
          <source>Encyclopedia of biometrics 741</source>
          (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>B.</given-names>
            <surname>Barazandeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Razaviyayn</surname>
          </string-name>
          ,
          <article-title>On the behavior of the expectation-maximization algorithm for mixture models</article-title>
          ,
          <source>in: 2018 IEEE Global Conference on Signal and Information Processing (GlobalSIP)</source>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>61</fpage>
          -
          <lpage>65</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>V.</given-names>
            <surname>Nannen</surname>
          </string-name>
          ,
          <article-title>The paradox of overfitting</article-title>
          ,
          <source>Ph.D. thesis, Faculty of Science and Engineering</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>G.</given-names>
            <surname>Schwarz</surname>
          </string-name>
          ,
          <article-title>Estimating the dimension of a model</article-title>
          ,
          <source>The annals of statistics</source>
          (
          <year>1978</year>
          )
          <fpage>461</fpage>
          -
          <lpage>464</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>