Skip to main content
Version: 2.14.1

ElasticSearch SIEM Zero Trust Alert Integration

Free integration setupWe’ll install and validate this for you.
Book a setup call

Support Statement

DISCLAIMER

This documentation is provided "as is" without support for 3rd party software. The level of support for this integration guide is best effort without any SLA on response time. No 3rd party product support can be provided by Superna directly. 3rd party components require support contracts. See EULA for more details.


Overview

Elastic SIEM is a powerful security platform built on top of the Elastic Stack, which includes Elasticsearch, Logstash, and Kibana. It provides a centralized way to collect, normalize, and analyze security-related data from various sources, offering real-time threat detection and response capabilities.

Solution Overview

Superna Defender Zero Trust API receives webhook alerts and parses the key data into HTTP API payload events that are sent to the ElasticSearch SIEM endpoint URL. The ElasticSearch solution uses the Custom HTTP Endpoint Logs Integration.

Advanced Zero Trust Capabilities

  • Webhook to native HTTP endpoint with JSON custom payload

What Is ElasticSearch SIEM?

Elastic SIEM is a powerful security platform built on top of the Elastic Stack, which includes Elasticsearch, Logstash, and Kibana. It provides a centralized way to collect, normalize, and analyze security-related data from various sources, offering real-time threat detection and response capabilities.

Integration Architecture

ElasticSearch SIEM integration architecture

Solution Configuration in ElasticSearch SIEM and Data Security Edition Zero Trust

Prerequisites

  • Installed Security Edition
  • Eyeglass OS appliance version 15.5 — verify with cat /etc/os-release
  • License key for the Zero Trust API
  • ElasticSearch SIEM (on-premises or SaaS)

Configuration in ElasticSearch SIEM

  1. Log in to the Elastic console and select Project settingsIntegrations.

  2. Select Custom HTTP Endpoint Logs.

  3. Click the install option and follow the Elastic Agent installation guide to install an agent on an on-premises host that has IP reachability to the Eyeglass VM on TCP port 8080.

    note

    Record the IP address of the Elastic Agent — this is used in the Eyeglass integration code to send formatted JSON payload alerts to the Elastic Agent over port 8080.

  4. Click Add Custom HTTP Endpoint Logs integration.

  5. Change the listening address from localhost to 0.0.0.0 to accept connections from the Eyeglass VM. Leave all other defaults to create the agent and HTTP policy.

The HTTP endpoint agent accepts HTTP over port 8080 with a JSON payload that is indexed using json.fieldname within the index.

Configuration Steps on Eyeglass Virtual Machine

High-Level Steps

  1. Create the Python location to run the application on the Eyeglass VM.
  2. Create the Python main application script.
  3. Create the Linux systemd service and set it to auto-start.
  4. Create the Zero Trust configuration in Data Security Edition.
  5. Update the main script to customize it with the ElasticSearch SIEM Python code.
  6. Test the script is running as a service.
  7. Create a test event in Defender to validate alerts appear as indexed parsed events in ElasticSearch SIEM.

Configure the Service Start and Python Integration Files

Log in to the Eyeglass VM via SSH as the admin user:

ssh admin@<your-vm-ip>

Become root:

sudo -s

mkdir -p /opt/superna/cgi-bin

chown -R sca:users /opt/superna/cgi-bin

chmod -R u+rwX,g+rwX /opt/superna/cgi-bin

Switch to the SCA user:

sudo -u sca -s

cd /opt/superna/cgi-bin

Create a Python virtual environment for the integration:

python3 -m venv venv-elasticsearch

source venv-elasticsearch/bin/activate

Install required Python packages:

pip install flask requests

deactivate

Create integration script files:

touch elasticsearch.py

touch elasticsearch.sh

chmod +x elasticsearch.py

chmod +x elasticsearch.sh

Create the elasticsearch.sh launch script:

nano /opt/superna/cgi-bin/elasticsearch.sh

Paste the following content into the file:

#!/bin/bash

export PATH="/opt/.pyenv/bin:$PATH"

source /opt/superna/cgi-bin/venv-elasticsearch/bin/activate

exec python /opt/superna/cgi-bin/elasticsearch.py

Make the script executable:

chmod +x /opt/superna/cgi-bin/elasticsearch.sh

