WAZUH - THE HIVE

🔗 Integración de Wazuh con TheHive para la Creación Automática de Casos, Incluyendo Alertas Enriquecidas con Gemini AI

En esta práctica implementaremos una integración directa entre Wazuh y TheHive, permitiendo que todas las alertas generadas por Wazuh se añadan automáticamente como casos o eventos dentro de TheHive.
De esta forma, cada incidente detectado en los agentes monitorizados se trasladará de inmediato al sistema de gestión de incidentes, permitiendo una escalada rápida y eficiente.

Además, extenderemos esta integración para que TheHive también reciba las alertas enriquecidas generadas por Gemini AI, creadas en una práctica anterior. Esto permitirá que tanto las alertas básicas como las alertas ampliadas con análisis contextual se gestionen directamente desde TheHive, ofreciendo una visión más completa al analista.

Este flujo automatiza la detección → análisis → creación de caso, simulando un entorno SOC profesional.

🧰 Tecnologías empleadas

Wazuh

Wazuh es una plataforma de monitorización y seguridad que detecta amenazas, analiza logs, protege sistemas y genera alertas en función de reglas y eventos críticos. Puede integrarse fácilmente con otras herramientas mediante API y webhooks.

TheHive

TheHive es una plataforma de gestión de incidentes (IRP) utilizada por SOCs, CSIRTs y equipos de respuesta. Permite crear casos, gestionar incidentes, ejecutar flujos de análisis y centralizar toda la información relativa a amenazas.

Gemini AI

Gemini es una inteligencia artificial avanzada que puede analizar alertas, generar explicaciones ampliadas, aportar contexto y enriquecer información técnica para facilitar la interpretación del incidente.

🎯 Objetivos de la práctica

  • Integrar Wazuh y TheHive para la creación automática de casos.

  • Asegurar que todas las alertas de Wazuh se envían a TheHive inmediatamente.

  • Añadir también las alertas enriquecidas generadas mediante Gemini AI.

  • Mantener un flujo centralizado donde TheHive actúa como sistema principal de gestión de incidentes.

  • Realizar una prueba práctica para verificar la integración completa.

🧩 Aspectos clave de la práctica

🔗 Integración de Wazuh → TheHive

Configuraremos Wazuh para que, cada vez que detecte una alerta:

  • Se envíen los datos del evento a TheHive.

  • Se genere un caso o alerta dentro de la plataforma.

  • Se asocie cada incidente con la información del agente afectado.

Este proceso automatiza la escalada inicial del incidente.

🤖 Envío de alertas enriquecidas con Gemini AI

Retomando la práctica anterior, donde Gemini analizaba alertas de nivel 12 o superior:

  • La alerta original se ampliaba con el análisis generado por IA.

  • Se producía una alerta enriquecida dentro de Wazuh.

Ahora, añadiremos un paso extra:

Las alertas enriquecidas también se enviarán a TheHive.

Esto permitirá que el analista vea no solo el evento técnico, sino toda la contextualización generada por la IA:

  • Explicación del incidente

  • Riesgos

  • Impacto potencial

  • Recomendaciones iniciales

📥 TheHive como centro de gestión de alertas

Una vez recibidas en TheHive, las alertas —tanto normales como enriquecidas— se convertirán en:

  • Casos, si requieren investigación

  • Alertas, si deben revisarse antes de convertirse en casos

El analista podrá:

  • Agrupar eventos similares

  • Ampliar información

  • Realizar enriquecimientos desde Cortex

  • Escalar incidentes

  • Documentar todo el proceso de investigación

TheHive se convierte así en la consola central del SOC.

🧪 Prueba práctica de validación

Al finalizar la configuración:

  1. Generaremos una alerta normal en Wazuh.

  2. Verificaremos que aparece automáticamente en TheHive.

  3. Generaremos una alerta crítica para activar Gemini.

  4. La IA devolverá un análisis enriquecido.

  5. Wazuh creará la alerta enriquecida.

  6. Esta alerta enriquecida será enviada a TheHive.

  7. Confirmaremos que TheHive recibe ambas alertas correctamente.

Con esto probamos la integración completa en ambos sentidos.

🔍 ¿Por qué es importante esta práctica?

Esta práctica muestra cómo unir:

  • Detección de amenazas (Wazuh)

  • Inteligencia artificial aplicada (Gemini AI)

  • Gestión de incidentes (TheHive)

Creando un flujo moderno y profesional similar al de un SOC real.

Permite comprender:

  • Cómo automatizar la escalada de incidentes.

  • Cómo enriquecer alertas antes de gestionarlas.

  • Cómo centralizar toda la información en TheHive.

  • Cómo optimizar tiempos de respuesta y análisis.

Es una integración fundamental para elevar Wazuh a un entorno SOC de nivel empresarial.

