TELCOBREAK
Workshop · DEF CON 34
Workshop Module · IMSI · MSISDN · SS7

IMSI, MSISDN, and the Protocols That Connect Them

Understand the two key identifiers used in mobile networks, why both exist, and how legacy protocols let anyone with network access resolve one from the other.

Learning Objectives
1

The Phone Number You Know: MSISDN

The external identifier you share with the world

A MSISDN (Mobile Station ISDN Number) is simply a subscriber's phone number — the string of digits you dial or share with someone. The name comes from ISDN, an older digital telephone standard, but in practice a MSISDN is what every carrier uses to route calls and SMS to a specific subscriber.

Every MSISDN is structured in three parts defined by the ITU-T E.164 standard. Click each segment to explore its role:

PartNameDescriptionExample
CC Country Code Identifies the country (1–3 digits) 1 (USA)
NDC National Destination Code Area code / network prefix 555
SN Subscriber Number Unique number within the NDC 1234567

The full MSISDN is at most 15 digits. In international format it is prefixed with + — for example, +15551234567.

Key point The MSISDN is public-facing. You hand it to friends, print it on a business card, and give it to apps. The network uses it as the address it advertises to the outside world.

2

The Identity the Network Knows: IMSI

The internal identifier stored on your SIM

An IMSI (International Mobile Subscriber Identity) is the true internal identifier for a subscriber. It is a 15-digit number stored on the SIM card and never normally visible to the subscriber or to outside parties. Every time your phone registers on a network, it presents its IMSI.

IMSI anatomy — click each segment to explore:

PartNameDescriptionExample
MCC Mobile Country Code Identifies the country (3 digits) 310 (USA)
MNC Mobile Network Code Identifies the operator (2–3 digits) 260 (T-Mobile US)
MSIN Mobile Subscription ID Number Unique subscriber ID within operator (up to 10 digits) 1234567890

Where it lives: The IMSI is stored in the SIM card's secure element and in the carrier's subscriber database. It does not change when you get a new phone, but it does change when you get a new SIM.

Key point The IMSI is private by design. Unlike a phone number, it is never meant to leave the trusted network. This distinction becomes critical in Section 4.

3

MSISDN vs. IMSI — Why Both Exist

Stability vs. routability — a deliberate architectural split
Core design principle: The separation exists deliberately — the MSISDN is a stable public address you can share, while the IMSI is a fixed internal identity used for authentication and routing inside the carrier's network.
MSISDNIMSI
Visible to Everyone Carrier's internal systems
Can change? Yes — number porting, reassignment Only with a new SIM
Purpose External addressing (calls, SMS) Internal network identity and authentication
Stored on Carrier databases, contact lists SIM card + carrier HLR/HSS

A subscriber can change their phone number (MSISDN) without getting a new SIM, and can get a new SIM (new IMSI) while keeping the same number. The carrier's subscriber database bridges the two.

The Mapping Database: HLR and HSS

The database responsible for mapping MSISDN → IMSI (and tracking where a subscriber currently is) is called the:

MSISDN INPUT +15551234567 MAP-SRI HLR / HSS subscriber database IMSI + MSC IMSI OUTPUT 310260…
Click Animate to trace the lookup

When a call or SMS arrives for +15551234567, the network queries the HLR to find:

  1. Which IMSI owns that number
  2. Which serving node the subscriber is currently attached to — the network equipment closest to where the phone is right now. The node type depends on the network generation:

NodeFull NameGenerationRole
MSC Mobile Switching Center 2G / 3G Routes voice calls
VLR Visitor Location Register 2G / 3G Temporary subscriber cache co-located with the MSC
SGSN Serving GPRS Support Node 2G / 3G Handles packet (internet) data — the data-plane counterpart to the MSC
MME Mobility Management Entity 4G / LTE Replaces the MSC and VLR; manages registration, authentication, and handoffs between towers
This lookup is entirely normal and happens billions of times a day. The security concern, as you'll see next, is that the protocols designed to perform this lookup were built with minimal origin authentication — any SS7-connected node can issue the query.

