README.md

December 29, 2025 · View on GitHub

5G-Gibbon Logo

Advanced 5G/4G LTE Core Network Security Testing Toolkit

Red Team & Blue Team capabilities for mobile network infrastructure

Python 3.8+ MIT License 5G Support 4G Support


Author: NET - Gaspberry

A comprehensive 5G and 4G/LTE core network security testing framework for authorized penetration testing and security audits.

Supports: 5G NR (NGAP, SBI, PFCP, GTP-U) + 4G LTE (S1AP, Diameter, GTP)


Quick Start (6 Steps)

1. Download the Toolkit

git clone https://github.com/Suffix30/5G-Gibbon.git
cd 5G-Gibbon

2. Install Requirements

# Linux/WSL (Recommended)
chmod +x setup.sh
./setup.sh

# Or manually:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

3. Load the Toolkit

source venv/bin/activate
python run.py

4. Scan for Targets

# From interactive menu: Select [1] Discovery
# Or directly:
sudo python run.py discover --network 10.0.0.0/24

5. Target Point of Interest

The toolkit auto-detects 5G components (UPF, AMF, SMF, NRF, etc.) and displays them.

6. Run Against Target

# Full security audit
sudo python run.py audit

# Red team attack
sudo python run.py ultra-red

# Blue team defense
sudo python run.py ultra-blue

Usage Modes

python run.py

Shows a menu-driven interface with all options.

Direct Command Mode (Power users)

python run.py <command> [options]
CommandDescription
discoverScan network for 5G/4G components
auditRun comprehensive security audit
keys standardStandard key extraction
keys maximumMaximum extraction (all methods)
attack billingBilling fraud attack
attack nestedNested GTP-U tunnel attack
async scanAsync network scan (10x faster)
async teidAsync TEID enumeration (5x faster)
timing teid-oracleTEID oracle timing attack
fuzz gtpAdvanced GTP protocol fuzzing
report htmlGenerate HTML security report
dashboardStart real-time dashboard
ultra-redFull red team framework
ultra-blueFull blue team defense
lte rogue-enbRegister rogue eNodeB to MME
lte hss-probeProbe HSS via Diameter CER
lte imsi-enumEnumerate valid IMSIs
lte auth-vectorsExtract auth vectors from HSS
lte assessmentFull 4G/LTE security assessment

Run python run.py --help for all commands.


Requirements

  • Python 3.8+
  • Linux/WSL (recommended for raw socket access)
  • Root/sudo (for network operations)

Folder Structure

5G-Gibbon/
├── run.py              # Main entry point
├── setup.sh            # Setup script
├── requirements.txt    # Dependencies
├── docs/               # Documentation
├── core/               # CLI, config, async utilities
├── discovery/          # Network scanning (sync + async)
├── enumeration/        # TEID/SEID enumeration (sync + async)
├── key_extraction/     # Key extraction modules
├── attacks/            # Attack modules (sync + async)
├── defense/            # Blue team / remediation
├── red_team/           # Red team framework
├── analysis/           # Packet analysis
├── audit/              # Security audit
├── protocol/           # Protocol definitions (HTTP/2, SCTP)
├── tunneling/          # GTP-U tunneling
└── utils/              # Utilities

Docker Usage

# Build and run dashboard
docker-compose up -d gibbon-dashboard

# Run toolkit in container
docker-compose run gibbon --help
docker-compose run gibbon discover --network 10.0.0.0/24

Documentation

GuideDescription
Installation GuideSystem requirements, platform setup, troubleshooting
User GuideCLI commands, workflows, configuration
Honeypot GuideDeploy and use the honeypot network
Reporting GuideGenerate HTML, JSON, topology reports
Docker GuideContainer deployment, docker-compose
ArchitectureTechnical overview for developers

Attack Coverage

5G NR Attacks

Attack VectorDetails
TEID EnumerationSync + Async modes
Nested GTP-U TunnelsMulti-layer encapsulation
Billing FraudSync + Async modes
Battery DrainUE power exhaustion
Session HijackingPDU session takeover
Key Extraction4 extraction methods
Rogue gNodeBNGAP registration
PFCP AttacksSession manipulation
DPI BypassTunnel obfuscation
Timing AttacksTEID/Session oracle
Side-ChannelError/Traffic analysis
Protocol FuzzingGTP/PFCP/NGAP
HTTP/2 SBINRF/UDM/AMF exploitation

4G LTE Attacks

Attack VectorProtocol
Rogue eNodeB RegistrationS1AP
Initial UE InjectionS1AP
Forced HandoverS1AP
S1 Interface ResetS1AP
HSS Diameter ProbeCER/CEA
IMSI EnumerationAIR/AIA
Cancel LocationCLR/CLA
Auth Vector ExtractionAIR/AIA
Purge UEPUR/PUA
S1AP/Diameter FloodDoS

Defense Modules

ModuleDescription
IDS SignaturesGenerate Snort/Suricata/iptables rules for 5G attack detection
Honeypot NetworkDeploy fake UPF/SMF/NRF to detect attackers
Anomaly DetectorReal-time traffic anomaly detection with baseline learning
Security AuditCompliance checking (GSMA 5G, 3GPP, NIST)
DPI RulesDeep packet inspection firewall rules
Blue Team FrameworkFull defensive monitoring and remediation

Analysis Modules

ModuleDescription
Traffic AnalyzerDeep protocol parsing (GTP-U, PFCP, NGAP, SBI)
Session TrackerTrack UE registrations, PDU sessions, handovers
Packet CaptureReal-time packet capture and analysis
Rate Limit TestingDetect rate limiting thresholds

Reporting

FeatureCommand
HTML Reportpython run.py report html
JSON Exportpython run.py report json
Network Topologypython run.py report topology
Live Dashboardpython run.py dashboard

View Example Reports →


Warning

This toolkit is for AUTHORIZED SECURITY TESTING ONLY. Unauthorized use against networks you don't own is illegal.


License

For authorized security research and penetration testing only.