Skip to main content
Be Bitwise

Cellular Network Architecture

Mobile Network Security · Mobile Exploitation track

11 min read

In this module

From Analogue to 5G

Cellular networks have rolled through five distinct generations, each one rewriting architecture, security, and capability. Working through that evolution matters, because it explains why certain vulnerabilities still haunt the latest networks: backward compatibility means newer generations inherit the worst habits of the old ones.

The core architectural split in every cellular generation sits between the Radio Access Network (RAN), which is the base stations and radio interfaces devices connect to over the air, and the Core Network, the backend infrastructure that handles authentication, routing, billing, and interconnection with other networks.

2G GSM Architecture

The Global System for Mobile Communications (GSM), deployed from 1991, was the first digital cellular standard. Its architecture is circuit-switched: a dedicated channel is held open for the duration of each call, the same idea as traditional landline telephony.

RAN Components

The 2G RAN is built from Base Transceiver Stations (BTS), the radio equipment at each cell site, and Base Station Controllers (BSC) that wrangle groups of BTS units. The BSC takes care of radio resource allocation, handover decisions between cells, and channel assignment.

Core Network Components

The 2G core network revolves around the Mobile Switching Centre (MSC), which routes calls and SMS messages. Two databases sit underneath it:

  • Home Location Register (HLR): The master database of all subscribers. Stores the IMSI, MSISDN (phone number), service subscriptions, and the subscriber's current location (which VLR they're registered with).
  • Visitor Location Register (VLR): A temporary database at each MSC that caches subscriber data for devices currently in its area. Travel to a different region and your data is copied from the HLR to the local VLR.

The Authentication Centre (AuC) stores the Ki (authentication key) for each subscriber and churns out authentication triplets used to verify SIM identity.

2G Authentication: COMP-128

2G authentication runs a challenge-response mechanism based on the A3 and A8 algorithms. The most widely deployed implementation is COMP-128.

The process plays out like this:

  1. The MSC/VLR sends a 128-bit random number (RAND) to the mobile device.
  2. The SIM card computes a Signed Response (SRES) using A3(Ki, RAND) and a session key (Kc) using A8(Ki, RAND).
  3. The SRES is sent back to the network, which independently computes the expected SRES using its copy of Ki.
  4. If they match, the subscriber is authenticated.
The Fatal Flaw of 2G Authentication

2G authentication is one-way only: the network verifies the subscriber, but the subscriber never verifies the network. The phone blindly trusts whatever base station it connects to. This is the fundamental vulnerability that IMSI catchers exploit - a rogue base station can impersonate a legitimate tower, and the phone has no mechanism to detect the deception.

2G Encryption

2G uses the A5 family of stream ciphers for over-the-air encryption:

  • A5/1: The original cipher, used across most Western networks. Cryptographically broken: attacks can pull the session key in seconds with rainbow tables.
  • A5/2: A deliberately weakened export version. Trivially broken in real time.
  • A5/3 (KASUMI): A later addition based on the MISTY1 block cipher. Much stronger, but never made it onto every 2G network.
  • A5/0: No encryption at all. The network can instruct the phone to drop encryption entirely, and the user never sees a thing.

The session key Kc is only 64 bits long, and COMP-128v1 forces 10 of those bits to zero, leaving an effective 54-bit key. Modern hardware brute-forces that without breaking a sweat.

3G UMTS Architecture

The Universal Mobile Telecommunications System (UMTS), deployed from the early 2000s, plugged a lot of 2G's security holes while bolting on packet-switched data capability.

RAN Changes

3G swaps the BTS for NodeB base stations and the BSC for the Radio Network Controller (RNC). The air interface moves to WCDMA (Wideband Code Division Multiple Access), buying higher bandwidth and better spectral efficiency.

Mutual Authentication: AKA Protocol

The biggest security upgrade in 3G is mutual authentication via the Authentication and Key Agreement (AKA) protocol:

  1. The network sends a random challenge (RAND) along with an Authentication Token (AUTN).
  2. The USIM (3G SIM) first verifies the AUTN using its stored Ki and a sequence number. This proves the network's identity.
  3. Only if network verification succeeds does the USIM compute and return the response (RES).
  4. Session keys (CK for confidentiality, IK for integrity) are derived.