4

The SS7 Protocol Commands That Bridge the Gap

MAP operations that expose IMSI over the signaling network

SS7 (Signaling System No. 7) is the protocol suite that has run the world's telephone networks since the 1970s. It handles call setup, teardown, SMS routing, and subscriber database lookups. Despite being decades old, SS7 still underpins most carrier infrastructure worldwide and interconnects 2G, 3G, and 4G networks at the roaming layer.

SS7 uses a sub-protocol called MAP (Mobile Application Part) for interactions between mobile network nodes. Two MAP operations are particularly relevant here.

MAP SendRoutingInfo (MAP-SRI)

Originally designed to route incoming calls to a subscriber, MAP-SRI asks the HLR: "I want to route a call to this phone number — where is the subscriber and what is their IMSI?"

The HLR responds with:

Security gap Any SS7-connected node can send this query. The HLR does not verify whether the requesting node is a legitimate roaming partner — it has no built-in origin authentication. This is the core design-era vulnerability researchers and defenders need to understand.

MAP SendRoutingInfoForSM (MAP-SRI-SM)

Similar to MAP-SRI but designed for SMS routing. It asks the HLR where to deliver an SMS for a given phone number. The response again includes the IMSI and the current serving node.

Summary of Relevant Commands

CommandProtocolOriginal PurposeData Returned
SendRoutingInfo SS7 MAP Route incoming voice calls IMSI + serving MSC address
SendRoutingInfoForSM SS7 MAP Route incoming SMS IMSI + serving MSC (2G/3G voice node) or SGSN (3G data node) address
AnyTimeInterrogation SS7 MAP Query subscriber info for value-added services IMSI + location cell ID
Send-Routing-Info Diameter (Sh) IMS / LCS subscriber lookup (Sh = the named interface between Application Servers and the HSS) IMSI + routing info
User-Data-Request Diameter (Sh) Retrieve subscriber profile IMSI + profile data
Note on naming: Both SS7 and Diameter have a command called "Send-Routing-Info" — they are different operations on different protocol stacks but serve the same conceptual purpose.

5

Diameter: The 4G Evolution

SS7's successor — same exposure, different protocol

Diameter is the protocol that replaced SS7's MAP for 4G/LTE network signaling. Where SS7 uses a layered stack of protocols (MTP for raw transport → SCCP for routing → TCAP for transactions → MAP for mobile operations), Diameter is an IP-based protocol designed for telecom-grade reliability and scalability — think of it as a purpose-built messaging system where network nodes send structured request/response messages to each other over TCP or SCTP (Stream Control Transmission Protocol — a transport similar to TCP but designed for telecom signaling, with built-in multi-path support).

What is a "Diameter interface"? In telecom, an interface is not a software API — it is a named, standardized connection point between two specific types of network nodes. Each interface has a defined protocol, message types, and expected behaviors. Naming them (Sh, S6a, Gx, etc.) lets engineers and standards bodies say "this exact set of rules applies when node A talks to node B" without ambiguity. Think of it like a labeled electrical socket standard: the name tells you which plug fits and what voltage to expect.

In 4G networks the HSS exposes its MSISDN → IMSI mapping through two Diameter interfaces:

The Send-Routing-Info command on the Sh interface is functionally equivalent to MAP-SRI: given a phone number, it returns the subscriber's IMSI and routing information.

Same problem The Sh interface was designed for trusted internal use between operator nodes. Diameter's transport security (IPSec or TLS) protects the connection itself, but authorization — should this node be allowed to query this subscriber? — is often weakly enforced or absent in inter-carrier configurations.

6

The Full Lookup Flow

How a MAP-SRI query resolves a phone number to an IMSI — and why unauthenticated access is a problem

Putting it all together, here is the end-to-end path from a known phone number to a retrieved IMSI. Press Play to trace the lookup flow step by step:

