Skip to content

Claroty Continuous Threat Detection Executor

Category: OT and IoT Security Script: claroty.py Integration: REST API Faraday Plugin: Raw JSON Website: https://claroty.com/industrial-cybersecurity/ctd

Description

Imports the OT asset inventory and security alerts from a Claroty Continuous Threat Detection (CTD) appliance into Faraday. Each asset and each alert becomes a host with a vulnerability describing it.

Prerequisites

  • A Claroty CTD appliance reachable from the agent
  • A CTD user (username and password) with permission to read assets and alerts
  • Python requests module available to the agent

Configuration

Environment Variables (Setup)

Variable Required Description
CLAROTY_HOST Yes Base URL of the CTD appliance (e.g., https://ctd.example.lan). https:// is added if you enter a bare hostname.
CLAROTY_USER Yes CTD username
CLAROTY_PASSWORD Yes CTD password
CLAROTY_PAGES No Maximum number of pages (100 records each) to read from assets and from alerts (default: 10, maximum: 100)

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
CLAROTY_SITE_ID string No Only import assets and alerts of this site (site ID or name, depending on your appliance). Leave blank to import all sites.
CLAROTY_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical. Assets are filtered by their criticality and alerts by their severity. Leave blank to import everything.

YAML Configuration Example

executors:
  claroty:
    repo_executor: claroty.py
    max_size: 65536
    varenvs:
      CLAROTY_HOST: "https://ctd.example.lan"
      CLAROTY_USER: "<claroty_user>"
      CLAROTY_PASSWORD: "<claroty_password>"
    params:
      CLAROTY_SITE_ID:
        mandatory: false
        type: string
        base: string
      CLAROTY_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Logs in with POST /api/v1/auth/login and uses the returned session token as a Bearer token
  2. Reads assets from GET /api/v1/assets and alerts from GET /api/v1/alerts, 100 records per page, filtered by CLAROTY_SITE_ID if set
  3. Creates one host per asset, using its IP, name, MAC and a vendor/model/firmware/OS string. The asset is reported as an [ASSET-INVENTORY] vulnerability whose severity comes from its criticality.
  4. Creates one host per alert, keyed on the first related asset IP. The alert is reported as a vulnerability with the alert severity, category and CVEs.
  5. Drops records below CLAROTY_MIN_SEVERITY

Notes

  • Assets or alerts without a usable IP (empty, loopback or 0.0.0.0) are placed on a host with IP 0.0.0.0.
  • All vulnerabilities are open, including alerts that Claroty reports as resolved or muted. The original Claroty status is kept as a reference.
  • The run stops if the login fails or a request returns 401. Other HTTP errors end pagination of that list and the records already read are imported.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.