MODULE ID: GTP-C-TUNNEL-HIJACK-OVERBILLING
CONFIDENTIAL LEVEL: CRITICAL

GTP-C Tunnel Hijacking and IMSI Overbilling Fraud

SENTRY:TelcoSec Research
TIMESTAMP:
ANALYSIS TIME18 MIN

GPRS Tunnelling Protocol (GTP) is the least discussed and most under-defended protocol in the mobile core. While SS7 and Diameter get the bulk of signaling security attention, GTP quietly carries every megabyte of subscriber data — web browsing, VoIP, application traffic — from 2G GPRS through 4G LTE and into 5G NSA deployments. The GTP-C control plane manages the lifecycle of the tunnels that carry that traffic: creating them, modifying them, and tearing them down. An attacker who can speak fluent GTP-C to a live SGSN or SGW does not need to intercept a signaling message about a subscriber — they take over the pipe the subscriber's data actually flows through.

This matters because GTP-C endpoints are reachable across the GRX (GPRS Roaming eXchange) and IPX interconnect fabric — the same shared network that carries roaming SS7 and Diameter traffic, and accessible to every operator, MVNO, and IPX reseller with roaming peering. Where a Diameter attack manipulates subscription records and an SS7 attack queries location, a GTP-C attack redirects the actual bearer — with two distinct consequences: real-time traffic interception, and a billing fraud vector that silently attributes an attacker's data consumption to a victim's IMSI. This research documents the Create Session Request forgery technique, the GTPdoor malware campaign that turned GTP-C into a covert C2 channel, and the GSMA FS.20 controls that close the gap.

This research examines how the GTP-C control plane — the tunnel-management layer beneath every generation of mobile data service — can be abused to hijack PDP/EPS bearer contexts and commit subscriber-attributed billing fraud. We dissect the Create Session Request forgery technique, walk through the GTPdoor malware case study documented across the threat-intel community in 2024, and detail the GSMA FS.20 firewall controls that operators use to close the GRX/IPX attack surface.

I. GTP-C Control Plane Architecture

GTP splits into two logically separate protocols that share a naming convention but almost nothing else operationally. GTP-U (UDP port 2152) carries the actual user-plane payload — encapsulated IP packets moving between the radio network and the packet core. GTP-C (UDP port 2123) is the signaling channel that establishes, modifies, and deletes the tunnels GTP-U rides on. In 3G this unit of state is a PDP Context; in 4G/LTE it is an EPS Bearer Context, negotiated between the Serving Gateway (SGW) and PDN Gateway (PGW) over the S5/S8 interface, and between the eNodeB and SGW over S1-U.

Every tunnel endpoint is identified by a Tunnel Endpoint Identifier (TEID) — a 32-bit value chosen by the receiving node and communicated to its peer during context creation. There is no cryptographic binding between a TEID and the node that issued it. Whoever controls the IP address associated with a TEID controls that leg of the tunnel.

GTP-C nodes are designed to trust any peer that can reach them on UDP 2123. The specification (3GPP TS 29.274) defines message formats and state machines, but leaves peer authentication entirely to network-layer controls — typically nothing more than "is this IP address on our GRX/IPX link." This is structurally the same gap that makes Diameter Edge Agent bypass and SS7 Global Title spoofing possible: the protocol assumes a closed, trusted interconnect that no longer exists.

GTP-C in the Roaming Path

┌──────────────────────────────────────────────────────────────────┐
│              GTP TUNNEL ARCHITECTURE (LTE/EPC)                   │
│                                                                   │
│  UE ── eNB ── [S1-U] ── SGW ── [S5/S8] ── PGW ── Internet       │
│                              GTP-C: UDP 2123                      │
│                              GTP-U: UDP 2152                      │
│                                                                   │
│  Roaming path:                                                    │
│  VPLMN SGW ── [S8] ── [GRX/IPX] ── [S8] ── HPLMN PGW            │
│                        ↑                                          │
│              Attack entry point: GRX is a shared network        │
│              accessible to all roaming partners                   │
└──────────────────────────────────────────────────────────────────┘

The GRX network connects thousands of organizations globally — every operator, every MVNO, every IPX reseller with a peering agreement. It is not internet-routable, but it is not a small trusted circle either, and a GTP-C node accepting messages from "anything on the GRX link" is functionally accepting messages from any of those thousands of parties.

