An implementation of an Artifact for security in 5G networks using Deep Learning methods.

The Fifth-Generation networks are vital in telecommunications, which reaches a substantial increase in transmission speed. However, due to this dynamism, cyber attackers try to take advantage of certain configuration flaws. Under this problem, this study aims to design and implement an artifact capable of protecting and improving security in this cellular network type. The artifact uses a neural network structure based on Depp Learning, Gödel's theorem, Dijkstra's graph theory, a sigmoid function for faster activation in the designed neural network, and a mathematical model able to perform a recursive and logical process for the analysis of attacks. Considering the Gödel method, this artifact can evade Worms, Ransomware, Phishing, Doxing attacks and can be used in the OPC, Profibus, EtherCat, Profinet DNP3, and Modbus protocols. Its implementation allows us to create evasive actions in case of an attack and improve the configuring flaws in the security protocols, changing its parameters and making it secure. We developed the artifact through Extreme Programing with the combination of Python and Matlab. The results prove the functionality of the algorithms and demonstrate the success in evading an attack or making the best decision to protect the 5G network.


Introduction
The arrival of the Fifth-Generation networks (5G) to the world of technology has significantly increased data transmission speed and the ease of connectivity between devices. This kind of technology created a new concept, where there are great benefits. 5G networks will provide opportunities for developing new services, new business models, and new players to enter the mobile market [1]. However, also vulnerabilities increased the network's security, one of the essential risks being larger-scale DDoS attacks.
Nowadays, the industry and the scientific community argue relevant security risks and threats, and various vulnerabilities, to which 5G cellular networks are exposed [2]. Furthermore, as 5G services grow, they become attractive targets for cyberattacks due to increasing volumes and poor and weak information security levels [3]. In fact, in recent years, 5G has posed serious cybersecurity challenges, motivated by the number of cyberattacks that have grown dramatically, as well as its complexity [4].
This study aims to improve the security of 5G cellular networks due to failures in security and network protocols due to their recent adaptation [5]. For this, a vulnerability detection artifact was developed using Deep Learning techniques with convolutional networks, which will act as a learning process to detect the sectors with vulnerabilities. An artifact is a tangible product resulting from the software development process. Then, we implement a real-time detection algorithm, which stores the data to convert it into an input for the designed neural network layer assignment based on a mathematical model.
We used the sigmoid function as an activation, which speeds up the process in a binary 1 or 0 state. In addition, we applied Extreme Programming (XP) to develop the artifact [6]. For the statistical validation of the model, we employed Gödel's theorem for algorithms of complexity four [7]. Concerning the neural network, we use the Tensor Flow and Numpy libraries of Python for its development for discrete variables.
For the proofs of concept, we used a virtual machine with an Ubuntu server. In addition, we configured a virtual network environment to simulate the 5G network [8]. Likewise, the Matlab functions were used, which allows applying the tests of Gödel's theorem [9]. Finally, the inflection points in the performance curves were measured in the execution of the mathematical model. The results show the algorithm's efficiency to detect any attack and the effectiveness of knowing the best evasion to counteract an external hack. Our development is expected to drive a change in computer science security and increase security levels in 5G cellular networks.
The main contribution of this study is to create an artifact that improves the configuration of security protocols in 5G networks [10], which can analyze, which is the best evasion technique against a computer attack. All of this is achieved through neural network training, capable of identifying the vulnerabilities against the attack. This analysis identifies similar patterns from other existing attacks and assesses the correct way to prevent them from affecting the stability of the network.
The article is structured as follows: Section 2 describes some previous related works. Section 3 explains in depth the methods and techniques that were used to develop the model. In section 4, the results are evaluated. Finally, section 5 concludes with the main findings and lines of future work.