That closes the impersonation hole that 2G left open: a fake base station can't produce a valid AUTN without knowing the subscriber's Ki, so it can't complete authentication or set up keys. It doesn't stop IMSI catching, though. The network may send an Identity Request before any authentication has happened, and the phone answers it with its IMSI in cleartext, so a rogue 3G or 4G cell can still harvest identities. It can also simply push the phone down to 2G, where none of this applies.

Sequence Number Protection

AKA includes a sequence number (SQN) that shuts down replay attacks. The AuC and USIM both maintain synchronised sequence counters. Each authentication vector must have a sequence number greater than the last accepted value. Replay a captured authentication vector and the SQN gets rejected as stale.

4G LTE Architecture

Long-Term Evolution (LTE), first deployed around 2009, is an all-IP, fully packet-switched architecture. There's no circuit-switched voice anymore. Voice calls use VoLTE (Voice over LTE), or they fall back to 2G/3G via CSFB (Circuit-Switched Fallback).

Evolved Packet Core (EPC)

The 4G core network is called the Evolved Packet Core (EPC) and consists of several key entities:

  • eNodeB: The 4G base station. Unlike 3G, there's no separate controller. Each eNodeB plugs directly into the core network in a "flat" architecture.
  • MME (Mobility Management Entity): Handles authentication, bearer establishment, handover, and paging. The MME is the signalling brain of the EPC.
  • HSS (Home Subscriber Server): Evolved from the HLR. Stores subscriber profiles and authentication vectors.
  • S-GW (Serving Gateway): Routes user-plane data between the eNodeB and the P-GW. Anchors mobility during handovers.
  • P-GW (PDN Gateway): Connects the EPC to external packet data networks (the internet). Handles IP address allocation and policy enforcement.

4G Authentication

4G uses EPS-AKA (Evolved Packet System AKA), an evolution of the 3G AKA protocol. It provides mutual authentication and derives a hierarchy of encryption keys:

  • K: The permanent key stored on the USIM and in the HSS.
  • CK, IK: Cipher Key and Integrity Key, derived during AKA.
  • KASME: The Access Security Management Entity key, derived from CK and IK. This is the master session key for 4G.
  • KeNB: Derived from KASME, used to generate the actual radio encryption keys (KUPenc, KRRCenc, KRRCint).

This hierarchy gives key separation: each key is derived one way for one purpose, so leaking a radio key (say, KUPenc) doesn't expose KASME or keys used for other purposes. It isn't forward secrecy in the usual sense. Everything ultimately derives from the long-term K, so anyone who obtains K and recorded the authentication exchange can recompute the session keys.

4G Signalling: Diameter Protocol

4G ditches SS7 in favour of the Diameter protocol for signalling between core network elements. Diameter rides over TCP/SCTP transport and traces its lineage back to the older RADIUS protocol. It supports IPsec for transport security, but plenty of deployments lean on the same trust model as SS7, inheriting the same vulnerabilities. Lesson 3 picks up that thread.

5G Architecture

5G, standardised by 3GPP from Release 15 (2018), is the most radical architectural shake-up since GSM. It introduces a Service-Based Architecture (SBA) where core network functions talk to each other over HTTP/2 APIs rather than point-to-point signalling protocols.

5G RAN

5G base stations are called gNB (gNodeB). The air interface runs NR (New Radio), supporting both sub-6 GHz and mmWave (millimetre wave) frequencies. 5G also splits the RAN into a CU (Central Unit) for upper protocol layers and a DU (Distributed Unit) for lower layers, which makes deployment a great deal more flexible.

5G Service-Based Architecture

Key 5G network functions include:

  • AMF (Access and Mobility Management Function): Equivalent to the 4G MME. Handles registration, mobility, and connection management.
  • AUSF (Authentication Server Function): Dedicated authentication service. Executes the 5G-AKA or EAP-AKA' protocols.
  • UDM (Unified Data Management): Evolved from the HSS. Stores subscriber data and generates authentication vectors.
  • SEPP (Security Edge Protection Proxy): A critical new element that sits at the border between operators for roaming. All inter-operator signalling passes through the SEPP, which applies filtering, topology hiding, and message validation.