GTP-C vs. Diameter vs. SS7: Interconnect Trust Comparison

FeatureSS7 (MAP)DiameterGTP-C
Transport SecurityNoneTLS/IPsec (optional, rarely e2e)None (UDP, no encryption)
Peer AuthenticationGT screening (manual)CER/CEA realm exchangeSource-IP whitelist only
Message IntegrityNoneHop-by-hop onlyNone
What it movesSignaling / subscriber recordsSignaling / subscriber recordsLive user-plane data tunnels
Consequence of forgeryLocation leak, profile editLocation leak, fraud, DoSTraffic redirection, billing fraud
Interconnect fabricSS7/SIGTRANIPX/GRXGRX/IPX (shared with above)

Note the difference in consequence: SS7 and Diameter forgery leak or manipulate records about a subscriber. GTP-C forgery redirects the subscriber's actual data.

II. Reconnaissance and Create/Modify Bearer Request Abuse Mechanics

GTP-C endpoints don't advertise themselves via DNS SRV records the way Diameter peers do. They're found through direct protocol probing.

Endpoint Discovery via GTP Echo

Every GTP-C node must respond to a GTP Echo Request per 3GPP TS 29.060 §7.2.1 — it's the protocol's keepalive/liveness check, and it cannot be disabled without breaking legitimate roaming.

<CodeBlock language="python" filename="gtp_echo_probe.py" code="from scapy.all import *

