Trend Micro Deep Security Executor¶
Category: Endpoint Security
Script: trendmicro_deep_security.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.trendmicro.com/en_us/business/products/hybrid-cloud/deep-security.html
Description¶
Imports the computers managed by a Trend Micro Deep Security Manager (or Cloud One Workload Security) into Faraday, with their anti-malware events and their assigned intrusion prevention (IPS) virtual patching rules. Each computer becomes a Faraday host and each event or rule becomes an [EDR] vulnerability.
Prerequisites¶
- A Trend Micro Deep Security Manager, or Cloud One Workload Security, reachable from the agent
- A Deep Security API key with read access to computers, anti-malware events and IPS rules, created under Administration > User Management > API Keys
requestsavailable in the agent's Python environment (checked withpython3 -c 'import requests')
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
DSM_HOST |
Yes | URL of the manager (e.g., https://dsm.example.com:4119 for on-premises, or https://workload.deepsecurity.trendmicro.com for Cloud One) |
DSM_API_KEY |
Yes | Deep Security API key, sent in the api-secret-key header |
DSM_VERIFY_SSL |
No | Set to false, 0, no or off to skip TLS certificate verification, for example with a self-signed certificate on the manager. By default the certificate is verified. |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
DSM_POLICY_ID |
string | No | Numeric ID of a Deep Security policy. Only computers assigned to that policy are imported. A non-numeric value is ignored. |
DSM_HOSTNAME_FILTER |
string | No | Text that the computer's host name or display name must contain, not case-sensitive (e.g., prod-). Use it to limit a run to one business unit. |
DSM_MIN_SEVERITY |
string | No | Minimum severity to import: info, low, medium, high or critical. The Deep Security numbers 1 (low) to 4 (critical) are also accepted. Default: info. |
YAML Configuration Example¶
executors:
trendmicro_deep_security:
repo_executor: trendmicro_deep_security.py
max_size: 65536
varenvs:
DSM_HOST: "https://dsm.example.com:4119"
DSM_API_KEY: "<dsm_api_key>"
params:
DSM_POLICY_ID:
mandatory: false
type: string
base: string
DSM_HOSTNAME_FILTER:
mandatory: false
type: string
base: string
DSM_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates with the
api-secret-keyheader andapi-version: v1 - Lists the managed computers with
POST /api/computers/search, filtered byDSM_POLICY_ID, and keeps those that matchDSM_HOSTNAME_FILTER - Reads the anti-malware events with
POST /api/searches/eventsantimalwareand the IPS rule catalogue withPOST /api/ipsrules/search - Creates one Faraday host per computer, with its IP address, MAC address and operating system, and attaches:
- Anti-malware events: one
[EDR]vulnerability per event, with the malware name, file path, hashes, scan action and process details. The severity comes from the malware type. - IPS rules: one
[EDR]vulnerability for each IPS rule assigned to the computer that covers a CVE (or hashighorcriticalseverity), with the CVEs, CVSS data and description. The severity comes from the rule's 1-4 severity or CVSS score.
- Anti-malware events: one
- Drops findings below
DSM_MIN_SEVERITY
Notes¶
- Computers are imported even when they have no findings. If Deep Security has no usable IP for a computer,
0.0.0.0is used. - Anti-malware events whose computer is not in the imported list are grouped under a host with IP
0.0.0.0. - Each request returns at most 5000 records per page, and at most 200 pages are read per list.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseDSM_MIN_SEVERITYto filter by severity.