5G Authentication: 5G-AKA and SUCI

5G introduces two major authentication improvements:

5G-AKA extends EPS-AKA with a home network confirmation step. After the serving network authenticates the subscriber, the result is bounced back to the home network for verification, blunting certain serving-network-based attacks.

SUCI (Subscription Concealed Identifier) finally tackles the long-running embarrassment of IMSI exposure. On 2G/3G/4G, the IMSI gets shouted in cleartext during the initial attach procedure. In 5G:

  1. The permanent identity is called the SUPI (Subscription Permanent Identifier).
  2. Before transmission, the SUPI is encrypted using ECIES (Elliptic Curve Integrated Encryption Scheme) with the home network's public key, producing the SUCI.
  3. Only the home network (UDM) can decrypt the SUCI to recover the SUPI.
  4. Each SUCI is freshly randomised, preventing cross-session tracking.

The protection has gaps. The standard allows a null scheme that sends the SUPI unprotected, and an operator that hasn't provisioned a home-network public key uses it. Most early 5G deployments are non-standalone (NSA): the phone attaches through a 4G core, so it's identified the 4G way, IMSI and all. And a rogue cell can still try to downgrade the phone to 4G or 2G.

Key Concept
SUPI/SUCI

5G replaces the cleartext IMSI with a two-layer identity scheme. The SUPI (Subscription Permanent Identifier) is the permanent identity, equivalent to the IMSI. The SUCI (Subscription Concealed Identifier) is an encrypted version of the SUPI, generated fresh for each registration using the home network's ECIES public key. On a standalone 5G network with a real protection scheme, this stops passive eavesdroppers and IMSI catchers from reading subscriber identities off the air. It doesn't help when the null scheme is in use, on non-standalone 5G that attaches through a 4G core, or against a downgrade to an older generation.

Bearer vs Signalling Channels

Every cellular generation splits traffic into two planes:

  • User Plane (Bearer): Carries the actual user data — voice, video, internet traffic. Encrypted between the device and the base station (or further on, in 5G). This is the data path.
  • Control Plane (Signalling): Carries the management messages that set up, maintain, and tear down connections. Authentication, handover commands, paging, and location updates all ride the control plane.

Both planes share the lower half of the radio stack on the phone. Hover over each layer below. NAS and RRC exist only for signalling, while your IP traffic enters at the top and drops straight to PDCP, where both planes pick up their encryption before RLC, MAC and the physical layer carry them over the air.

Cellular Protocol Stack

Application LayerUser services
VoLTE (IMS)Data (IP)SMS
Non-Access Stratum (NAS)Mobility & session management
EMM (4G)5GMM (5G)ESM (4G)
Radio Resource Control (RRC)Connection management
RRC ConnectedRRC IdleRRC Inactive (5G)
PDCPEncryption & integrity
SNOW 3GAES-CTRZUC
RLCSegmentation & retransmission
TM (transparent)UM (unacknowledged)AM (acknowledged)
MACScheduling & multiplexing
HARQScheduling grantsLogical channel mux
Physical LayerOver-the-air transmission
OFDMA (downlink)SC-FDMA/OFDMA (uplink)MIMO
Security4G LTE: NAS security after authentication; IMSI can go out in cleartext

Hover over a layer to see details

These two planes are not equally protected. User-plane encryption protects call content, but control-plane signalling leaks metadata: who is communicating, where they are, and when. SS7 and Diameter attacks target the signalling plane precisely because they can track users and intercept communications without ever needing to break user-plane encryption.

The Backward Compatibility Problem

The most stubborn security challenge in cellular networks is backward compatibility. Even with 5G's improvements:

  • Most networks still support 2G and 3G for rural coverage and as fallback when newer networks are congested.
  • International roaming forces interoperability between networks at different technology levels, often via SS7.
  • Many IoT devices and chunks of legacy equipment only support 2G/3G.
  • A 5G device can be forced down to 4G or even 2G through signal jamming or reject messages, surrendering every security gain of the newer generation in the process.

The end result is a system whose security is constantly capped by the weakest generation still in operation. Until 2G and 3G are fully decommissioned — a process that varies by country and isn't expected to wrap globally for years — their vulnerabilities remain exploitable.