Skip to content

BlackBerry Cylance (CylancePROTECT) Executor

Category: Endpoint Security Script: cylance.py Integration: REST API (JWT) Faraday Plugin: Raw JSON Website: https://www.blackberry.com/us/en/products/cylance-endpoint-security

Description

Imports managed devices and their threats from BlackBerry CylancePROTECT into Faraday. Each device becomes a host and each threat found on it becomes a vulnerability.

Prerequisites

  • A CylancePROTECT tenant
  • A Custom Application created in the Cylance console (Settings > Integrations > Custom Application) with the device, threat and policy read/list scopes. It provides the application ID and secret.
  • Your tenant ID, shown in the console
  • Python requests module available to the agent

Configuration

Environment Variables (Setup)

Variable Required Description
CYLANCE_APP_ID Yes Application ID of the Custom Application
CYLANCE_APP_SECRET Yes Application secret of the Custom Application
CYLANCE_VERIFY_SSL No Set to 0, false, no or off to disable TLS certificate verification (default: verification enabled)

Execution Arguments

Parameter Type Mandatory Description
CYLANCE_TENANT_ID string Yes Your Cylance tenant ID
CYLANCE_REGION string No Cylance cloud region of your tenant: na (default), euc1, au, sae1 or jp. The aliases us, eu, apac and sa are also accepted. Unrecognized values fall back to na.
CYLANCE_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: info)

YAML Configuration Example

executors:
  cylance:
    repo_executor: cylance.py
    max_size: 65536
    varenvs:
      CYLANCE_APP_ID: "<app_id>"
      CYLANCE_APP_SECRET: "<app_secret>"
    params:
      CYLANCE_TENANT_ID:
        mandatory: true
        type: string
        base: string
      CYLANCE_REGION:
        mandatory: false
        type: string
        base: string
      CYLANCE_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Builds a signed JWT from the application ID, secret and tenant ID and exchanges it for an access token at /auth/v2/token on the regional API host
  2. Reads devices (/devices/v2/), the threat catalogue (/threats/v2/) and policies (/policies/v2/), 200 records per page
  3. Creates one host per device, using its first non-loopback IP address, hostname, operating system and policy name
  4. For each device, reads its threats from /devices/v2/{id}/threats and reports each one as an [EDR] vulnerability, enriched with the catalogue data (classification, Cylance score, hashes)
  5. Maps severity from the Cylance score (0.8 and above is critical, 0.4 and above high, 0 and above medium, down to info for trusted files). Quarantined or blocked threats are closed and waived or safelisted threats are risk-accepted; the rest are open.

Notes

  • Devices are imported as hosts even when they have no threats. Devices without a usable IP use 0.0.0.0.
  • The run stops if the tenant ID or the credentials are missing, or if authentication fails.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use CYLANCE_MIN_SEVERITY to filter by severity.