Skip to main content
Version: 2.14.1

Splunk Enterprise Integration with Zero Trust Alarms

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

Customers using Splunk Enterprise can leverage this integration to send real-time Zero Trust alerts using webhooks and maintain full payload parsing using JSON-defined fields. The Splunk HTTP Event Connector capability allows inbound webhook JSON payloads to be parsed and tagged with a source type to allow for dashboards and triggers to be used in workflows.

Limitations

HTTPS with unsigned certificates is the default configuration, and certificate checking has been disabled in this sample code.

Solution Overview

Superna Defender Zero Trust API is the cornerstone technology used to integrate with SIEM, SOAR, and XDR platforms. Automation begins with data that summarizes the threat and places that information into a security tool to be acted on by SecOps teams. The Splunk platform can dynamically extract fields encoded in the alert payload and expose them in the index as key-value pairs.

What Is Splunk Enterprise?

Splunk Enterprise enables organizations to search, analyze, and visualize data gathered from IT infrastructure or business components, and to create triggers, workflows, and dashboards for monitoring critical infrastructure.

Integration Architecture

Splunk Enterprise integration architecture

Solution Configuration in Splunk Enterprise and Defender Zero Trust

Prerequisites

  • Installed Ransomware Defender and/or Easy Auditor or Defender for AWS
  • Eyeglass OS appliance version 15.5 — verify with cat /etc/os-release
  • License key for the Zero Trust API

Configuration in Splunk Enterprise

  1. Log in to the console and navigate to SettingsData InputHTTP Event Collector.
  2. Fill in the fields and enable all indexes, setting the default to Main.
  3. Click Submit.
  4. Go back to Data InputsHTTP Event Collector and click Global Settings:
    • Set the default source type to _json
    • Click Enable All Tokens
    • Click Save
  5. On the list of HTTP Event Tokens, record the token value for use in the Python code. Click the token field to copy the value.

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 Defender.
  5. Update the main script to customize it with Splunk Enterprise 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 Splunk Enterprise.

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-splunk

source venv-splunk/bin/activate

Install required Python packages:

pip install flask boto3 requests logging

deactivate

Create integration script files:

touch splunk.py

touch splunk.sh

chmod +x splunk.py

chmod +x splunk.sh

Create the splunk.sh launch script:

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

Paste the following content into the file:

#!/bin/bash

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

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

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

Make the script executable:

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

Exit back to root:

exit

whoami # confirm you are root

Create the systemd service unit file:

nano /etc/systemd/system/splunk.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/splunk.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 splunk

Configure Python Packages and Customize the Integration Code

  1. Download the Python template code from the link to download (right-click, save as).

  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 values with your Splunk HEC token and URL:

    SPLUNK_HEC_TOKEN = 'xxxxxxxxxxxxxxxx'
    SPLUNK_HEC_URL = 'https://yyyyyyyyyyyyyy:8088/services/collector/event'

    Replace xxxxx with the HEC token recorded above and yyyy with the IP address of the Splunk server running the HTTP Event Collector.

  4. Open the production file on the Eyeglass VM:

    nano /opt/superna/cgi-bin/splunk.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 splunk

    systemctl status -l splunk

    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/splunk
  3. Add the Content-Type header with value application/json to complete the webhook configuration.

  4. Click Save to commit the configuration.

  5. Click Save on the main Webhook configuration page.

How to Test the Integration with Splunk Enterprise

  1. Download the curl command template and open it with a text editor.
  2. Copy all the text.
  3. SSH to the Eyeglass VM as the admin user.
  4. Paste the entire CLI command to the SSH prompt to send sample data to the running Zero Trust application.

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

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

To review the process logs from the web application:

sudo -s

journalctl -f -u splunk

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

journalctl -f -n 250 -u splunk > /tmp/ztwebhook.log

nano /tmp/splunk.log

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

Log in to the Splunk Enterprise Main Dashboard and search for sourcetype="supernaZT" to locate events sent from testing.

Splunk Enterprise SecOps Administrators Integration Experience

Once the integration has been tested, you can build triggers from indexed, parsed Zero Trust fields to create automated response workflows.

Configure Data Security Essentials (DSE)

Overview

Data Security Essentials saves alerts to the Windows Event log under a custom application log. This integration extracts the log entries and the JSON payload contained within them, formats the data as webhook events, and sends them to the Splunk HEC endpoint.

Requirements

  1. Follow the Splunk integration steps above to configure the integration.

  2. Install Python for Windows on the Data Security Essentials host.

    note

    Ensure Python is installed for all users — enable the for all users option during installation.

  3. The integration code matches event log entries from the following sources:

    • Superna Data Security Essentials BOT Service
    • Superna Data Security Policy Engine

Features

  • Execution logs are stored alongside the Python code
  • Each execution stores the event log record ID, date time, and event number of the last processed event in last_processed_record.txt — read on each execution to continue from the last record
  • The scheduled sync runs every minute and processes only events since the last record
  • Only Major and Critical severity events are processed — other severities are ignored

Steps to Configure Event Sync to Splunk Integration

  1. Download the integration code (right-click, save as).

  2. Modify the Python file and update the Splunk integration settings to match your environment:

    # Splunk HEC authentication
    SPLUNK_HEC_TOKEN = 'xxxxxxx'
    SPLUNK_HEC_URL = 'https://yyyyyy:8088/services/collector/event'

    # Configuration
    server = 'localhost'
    log_name = 'Data Security Essentials'
    source_names = ['Superna Data Security Essentials BOT Service', 'Superna Data Security Policy Engine']
    trigger_severities = ['MAJOR', 'CRITICAL', 'WARNING']
  3. Copy the Python code to C:\Program Files\Superna\cgi-bin on the Data Security Essentials host and name the file splunk-dse.py.

  4. Install Python dependencies:

    note

    Open a command prompt as the service account (hold down Shift and right-click the command prompt icon → Run as). This is required to install the Python packages under the correct user account.

    pip install pywin32 requests
  5. Test the script from a command prompt:

    cd "C:\Program Files\Superna\cgi-bin"
    python splunk-dse.py

    The output should display event log entries that match, ignoring severities that do not match the script settings. You can review last_processed_record.txt to see the last processed date, time, and event ID. Delete this file to have the script start reading from the oldest Windows event log entry.

    An example log file is available: right-click to download and open.

  6. Grant the Data Security Essentials AD service account the Log on as a batch job right via Local Security Policy (secpol.msc).

  7. Download the Task Scheduler XML file (right-click, save as). You can rename it from Servicenow alert sync.xml to Splunk integration.xml.

  8. Open Task Scheduler (taskschd.msc), right-click Task Scheduler Library, and select Import Task.

  9. In the task definition:

    • Edit the name to Splunk integration
    • Click the Actions tab and browse to select C:\Program Files\Superna\cgi-bin\splunk-dse.py
    • Update the service account name, domain, and password
    • Click OK to save