REQUESTING NODE MSISDN: +15551234567 has MSISDN sends query MAP-SRI query SendRoutingInfo → REMOTE HLR Home Location Register HLR lookup: MSISDN → IMSI IMSI + MSC returned (no auth) REQUESTING NODE RECEIVES IMSI: 3102601234567890 MSC: 192.0.2.10 awaiting response…
Press Play to trace the full lookup sequence

Because the IMSI is the internal handle for all subscriber operations, uncontrolled access to this lookup exposes several capabilities the protocol was never designed to guard against:

The MSISDN → IMSI resolution step is always the starting point. It converts the public-facing phone number into the internal handle that controls all subsequent network operations — which is why carriers and standards bodies have added SS7 firewalls and filtering rules to block unsolicited MAP-SRI queries from outside the trusted network.

7

Hands-On Challenge

Apply what you've learned in a simulated SS7 environment

CTF Challenge

Try It Yourself

You have been given a phone number. Use what you've learned about how SS7 MAP lookups work to retrieve the corresponding IMSI from a simulated HLR environment.

1 Identify the correct SS7 MAP command to query the HLR
2 Send the query to the provided test HLR with the challenge MSISDN
3 Parse the response and extract the IMSI

Tools available

  • sigtran-shell — a command-line SS7 signaling tool pre-configured with the workshop's test SCTP endpoints
  • The challenge HLR is reachable at the address printed on your station card

Success criteria

  • You retrieve a valid 15-digit IMSI from the HLR response
  • Submit the IMSI to the challenge portal to claim the flag
▶ Launch Simulator Interactive SS7 / Diameter terminal with animated protocol stack
Hint: Review the table in Section 4. Which command was designed for call routing and returns IMSI as part of its response?

Quick Reference Glossary

Key terms for this module
MSISDN
Mobile Station ISDN Number — the subscriber's phone number (public-facing)
IMSI
International Mobile Subscriber Identity — the network-internal SIM identity (private)
MCC
Mobile Country Code — 3-digit country identifier, first part of an IMSI
MNC
Mobile Network Code — 2–3 digit operator identifier, second part of an IMSI
MSIN
Mobile Subscription Identification Number — up to 10 digits, unique within the operator
HLR
Home Location Register — 2G/3G subscriber database that maps MSISDN ↔ IMSI
HSS
Home Subscriber Server — 4G/5G equivalent of the HLR, uses Diameter
SS7
Signaling System No. 7 — legacy telecom signaling protocol suite, still in global use
MAP
Mobile Application Part — SS7 sub-protocol for mobile network operations
MAP-SRI
SendRoutingInfo — MAP command returning IMSI + MSC address for call routing
MAP-SRI-SM
SendRoutingInfoForSM — MAP command returning IMSI for SMS routing
Diameter
IP-based signaling protocol replacing SS7 MAP in 4G/5G networks
MSC
Mobile Switching Center — the 2G/3G node that routes voice calls, roughly equivalent to a telephone exchange. Its address is returned alongside the IMSI in a MAP-SRI response.
VLR
Visitor Location Register — a temporary subscriber database co-located with the MSC. When your phone enters an MSC's coverage area it copies your profile from the HLR into the VLR so the MSC can serve you without querying the HLR for every call.
SGSN
Serving GPRS Support Node — the 2G/3G node responsible for routing packet data (internet traffic), the data-plane equivalent of the MSC. Returned instead of the MSC in SMS-routing responses when a subscriber is on a 3G data session.
MME
Mobility Management Entity — the 4G/LTE equivalent of the MSC. Manages which cell tower a phone is attached to, handles authentication by talking to the HSS over the S6a interface, and orchestrates handoffs between towers.
Interface (telecom)
A named, standardized connection point between two specific network node types with defined protocol, messages, and rules — e.g., S6a (MME ↔ HSS), Sh (App Server ↔ HSS). Not to be confused with a software API; it describes the entire contract for how two kinds of nodes communicate.