Skip to main content
Be Bitwise

SS7 & Diameter Vulnerabilities

Mobile Network Security · Mobile Exploitation track

12 min read

In this module

Signalling System 7: The Backbone of Telephony

Signalling System 7 (SS7) is the set of telephony signalling protocols cooked up in the 1970s and 1980s, and it still controls virtually every circuit-switched telephone network in the world. SS7 handles call setup and teardown, SMS routing, number portability, roaming, billing — the lot. It's the invisible plumbing that lets a phone call connect across different carriers and countries.

SS7 was designed in an era when the only entities with access to the signalling network were trusted national telephone companies. There was no notion of an adversary inside the signalling network. Every node was assumed legitimate. That implicit trust model is the root cause of every SS7 security problem we still grapple with today.

SS7 Protocol Architecture

SS7 uses a layered protocol stack:

The Mobile Application Part (MAP) is the layer most relevant to mobile network attacks. MAP messages handle subscriber authentication, location management, SMS routing, and supplementary services. They sit on top of TCAP (for transaction management) and SCCP (for addressing and routing).

How SS7 Access Is Obtained

SS7 used to require physical connections at telephone exchanges. Today, access is far cheaper and more abundant:

  • SS7-over-IP (SIGTRAN): SS7 messages can be transported over IP networks using the SIGTRAN protocol suite (M3UA, SCTP). This means SS7 access no longer requires a physical link to a telephone exchange.
  • Rogue operators: Some operators in certain jurisdictions sell SS7 access for a few hundred dollars per month.
  • Compromised network elements: An attacker who compromises a carrier's infrastructure gains SS7 access.
  • Interconnect agreements: Hundreds of operators worldwide have interconnect agreements that grant SS7 access for roaming and messaging. Each one is a potential entry point.
The SS7 Trust Problem

SS7 has no authentication or authorisation mechanism at the protocol level. Any entity with access to the SS7 network can send any message to any other entity, and the receiving entity will process it. There is no way to verify that a message claiming to come from a legitimate operator actually originates from that operator. This is not a bug - it is a fundamental design characteristic of a protocol built for a world of trusted monopoly telephone companies.

SS7 Attack Categories

SS7 attacks fall into four broad camps based on what the attacker wants: location tracking, interception, fraud, and denial of service.

Location Tracking

SendRoutingInfo (SRI): When someone calls a mobile subscriber, the calling network has to know where the subscriber is currently registered. It sends an SRI message to the subscriber's home network (HLR), which asks the serving MSC/VLR for a temporary Mobile Station Roaming Number (MSRN) and returns that, usually with the subscriber's IMSI. The MSRN's prefix reveals which network, and roughly which region, the subscriber is in.

An attacker sends SRI queries for a target phone number and reads the serving network off the answer. Send those queries on a loop as the target moves and you've got near-real-time location tracking.

ProvideSubscriberInfo (PSI): This MAP message asks for the subscriber's current Cell-ID, the specific cell tower they're attached to. Cell-IDs map to physical locations with accuracy ranging from a few hundred metres in urban areas to several kilometres in rural ones.

SendRoutingInfoForSM (SRI-SM): The SMS variant of SRI. Intended for SMS routing, it returns the subscriber's IMSI and current serving MSC. Attackers love it because it's simpler to send than SRI and many networks filter it less aggressively.

Call and SMS Interception

RegisterSS (Register Supplementary Service): An attacker can plant a call forwarding rule on the target's number by sending a RegisterSS message to the target's HLR. All incoming calls then get forwarded to the attacker's number. The attacker answers, records, then bridges the call back to the real target. The interception is invisible.

InsertSubscriberData (ISD): Updates subscriber data in the VLR. An attacker can use it to change the subscriber's service profile, redirect SMS messages, or fiddle with other parameters. Tweak the SMS routing information and every incoming SMS — two-factor authentication codes very much included — gets redirected to the attacker.

The SMS interception seen in real bank fraud doesn't even need ISD. The sequence below follows an attacker stealing a one-time code: SRI-SM to learn the IMSI, a forged UpdateLocation (covered under Fraud below) to move the subscriber onto the attacker's fake MSC, and then the ordinary SMS delivery path doing the rest.

The victim's phone simply stops receiving texts until it next re-registers. Nothing on the handset shows why.

Fraud

SendAuthenticationInfo (SAI): Asks the AuC for authentication vectors (RAND, SRES, Kc triplets for 2G). With valid authentication vectors in hand, an attacker can clone the subscriber's session on another device, making calls and sending messages billed to the victim.

UpdateLocation: Send an UpdateLocation message claiming that the subscriber has roamed onto the attacker's fake network and the HLR will start routing incoming calls and SMS to that network instead of the legitimate one.

