Skip to content

fersegundo22/cerberus-ids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cerberus IDS - Sistema de Detección de Intrusos

Python Licencia

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.


¿Qué detecta?

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

Características

  • 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

Instalación

git clone https://github.com/fersegundo22/cerberus-ids.git
cd cerberus-ids

Sin dependencias externas. Solo Python 3.8+.


Uso

# Demo con tráfico sintético de ataque
python examples/demo.py
from 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())

Demostración

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

Estructura

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

Licencia

MIT

About

Motor IDS/IPS con DPI multinivel: parser PCAP nativo, 100+ firmas de ataque con mapeo MITRE ATT&CK, detección por comportamiento (port scan, beacon C2, ARP spoofing), score de amenaza 0-100 y reportes forenses TXT/HTML/JSON.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages