This script sets up a 5G slicing lab with the following features:
- Dependency Installation: Automatically installs required packages and updates the system.
- Builds Components: Compiles and installs open5GS (5G Core) and srsRAN (RAN simulator).
- Wizard Interface: Provides interactive menus for single-node or distributed testing scenarios.
- Pentesting Tools: Includes basic scanning, location tracking demos, and DoS simulations.
- Designed for Ubuntu/Debian-based systems (e.g., Ubuntu 20.04, 22.04).
- Must be run as root or via sudo.
- For distributed deployments, ensure SSH connectivity and
paramiko
are configured. - Intended for lab or demonstration purposes only. Do not use on production systems.
#!/usr/bin/env python3
"""
5G Lab Setup & Wizard Script (Single-Node or Distributed)
Author: ScaryByte
Description:
- Installs and upgrades necessary packages.
- Builds open5GS (5G Core) and srsRAN (RAN simulator) from source.
- Provides a wizard for single or distributed scenarios.
- Allows basic pentesting tasks (Nmap, Hydra, log checks, DoS scripts).
Usage:
sudo ./LAB-PoC.py
Disclaimer:
This script is intended for demonstration in an isolated lab environment only.
Unauthorized testing on production systems is illegal and unethical.
"""
For the complete script, refer to the source code.
chmod +x LAB-PoC.py
sudo ./LAB-PoC.py
- Installs open5GS and srsRAN locally.
- Configures and starts open5GS services.
- Launches a wizard for:
- Basic Nmap scans
- Hydra brute force demos
- Location tracking (log search)
- Sample DoS attach flood simulation
- Prompts for remote host details (IP, username, password/key, role).
- Builds open5GS or srsRAN on remote hosts based on roles.
- Configures distributed environments.
- Launches a wizard for:
- Remote scanning
- Remote log searches
- Distributed DoS demonstrations
- Perform basic Nmap scan on localhost.
- Launch Wireshark.
- Hydra brute force example on local orchestrator.
- Location tracking demo (log search).
- DoS attach flood simulation.
- Nmap scan orchestrator/core node.
- Launch Wireshark locally.
- Hydra brute force on remote orchestrator.
- Remote location tracking log search on core node.
- Local DoS script demonstration.
- For the fake attach flood (
fake_attach.py
), ensure you provide your own script in~/fake_attach.py
. - Proper IP addressing, routing, and SCTP ports must be configured between AMF/SMF/UPF and the RAN node in distributed setups.
- This script forcibly updates and upgrades packages, which may alter your system. Use a clean lab environment.
- Missing dependencies (e.g.,
paramiko
) are installed automatically during execution.
This script is intended for research and educational purposes only. Unauthorized use on production systems is both illegal and unethical. Always use in a controlled lab environment.