Denial of Service

PurgeMS: Tells the HLR to delete the subscriber's record from the current VLR, effectively de-registering them from the network. The subscriber loses service until their phone re-registers.

Cancel Location: Tells the HLR to cancel the subscriber's registration outright. The user-facing result is the same: no service.

Diameter: The 4G Signalling Protocol

The Diameter protocol was designed as the successor to SS7 for 4G LTE networks. (5G's own core replaces it with HTTP/2 service-based interfaces, but Diameter stays in use wherever 5G interworks with 4G, including non-standalone 5G.) Named as a pun (it's twice the RADIUS protocol), Diameter rides over TCP or SCTP for reliable transport and supports IPsec and TLS for encryption. Its data model is built around Attribute-Value Pairs (AVPs): flexible, extensible containers that carry signalling information.

Diameter Protocol Structure

Diameter operates on a peer-to-peer model with messages exchanged between Diameter agents:

  • Diameter clients: Generate requests (e.g., the MME requesting authentication vectors).
  • Diameter servers: Process requests and generate responses (e.g., the HSS providing authentication vectors).
  • Diameter relay agents: Forward messages between realms (operators) without modifying them.
  • Diameter proxy agents: Forward messages and may apply policy decisions.

Key Diameter applications (protocol extensions) for mobile networks include:

  • S6a/S6d: Interface between the MME and HSS for subscriber authentication and data retrieval.
  • S9: Policy and charging control for roaming.
  • S13: Equipment identity checking (checking IMEI against the EIR).
  • Cx/Dx: Used in IMS (IP Multimedia Subsystem) for VoLTE registration.

Diameter Inherited Vulnerabilities

For all its modernity, Diameter inherits much of SS7's underlying design rot:

Trust model: Like SS7, Diameter signalling between operators leans heavily on trust. Inter-operator Diameter messages cross roaming hubs and interconnect networks with limited validation. A compromised or malicious Diameter peer can send crafted messages to fish out subscriber data.

Authentication-Info-Request (AIR): The Diameter equivalent of SS7's SAI. An attacker with Diameter access can request authentication vectors from the HSS, opening up session cloning.

Update-Location-Request (ULR): The Diameter equivalent of UpdateLocation. An attacker claims a subscriber has roamed onto their network, and traffic gets redirected.

Notify-Request (NOR): Can be used to alter subscriber service configurations, similar to InsertSubscriberData.

Insert-Subscriber-Data-Request (IDR): Can inject or modify subscriber profile data in the MME's local store.

Diameter Is Not Inherently Secure

Diameter supports IPsec and TLS for transport security, but these protect the link between two adjacent nodes - they do not provide end-to-end authentication or authorisation. A message that arrives at an operator's Diameter gateway may have passed through multiple intermediaries, any of which could have modified it. The receiving operator cannot verify the original source of the message or whether the sending operator was authorised to send it. This is the same trust-based design flaw as SS7, dressed in modern transport protocols.

GTP Vulnerabilities

The GPRS Tunnelling Protocol (GTP) plays two roles in mobile networks. GTP-C carries control-plane signalling between core network elements. GTP-U tunnels user-plane data.

GTP-C Attacks

GTP-C messages between the S-GW and P-GW (in 4G) or between SGSNs and GGSNs (in 3G) create and manage PDP contexts — data sessions, basically. Vulnerabilities include:

  • Session hijacking: An attacker with access to the GTP-C interface can fire off a Create PDP Context Request with a spoofed IMSI, opening a data session billed to the victim.
  • Session deletion: A Delete PDP Context Request tears down an active data session and causes a denial of service.
  • Subscriber information disclosure: SGSN Context Request messages can pull back session information including IP addresses and QoS parameters.

GTP-U Attacks

GTP-U tunnels carry encapsulated user data between the RAN and core network. With GTP-U access, an attacker gets:

  • Traffic interception: All user data (web browsing, email, app traffic) flows through GTP-U tunnels in cleartext, unless the application brings its own encryption like TLS.
  • Traffic injection: An attacker can inject packets into an existing GTP-U tunnel, redirecting traffic or planting malicious content.

GTP traffic between operators and roaming hubs frequently crosses public IP networks with minimal protection. GSMA guidelines recommend IPsec for GTP. Compliance, predictably, is inconsistent.

Why These Protocols Are Hard to Secure

Several structural factors make securing SS7, Diameter, and GTP a genuine ordeal:

Roaming Requirements

International roaming forces operators to accept signalling messages from hundreds of other operators across the world. Each roaming relationship requires signalling connectivity, creating a vast interconnected mesh where any one compromised or malicious operator can reach any subscriber on any other network.

