Skip to main content
Version: 2.14.1

Rapid7 InsightIDR Superna Zero Trust Alerts 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

Customers using Rapid7 InsightIDR can leverage this integration to send real-time Zero Trust alerts using webhooks and maintain full payload parsing using JSON-defined fields. The InsightIDR network port syslog data collector is used. To leverage real-time webhooks, a Python integration application processes the webhooks and formats the data in syslog format to send to Rapid7.

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 InsightIDR platform can dynamically extract fields encoded in the alert payload. The example code sends all fields in the webhook to Rapid7; the application code can be customized to extract fields and send only a subset of the available data.

What Is Rapid7 InsightIDR?

A cloud-based SIEM built for security teams that need a solution to quickly detect and respond to threats in today's ever-evolving hybrid and multi-cloud IT environments.

Integration Architecture

Rapid7 InsightIDR integration architecture

Solution Configuration in Rapid7 InsightIDR and Defender Zero Trust

Prerequisites

  • Installed Superna Security Edition
  • Eyeglass OS appliance version 15.5 — verify with cat /etc/os-release
  • License key for the Zero Trust API, or a Subscription license type

Configuration in Rapid7 InsightIDR

  1. Log in to the InsightIDR console and install a Data Collector (this example uses the Windows OS collector).
  2. Select Add Raw Logs Custom Event Type and select the collector to use.
  3. Use an unused network port on the collector host.
  4. Select Listen on Network Port and use port 6675 (or select another port if this port is already in use).
  5. Leave the protocol set to UDP.
  6. Check the box for RFC 3164.

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 the Rapid7 InsightIDR 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 Rapid7 InsightIDR.

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

source venv-insightidr/bin/activate

Install required Python packages:

pip install flask boto3 requests logging

deactivate

Create integration script files:

touch insightidr.py

touch insightidr.sh

chmod +x insightidr.py

chmod +x insightidr.sh

Create the insightidr.sh launch script:

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

Paste the following content into the file:

#!/bin/bash

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

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

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

Make the script executable:

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

Exit back to root:

exit

whoami # confirm you are root

Create the systemd service unit file:

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

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 update the values. Optionally change the facility and severity defaults used in the syslog headers:

    SYSLOG_SERVER = 'syslog.server.address'  # Replace with your Data Collector server address; keep the single quotes
    SYSLOG_PORT = 6675 # Replace with your Data Collector UDP port configured for the Event Source
    FACILITY = 13 # 1 = User-level messages, 13 = Security audit log
    SEVERITY = 2 # 1 = Alert, 2 = Critical, 3 = Error, 4 = Warning, 5 = Notice, 6 = Informational
  4. Open the production file on the Eyeglass VM:

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

    systemctl status -l insightidr

    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 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 Rapid7 InsightIDR

  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.

    note

    It can take up to 5 minutes for the data collector to forward events to the portal. Once webhooks are processed, the log search shows the records, and using JSON format the key-value pairs are displayed.

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

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

To review the process logs from the web application:

sudo -s

journalctl -f -u insightidr

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

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

nano /tmp/insightidr.log

The response code from the Rapid7 InsightIDR API call should show HTTP 200 status code.

Log in to Rapid7 InsightIDR, view the event source, select the collector used for the integration, and click View Raw Log to verify data has been received by the Rapid7 portal from the on-premises collector.

Create Detection Rules in Rapid7 InsightIDR

Overview

Configure a Log Pattern Detection rule to create critical incidents from Zero Trust alerts. Since a Zero Trust alert represents a root-cause detection rather than a log entry, the log entries can be set up as a trigger to create critical incidents in InsightIDR.

Configure a Detection Rule

note

Ensure log entries have been tested and are visible in the log search before starting this configuration.

  1. Run a search using the severity query filter and select the Superna Zero Trust log collector:

    where("severity" = "CRITICAL")
  2. Select the three-dot menu to create a Log Pattern Detection Rule.

  3. Follow the prompts to create the Log Pattern Detection Rule.

  4. Click Create, then view the detection rules page to verify it is enabled.

When new log entries arrive, they trigger the creation of critical incidents.

Example Incident in InsightIDR

After the integration is complete, Superna Zero Trust alerts appear as critical incidents in InsightIDR with the full evidence log and parsed JSON fields visible.