Related Work
The Fifth-Generation of telecommunications represents a technological revolution that a few years ago was not foreseen that could be possible. However, it has already begun to be developed and implemented in several countries since 2019 [11]. Within this context, in the industry, several solutions have been proposed. A summary is described below: As mentioned in [12], the expectations in 5G networks enhance the wireless network services, which have much more advanced cryptographic security algorithms. Thus, in 2017 a Physical layer security (PLS) solution provides advantages over the features in the wireless channels that receive the signal against attacks from malicious users. Moreover, PLS techniques match the features of 5G networks. Therefore, the application of PLS to 5G networks is a promising solution to address security threats. This article presents a comprehensive review of the state-of-the-art PLS techniques and discusses their applications in 5G networks [13].
In the study proposed of [14], a PLS is used in 5G networks, which continuously examines security as the transmission inherent and vulnerable for the deficiencies in the security of this type of network. This work proposes a solution based on safeguarding data randomly in the middle of communications.
The three most promising ones are discussed among various technologies: heterogeneous networks, massive multiple-input multiple-output, and millimeter-wave. Based on the fundamental principles of each technology, we identify the rich opportunities and the significant challenges that security designers must tackle [15]. Such identification is expected to advance the understanding of future physical layer security decisively.
Another study that has been observed based on 5G technologies refers to [16]. Their technique based on quantum computing protocols involves a range of possibilities due to their perceptual states, so they mention mechanisms in QoS, which work for data sharing and security. The statistical data sample presents an excellent efficiency in the equation raised concerning the bit-by-bit vector operation. Besides, the protocols are based on Quantum Hash function schemes [17]. A function is generated, which evaluates the diffusion and distribution of the data curves through different analysis tests. Our work allows the help of using the data as bi-neutral techniques in deep learning algorithms [18].
In perspectives of using techniques based on Deep Learning [19], the article proposed by [20] mentions the principles of cybersecurity and defense in systems that work with this type of technology. The techniques used for the existing traffic in the network are analyzed. The authors' proposal allows adapting and automating the configuration in the architecture of a defense system against computer attacks, the experiments that were conducted in virtualized environments. Also in [21], a wide range of Machine Learning techniques can accomplish the above requirements, e.g., it has no strict time restrictions in the NAD module if the ASDs have adequate classification performance.
In another study based on Deep Learning techniques presented by [22], a solution based on a framework is mentioned. The authors propose a Blockchain-based secure FL framework to create intelligent contracts and prevent malicious or unreliable participants from being involved in FL. In doing so, the central aggregator recognizes malicious and unreliable participants by automatically executing intelligent contracts to defend against poisoning attacks [23].
Within this context, in preliminary studies, authors used neural cryptography, which uses a modified artificial neural network called the Tree Parity Machine or TPM to establish a private key through an insecure channel [24]. Furthermore, in [25], the authors increased the security of the RSA encrypted message by investing a minimum amount of extra time in encryption and decryption (i.e., multi-encryption) in networks and mobile devices. Finally, in [26], researchers evaluated the malware life cycle. They developed a custom and unpublished keylogger using Python and added the necessary methods to avoid the leading security tools used in Windows environments successfully.