def gtp_echo_probe(target_ip: str) -> bool: """Send GTP-C Echo Request, return True if a GTP node responds.""" pkt = ( IP(dst=target_ip) / UDP(sport=2123, dport=2123) / # GTPv1-C Echo Request: flags=0x32, type=0x01, len=4, teid=0 Raw(b'\x32\x01\x00\x04\x00\x00\x00\x00\x00\x00\x85\x00') ) resp = sr1(pkt, timeout=3, verbose=False) return resp is not None and bytes(respRaw)1 == 0x02 # Echo Response

for ip in operator_grx_range: if gtp_echo_probe(ip): print(f'+ Live GTP-C node: {ip}')" />

The Echo Response leaks the node's Recovery IE (restart counter), which fingerprints whether the endpoint is an SGSN, SGW, or PGW and whether it has recently restarted — reconnaissance value with zero authentication required.

Forging a Create Session Request

The Create Session Request (CSR) is the GTPv2-C message an SGW/MME sends to establish a new EPS Bearer. Its two load-bearing parameters are the target IMSI and the F-TEID (Fully-Qualified TEID) of the node requesting the tunnel — and the F-TEID is exactly the field an attacker controls.

If the receiving SGW does not validate the sender's IP against a bilateral roaming whitelist — or worse, accepts any CSR that arrives on the GRX link — it allocates a full bearer context for the target IMSI and hands back a Create Session Response containing the S1-U TEID for that session, now pointing at the attacker's own endpoint.

Forging an initial CSR requires the target IMSI not to already have an active session, or the request will collide. A subtler technique targets sessions already in progress: the GTPv2-C **Modify Bearer Request** is legitimately used during handovers (e.g., X2/S1 handover between eNodeBs) to update the S1-U F-TEID for an existing bearer. If the SGW accepts a Modify Bearer Request from an unauthorized source claiming a handover for a target IMSI, it swaps the live bearer's endpoint mid-session — the subscriber sees no interruption while their traffic silently redirects through the attacker's node. This is functionally more dangerous than the initial CSR forge because it hijacks an already-authenticated, already-billing session rather than creating a new one.

III. Tunnel Hijack and Traffic Redirection

Once the forged CSR (or Modify Bearer Request) is accepted, the Create Session Response reveals exactly what the attacker now controls:

The attacker now owns the S1-U GTP-U endpoint for this IMSI's bearer. Every packet the network believes belongs to that subscriber's session — inbound and outbound — flows through attacker-controlled infrastructure:

<CodeBlock language="python" is-terminal code="def send_gtp_u(target_sgw_ip: str, teid: int, payload: bytes) -> None: """Send GTP-U data packet via the hijacked bearer.""" pkt = ( IP(dst=target_sgw_ip) / UDP(sport=2152, dport=2152) / GTP_U_Header(teid=teid) / Raw(payload) ) send(pkt)

Attacker's outbound traffic now flows over the hijacked TEID.

CDRs generated at SGW/PGW attribute this traffic to the victim IMSI."

/>


IV. The IMSI Overbilling Fraud Mechanism

The billing consequence of a hijacked bearer is easy to underestimate until it's mapped out. Charging Data Records (CDRs) are generated at the SGW and PGW based on the bearer context — not on any independent verification of who actually sent the traffic. A CDR records the IMSI the bearer was allocated to, the data volume observed on that TEID, and the session duration. It has no way to know the packets crossing that TEID originated from an attacker rather than the legitimate device.

<CodeBlock language="text" is-terminal code=" Normal flow: UE data → SGW → CDR: IMSI=victim, volume=X, duration=T

Hijacked flow: Attacker data → hijacked TEID → SGW CDR generated: IMSI=victim, volume=LARGE, duration=LONG ↑ Victim billed for the attacker's data consumption Attacker receives free, unattributed data service

Scale: an automated attack against thousands of IMSIs can generate millions in fraudulent CDRs before detection" />

Two fraud patterns follow directly from this. Overbilling attributes an attacker's own data consumption to a victim's account — the attacker gets free service, the victim gets an inflated bill or triggers a false roaming-data-overage alert. Bypass fraud runs the same mechanism in reverse: an attacker with legitimate roaming credentials assigns their own traffic to a hijacked bearer belonging to a low-usage or dormant IMSI specifically to avoid being billed for it at all, since the CDR is generated against a different subscriber's account entirely. Both patterns scale linearly with the number of IMSIs an attacker can enumerate and hijack, and because CDRs "look normal" — correctly formatted, attributed to a real subscriber, generated by legitimate core network elements — post-hoc fraud detection has to rely on statistical anomalies (a sudden data-volume spike on a subscriber who normally makes voice calls) rather than any protocol-level red flag.

V. Exploitation Kill Chain

The end-to-end attack sequence, from a controlled ProLab assessment perspective:

StepActionResult
1GTP Echo probe sweep across the target operator's GRX/IPX IP rangeLive GTP-C nodes fingerprinted (SGSN/SGW/PGW, restart counter)
2Construct forged Create Session Request with target IMSI + attacker F-TEIDIf accepted: bearer context allocated, SGW believes attacker's node is the tunnel peer
3Capture Create Session ResponseAttacker learns the S1-U/S5-S8 TEIDs now bound to the hijacked bearer
4Inject GTP-U packets using the hijacked TEIDTraffic flows through attacker infrastructure; CDR attribution begins accruing against the victim IMSI
5 (alternate)Forge a Modify Bearer Request for an active session, mimicking a handoverLive bearer's F-TEID swaps mid-session with no interruption visible to the subscriber

Every step in this chain assumes exactly one condition: the receiving GTP-C node accepts messages from an IP address it hasn't independently validated against a bilateral roaming agreement. Remove that condition and the entire kill chain collapses at step 2.

VI. Real-World Impact: GTPdoor and the GRX Threat Landscape

GTPdoor: When GTP-C Became Malware C2

In early 2024, researcher haxrob published analysis — subsequently covered by Eclecticiq, Kaspersky, and Trend Micro — of a Linux kernel-module backdoor named GTPdoor, found deployed on compromised SGSN and SGW nodes at multiple telecommunications operators. Its defining innovation was using GTP-C Echo Request packets themselves as a covert command-and-control channel.

GTP Echo Requests are mandatory traffic — every GTP-C node must respond to them, so they blend into constant background noise on UDP 2123. Security tooling rarely inspects GTP payloads at all, and most operators' own firewall rules explicitly whitelist GTP-C traffic from roaming peers by design. A backdoor riding inside Echo Request/Response exchanges is, in effect, hiding inside traffic the network is contractually obligated to allow.

GTPdoor embedded command-and-control payloads inside the Recovery Information Element of Echo Request/Response pairs — a field the specification permits but rarely inspects for content:

Attacker ──── GTP Echo Request (embedded C2 payload) ────▶ Compromised SGW
                       UDP port 2123
                       Recovery IE: C2 command bytes

Compromised SGW ◀──── GTP Echo Response (C2 response) ──── kernel module
                       Triggers shell execution, data exfil, or pivot

Documented GTPdoor capabilities included reverse shell execution, subscriber data exfiltration, interception of passing Create Session Requests, and IMSI harvesting — meaning a single compromised SGSN/SGW could be used both as a persistent backdoor and as the launch point for exactly the tunnel-hijack technique described above. Public reporting placed affected operators in at least three countries across Asia-Pacific and Eastern Europe, with full disclosure limited by operator sensitivity — a pattern consistent with how Diameter interconnect incidents are typically underreported by the operators involved.

The clearest detection indicator: a GTP Echo Request's TEID field is required by specification to be zero. GTPdoor traffic consistently carried non-zero TEID values and non-standard Recovery IE byte patterns — a protocol-conformance violation that any GTP-aware inspection tool can flag without needing to understand the malware's internals.

CVSS Analysis

MetricValueRationale
Attack VectorNetworkGRX/IPX reachable to any party with roaming peering access
Attack ComplexityLowStandard GTPv2-C message construction, no exotic tooling required
Privileges RequiredLowCommercially available IPX peering access
User InteractionNoneFully remote, transparent to the victim subscriber
ScopeChangedImpacts the billing system and the data plane as separate assets
ConfidentialityHighFull data-plane traffic interception once the tunnel is hijacked
IntegrityHighCDR falsification and session-state manipulation
AvailabilityNoneSessions remain "active" — only redirected, not dropped

Composite CVSS 3.1 score: 8.6 (HIGH) — related in class to CVE-2021-38161 (GTP control-plane session injection).

VII. Defense Architecture: GSMA FS.20 GTP Firewalling

GSMA FS.20 is the industry baseline for GTP-C/GTP-U interconnect filtering, and its core controls map directly onto the attack chain above.

- **IMSI/PLMN consistency validation:** reject any Create Session Request where the IMSI's home MCC/MNC has no active bilateral roaming agreement with the sending peer's registered PLMN. - **MSISDN/IMSI cross-check:** reject requests where the MSISDN's E.164 country code doesn't match the claimed IMSI — a common tell in forged tunnel requests. - **Peer IP whitelisting:** restrict GTP-C processing to source IPs registered in the GSMA IREG bilateral agreement database; drop everything else on the GRX/IPX link by default. - **GTPdoor / Echo anomaly detection:** flag any GTP Echo Request with a non-zero TEID (a specification violation) or an oversized/non-standard Recovery IE. - **Modify Bearer Request scrutiny:** validate that a Modify Bearer Request claiming a handover actually correlates with a plausible handover event (neighboring cell, timing) rather than accepting it as an unconditional TEID reassignment.

GTP Firewall Rule Reference

Rule 1: CSR from SGSN/SGW with Origin-IP in PLMN-A
  → IMSI must have MCC/MNC matching PLMN-A, or an active
    bilateral roaming agreement between PLMN-A and PLMN-B
  → Reject if the IMSI's home PLMN has no bilateral agreement with the sender

Rule 2: CSR MSISDN must match the IMSI's E.164 country code
  → Reject MSISDN/IMSI mismatches (a common artifact of forged tunnels)

Rule 3: GTP Echo Request with non-zero TEID (GTPdoor IOC)
  → Flag and alert; per spec, TEID must be 0 in Echo Requests

Peer-level access control closes off the bulk of the exposure:

# Example GTP-C peer whitelist (production deployments use a
# dedicated GTP firewall, not raw iptables — shown for clarity)
iptables -A INPUT -p udp --dport 2123 -s 10.20.0.0/16 -j ACCEPT   # Partner PLMN A
iptables -A INPUT -p udp --dport 2123 -s 172.16.0.0/12 -j ACCEPT  # Partner PLMN B
iptables -A INPUT -p udp --dport 2123 -j DROP                      # Drop all others

Defense Effectiveness Matrix

Defense LayerBlocks Initial CSR HijackBlocks Mid-Session HijackBlocks GTPdoor C2Blocks Overbilling
No GTP filteringNoNoNoNo
Peer IP whitelist onlyGoodPartialNoGood
IMSI/PLMN consistency validationExcellentGoodNoExcellent
Full GSMA FS.20 GTP firewallExcellentExcellentGoodExcellent
Echo/Recovery IE anomaly detectionN/AN/AExcellentN/A
CDR anomaly detection (statistical)Detection onlyDetection onlyNoGood (post-hoc)

Verification (Authorized Lab Assessment)

<CodeBlock language="bash" is-terminal code="# 1. Confirm GTP-C endpoint responds to Echo python3 gtp_echo_probe.py 10.10.1.20

2. Send a CSR with a test IMSI (lab-only, no real subscriber)

Before hardening: CSR accepted, TEID allocated

After hardening: CSR rejected - IMSI PLMN not in bilateral whitelist

3. Verify peer whitelist enforcement

Send a CSR from a non-whitelisted IP - expect a silent drop

4. Test the GTPdoor detection rule

Send an Echo Request with a non-zero TEID - expect an alert to fire"

/>

VIII. Authoritative References


IX. Frequently Asked Questions

GTP-C tunnel hijacking is the forgery of Create Session Request or Modify Bearer Request messages to redirect a subscriber's user-plane data tunnel (GTP-U) to an attacker-controlled endpoint. Because the GTP-C control plane trusts any peer reachable on the GRX/IPX interconnect, an attacker can allocate or reassign a bearer context for a target IMSI without any authentication step, taking over the actual flow of that subscriber's data.

No. GTP-C and GTP-U both run over plain UDP with no built-in encryption or integrity protection in the base specification. Some operators layer IPsec across GRX/IPX links, but this is a network-level control applied inconsistently across roaming partners, not an end-to-end guarantee — the same partial-protection pattern seen in Diameter deployments where TLS is typically terminated at the edge rather than carried end-to-end.

Charging Data Records are generated from the bearer context at the SGW/PGW, keyed to whichever IMSI the TEID was allocated to — not to any independent proof of who sent the traffic. Once an attacker hijacks a bearer, their own data consumption is recorded against the victim's IMSI. The victim sees an inflated bill or a false data-usage alert, and the attacker receives data service that is never billed to them.

A properly configured GSMA FS.20 GTP firewall — peer IP whitelisting plus IMSI/PLMN consistency validation — blocks the initial Create Session Request forgery almost completely, since it requires the sender to be a recognized bilateral roaming partner for the claimed IMSI. Mid-session hijacking via Modify Bearer Request is harder to fully close because legitimate handovers use the same message; it requires correlating the request against plausible handover context (neighboring cell, timing window) rather than a simple allow/deny rule.

SS7, Diameter, and GTP-C are frequently assessed together because they share the same underlying weakness — an interconnect fabric (SS7/SIGTRAN, IPX/GRX) built on implicit trust between operators. SS7 and Diameter carry signaling about subscribers (location, subscription, authentication); GTP-C carries the tunnel state for the subscriber's actual data. A comprehensive telecom penetration test evaluates all three, since a gap in any one can be chained with the others — for example, using Diameter-based location intelligence to identify a target's serving SGW before attempting a GTP-C tunnel hijack against it.


Conclusion & Next Steps

GTP-C sits in an unusual blind spot: less scrutinized than SS7, less discussed than Diameter, but carrying the one thing an attacker actually wants — the subscriber's live data. The forged Create Session Request technique documented here, and its more surgical Modify Bearer Request variant, both stem from the same root cause as every other interconnect-era signaling vulnerability: a protocol designed for a small circle of trusted national operators, now exposed to a GRX/IPX fabric with thousands of participants. The GTPdoor campaign demonstrated that this isn't theoretical — it's an active technique with documented deployments across multiple operators and continents.

The defense roadmap requires:

  1. Immediate: Deploy a GSMA FS.20-compliant GTP firewall with IMSI/PLMN consistency validation and peer IP whitelisting.
  2. Short-term: Add Echo Request/Recovery IE anomaly detection to catch GTPdoor-class C2 abuse before it becomes a hijack.
  3. Medium-term: Extend CDR anomaly detection to flag statistically implausible volume/duration spikes per IMSI.
  4. Long-term: Validate the full GTP-C attack surface through structured telecom penetration testing methodology engagements alongside your Diameter and SS7 assessments.

TelcoSec provides comprehensive GTP-C interconnect security assessments, including controlled tunnel-hijack simulations to validate firewall configuration and IMSI/PLMN filtering. Explore our TelcoSec research library for related signaling intelligence, or review the 3GPP specification navigator for GTPv2-C protocol references.

REPORT FEEDBACK PROTOCOL

Help refine threat intelligence feeds

Related Articles