SENIORCHAPTER 21

Network security: signalling attacks, SIM swap and fraud

Networks that must answer each other's questions cannot check every asker's intent. Learn what the open doors are, how operators decide who may ask what, and where a process, not a protocol, is the weak point

45 MINHOW MOBILE NETWORKS WORKUPDATED 2026-11-13
PREDICT

A message arrives at Lumora's border from a roaming partner's network. It is correctly encoded, it is an operation partners send all the time, and it names a real Lumora subscriber. Which check does most to tell a legitimate message from an abusive one?

Every mobile network has to answer questions from other networks. A subscriber who lands in another country is looked up in her home network’s database. A call to her number is routed using answers from the network that holds her record. A text is handed from one network’s message centre to another’s. Each of these is a message from one operator to another that triggers a lookup or a change in the target’s database. That is interconnect (the Interconnect chapter in this module covers the commercial side), and it is the reason this chapter exists. A network that never talked to anyone else would need no signalling firewall.

The trust model between networks

The signalling chapter showed three languages and what each trusts. Between networks the same three apply, with one more.

Door Used for What it trusts What an outsider who reaches it may be able to ask
SS7 over SIGTRAN (MAP, CAP, ISUP) 2G and 3G roaming, calls and texts between networks Position: any node on the signalling network is assumed to be an operator’s Where a subscriber is served, who delivers her texts, how her calls are forwarded
Diameter over IPX (S6a, S6d and others) 4G roaming: attach, authentication, subscriber data A configured peer, the realm in the message and, if used, TLS or IPsec The same questions in 4G form, and subscriber data and authentication vectors
GTP between networks (S8, Gp) Roaming data sessions, tunnels between the visited and home gateways The address of the roaming partner, usually a private IPX address Creating, changing and deleting a subscriber’s data session
5G service-based interfaces through a SEPP (security edge protection proxy, N32) 5G roaming The partner’s certificate and signed or encrypted messages Fewer things, because the edge checks them

The IPX (IP exchange) is a private IP network run by a few carriers that connects operators, so partners reach each other without the public internet. That keeps random strangers out. It does not make every member trustworthy, and it does not make a compromised or misused member’s messages look different.

The weakness is old and structural. SS7 was built when a small club of operators, many of them state-owned, were the only people who could reach a signalling link. Position was the credential. Today access to a link can be rented, resold or obtained through a compromised operator, and the protocols mostly do not say who sent a message in a way the receiver can verify. Diameter improved on it, and 5G improved on that, but the older doors stay open for as long as a 2G, 3G or 4G subscriber needs them. Your network is as safe as its weakest open door.

Four classes of abuse, as published

Researchers and journalists have described the same four classes for a decade. This chapter names what each one abuses and how it is stopped. It does not describe how to do any of them, and the published sources do not need to for you to defend against them.

Location tracking. Networks must be able to find a subscriber to deliver a call or a text, so they answer questions about which node currently serves her. An abusive sender asks the same question for a target and learns roughly where she is. Tobias Engel’s 2014 Chaos Communication Congress talk showed this class and its scale. The Citizen Lab’s 2023 report Finding You (Miller and Parsons) documents how the exposure has spread from SS7 into Diameter and persists as 5G rolls out.

Interception. A network can be told that a subscriber is now served somewhere else, or that her calls or texts should go to another address. A sender who persuades the home network to believe it can have her traffic delivered to it. The German 2017 case in the Why is this class: banking codes sent by text were redirected, after the criminals had already obtained victims’ online banking credentials by other means.

Denial of service. A sender that can cancel a subscriber’s registration, or flood a node with requests, can cut her service or exhaust a database. The cost to the victim is real even when nothing is stolen, and a flood works whether or not the messages are valid.

Fraud. The same access can be used to avoid charges, to receive bank codes, or to make a network believe a subscriber is somewhere she is not. Fraud also arrives by routes that never touch signalling, such as a SIM box that bypasses termination rates (the Revenue Assurance course owns it) and the process attacks in the next sections.

What the four have in common is the useful thing to remember. Every attack is a real operation doing its normal job for a sender who should not be asking. That is why a malformed-packet filter does nothing. The defence has to know who may ask, and about whom.

How operators defend: categories, not a blacklist

