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 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
| Feature | SS7 (MAP) | Diameter | GTP-C |
|---|---|---|---|
| Transport Security | None | TLS/IPsec (optional, rarely e2e) | None (UDP, no encryption) |
| Peer Authentication | GT screening (manual) | CER/CEA realm exchange | Source-IP whitelist only |
| Message Integrity | None | Hop-by-hop only | None |
| What it moves | Signaling / subscriber records | Signaling / subscriber records | Live user-plane data tunnels |
| Consequence of forgery | Location leak, profile edit | Location leak, fraud, DoS | Traffic redirection, billing fraud |
| Interconnect fabric | SS7/SIGTRAN | IPX/GRX | GRX/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.
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:
| Step | Action | Result |
|---|---|---|
| 1 | GTP Echo probe sweep across the target operator's GRX/IPX IP range | Live GTP-C nodes fingerprinted (SGSN/SGW/PGW, restart counter) |
| 2 | Construct forged Create Session Request with target IMSI + attacker F-TEID | If accepted: bearer context allocated, SGW believes attacker's node is the tunnel peer |
| 3 | Capture Create Session Response | Attacker learns the S1-U/S5-S8 TEIDs now bound to the hijacked bearer |
| 4 | Inject GTP-U packets using the hijacked TEID | Traffic 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 handover | Live 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.
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
| Metric | Value | Rationale |
|---|---|---|
| Attack Vector | Network | GRX/IPX reachable to any party with roaming peering access |
| Attack Complexity | Low | Standard GTPv2-C message construction, no exotic tooling required |
| Privileges Required | Low | Commercially available IPX peering access |
| User Interaction | None | Fully remote, transparent to the victim subscriber |
| Scope | Changed | Impacts the billing system and the data plane as separate assets |
| Confidentiality | High | Full data-plane traffic interception once the tunnel is hijacked |
| Integrity | High | CDR falsification and session-state manipulation |
| Availability | None | Sessions 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.
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 Layer | Blocks Initial CSR Hijack | Blocks Mid-Session Hijack | Blocks GTPdoor C2 | Blocks Overbilling |
|---|---|---|---|---|
| No GTP filtering | No | No | No | No |
| Peer IP whitelist only | Good | Partial | No | Good |
| IMSI/PLMN consistency validation | Excellent | Good | No | Excellent |
| Full GSMA FS.20 GTP firewall | Excellent | Excellent | Good | Excellent |
| Echo/Recovery IE anomaly detection | N/A | N/A | Excellent | N/A |
| CDR anomaly detection (statistical) | Detection only | Detection only | No | Good (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
- 01 GSMA FS.20GTP SecurityGSMA Security Resources & Guidelines →
- 02 3GPP TS 29.2743GPP Evolved Packet System (EPS); Evolved GPRS Tunnelling Protocol for Control plane (GTPv2-C)3GPP TS 29.274 – GTPv2-C Specification →
- 03 3GPP TS 29.060GPRS Tunnelling Protocol (GTP) across the Gn and Gp Interface3GPP TS 29.060 – GTP Specification →
- 04 NVD — CVE-2021-38161GTP Control Plane Session Injection (related vulnerability class)NVD CVE-2021-38161 →
- 05 GTPdoor Malware Analysishaxrob independent research, 2024 — subsequently covered by Eclecticiq, Kaspersky, Trend MicroGTPdoor Technical Writeup →
- 06 GSMA IR.88LTE and EPC Roaming GuidelinesGSMA IR.88 LTE Roaming Guidelines →
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:
- Immediate: Deploy a GSMA FS.20-compliant GTP firewall with IMSI/PLMN consistency validation and peer IP whitelisting.
- Short-term: Add Echo Request/Recovery IE anomaly detection to catch GTPdoor-class C2 abuse before it becomes a hijack.
- Medium-term: Extend CDR anomaly detection to flag statistically implausible volume/duration spikes per IMSI.
- 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.
