# Cyber5 Gym: An Integrated Framework for 5G Cybersecurity Training
## 2 Background
### 5G Architecture  
The architecture of the 5G system can be broadly categorized into three primary components [11]: the User Equipment (UE), the Radio Access Network (RAN), and the Core Network (CN) (see Figure 1). Each of these components plays a pivotal role in the functionality and efficiency of the 5G network, ensuring high-speed connectivity and advanced network capabilities.  
**User Equipment (UE)**: The UE refers to the devices that end-users utilize to connect to the 5G network. These include a wide array of devices, from smartphones and tablets to a multitude of IoT devices. UEs are not just communication endpoints but are integral to managing sophisticated tasks like processing power and storage, thereby facilitating a more distributed network architecture. Moreover, UE is crucial for testing and emulating the behavior of real-world devices within the 5G network. It allows for the evaluation of network performance and the effectiveness of various network configurations and security protocols from the perspective of the end user.  
**Radio Access Network (RAN)**: The RAN is the link between the UE and the Core Network. It consists of base stations and other radio access nodes that facilitate wireless communication with mobile devices. In 5G networks, the RAN is developed to support a higher frequency spectrum and advanced technologies such as Massive MIMO (Multiple Input Multiple Output) and beamforming. These technologies are key to achieving the high data rates, reduced latency, and enhanced capacity that 5G promises.  
**Core Network (CN)**: The Core Network is the backbone of the 5G system, orchestrating the management and delivery of services. It is responsible for critical functions such as data routing, authentication, session management, and mobility management. The CN is more software-centric in 5G, offering flexibility and scalability to accommodate the diverse needs of different applications, ranging from high-speed internet access to critical communication for autonomous vehicles and industrial automation. Within the CN, three essential elements play key roles:  
1. Access and Mobility Management Function (AMF): The AMF is fundamental in managing user connectivity and ensuring seamless mobility. It is responsible for authentication, security control, and session management. The AMF ensures that as devices move, maintain continuous and secure connectivity, switching between different access networks when needed.
2. Session Management Function (SMF): This function primarily deals with session establishment, modification, and release. It manages the data sessions for each user, ensuring that the network resources are allocated effectively and that the data routing paths are optimized for each session. The SMF plays a crucial role in quality of service (QoS) management and in enforcing data policies.
3. User Plane Function (UPF): The UPF is involved in data plane processing, including packet routing and forwarding. It serves as the anchor point for intra-network and inter-network mobility, enabling user data to be transferred seamlessly across the  
Figure 1: Simplified Virtualized 5G Architecture.  
network. The UPF is crucial for achieving the high data rate and low latency features that are characteristic of 5G networks.