The GSMA, the industry body for mobile operators, publishes interworking security guidance. Two documents matter here: FS.11, for SS7 (monitoring and firewall guidelines), and FS.19, for Diameter (interconnect security), with FS.20 covering GTP. The full texts are restricted to GSMA members, so what follows is the outline of their approach as the GSMA’s public pages and published commentary describe it. If you work at an operator, read the documents themselves.

The idea in FS.11 is to sort every incoming operation into one of a small number of categories and apply a rule to each.

  1. Prohibited from outside. Operations that should only ever be sent inside one network. If one arrives from a partner, it is blocked, whoever the partner is. This category needs no judgement and removes the most dangerous operations at a stroke.
  2. Valid only from the home network. Operations a network may legitimately send only about its own subscribers. The firewall checks that the sender’s address belongs to the subscriber’s home network. A partner asking about someone it does not serve fails the test.
  3. Valid in form, so check plausibility. A location update from a network the subscriber could not have reached in the time since her last one is the standard example. The firewall compares the claim with what it already knows. This needs state: the subscriber’s last known location and when.

FS.19 follows the same pattern for Diameter. Vendor documentation describes four levels: a basic anti-spoofing check that the claimed identity matches the connection and the realm, filtering by application and command, filtering of individual attributes, and location-based checks like category 3. A Diameter edge agent is the border node that applies them, and that also hides the operator’s internal node names and addresses from partners (topology hiding) so that nothing inside can be targeted directly. A GTP firewall does a similar job for roaming tunnels.

Around the filters sit three other things.

  • Home routing for texts. An SMS home router in the home network answers a partner’s “where do I send this text?” query with its own address instead of the serving node’s, then forwards the text itself. The sender never learns which node serves the subscriber, so the answer that tracking depends on is not given out.
  • Rate and behaviour limits. A legitimate partner asks about its own roamers. It does not ask about sixty subscribers in ninety seconds. Limits catch the flood and the scan even when each message is valid.
  • Monitoring and sharing. Block lists change. Operators report abusive sources to their partners and the GSMA, and use partners’ reports to update their own rules.

The shape of the border is in the diagram.

Partner networksand the IPXsome honest,some misusedThe borderSS7 firewall, Diameter edge agent,GTP firewall, SEPP (5G)1. Is the sender a known partner?2. May this operation come from outside?3. May this sender ask about her?4. Is the rate and place plausible?The coreHLR, HSS, UDM,message centretrusts what passesallowedMonitoring: every decision logged

Lumora Mobile runs this layer: a signalling firewall on its SS7 and Diameter borders and a text home-routing service. Akpan’s morning report is its output. The report is the part to look at, because a firewall that nobody reads is a log file. The numbers it should show are blocks by category, by source network, and by subscriber targeted.

Where 5G helps, and where it does not

The 5G core was designed with this problem in view. Between two operators, each runs a SEPP (security edge protection proxy). TS 33.501, the 3GPP security specification, describes the interface between them, N32. The SEPPs authenticate each other, then protect the core’s roaming messages: integrity protection, confidentiality for the information elements that policy marks sensitive, and the ability to hide the internal functions’ addresses. Roaming messages enter only through an authenticated partner SEPP. Compare that with the SS7 door, where the message carried its own claim of origin.

Two other 5G changes matter. First, the phone does not send its IMSI over the air in clear. It sends a SUCI (subscription concealed identifier), the part of the IMSI that identifies the subscriber (the MSIN) encrypted with the home network’s public key, while the country and network codes stay readable so that the message can be routed home. Someone listening to the radio link learns nothing about who she is. Second, the core’s functions use token-based authorisation, which you met in signalling.

What 5G does not do is switch the old doors off. A 5G subscriber who falls back to 4G, a 3G-only roamer and a 2G feature phone all still arrive through SS7 or Diameter, and the operator interworks them to the same subscriber records. The Citizen Lab report makes this point at length: the weak door matters most. Protecting one generation properly while leaving another open is like fitting a good lock to one door of a house.

SIM swap: a process attack

The SIM chapter showed that a SIM swap defeats the cryptography by getting the operator to issue the attacker a valid card. Seen from the security side it is a fifth fraud class, and it sits beside the signalling classes because it ends the same way: the bank’s code arrives at the wrong phone.

