# An Introduction of a Modular Framework for Securing 5G Networks and Beyond
## 1 Introduction  
New use cases will be created and vertical industries supported in the Fifth Generation Mobile Network (5G). End-users will be able to access services at the edge from different service providers (SPs). The mobile network operator (MNO) and SP will also share infrastructure and security management while providing the service to the users. The Fifth Generation Mobile Network (5G) will also use network services such as device-to-device (D2D) communications as a underlay technology to push content to the edge [1, 2]. The general security approach in solving security issues is using cryptographic techniques to achieve most security objectives. These cryptographic techniques should increase the reliability of security and privacy mechanisms in D2D communication, in form of anonymity, unlinkability, privacy, confidentiality, integrity, and authentication. These mechanisms should be lightweight due to mobile device computation and energy consumption constraints. In the past, D2D security was applied at the application layer, however, recently, network layer and physical layer security are new ways to achieve security objectives. For example, communication secrecy can be achieved at the lower layers without depending on higher layer encryption. With cryptographic methods such as the symmetric and asymmetric methods deployed at these layers, D2D communication security requirements can be achieved. Additionally, physical layer security can also be achieved by analysing and implementing the physical properties of wireless channels connecting D2D devices to provide secrecy capacity, channel-based key agreement, physical-layer authentication, and privacy-preserving anonymity [3]. There are a few security features in an information-centric networking (ICN) architecture. For example, to address the trust issue in ICN, a consumer can gain trust from the received content by deriving it from the publisher's credentials using their public key certificate [4]. In content-centric networking (CCN), data integrity is achieved by a publisher signing a piece of content with their private key and verifying the content using the publishers' public key. Data integrity is intrinsically provided in ICN by a named data object including a hash of data formatting. A symmetric encryption technique is used, and keys are securely distributed to authorised users, ensuring data secrecy. Due to name-based routing and the fact that the network's interests are dispersed throughout many areas, attacks such as denial of service (DoS) have less of an impact on CCN. Secure naming addresses content poisoning and cache pollution, which are basic security challenges that need to be addressed. Strong cache validation and self-certifying naming methods also prevent fraudulent content and unpopular content from spreading throughout the network [2]. Due to its capacity to support dynamic content objects and offer an effective content retrieval, self-certification has emerged as an effective strategy, particularly at the network edge of 5G technology [5]. The initial research to address the security issues of D2D communications led to the development of several security protocols to address security at different layers of communications. It was discovered that there is a need for a security framework that can capture all levels of the network. This article aimed to explain how these protocols could co-exist and interact within the context of a framework. Therefore, it explores the security of 5G and D2D communications and proposes a network service security (NSS) framework that includes a multi-level security model for a 5G-enabled D2D communication system. The NSS framework consists of three security levels that can be used to develop the underlying security protocols for an integrated security solution to provide privacy and security protection to network services at different levels of 5G-enabled D2D communications network.