IDS/IPS desde cero con 100+ firmas de ataque. Analiza archivos PCAP o tráfico en vivo. Detecta reconocimiento, exploits, shells, C2, DDoS, ataques web, exfiltración, fuerza bruta y más. Genera reportes en TXT, HTML y JSON.
| Categoría | Ejemplos | Firmas |
|---|---|---|
| RECON | SYN scan, ping sweep, OS fingerprint, DNS zone transfer | 10 |
| EXPLOIT | EternalBlue, Shellshock, Heartbleed, Log4Shell, ProxyShell | 10 |
| SHELL | Reverse shells (bash, Python, PHP, PS), Cobalt Strike, Meterpreter | 10 |
| C2 | DNS tunneling, HTTP beaconing, Sliver, Havoc, Brute Ratel | 8 |
| DDoS | SYN/ICMP/UDP flood, Slowloris, DNS amplification, SSDP reflection | 9 |
| WEB | SQLi (union/boolean/time), XSS, path traversal, LFI/RFI, command injection, XXE, SSTI | 20 |
| MALWARE | Emotet, TrickBot, QakBot, Dridex, IcedID | 8 |
| EXFIL | DNS exfil, HTTP exfil, ICMP exfil, credential dump | 5 |
| BRUTEFORCE | SSH, FTP, RDP, MySQL, SMTP, VPN, SMB | 7 |
| ARP | ARP spoofing/poisoning | 2 |
| POLICY | Telnet, FTP cleartext, crypto mining, TOR, VNC | 10 |
- Parser de PCAP: lee archivos PCAP nativos (formato libpcap)
- DPI: decodifica Ethernet, IPv4, TCP, UDP, ICMP, ARP, DNS, HTTP
- 100+ firmas: por cabeceras, payload, URI, User-Agent y comportamiento
- Detección de comportamiento: port scans, beacons C2, ARP spoofing
- Correlación: agrupa alertas por IP, severidad, categoría
- Score de amenaza: puntuación 0-100 del nivel de riesgo global
- MITRE ATT&CK: mapeo automático a técnicas MITRE
- Reportes: TXT, HTML, JSON con resumen ejecutivo y detalle
git clone https://github.com/fersegundo22/cerberus-ids.git
cd cerberus-idsSin dependencias externas. Solo Python 3.8+.
# Demo con tráfico sintético de ataque
python examples/demo.pyfrom cerberus.ids import CerberusIDS
from cerberus.reporte import ReporteSeguridad
ids = CerberusIDS()
alertas = ids.analizar_pcap("trafico_sospechoso.pcap")
print(f"Score de amenaza: {ids.score_amenaza():.0f}/100")
print(f"Alertas: {len(alertas)}")
# Top atacantes
for ip, count in ids.top_ips_atacantes(5):
print(f" {ip}: {count} alertas")
# Reporte completo
reporte = ReporteSeguridad(alertas, ids.resumen())
print(reporte.texto())La demo genera un PCAP sintético con ataques realistas y lo analiza:
Paquetes generados: ~200
Ataques incluidos: SYN scan, SQLi, XSS, reverse shell, Log4Shell,
path traversal, ARP spoofing, ping sweep,
beacon C2, SSH brute force, DNS tunneling
cerberus-ids/
├── cerberus/
│ ├── __init__.py
│ ├── ids.py # Motor IDS principal
│ ├── firmas.py # 100+ firmas de ataque
│ ├── reporte.py # Generador de reportes
│ └── parser/
│ └── pcap.py # Parser PCAP + DPI (Ethernet/IP/TCP/UDP/ICMP/ARP/DNS/HTTP)
├── examples/
│ └── demo.py # Demo con tráfico sintético
├── tests/
│ └── test_cerberus.py
└── README.md
MIT