Where does it go wrong? Researchers at Princeton tested five US prepaid carriers with attempted swaps. Their paper at SOUPS 2020 (Lee, Kaiser, Mayer and Narayanan) found that all five carriers used authentication challenges that could be defeated, and that 39 of their 50 swap attempts succeeded. The weak points were what the customer was asked for: for example a recent incoming call, which an attacker can arrange by calling the victim first. Whatever the system did afterwards, the decision had already been taken by a person at a counter or on a phone.

A swap’s defences sit in four places.

  • Before. Check identity against something the attacker cannot photocopy. A 2022 NCC news release says that, under the SIM replacement guidelines, use of the National Identification Number (NIN) is compulsory in addition to the other criteriaas of 2026-11, and its NIN and SIM integration FAQ says an operator may replace the SIM of a subscriber registered and active on the network when the subscriber presents a NINas of 2026-11. That is a minimum. It does not remove the need to check that the person at the counter is the person on the NIN.
  • At the time. Notify the old SIM and any other contact the customer has: a text, a call. A swap that the real owner hears about in the first minutes can be reversed before money moves.
  • After. Limit what a newly swapped SIM may do for a short period, for example hold outgoing transfers or high-value mobile money actions, and tell banks that the number changed. The delay is a cost to honest customers who lost a phone, so choose it with that in mind. Any number you pick is a policy judgement, not a technical constant.
  • Over time. Count. A counter agent who does six swaps in a day when the norm is one or two a week is a signal long before any customer complains.

Kolanut Mobile in its launch year can do the first and the last. The NCC’s virtual operator framework (section 4.2) gives a Tier 1 operator its brand, sales and distribution, with no control of numbering, switching or the intelligent networkas of 2026-11, so Lumora Mobile runs the swap system, the SIMs and the signalling border. Kolanut owns the agents. Ene, who leads risk for its agent network, therefore works from Lumora’s weekly report of replacements by agent code, and from the rules Kolanut writes into its agent contract. Ene cannot see a single signalling message. That is not a failing. It means the host agreement must say what Lumora shares: swap reports, blocked-source summaries relevant to Kolanut’s subscribers and the contact for an incident.

At Tier 2, Kolanut would run its own HSS behind Lumora’s core. That puts an HSS peer list in its hands, and the lab step below is what that list looks like.

Monitoring and incident response

Prevention fails, so decide beforehand what you will do and who will do it. A working response has four parts.

Know what normal is. A baseline per source network and per operation: how many location and authentication requests a partner sends per hour, from which addresses, about subscribers who are actually in that network. A spike in refused capabilities exchanges, one subscriber seen in two countries minutes apart, and a single sender asking about many unrelated subscribers are the patterns to alarm on.

Contain. Block the source at the border (a rule, not a reboot), and where the abuse is by a roaming partner, call that partner’s security contact. Protect the subscribers who were targeted: for the interception class, check whether their forwarding or registration changed.

Preserve. Keep the border log, the message captures if you take them under your own policy, and a timeline. You will need them for the partner, the regulator, the bank and any claim.

Learn. Every incident ends with a rule. If the border accepted something it should have refused, the category table was missing a row.

For a virtual operator the customer side is the same. Tell the affected subscriber briefly and truthfully, help her secure her bank, and ask her bank to use signals other than a text. Fraud detection in depth belongs to the Revenue Assurance course.

The lab: allow-lists and the cost of cleartext

The lab cannot show a firewall and must not show an attack. It shows three defensive facts you can read from your own machine: a peer allow-list that refuses an unknown peer, a monitor that flags any sender not on a list, and what a lab left unprotected would show an observer.

The HSS’s allow-list is one line of core/freeDiameter/hss.conf: ConnectPeer = "mme.atlas.lab" { ... }. Only that peer may complete a capabilities exchange. A claim to be another name, mme.evil.lab, is refused with Result-Code 3010 (DIAMETER_UNKNOWN_PEER), and nothing else is sent. Notice the limit of the check. The lab’s stand-in MME claims a name over an unprotected TCP connection. A determined sender that claimed the right name would pass. On a live link the name is backed by a certificate (TLS) or IPsec, so the claim is proved as well as made. The allow-list stops a misconfigured or unlisted peer. It does not stop a trusted peer that is misused, which is why the border also asks the questions in the diagram.

