A Python-based simulation that demonstrates and mitigates common cybersecurity threats—DDoS, IMSI Catcher, and Man-in-the-Middle (MITM)—targeting 5G network components. The system generates both normal and malicious traffic, applying mitigation logic and visualizing network health in real time.
- ✅ Simulation of 3 major types of attacks:
- DDoS Attack: Overwhelms the User Plane Function (UPF) with traffic
- IMSI Catcher: Mimics fake base stations requesting IMSI data
- MITM Attack: Intercepts and alters data between entities
- ✅ Real-time mitigation logic for each attack type
- ✅ Packet-level filtering and rate-limiting
- ✅ Live graph visualization using
matplotlib
Attack Type | Source | Target | Mitigation Strategy |
---|---|---|---|
DDoS | Attacker | UPF | Rate limiting and packet dropping |
IMSI Catcher | FakeBaseStation | UE | Block IMSI requests from fake sources |
MITM | MITM Agent | UPF | Drop intercepted/spoofed packets |
- Python 3.x
- matplotlib
pip install matplotlib
### Run the simulation
python 5g_simulation.py
```Then select the type of attack to simulate:
1. DDoS Attack
2. IMSI Catcher (Fake Base Station)
3. MITM (Man-in-the-Middle)