Back to articles
AI & Cloud

Building a Home SOC with AI Integration Using Wazuh, TheHive, and Anomaly Detection for Small Business Networks

A guide to building a home SOC with AI integration using Wazuh, TheHive, and anomaly detection models for small businesses, enabling cost-effective and self-managed security monitoring.

DPTCloud Engineering4 min read
Building a Home SOC with AI Integration Using Wazuh, TheHive, and Anomaly Detection for Small Business Networks

Introduction to Home SOC with AI Integration

In an increasingly complex cybersecurity landscape, small and medium-sized enterprises (SMEs) need effective security operations center (SOC) solutions that are both cost-efficient and self-managed. Building a home SOC with AI integration allows SMEs to reduce reliance on third-party services while improving control and response speed to threats. This guide walks through setting up a self-hosted SOC using open-source tools like Wazuh (for intrusion detection and system monitoring), TheHive (for incident response coordination), and an AI-based anomaly detection model to monitor network traffic and system behavior.

Requirements and Environment Setup

To deploy this system, you’ll need a server or VPS with sufficient hardware resources. Below are the minimum requirements:

  • OS: Ubuntu 22.04 LTS or equivalent
  • RAM: At least 8GB (16GB recommended)
  • Storage: 100GB SSD or larger
  • Network: Stable internet connection

Consider using High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways to ensure optimal performance for AI and monitoring services.

Integrating Wazuh and TheHive

Wazuh is a powerful open-source platform for system monitoring, intrusion detection, and compliance. TheHive is an incident response platform that helps coordinate security incidents and automate response workflows.

Follow these steps to integrate the two:

  1. Install the Wazuh Manager and Wazuh Agent on monitored systems.
  2. Configure the Wazuh Manager to send event data to TheHive via API.
  3. In TheHive, set up automation workflows to process Wazuh events—such as creating tasks, assigning them to team members, and sending alerts.

Use the following command to install the Wazuh Agent on a server:

curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --dearmor | sudo tee /usr/share/keyrings/wazuh.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | sudo tee /etc/apt/sources.list.d/wazuh.list
sudo apt update
sudo apt install wazuh-agent

AI-Powered Anomaly Detection Model

To enhance threat detection, integrate a machine learning model to analyze network traffic and system behavior. Simple models like Isolation Forest or Autoencoder can effectively identify abnormal patterns.

Integrate the AI model into the system by:

  • Hosting an AI service locally (e.g., using Qwen2.5-Coder 7B as a base).
  • Feeding Wazuh event data into the model for risk assessment.
  • Displaying anomaly alerts in TheHive via API integration.

Here is an example Python configuration for an anomaly detection model:

from sklearn.ensemble import IsolationForest
import numpy as np

# Input data from Wazuh (e.g., access count, duration, IP address)
data = np.array([[100, 30, '192.168.1.1'], [50, 15, '192.168.1.2'], [200, 60, '192.168.1.3']])

# Train Isolation Forest model
model = IsolationForest(contamination=0.1)
model.fit(data)

# Predict anomalies
predictions = model.predict(data)
print(predictions)

Testing and Troubleshooting

After deployment, perform the following checks:

  • Verify that the Wazuh Agent successfully sends data to the Wazuh Manager.
  • Confirm that data is transmitted to TheHive.
  • Test the AI model’s ability to detect anomalies.

If issues arise, review logs from Wazuh, TheHive, and the AI service. Use these commands:

sudo systemctl status wazuh-manager
sudo journalctl -u thehive -n 50

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478