LAB Read a peer allow-list, flag an unlisted sender, and see what cleartext exposes ~40 MIN
YOU NEEDDocker with Compose v2Python 3.9 or laterNo SCTP is needed: the HSS and the s6a script use TCP, and every other step reads files in traces/

You will start the HSS, ask it as the listed peer and as an unlisted one, read the allow-list, write a filter that flags signalling from a sender not on a list, and read what the lab’s cleartext registration reveals. Work in labs/telecoms. Every step works on any machine with Docker, including one without SCTP. Nothing here attacks anything: you play a configured peer and one that is not, against your own lab HSS.

1. Start the HSS and give it a subscriber.

docker compose --profile epc up -d mongo hss
sleep 12
scripts/subscriber.sh add 999700000000001 465B5CE8B199B49FAA5F0A2EE238A6BC E8ED289DEBA952E4283B54E88E6183CA 2340000000001

provisioned: 999700000000001, or already provisioned: 999700000000001, which is fine. The HSS needs about 12 seconds before it accepts connections.

2. Ask as the listed peer.

scripts/s6a.sh air 999700000000001

The capabilities exchange succeeds (Result-Code: 2001 (DIAMETER_SUCCESS), Origin-Host: hss.atlas.lab), then an Authentication-Information-Request goes out and the answer carries an E-UTRAN-Vector with Result-Code: 2001. RAND, XRES, AUTN and KASME differ on every run. Last comes the Disconnect-Peer exchange. This is the baseline: what a peer on the list gets.

3. Ask as a peer that is not on the list.

scripts/s6a.sh air 999700000000001 --as mme.evil.lab

The request names Origin-Host: mme.evil.lab. The answer to the capabilities request is:

<<< Capabilities-Exchange-Answer
  Result-Code: 3010  (DIAMETER_UNKNOWN_PEER)
  Error-Message: DIAMETER_UNKNOWN_PEER
  Origin-Host: hss.atlas.lab
  Origin-Realm: atlas.lab
  Origin-State-Id: 1794604180

(Origin-State-Id differs on your machine.) Then the script prints The HSS refused the capabilities exchange (Result-Code 3010): it does not accept mme.evil.lab as a peer. Nothing else is sent. No authentication request goes out, so the HSS is never asked about the subscriber.

Now look for the refusal in the HSS’s own log.

docker compose logs --no-log-prefix hss | sed 's/\x1b\[[0-9;]*m//g' | grep -c evil
docker compose logs --no-log-prefix hss | sed 's/\x1b\[[0-9;]*m//g' | grep CONNECTED

