GestorAbuseIPDB module enriches detected intrusion events with external reputation data: abuse confidence score, risk label, total report count, and country of origin. This data is available in the SOC dashboard under the IP reputation panel.
The current implementation runs in mock/simulation mode. All queries return static simulated values (
abuse_score: 15, riesgo: 'RIESGO MEDIO (Simulado)') until the module is connected to the real AbuseIPDB API. See Connecting to the real API below.Initialization
Import and initializeGestorAbuseIPDB with your AbuseIPDB API key:
abuseipdb_module.py
Checking IP reputation
verificar_ips(ips, callback_resultado=None, callback_error=None) accepts a list of IP address strings and delivers results through a callback:
callback_resultado is called with a result dictionary:
The queried IP address.
AbuseIPDB confidence score from 0 to 100. Higher values indicate a greater likelihood the IP is malicious.
Human-readable risk label derived from the abuse score:
RIESGO BAJO— low threatRIESGO MEDIO— moderate threatRIESGO ALTO— high threat
(Simulado).Total number of abuse reports on record for this IP in the AbuseIPDB database.
Country of origin for the IP address. In mock mode the value is suffixed with
(Simulado).Exporting a reputation report
exportar_reporte(ruta) saves the current reputation data to a file:
True on success. In mock mode it writes a simulated report to the given path.
Cleanup
Calllimpiar() when the SOC interface closes to release any resources held by the module:
Usage in the SOC interface
GestorAbuseIPDB is imported and instantiated in interfasc.py. A Verificar AbuseIPDB button in the dashboard toolbar triggers verificar_ips_abuse(), which extracts external IPs from the warnings panel and event table, then calls verificar_ips(). Results are prepended into the warnings text area in the format:
CRÍTICO risk also trigger a status-bar warning message.
Connecting to the real API
To query live reputation data, replace the mock implementation inverificar_ips with a real HTTP call to the AbuseIPDB v2 endpoint: