CH3 — Slice Census
The NSSF reveals every virtual network carved out of the 5G core — including slices that were never meant to be visible.
What Is Network Slicing?
Network slicing is one of 5G's defining architectural features. A single physical 5G core can be partitioned into multiple independent virtual networks — each with its own QoS guarantees, security policies, and subscriber base. A slice is identified by an S-NSSAI (Single Network Slice Selection Assistance Information), which contains an SST (Slice/Service Type) value and an optional SD (Slice Differentiator).
The NSSF (Network Slice Selection Function) is the function that knows about all slices and decides which slice a subscriber or session should be placed into. Every available slice is registered as a profile in the NSSF — and that registration is visible through the NRF. A decoy NSSF profile advertising a RESTRICTED internal slice (S-NSSAI sst=3) has been planted in this lab. Its identity is the flag.
The Vulnerability
In a production 5G deployment, only authorized Network Functions — identified by their OAuth2 client credentials and NF-type — may query the NRF for NSSF registrations or walk individual NSSF profiles. The NRF validates every request. In this lab, every query is accepted without any authorization check. An attacker with SBI network access can enumerate the full slice topology in two HTTP requests.
Production NSSF
Your Lab (Open5GS)
10.100.200.20:7777)
from the service catalog challenge. Now you use that same NRF to filter by NSSF and walk the profiles,
looking for a slice that should not be advertised to the public.
The Attack
This challenge builds on CH1 (NRF enumeration). You query the NRF with a filter for nf-type=NSSF
to get the list of registered NSSF instances, then fetch each profile individually by UUID.
The planted decoy NSSF profile has the flag in its fqdn field.
--http2-prior-knowledge
to every curl command or you will receive no response. This is the most common mistake when querying 5G core APIs.
Query the NRF for NSSF instances
Use the ?nf-type=NSSF filter to get only NSSF profiles. The response is a JSON array of
matching NF instances — note each nfInstanceId UUID. There may be more than one NSSF registered.
Walk each NSSF profile by UUID
Fetch the full profile for each NSSF instance using its UUID. The full profile includes more detail
than the list response — including the fqdn field where the flag is embedded.
Look for the profile where fqdn contains TWIN{}.
| jq '.[] | select(.nfType=="NSSF")' to filter only NSSF entries and see them clearly.
To pull just the fqdn from each result: | jq -r '.[].fqdn'
Real World Impact
In a production carrier 5G deployment, the NSSF knows about every slice — including those that operators would strongly prefer remain internal. An attacker who can enumerate the NSSF gains a detailed map of the operator's network architecture and customer commitments.
-
Reveal private enterprise slices Large enterprises lease dedicated 5G slices for their own traffic — factory floors, campus networks, critical infrastructure. Enumerating the NSSF tells an attacker exactly which enterprises are on the network and what their slice identifiers are, enabling targeted attacks against specific tenants.
-
Identify law enforcement and government slices Emergency services, law enforcement intercept infrastructure, and government communication networks often run on dedicated 5G slices. Discovering their existence via NSSF enumeration is the first step toward targeting them — or specifically avoiding detection by operating around them.
-
Map the operator's business relationships Every slice's S-NSSAI and associated FQDN reveals operator-customer relationships, service tier commitments, and internal network segmentation decisions. This is competitive intelligence an attacker could sell or use to craft more targeted social engineering campaigns.
-
Enable targeted slice-specific attacks Knowing a slice exists and its identity allows an attacker to craft attacks specific to that slice — for example, registering rogue NFs that advertise support for the target slice's S-NSSAI, intercepting traffic for that specific slice's subscribers while ignoring the rest.
Flag Format
The flag is embedded in the
fqdn field of the planted NSSF profile returned by the NRF.
The full fqdn string looks like a valid 3GPP FQDN:
TWIN{xxxxxxxxxxxx}.nssf.5gc.mnc070.mcc999.3gppnetwork.orgExtract only the
TWIN{xxxxxxxxxxxx} prefix and submit that as your flag.
The planted NSSF profile advertises an S-NSSAI with sst=3 — look for this value to identify
the decoy among the registered NSSF instances.
TWIN{...} string including braces and the 12 hex characters.
Do not include the .nssf.5gc.mnc070... suffix — that is just the FQDN wrapper used as camouflage.