The first command prints 0: the refusal leaves no line naming mme.evil.lab at the log’s default level. The second shows only lines such as [diam] INFO: CONNECTED TO 'mme.atlas.lab' (TCP,soc#7), one for each time the listed peer connected; timestamps and socket numbers vary. A refusal you cannot see is a refusal you cannot alarm on. A live border counts refused capabilities exchanges and reports them, which is why monitoring is a separate job from filtering.

4. Read the allow-list.

grep -nE "^(Identity|Realm|ConnectPeer)" core/freeDiameter/hss.conf
4:Identity = "hss.atlas.lab";
5:Realm = "atlas.lab";
17:ConnectPeer = "mme.atlas.lab" { ConnectTo = "10.33.0.9"; No_TLS; TcTimer = 600; };

The HSS knows itself as hss.atlas.lab in realm atlas.lab, and it knows one peer, at 10.33.0.9, with TLS switched off by No_TLS so you can read the capture. On a live link that clause would name a certificate. One line per partner is the allow-list in its simplest form.

5. Write a filter that flags a sender not on a list. Save this as allowlist.py in labs/telecoms. It reads scripts/ladder.sh output on standard input and lists, for each kind of signalling, the senders allowed to send it.

#!/usr/bin/env python3
"""Flag signalling that comes from a sender not on the allow-list for its protocol.

Reads the output of scripts/ladder.sh on standard input.
  scripts/ladder.sh traces/s6a.pcapng --filter diameter | python3 allowlist.py
"""
import re
import sys

# Who may SEND each kind of signalling on the lab's core network. Illustrative:
# a real operator keeps this per interface and per partner, in a firewall.
ALLOWED = {
    "DIAMETER": {"MME(s6a)", "HSS"},
    "NGAP": {"gNB", "AMF"},
    "NGAP/NAS-5GS": {"gNB", "AMF"},
    "PFCP": {"SMF", "UPF"},
    "HTTP2": {"SCP", "NRF", "AMF", "SMF", "AUSF", "UDM", "UDR", "PCF", "BSF", "NSSF"},
}
# Not signalling: the phone's own packets (shown as "phone ..." or
# "internet") and the cell's tunnel carrying them.
USER_PLANE = ("phone", "internet", "UPF(dn)")
IGNORE = {"GTP", "ICMP"}

LINE = re.compile(r"^\s*(\d+\.\d+)\s+(.+?)\s+->\s+(.+?)\s{2,}(\S+)\s")


def check(lines):
    seen = flagged = 0
    for line in lines:
        m = LINE.match(line)
        if not m:
            continue
        when, src, dst, proto = m.groups()
        if proto in IGNORE or src.startswith(USER_PLANE) or dst.startswith(USER_PLANE):
            continue
        seen += 1
        allowed = ALLOWED.get(proto.split("/")[0], set()) | ALLOWED.get(proto, set())
        if src not in allowed:
            flagged += 1
            print(f"FLAG {when:>8} s  {src} -> {dst}  {proto}: sender not on the {proto} list")
    print(f"{seen} signalling messages read, {flagged} flagged")
    return flagged


if __name__ == "__main__":
    sys.exit(1 if check(sys.stdin) else 0)

Run it on two recordings that contain only the lab’s own functions.

scripts/ladder.sh traces/s6a.pcapng --filter diameter | python3 allowlist.py
scripts/ladder.sh traces/attach-and-browse.pcapng --all | python3 allowlist.py
18 signalling messages read, 0 flagged
308 signalling messages read, 0 flagged

The first is the three Diameter exchanges of traces/s6a.pcapng, six messages each. The second is the whole 5G registration and session: every NGAP, PFCP and HTTP/2 message, none from a sender the list does not name. ladder.sh replaces addresses with function names, and the filter reads those names, so a sender it does not know appears as a bare address.

Now give it a line that a real border might see: a sender at an address nobody has listed, appended to the same recording. The line is made up for the test.

(scripts/ladder.sh traces/s6a.pcapng --filter diameter; echo "  99.000  10.33.0.99  -> HSS         DIAMETER       cmd=3GPP-Authentication-Information Request(318) flags=RP-- appl=3GPP S6a/S6d(16777251)") | python3 allowlist.py
FLAG   99.000 s  10.33.0.99 -> HSS  DIAMETER: sender not on the DIAMETER list
19 signalling messages read, 1 flagged

The script exits with status 1 when anything is flagged, so a scheduled job can alarm on it. It decided from the sender alone. It said nothing about whether the question was a reasonable one, which is the limit you meet in the break.

6. Read what the lab leaves in the clear. The lab’s phone sends a Registration request with its identity unprotected. Read it from the recording.

docker run --rm -v "$PWD/traces:/t:ro" nicolaka/netshoot:v0.13 \
  tshark -r /t/attach-and-browse.pcapng -o nas-5gs.null_decipher:TRUE -Y 'frame.number==96' -V |
  grep -E "Security header type|Type of identity|Protection scheme|MSIN"
.... 0000 = Security header type: Plain NAS message, not security protected (0)
.... .001 = Type of identity: SUCI (1)
.... 0000 = Protection scheme Id: NULL scheme (0)
MSIN: 0000000001

Frame 96, at 8.058 s, from the cell (10.33.0.50) to the AMF. The identity is a SUCI, but with the null protection scheme, so the subscriber’s identifying digits (0000000001, with MCC 999 and MNC 70) are readable by anyone who can see the link. On a live network the operator is expected to configure a public-key protection scheme, and the same field is unreadable without the home network’s private key. This is one of the lab’s listed differences.

Then read the algorithms the AMF chose.

docker run --rm -v "$PWD/traces:/t:ro" nicolaka/netshoot:v0.13 \
  tshark -r /t/attach-and-browse.pcapng -o nas-5gs.null_decipher:TRUE -Y 'frame.number==242' -V |
  grep -E "Type of ciphering|Type of integrity"
0000 .... = Type of ciphering algorithm: 5G-EA0 (null ciphering algorithm) (0)
.... 0010 = Type of integrity protection algorithm: 128-5G-IA2 (2)

The Security mode command at 8.370 s selects the null cipher (5G-EA0) for ciphering and a real integrity algorithm (128-5G-IA2). Integrity protection stops a message being altered. With no ciphering, every NAS message after this one is readable on the link, and you can read it in the capture: that is why this lab’s registrations and session requests print in full. core/amf.yaml puts the null cipher first on purpose. A live network lists a real cipher first, and the traffic an observer would see after the Security mode command is unreadable. Think of what the lab’s trace shows an observer who had tapped a live backhaul link, then of what a real network leaves them.

Narrow the list and watch it block the service. Copy allowlist.py to allowlist-narrow.py, change the DIAMETER entry in ALLOWED to {"HSS"}, and run scripts/ladder.sh traces/s6a.pcapng --filter diameter | python3 allowlist-narrow.py. It prints 18 signalling messages read, 9 flagged: the lab’s own MME, the listed peer, is now flagged on every request it makes, at 6.615 s, 6.675 s, 6.838 s and on the other six. A list that is too narrow blocks the service it protects, and a monitor that flags everything is switched off within a week. Now go the other way: add a rule that also flags any single sender that makes more than five requests to the HSS in one capture. Decide what number you would choose for a real partner, what data you need to choose it, and what a legitimate partner’s traffic looks like on the day a stadium of roamers lands.

DECIDE

Kolanut Mobile is in its launch year. Lumora Mobile's weekly SIM replacement report, which lists replacements by agent code, shows six at one market agent's stall in a single day. The usual is one or two a week for the busiest stalls (illustrative figures). Lumora owns the swap system and the SIMs; Kolanut owns the agents and the customers. You are Ene, and nobody has complained yet. What do you do first?

READING
  1. DOC
    GSMA: Interworking Security (cybersecurity knowledge base) GSMA

    The public index of the operator guidance this chapter outlines: FS.11 for SS7, FS.19 for Diameter and FS.20 for GTP. It describes each document and says who may read it. Use it to find the current version of each; the full texts are for GSMA members.

  2. TALK
    SS7: Locate. Track. Manipulate. Tobias Engel, 2014

    The talk that made the SS7 trust model public. Read it for what the classes of abuse look like from a researcher's side and the case for filtering. It is a set of slides: skim the pictures, read the conclusions.

  3. PAPER
    Finding You: The Network Effect of Telecommunications Vulnerabilities for Location Disclosure Gary Miller and Christopher Parsons, Citizen Lab, 2023

    The most readable current account of why old signalling doors stay a risk as new generations arrive, with the policy argument for mandatory standards. Read the overview and the roaming section; skip the case-by-case detail on first pass. Read: the overview of signalling protocols and the sections on international roaming and on how the exposure persists across 3G, 4G and 5G.

  4. DOC
    3GPP TS 33.501: Security architecture and procedures for the 5G system 3GPP

    The authority for the SUCI and its protection schemes, the NAS ciphering and integrity algorithms, and the SEPP and N32 interface. Read the clauses on the security architecture overview, subscription identifier privacy and security for roaming (clause 13); the procedures are for implementers.

  5. PAPER
    An Empirical Study of Wireless Carrier Authentication for SIM Swaps Kevin Lee, Benjamin Kaiser, Jonathan Mayer and Arvind Narayanan, 2020

    A measured account of how a SIM swap is won at the carrier's counter or phone line, with what to change. It studies US prepaid carriers, so read it for the method and the failure pattern, not for Nigerian rules. Read: the method, the results on authentication challenges and the recommendations.

  6. POST
    After years of warnings, mobile network hackers exploit SS7 flaws to drain bank accounts The Register, 2017

    A press report of the confirmed German case in the Why, based on the operator's own statement. Note the two stages: credentials first, then the redirected code. It is a news report, not a technical source, so use it for the sequence of events.

  7. DOC
    NCC: SIM replacement guidelines news release Nigerian Communications Commission

    The regulator's statement that operators, agents and consumers must comply with the SIM replacement guidelines, including the NIN requirement. Read it before you write an agent contract; check the NCC site for the current guidelines, which can change.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Lawful interception and data retention →