PFCP
PFCP
5G Standalone
core security
research
positive-tech.com
5G Standalone core security research
Contents
1. Executive summary................................................................................................................ 3
2. Introduction................................................................................................................................ 4
4. PFCP protocol........................................................................................................................... 6
5. HTTP/2 protocol.................................................................................................................... 10
5.1. NRF....................................................................................................................................... 10
5.2.1. 5G AKA.............................................................................................................................12
7. Conclusion................................................................................................................................ 20
2
5G Standalone core security research
1. Executive summary
This report presents our findings regarding the 5G Standalone
core. Our objective was to analyze the security of the network
architecture, interaction of network elements, and subscriber
authentication and registration procedures.
3
5G Standalone core security research
2. Introduction
5G mobile networks are gradually being rolled out by operators worldwide.
Widespread adoption will allow users and devices to benefit from all the
advantages of 5G, such as enhanced mobile broadband (eMBB), ultra-reli-
able and low-latency communications (URLLC), and massive machine-type
communications (mMTC).
1,800 45%
5G adoption (in millions)
5G coverage (% of geography)
1,600 40%
1,400 35%
1,200 30%
1,000 25%
800 20%
600 15%
400 10%
200 5%
0 0%
2019 2020 2021 2022 2023 2024 2025
4
5G Standalone core security research
N2 N4
N3 N6
UE gNB UPF DN
The tested network includes the basic components needed for serving sub-
scribers, such as:
User Plane Function (UPF), which is responsible for connecting the sub-
scriber to the Internet, handling GTP-U packets, assigning policy rules, and
setting quality of service parameters.
User Data Management (UDM), which is responsible for managing user pro-
file data and user IDs, as well as for generating authentication credentials.
Unified Data Repository (UDR), which is a database that stores and allows
extraction of subscriber-related data.
5
5G Standalone core security research
Policy Control Function (PCF), which assigns policy rules to user terminals
using data from the UDR.
Network Slice Selection Function (NSSF), which selects the network slicing
instance when user equipment is registered on the network depending on
the equipment's type, location, and other factors.
4. PFCP protocol
PFCP (Packet Forwarding Control Protocol) is used on the N4 interface be-
tween the control plane and the user plane. With the help of this protocol,
the SMF establishes a PFCP session on the UPF to manage the GTP tunnel
that provides Internet access to the subscriber. All subscriber settings con-
sist of a number of rules responsible for the PDR (Packet Detection Rule),
FAR (Forwarding Action Rule), QER (QoS Enforcement Rule), URR (Usage
Reporting Rule), BAR (Buffering Action Rule), and MAR (Multi-Access Rule
Handling). Each subscriber is assigned its own unique PDR rules, and the
session is identified with the help of an assigned SEID (Session Endpoint
Identifier).
6
5G Standalone core security research
N1
Control plane
N2
User plane
UE AMF
N11
gNB SMF
N4
N3
N6
Base score:
6.1 (medium)
7
5G Standalone core security research
N1
Control plane
N2
User plane
UE AMF
N11
gNB SMF
N4
N3
N6
Base score:
6.1 (medium)
8
5G Standalone core security research
N1
Control plane
N2
User plane
UE AMF
N11
gNB SMF
3 — GTP-U N4
N3
N6
Base score:
8.3 (high)
9
5G Standalone core security research
5. HTTP/2 protocol
5.1. NRF
According to the specification, the Network Repository Function is a key
service of 5G networks. The NRF is responsible for registering new NFs and
storing their profiles. The NRF also receives requests for discovery of availa-
ble NFs that meet certain criteria.
Registering a new NF
Obtaining the NF profile
Deleting the NF profile
In the tested deployment, none of the components verify the TLS certificate
when connecting to each other. No procedure for service authorization is
performed on the NRF.
Base score:
8.2 (high)
10
5G Standalone core security research
AV:A/AC:L/PR:N/
200 OK
UI:N/S:C/C:H/I:N/A:N
Attacker NRF
Base score: as NF
7.4 (high)
Figure 10. Obtaining the NF profile
Attackers can then impersonate any network service for other NFs and ob-
tain profile data, such as authentication status, current location, and sub-
scriber settings for network access.
AV:A/AC:L/PR:N/
204 No content
UI:N/S:C/C:N/I:N/A:H
Attacker NRF
Base score: as NF
7.4 (high)
Figure 11. Deleting the NF profile
In case of mass deregistration of the core components, the network will not
be able to provide service to subscribers, potentially causing financial losses
and reduction in subscriber trust.
11
5G Standalone core security research
1 — POST 2 — POST
.../ue-authentications .../generate-auth-data
200 OK
201 Created
3 — PUT
.../5g-aka-confirmation 4 — POST
.../auth-events
201 Created
200 OK
5.2.1. 5G AKA
The first request (…/ue-authentications) initializes authentication. The mes-
sage contains the user ID (SUPI or SUСI) and name of the serving network.
The response returns data together with the HXRES* and resource address
to confirm authentication (Figure 13). Attackers can use this procedure to
obtain the subscriber authentication vector.
12
5G Standalone core security research
As soon as the AMF obtains the authentication vector, it sends the RAND
and AUTN parameters to the subscriber, on whose device the RES* is cal-
culated. After obtaining the RES* from the subscriber, the AMF calculates
the HRES* hash and performs authentication of user terminal by compar-
ing the HRES* to the HXRES*. If they match, the AMF sends the request
…/5g-aka-confirmation, which contains the RES* to confirm authentication.
A successful response contains the authentication status, SUPI, and KSEAF
(Figure 14). The method itself is not dangerous, since the RES* is calculated
on the subscriber's device. However, if the attacker impersonates the AMF
and serves the subscriber, this will cause disclosure of the SUPI and fake au-
thentication of subscriber in the network.
13
5G Standalone core security research
200 OK
Attacker UDM
as NF
14
5G Standalone core security research
Subscriber MSISDN
NSSAI network segment identifier
User Internet connection parameters
Location data
Base score:
7.4 (high)
Access to such data would severely jeopardize security: it allows the attacker
to secretly spy on the subscriber, while the latter will never know what is go-
ing on. To protect equipment from such attacks, the same methods are ap-
plicable as before: obligatory authentication and authorization for network
components.
Control plane
AMF SMF
N2 N4
N3 N6
UE gNB UPF DN
15
5G Standalone core security research
5G networks use PDU sessions for subscriber Internet connections. The sub-
scriber terminal sends a request for connection to the AMF by using the N1
Interface via gNB. After successful subscriber registration, the AMF estab-
lishes a connection with the SMF via SM context to manage packet data
transfer between the subscriber and the UPF (Figure 19).
16
5G Standalone core security research
This information is enough to transfer traffic from the subscriber to the net-
work, but the UPF does not yet have information about the base station
serving the subscriber, nor has a TEID been assigned for downlink transmis-
sion. The AMF sends the required information to update the context by using
a unique identifier (Figure 21).
CVSS v3.1 Vector: After exchanging these messages, a PDU session is established and the sub-
AV:A/AC:L/PR:N/ scriber can connect to the Internet. Further management and session dele-
UI:N/S:C/C:L/I:H/A:N tion require knowledge of the unique number obtained during session crea-
tion. A potential attacker needs to obtain this number to perform an attack,
Base score:
which is rather difficult because all signaling traffic is encrypted.
8.2 (high)
The attacker can create a new session by impersonating the AMF, using the
data of a particular subscriber, and manage this session as described already.
As a result, the subscriber will be billed for all traffic used by the attacker.
17
5G Standalone core security research
6. How to protect 5G
Security wise 5G was designed to address the gaps and errors present in
the architecture of previous-generation networks. This led to new protection
mechanisms based on the following principles:
Mutual authentication. The sender and recipient must each verify that the
other is genuine.
These principles inspired new mechanisms for securing signaling traffic dur-
ing drafting of the 3GPP documentation. Starting with 5G potential attackers
should face a higher barrier to commit any kind of illegitimate activity: for
instance discovering the subscriber permanent identifier (SUPI) over the air
with an IMSI catcher; the subscriber concealed identifier (SUCI) should be
transmitted when a subscriber registers on the network. The Security Edge
Protection Proxy (SEPP) involves traffic filtering mechanisms that will help
to prevent attackers from breaching the operator's network via the roaming
network. Transport-level encryption can be used to prevent eavesdropping
on traffic within the MNO. At the same time, the Oauth 2.0 protocol will en-
able the network function receiving a message to verify whether the sender
(a different NF) has undergone network authorization, which is beneficial if
an attacker is attempting to send a message by posing as a legitimate NF.
These examples are only a few of the features incorporated at the specifica-
tion level for 5GC security. Which is good, but should not be treated as pan-
acea, because real life deployment always involves difficulties, some aspects
not fully solved by the moment and finally surprises happen.
That’s why even full use of all this functionality will not guarantee that a net-
work cannot be breached from outside.
18
5G Standalone core security research
1. Assessment
2. Monitoring
3. Protection
First. Security testing is a useful tool to start with – it has a number of ben-
efits. There are thousands of base stations in the world that need security
testing for the asset access or radio. It would also benefit to run the testing
for the core network, as it is fully exposed to the IPx. Security testing is pow-
erful to run on the virtualization infrastructure, as vendors deliver solutions
as a black box and it is difficult to uncover what is inside the infrastructure. It
is especially important to run testing for the MEC, as it can lack architectural
security, for instance.
Second. Security must also be non-intrusive for the telecom world. To pro-
vide the best services, the best speed, security must support the process but
not be an obstacle.
19
5G Standalone core security research
7. Conclusion
The number of 5G network users will continue to grow each year. The capa-
bilities of 5G networks allow providing services to all devices based on their
functionality. Besides regular subscribers, equipment belonging to business-
es and even cities may be connected to the network.
Sources
1 The 5G guide. A reference for gsma.com/wp-content/uploads/2019/04/
operators. GSMA, April 2019 The-5G-Guide_GSMA_2019_04_29_com-
pressed.pdf
20
5G Standalone core security research
positive-tech.com
5G Standalone core security research_A4.ENG.0003.03
[email protected]