Skip to content

EventSentry Executor

Category: SIEM and SOAR Script: eventsentry.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.eventsentry.com/

Description

Imports events from EventSentry Web Reports into Faraday. The executor reads the JSON behind an EventSentry list page (events by default), groups the events by computer and creates one vulnerability per event at or above the chosen severity.

Prerequisites

  • EventSentry Web Reports (v6.x) reachable from the agent
  • An EventSentry API key (JWT) created under the user API keys in the EventSentry admin UI
  • The Python requests library installed in the agent environment

Configuration

Environment Variables (Setup)

Variable Required Description
EVENTSENTRY_HOST Yes Base URL of EventSentry Web Reports, without a path (e.g., https://eventsentry.example.com:8844)
EVENTSENTRY_API_KEY Yes EventSentry API key (JWT). Sent as Authorization: Bearer <token> unless you change EVENTSENTRY_HEADER_NAME / EVENTSENTRY_HEADER_PREFIX.

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

Execution Arguments

Parameter Type Mandatory Description
EVENTSENTRY_EVENTS_PATH string No JSON endpoint to read (default: /events/json). Each Web Reports list page has a /<page>/json endpoint, e.g. /logons/json or /adchanges/json.
EVENTSENTRY_HEADER_NAME string No HTTP header that carries the API key (default: Authorization)
EVENTSENTRY_HEADER_PREFIX string No Text placed before the API key in the header (default: Bearer). Set it to an empty value for headers such as X-API-Key.
EVENTSENTRY_DATE_RANGE string No EventSentry date range preset, e.g. Today, Last 24 hours, Last 7 days, Last 30 days, Last 90 days. Overrides EVENTSENTRY_DAYS_BACK.
EVENTSENTRY_DAYS_BACK integer No Number of days to look back, rounded up to the nearest preset (0, 1, 7, 30 or 90) (default: 1). Ignored when EVENTSENTRY_DATE_RANGE is set.
EVENTSENTRY_SEARCH_QUERY string No EventSentry filter expression (e.g., computer:WEB01, admin:Yes, source:Service Control Manager)
EVENTSENTRY_SOURCE_FILTER string No Computer name to filter on; same as EVENTSENTRY_SEARCH_QUERY=computer:<value>. Ignored when EVENTSENTRY_SEARCH_QUERY is set.
EVENTSENTRY_MIN_SEVERITY string No Minimum severity to import, as a Faraday level (info, low, medium, high, critical) or an EventSentry event type (critical, error, warning, information, audit_failure, audit_success) (default: medium, which equals warning)
EVENTSENTRY_PAGE_SIZE integer No Rows per page (default: 500)
EVENTSENTRY_MAX_PAGES integer No Maximum number of pages to read (default: 50)
EVENTSENTRY_SEARCH_TYPE string No Value of the search.type parameter (default: not sent). detailed returns no rows on some v6.x installs, so leave it empty unless you need it.
EVENTSENTRY_SEARCH_ORDER string No Value of the search.order parameter, e.g. recorddate, time or computer (default: not sent). Some v6.x installs return no rows when it is set.
EVENTSENTRY_SEARCH_SORT string No Value of the search.sort parameter, asc or desc (default: not sent). Some installs return no rows when it is set.

YAML Configuration Example

executors:
  eventsentry:
    repo_executor: eventsentry.py
    max_size: 65536
    varenvs:
      EVENTSENTRY_HOST: "https://eventsentry.example.com:8844"
      EVENTSENTRY_API_KEY: "<api_key>"
    params:
      EVENTSENTRY_EVENTS_PATH:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_HEADER_NAME:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_HEADER_PREFIX:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_DATE_RANGE:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_DAYS_BACK:
        mandatory: false
        type: integer
        base: integer
      EVENTSENTRY_SEARCH_QUERY:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_SOURCE_FILTER:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_PAGE_SIZE:
        mandatory: false
        type: integer
        base: integer
      EVENTSENTRY_MAX_PAGES:
        mandatory: false
        type: integer
        base: integer
      EVENTSENTRY_SEARCH_TYPE:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_SEARCH_ORDER:
        mandatory: false
        type: string
        base: string
      EVENTSENTRY_SEARCH_SORT:
        mandatory: false
        type: string
        base: string

How It Works

  1. Sends the API key in the configured header (by default Authorization: Bearer <token>)
  2. Calls {EVENTSENTRY_HOST}{EVENTSENTRY_EVENTS_PATH} with the date range, the filter query and the optional search parameters, page by page, until a page is empty or shorter than the page size, or EVENTSENTRY_MAX_PAGES is reached
  3. Maps the event type to a Faraday severity: Critical becomes critical, Error high, Warning and Audit Failure medium, and Information and Audit Success info
  4. Drops events below EVENTSENTRY_MIN_SEVERITY and groups the rest by computer name
  5. Creates one vulnerability per event, named [SIEM] <source>: EventID <id>, with the timestamp, log, category, user and message. CVE IDs found in the message are added as references.

Notes

  • Each computer becomes a host with IP 0.0.0.0 and the computer name as hostname. Events without a computer name go to unknown-host.
  • TLS certificates are not verified.
  • On a 429 response the executor waits 30 seconds and moves on to the next page. Any other error stops reading and imports what was already read.
  • An unrecognized EVENTSENTRY_MIN_SEVERITY value falls back to medium.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use EVENTSENTRY_MIN_SEVERITY to filter by severity.