Materials and methods
The proposed artifact uses an Artificial Intelligence technique called Deep Learning. According to [27], Deep Learning is a form of Machine Learning that enables computers to learn from experience and understand the world in terms of a hierarchy of concepts. Because the computer gathers knowledge from experience, there is no need for a human-computer operator formally to specify all the knowledge needed by the computer.
On the other hand, the 5G is a technology with a good present and future. It aims to make a significant leap in connectivity, automation, and among these, one of the most important, information security.
Information security plays an essential role in everyday life since the evolution of technology increases vulnerability risk factors. Within this viewpoint, electronic devices have an essential role in the 5th Generation of telecommunications by sending and receiving vital information from users. As stated by [28] the security of information transfer, messages, and user data depends on the guarantees provided by authentication protocols and encryption techniques.
With 5G technology being a high-speed network, information packets travel the path shorter than its predecessor technology. However, this also poses more significant risks regarding privacy, confidentiality, and integrity of the information, which malicious people can receive for profit or harm third parties. Therefore, one alternative is the use of encryption techniques to reduce the chances of unauthorized access. Also, in the opinion of Gonzalez [28], thanks to the high speed of the 5G network, physical layer security (PLS) type encryption techniques can be implemented to prevent the interception of data traffic.. Thus, we propose to use some techniques to create a new artifact that can interpret the vulnerable data and insecure network sectors, also prevent informatics attacks in a 5G network [16]. On the other hand, considering the 5G network can be targeted by cybersecurity attacks, it is necessary to detect and learn the offense used so that the algorithm can solve the different situations and risks that may occur [29]. For example, suppose there is an attacker or a problem of insecurity in the network. In that case, the artifact will apply specific protocols to avoid exposing any vulnerability to the user.
We configured a virtual network environment with Linux service with Virtual Box as the central platform to create the 5G simulation. Within the context of this research, we defined a virtual network as a set of virtual network devices connected collectively in a given topology, which emulates an equivalent system in which the environment is perceived as if it were real [30]. Figure 1 shows the topology, from connection to a network, access to the web, connection to the virtual machine, subsequent algorithm execution, performing maintenance to the web, and network configuration. An experimental research proposal has conducted, applying Extreme Programming as a software engineering development methodology over a controlled virtualized environment, allowing emulating any event generated during network use with this type of technology. As it is known, the use of a Bayesian network that has several learning layers helps to diversify the computational mathematics for the continuous analysis of data that will enter this input function to give a resultant functional output.
For the development of this study, we considered using a sigmoid function. According to [31] sigmoid is a bounded and differentiable function defined for all real input values. It has a non-negative derivative at each point and precisely one inflection point. Figure 2 reveals the configuration of sigmoid neural network activation. We have developed our own customized and previously reviewed algorithm that has not been published yet. We have added different techniques concerning the needs of 5G networks. The algorithm uses a different neural network structure, based on a Sigmoid, which was developed in Python, Matlab, and R programming languages, tested on Windows-based operating systems, using a server-based on Linux-Ubuntu. The following equation shows the mathematics behind the network created (see equation 1).
The neural network was concise, assembled in the following factorial form, where it's learning definition works with the respective derivatives in each recursive equation.
The equations comply with the respective loss rule. Five layers will be used to allow the algorithm to be efficient in analyzing 5G networks. Therefore, the output function generates the following result according to linear computer algebra. Once the connection was conducted, the process of algorithmic complexity and evaluation of the neural network had to be used. Then the respective tests were carried out in XP, which according to the graph provided by Matlab, inferred that the performance of the network with sigmoid activation is based on a speed of one Gbps.
As can we observe in Figure 3, two synapses of the neural network are shown. The red function expresses the input of the network connection, while the blue function expresses the output function. It can be interpreted that both are in connection at the same activation speed and efficiency. In this way, being interconnected between them, the deep network is configured based on the input and output protocols.  Figure 4 shows that a neural network with five layers designed for the project explains the interconnection between networks. The factorial mathematical model is responsible for an initial layer with four inputs that interact: network speed, security protocols, the different possibilities of IP networks, and finally, the network parameters. The other three layers oversee activating methods to prevent the network from being compromised through the training of existing security methods to combine different ethical hacking techniques. Finally, we have a layer with a single output that will apply the technique to counter the attack on the 5G network. The circular shape was established for its short path according to Dijkstra's graph theory, and the network can analyze evasions much faster. Algorithm 1 oversees counteracting and mitigating the attack, i.e., with the neural network run, it performs a recursive process, which chooses the best attack method, based on the direct inputs and network connection; thus, it is named a smart network. Algorithm 1. securityFIVEG

Proof of concept
The artifact developed has undergone various tests, including statistical and performance tests, and as a result, has demonstrated its effectiveness. Having been tested in an environment of two virtual machines with 64-bit operating systems and Ubuntu 20.04, the algorithm had a previous estimate of 1.2 to 1.3 seconds in receiving the data, so it is much faster than other existing algorithms.
On the other hand, the virtualized server, which oversaw evaluating the 5G network when transmitting the data to the virtual machines, verified that it did not collapse, despite the large amount of data to which it was subjected convoluted neural network.
As shown in Figure 4, a neural network with five layers was designed for the project and explained the interconnection between networks. The factorial mathematical model is responsible for an initial layer with four inputs, where the network speed, security protocols, IP networks, and the network parameters enter. The other three layers oversee activating methods to prevent the network from being compromised by training existing security methods. Hence, it can combine different ethical hacking techniques. Finally, we have a layer with a single output that will apply the technique to counter the attack on the 5G network. According to Dijkstra's graph theory, the circular shape was established for its short path; the network can analyze evasions much faster.
At this point in the research, cybersecurity is the most relevant issue, as it became a crucial element in estimating the risks of massive networking of devices with connectivity through virtualized 5G networks [32], which means more utility and potential for IoT, but less security in the transmission and reception of data. Decentralized security in this network is the leading risk to achieve the speed that highlights 5G. There are more traffic routing points and not being monitored all these points. When an attack occurs, it takes longer to detect and address the problem, so more monitoring is needed since the loss of information can be catastrophic for an organization or user, even if the attack has a duration of 5 to 10 seconds.