✅ Resultados esperados

  • Integración Wazuh → TheHive funcionando correctamente.

  • Todas las alertas de Wazuh generando casos o eventos en TheHive.

  • Alertas enriquecidas por Gemini AI también enviadas a TheHive.

  • Flujo completo alerta → análisis → envío → caso operativo.

  • SOC funcional con capacidad de gestión centralizada.

🔗 Enlaces de interés



🔗Integrating Wazuh with TheHive for Automatic Case Creation, Including Gemini AI Enriched Alerts

In this practice, we will implement a direct integration between Wazuh and TheHive, enabling all alerts generated by Wazuh to be automatically forwarded and added into TheHive as alerts or cases.
This ensures that every security event detected across monitored agents is immediately escalated into the incident management system, providing fast, structured handling.

Additionally, we will extend the integration so that TheHive also receives the enriched alerts generated by Gemini AI, created in a previous practice. This means both the original alerts and the AI-enhanced ones — containing contextualized and expanded analysis — will flow directly into TheHive for investigation.

This creates a fully automated detection → enrichment → incident creation workflow, similar to what is used in a professional SOC.

🧰 Technologies Used

Wazuh

Wazuh is a security monitoring platform capable of detecting threats, analyzing logs, monitoring system integrity, and generating alerts based on events and rule evaluations. It supports integrations through API calls and webhooks, making it ideal for automated workflows.

TheHive

TheHive is an Incident Response Platform (IRP) designed for SOCs and CSIRTs. It centralizes incident management, allows the creation and tracking of cases, supports collaboration, and integrates with external tools for enrichment and automation.

Gemini AI

Gemini AI is an advanced artificial intelligence model capable of expanding alerts with contextual explanations, insights, risk evaluations, and recommended actions. Its enriched output significantly improves the triage and investigation process.

🎯 Objectives of the Practice

  • Integrate Wazuh with TheHive to automatically create alerts or cases.

  • Ensure all Wazuh alerts are forwarded to TheHive in real time.

  • Include Gemini AI–enriched alerts in the integration.

  • Centralize incident management through TheHive.

  • Perform practical tests to validate end-to-end functionality.

🧩 Key Aspects of the Practice

🔗 Integration: Wazuh → TheHive

Wazuh will be configured so that each time an alert is generated:

  • The alert data is sent to TheHive.

  • TheHive creates an alert or case based on the incoming information.

  • The incident is associated with the affected agent and metadata.

This process fully automates the first step of incident escalation.

🤖 Forwarding Gemini AI Enriched Alerts

From the previous practice, alerts with level 12 or higher were enriched by Gemini AI.
The enrichment process provides:

  • A clear, expanded explanation of the event

  • Additional context and correlations

  • Potential impact and risks

  • Suggested investigation or mitigation steps

Now we extend the workflow so that:

These enriched alerts are also sent to TheHive automatically.

This provides analysts with much richer information from the moment they open the case.

📥 TheHive as the Central Incident Management Hub

Once TheHive receives alerts — both basic and enriched — they are converted into:

  • Alerts, which can later be turned into cases, or

  • Cases, if configured to escalate immediately

Inside TheHive, analysts can:

  • Merge related alerts

  • Add observables and context

  • Request enrichment from Cortex

  • Assign, escalate, or close cases

  • Document the entire investigation workflow

This centralizes all SOC activity into a unified console.

🧪 Practical Validation Test

After configuration, we will perform an end-to-end test:

  1. Generate a simple alert in Wazuh.

  2. Confirm that it appears automatically in TheHive.

  3. Trigger a critical alert to activate Gemini AI.

  4. Gemini produces the enriched analysis.

  5. Wazuh generates the enriched alert.

  6. The enriched alert is also sent to TheHive.

  7. Verify that both alerts (normal and enriched) appear correctly.

This demonstrates that the full integration is working flawlessly.

🔍 Why This Practice Is Important

This practice unifies:

  • Threat detection (Wazuh)

  • Artificial intelligence enrichment (Gemini AI)

  • Incident management (TheHive)

Creating a streamlined workflow used in real SOC environments.

It highlights how to:

  • Automate incident escalation

  • Improve alert quality before investigation

  • Centralize all incident data in one platform

  • Reduce analyst workload and triage time

  • Modernize Wazuh environments with AI-driven intelligence

It is a key integration for advancing toward enterprise-level SOC capabilities.

✅ Expected Results

  • Wazuh-to-TheHive integration working correctly.

  • All Wazuh alerts appearing automatically in TheHive.

  • Gemini AI enriched alerts also forwarded to TheHive.

  • Proper flow: alert → enrichment → case creation → investigation.

  • A functional SOC workflow fully centered around TheHive.


Comentarios

Entradas populares