# Cyber5 Gym: An Integrated Framework for 5G Cybersecurity Training
## 2 Background
### 5G Interfaces  
The standard 5G network architecture includes key interfaces such as N1, N2, N3, and N4, each critical for network functionality and management [25].  
**N1 Interface**: The N1 interface connects the UE to the network, specifically linking the UE with the AMF. This interface is crucial for the initial registration of the UE to the network, authentication, session management, and mobility management. It carries signaling messages that facilitate these functions and ensure that the UE can effectively communicate with the core network for necessary services. From a cybersecurity perspective, it is a crucial point of vulnerability before the establishment of a security context, as NAS messages are unencrypted and susceptible to interception. As demonstrated in our training scenarios, a malicious actor with access to the N1 interface could manipulate NAS messages, underscoring the necessity of stringent security measures in the early communication stages. For example, SMC-reply attack, where attackers can intercept and replay security mode commands.  
**N2 Interface**: The N2 interface is established between the AMF and the Next Generation NodeB (gNB), which is part of the RAN. This interface plays a key role in controlling the flow of data and managing the resources of the radio network. It is responsible for setting up bearers, managing mobility, and handling the control plane information that dictates how data is routed and managed within the RAN. Moreover, the importance of the N2 interface in cybersecurity training environments such as Cyber5 Gym, lies in demonstrating how an attacker might disrupt bearer setups or manipulate control plane information, thereby undermining network stability.  
**N3 Interface**: The N3 interface is the data pathway between the gNB in the RAN and the UPF in the Core Network. This interface is crucial for the actual transmission of user data. It handles the data packets coming from the user equipment, passing them through the RAN and forwarding them to the Core Network for routing to their final destination. The N3 interface is integral to achieving the high-speed data transmission capabilities of 5G, facilitating the core data transport function of the network. While N3 facilitates high-speed data, it also poses a risk of data interception and requires comprehensive security protocols, a focus in our DDoS simulations where trainees learn to secure data transmission pathways.  
**N4 Interface**: The N4 interface connects the SMF with the UPF. This interface is used for the management and control of user plane sessions. It allows the SMF to establish, modify, and release session contexts in the UPF. Through the N4 interface, the SMF can control and manage the flow of data, ensuring that routing paths are optimized and that the quality of service requirements for each user session are met. It makes the N4 interface a potential target for attacks aimed at disrupting session contexts, which our training scenarios address by teaching trainees to maintain session integrity and respond to threats dynamically. In cybersecurity training systems, trainees need to learn to secure this interface, reinforcing its role in safeguarding user plane sessions against unauthorized modifications.  
Collectively, these components and interfaces form the backbone of the 5G network, enabling it to support a wide range of applications and services with unprecedented speed and reliability [11].