Evaluation Results and discussion
We test the artifact using Gödel's incompleteness theorems [33] to measure the complexity of the algorithms. We exported its results in different graphs. Figure 5 shows the results of this test, i.e., the first illustration shows the relationship between the processing and its data loss. The second graph shows the propagation of the analysis when performing the tests in Matlab. The third figure shows how the processing goes when choosing the best evasion method. Finally, the last graph shows the cook distance, which is to say that the algorithm has chosen the best way to avoid an attack. In this way, it performs the efficiency operation concerning the 5G network [34]. Figure 5. Results of the test applied Gödel's incompleteness theorems Table 1 presents the results obtained by subjecting the algorithm to the validation process according to the Gödel completeness test [35] at 1Gbps of network speed. As can be seen, it examines the security status of the communication protocols involved during transmission; the evasion techniques applied, the speed of algorithm execution, and data storage capacity. Before executing the neural network, the first level of complexity of security level is calculated.  Table 2 presents the results after the neural network execution. Here, the algorithm has an execution speed of up to one Ebps. In addition, security is activated in a more significant number of communication protocols and evasion techniques against attacks compared with Table 1, consequently increasing the complexity level of security to four. These results demonstrate the functionality and efficiency of our proposal. Given the respective analysis of the completeness of this algorithm, the expected results of an attack may vary due to the type of attack external to 5G networks. However, as can be appreciated in the neural network, the event creates a single output that generates a counterattack or improves the security protocols of the 5G network. For this reason, Figure 6 presents the results in real-time after running the algorithm and receiving a simulated external attack by sending a virus and downloading it via email. That is, once this indirect attack has been carried out, the algorithm can defend the network. Once the algorithm is executed, a comparison of the network security is conducted while new protocols are activated. As a result, the neural network can infer the best evasions techniques and improve security. Figure 7 shows an illustration where the network becomes more secure with the implemented protocols. The graph on the right side shows how it improved after executing the neural network and the algorithm with the deep learning technique. Figure 7. 5G Network before and after the execution of the algorithm.
The results are as expected according to Gödel's completeness test [36]. Moreover, since the neural network was tested, the efficiency and data propagation are adequate. In addition, as shown in the illustrations, it can be seen how the network can detect the best way to counter an attack. On the other hand, due to the algorithm model and the mathematical model statistics, it is considered that the algorithm can benefit the security in 5G networks.

Conclusions and future work
This study focused on the design and implementation of an unprecedented artifact to improve the security of 5G networks. We implemented the artifact with XP methodology and Python, designing a mathematical model that included a sigmoid activation function. Gödel's method applied to the mathematical model was able to evade Worms, Ransomware, Phishing, Doxing attacks and could be used in OPC, Profibus, EtherCat, Profinet, DNP3, and Modbus protocols. Among the results, we highlight the Gödel test results that show the efficiency of the mathematical model and its correct interpretation at the time of the simulation. In addition, the artifact functionality offers network security when entering data types before and after its execution and its stability and protection against any thread. Finally, the algorithm achieved the training of a neural network to analyze any pattern of insecurity and opt for evasion in the face of an external computer attack. With this, we can state that the algorithm can learn based on the experience of each attack obtained and improve the protection of a 5G network.
As future work, we planned to apply a mathematical model and Deep Learning to implement early warnings and vulnerability assessment in attacks to 5G cellular networks.