Backward Compatibility

Even operators who've fully deployed 4G/5G have to keep SS7 gateways alive for interworking with partners still running 2G/3G. Interworking Functions (IWF) translate between SS7 and Diameter, which means an SS7-based attack can ride straight into a 4G core network via the IWF.

Economic Incentives

SMS routing and voice interconnect bring in serious revenue. Operators are reluctant to deploy aggressive filtering that might block legitimate roaming traffic (and the revenue that comes with it) just to stop attacks that mostly hurt subscribers of other networks.

Protocol Complexity

The SS7 MAP specification on its own defines hundreds of message types with elaborate parameter structures. Diameter heaps further complexity onto that with its extensible AVP model. Writing filtering rules that catch malicious messages without breaking legitimate traffic is genuinely hard.

Mitigations and Defences

Signalling Firewalls

SS7/Diameter firewalls are the front-line defence. These are inline devices that inspect signalling messages and apply filtering rules:

  • Category 1 filtering: Basic rules that block obviously invalid messages (e.g., a foreign network sending a message type that should only originate from the home network).
  • Category 2 filtering: Contextual rules that check message sequences (e.g., blocking an SRI if there was no preceding call setup).
  • Category 3 filtering: Advanced rules using subscriber context and behaviour analysis.

Signalling firewalls have to walk a tightrope between security and roaming functionality. Overly aggressive filtering breaks legitimate roaming, which means subscriber complaints and lost revenue.

GSMA Guidelines

The GSMA (GSM Association) has published several security recommendations:

  • FS.11: SS7 interconnect security monitoring guidelines.
  • FS.19: Diameter interconnect security guidelines.
  • IR.82: Guidelines for SS7 signalling firewall deployment.

Compliance with these guidelines is voluntary, and implementation varies wildly between operators.

SMS Home Routing

SMS home routing forces all SMS messages destined for a subscriber to flow through the home network's SMS-C (Short Message Service Centre), wherever the subscriber happens to be roaming. That cuts off an attacker who'd otherwise use SS7/Diameter to redirect SMS messages straight to a foreign MSC under their control.

SEPP in 5G

The SEPP (Security Edge Protection Proxy) is a mandatory element in 5G roaming architecture. All inter-operator signalling has to flow through the SEPP, which delivers:

  • Message filtering: Inspecting and filtering messages based on policy.
  • Topology hiding: Concealing internal network topology from roaming partners.
  • End-to-end authentication: Using TLS with mutual certificate authentication between SEPPs.
  • Message integrity: Ensuring messages are not modified in transit through intermediary networks.

The SEPP is the 5G answer to the trust problem, but it only protects 5G signalling. As long as interworking with SS7 and Diameter is still on the table, the legacy vulnerabilities remain on the menu.

Key Concept
SS7/Diameter Nation-State Exploitation

SS7 and Diameter vulnerabilities are not theoretical. In 2024 a senior CISA telecoms adviser, Kevin Briggs, told the FCC he believed there had been numerous successful attempts to obtain US subscribers' location data through SS7 and Diameter exploits (CISA said he wrote in a personal capacity), and later reporting tied some of that activity to foreign governments. Attackers use SS7 to track individuals, intercept communications, and conduct surveillance. These attacks require only SS7 network access (available for a few hundred dollars per month from certain operators) and basic knowledge of MAP messages. The targets include journalists, dissidents, government officials, and business executives. The persistence of these vulnerabilities despite decades of awareness reflects the fundamental difficulty of retrofitting security onto a protocol built on implicit trust.

Real-World Exploitation Timeline

SS7 exploitation has a documented history stretching back over a decade:

  • 2008: Tobias Engel demonstrates SS7 location tracking at the Chaos Communication Congress.
  • 2014: Karsten Nohl and Tobias Engel demonstrate remote interception of phone calls and SMS messages via SS7 at 31C3.
  • 2017: German newspaper reports that criminals exploited SS7 to intercept two-factor authentication SMS codes and drain bank accounts.
  • 2018: US Senator Ron Wyden reveals that the DHS has confirmed SS7 exploitation by foreign governments targeting Americans.
  • 2020: Multiple reports of surveillance companies selling SS7-based tracking services to governments worldwide.
  • 2024: In comments to the FCC, CISA's senior telecoms adviser describes numerous suspected SS7 and Diameter location-tracking incidents against US subscribers, while the large US carriers say their signalling firewalls are working.

The persistence of these attacks, despite widespread awareness and available mitigations, lays bare the structural challenges of securing global signalling infrastructure that was simply never designed with adversaries in mind.