Summer internship with 5G network

This translated blog post is written by Sander Endresen based on his summer internship at SINTEF Digital in the summer of 2021. For accompanying illustrations, see the Norwegian original.

This summer, I worked for five weeks as a research assistant at SINTEF, under the direct supervision of the project manager for the research project “Raksha: 5G Security for Critical Communication Networks”. First, I will explain why the various tasks were carried out, and then how they were performed.

In order to be able to analyze 5G traffic later, I started by setting up a phone to prepare it for network analysis. The next task was to use this 5G phone to see whether a GUTI ID changed over time in the 5G network to which the phone was connected, in order to determine whether today’s public 5G networks maintain the minimum security and privacy requirements. Furthermore, a simulator of a 5G network was set up, which included both a simulated phone and a base station, in order to later have the opportunity to test various security aspects of 5G in a simulated environment. Setting up a private 4G network using a programmable USIM card was the next task. The programmable USIM card ensures mutual authentication between the phone and a private network, something that a regular SIM card does not support for private 4G networks.

A Quectel modem for 5G networks was then set up, supporting both Non-Standalone-Architecture (NSA) and Standalone-Architecture (SA). NSA is a 5G service built on top of an existing 4G network, whereas SA allows independent use of a 5G service without any connection to an existing 4G core. This made it possible to test 5G functionality using a separate modem. Since the summer internship was limited to 5 weeks and setting up the Quectel modem was more time-consuming than initially anticipated, the final task was to set up a 2G network with separate SIM cards, in order to examine the network traffic of two phones connected to the same base station. Now that the background for the tasks has been provided, I will explain how they were carried out.

To examine 5G traffic, it was necessary to use a specially adapted app for this purpose. I started with an Android phone of the OnePlus 8T model, which was “bricked” and “unrooted”, and which had to be “unbricked” and “unrooted” in order to use the network app. A phone being “bricked” means that it does not work and cannot be switched on, meaning that it has the same functionality as a brick. An “unrooted” phone is a phone that comes from the manufacturer, with the restrictions they have imposed on downloading apps and functionality. Something special about a OnePlus 8T phone is that it is relatively easy for the user to load new firmware themselves, without having to send it in for service.
To establish contact with the phone, I had to use Fastboot and Emergency DownLoad Mode, which is the first step in getting it to work. Next, the phone was connected to a computer via cable, and new firmware was installed. The phone was now “unbricked”, and the next step was to “root” it. To “root” it, the bootloader was unlocked, the Stock Boot Image was downloaded, and software for a “rooted” phone was used in order to be able to use the network app. The phone could now display detailed information about network traffic.

One of the many elements that can be viewed through the app is the GUTI ID. This is an anonymized and random ID number assigned to all devices every time they connect to the 5G network. The IDs should not provide any information about the device or the user, other than that “a device with this GUTI ID is now connected to the network”. It is important that these IDs are frequently updated to a new random value. A security-critical problem arises when these IDs are not updated regularly. In that case, it would be possible to monitor these GUTI IDs, and thus also specific devices. If these IDs for specific devices are monitored through physical observation, it would be easy to map individuals’ routine movement patterns from A to B. This summer, it turned out that the GUTI ID for the OnePlus 8T phone was not updated regularly in the 5G network to which it was connected. This shows that both minor and major security vulnerabilities can also occur in 5G technology or among network operators. Although 5G is considered safe to use, this is nevertheless something one should be aware of when using the technology.
The next task was to set up a system for simulating 5G traffic, where everything runs on one and the same machine. The system consisted of two main components: Open5GS and UERANSIM. Open5GS is an open-source project that provides 4G and 5G mobile packet core network functionality. UERANSIM is a simulator of UE and RAN, where UE stands for User Equipment and can be a mobile phone, and RAN stands for Radio Access Network, which is a network that uses radio frequencies for 5G. With this system up and running, I could now simulate devices connecting to my 5G network. The data traffic in the network could also be analyzed using suitable software that displays the data packets in the traffic.

Now it was time to set up a 4G network using hardware and a programmable USIM card. The software used for the network was srsRAN, which is a software radio suite for 4G and 5G. A USRP B200 mini with associated antennas was used as hardware. In addition, a USIM card was programmed using a SIM card reader. With the network running and this USIM card inserted into a phone, it was now possible for the phone to connect to the network.

Next, a 5G network was set up using a Quectel modem. First, the modem had to be configured and the antennas connected. The way to communicate with the modem is through AT commands, so these commands were used to configure the modem. The AT commands are sent to the modem via a terminal, and from there it is possible to do most things, from selecting an operator and network to sending SMS messages and similar tasks. Apart from the network using the Quectel modem, a 2G network was finally set up using separate SIM cards, allowing several mobile phones to connect to the base station. For this, I used OsmoNITB, which is a GSM Network-In-The-Box program, and a program for using separate SIM/USIM cards for a private network.

My experience from the summer is that it is incredibly educational to get hands-on experience working with networks involving both hardware and software. Having the opportunity to be part of a research environment at SINTEF has also been very exciting, and is a valuable experience that I will take with me going forward. The work has been so interesting that it has inspired me to write a project thesis on 5G and cybersecurity, which is also intended to be continued as a master’s thesis.