Exit back to root:

exit

whoami # confirm you are root

Create the systemd service unit file:

nano /etc/systemd/system/elasticsearch.service

Paste the following content into the file:

[Unit]
Description=Webhook listener for Zero Trust API translations and integrations
After=network.target

[Service]
Type=simple
User=sca
Group=users
WorkingDirectory=/opt/superna/cgi-bin
ExecStart=/bin/bash /opt/superna/cgi-bin/elasticsearch.sh
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Reload systemd to register the new service:

systemctl daemon-reload

Enable the service to start on boot (do not start it yet):

systemctl enable elasticsearch

Configure Python Packages and Customize the Integration Code

  1. Download the Python template code from the link to download.

  2. Open the Python template file in a text editor. Only replace the placeholder values — do not delete any commas.

  3. Locate the following section and replace the placeholder with your ElasticSearch SIEM on-premises endpoint URL:

    # ElasticSearch SIEM HTTP Collector Endpoint
    elastic_URL = "https://x.x.x.x:8080/"

    ElasticSearch SIEM SaaS: To use a SaaS endpoint, modify the headers section by replacing it with the following block and replace the placeholder with your API token:

    ELASTIC_HEADERS = {
    "Content-Type": "application/json",
    "Authorization": "Basic yyyyyyyyyy"
    }
  4. Open the production file on the Eyeglass VM:

    nano /opt/superna/cgi-bin/elasticsearch.py
  5. Open the template file locally in Notepad, select all (Ctrl+A), and copy.

  6. Paste the clipboard into the SSH terminal session with the open nano editor.

  7. Save the file:

    • Press Ctrl+X
    • Answer Yes to save and exit
  8. Start the service and verify it is running:

    systemctl start elasticsearch

    systemctl status -l elasticsearch

    Verify the service returns "active and running". If the service does not start, do not proceed — double-check the steps above.

Configure Defender Zero Trust Webhooks

  1. Configure the Zero Trust endpoint in the Ransomware Defender Zero Trust tab.

    Recommended Configuration

    Send only Critical and Major events, and only webhooks that set lockout or delayed lockout. The goal is to send findings rather than a list of alarms that do not pinpoint a security incident. Customers can customize based on specific requirements.

  2. The endpoint URL uses localhost and sends webhooks to the application service listening on port 5000:

    http://localhost:5000/webhook
  3. Add the following headers to complete the webhook configuration:

    • Content-Type: application/json
    • content-encoding: gzip
  4. Click Save to commit the configuration.

  5. Click Save on the main Webhook configuration page.

How to Test the Integration with ElasticSearch SIEM

  1. Get the IP address of the Eyeglass VM.
  2. Download the curl command template and open it with a text editor. Locate the IP address of Eyeglass at the very end of the text and replace it with the IP address of your Eyeglass VM.
  3. Copy all the text in the text editor.
  4. SSH to the Eyeglass VM as the admin user.
  5. Paste the entire CLI command to the SSH prompt to send sample data to the running Zero Trust application. This sends test data directly to the application to be processed and sent to ElasticSearch SIEM.

A successfully processed webhook test returns the following text in the SSH terminal:

done sending event to ElasticSearch SIEM and check for http 200 and success count in response

To review the process logs from the web application:

sudo -s

journalctl -f -u elasticsearch

To log to a file and review with nano, showing only the most recent 250 lines:

journalctl -f -n 250 -u elasticsearch > /tmp/elasticsearch.log

nano /tmp/elasticsearch.log

The response code from the ElasticSearch SIEM API call should show HTTP 200 status code and successCount 1 to indicate the event was successfully created.

ElasticSearch SIEM SecOps Administrators Integration Experience

Once the integration is complete, SecOps administrators can view indexed events in the ElasticSearch SIEM console. The following fields from the Superna Zero Trust webhook payload are indexed and available for search and alerting:

FieldDescription
json.actionAction taken
json.Alert_urlAlert URL
json.client_ipClient IP address
json.detectedDetection timestamp
json.severityAlert severity
json.userAffected user
json.filesAffected files
json.sharesAffected shares
json.stateAlert state
json.protocolProtocol used
json.device_vendorVendor (Superna)
json.device_productProduct (Data Security Edition)