|
| 1 | +# Echo CTI External Import Connector |
| 2 | + |
| 3 | +The OpenCTI Echo CTI connector can be used to import threat intelligence data (IOCs) from the Echo CTI platform. |
| 4 | +The connector fetches indicators such as IPs, URLs, hashes, and IP ranges from the Echo CTI API and imports them into OpenCTI. |
| 5 | + |
| 6 | +## Installation |
| 7 | + |
| 8 | +The OpenCTI Echo CTI connector is a standalone Python process that must have access |
| 9 | +to the OpenCTI platform and RabbitMQ. RabbitMQ credentials and connection parameters |
| 10 | +are provided by the API directly, as configured in the platform settings. |
| 11 | + |
| 12 | +Enabling this connector can be done by launching the Python process directly after |
| 13 | +providing the correct configuration in the `config.yml` file or within a Docker with |
| 14 | +the image `opencti/connector-echocti:latest`. We provide an example of |
| 15 | +[`docker-compose.yml`](docker-compose.yml) file that can be used independently or |
| 16 | +integrated into the global `docker-compose.yml` file of OpenCTI. |
| 17 | + |
| 18 | +If you are using it independently, remember that the connector will try to connect to |
| 19 | +the RabbitMQ on the port configured in the OpenCTI platform. |
| 20 | + |
| 21 | +### Configuration variables |
| 22 | + |
| 23 | +Below are the parameters you'll need to set for OpenCTI: |
| 24 | + |
| 25 | +| Parameter `OpenCTI` | config.yml | Docker environment variable | Mandatory | Description | |
| 26 | +|---------------------|------------|-----------------------------|-----------|------------------------------------------------------| |
| 27 | +| URL | url | `OPENCTI_URL` | Yes | The URL of the OpenCTI platform. | |
| 28 | +| Token | token | `OPENCTI_TOKEN` | Yes | The default admin token set in the OpenCTI platform. | |
| 29 | + |
| 30 | +Below are the parameters you'll need to set for running the connector properly: |
| 31 | + |
| 32 | +| Parameter `Connector` | config.yml | Docker environment variable | Default | Mandatory | Description | |
| 33 | +|-----------------------|---------------------|-------------------------------|-------------|-----------|--------------------------------------------------------------------------------------------------| |
| 34 | +| ID | `id` | `CONNECTOR_ID` | / | Yes | A unique `UUIDv4` identifier for this connector instance. | |
| 35 | +| Name | `name` | `CONNECTOR_NAME` | `Echo CTI` | Yes | Full name of the connector: `Echo CTI`. | |
| 36 | +| Scope | `scope` | `CONNECTOR_SCOPE` | `echocti` | Yes | Must be `echocti`, not used in this connector. | |
| 37 | +| Run and Terminate | `run_and_terminate` | `CONNECTOR_RUN_AND_TERMINATE` | `False` | No | Launch the connector once if set to True. Takes 2 available values: `True` or `False`. | |
| 38 | +| Duration Period | `duration_period` | `CONNECTOR_DURATION_PERIOD` | / | Yes | Determines the time interval between each launch of the connector in ISO 8601, ex: `PT1H`. | |
| 39 | +| Queue Threshold | `queue_threshold` | `CONNECTOR_QUEUE_THRESHOLD` | `500` | No | Used to determine the limit (RabbitMQ) in MB at which the connector must go into buffering mode. | |
| 40 | +| Log Level | `log_level` | `CONNECTOR_LOG_LEVEL` | / | Yes | Determines the verbosity of the logs. Options are `debug`, `info`, `warn`, or `error`. | |
| 41 | + |
| 42 | +Below are the parameters you'll need to set for Echo CTI connector: |
| 43 | + |
| 44 | +| Parameter `Echo CTI` | config.yml | Docker environment variable | Default | Mandatory | Description | |
| 45 | +|----------------------------|----------------------|--------------------------------|------------------------------------------|-----------|--------------------------------------------------------------------------------------------| |
| 46 | +| API URL | `api_url` | `ECHOCTI_API_URL` | `https://api.echocti.com/ioc2/feeds` | No | The Echo CTI API endpoint URL. | |
| 47 | +| Client ID | `client_id` | `ECHOCTI_CLIENT_ID` | `ChangeMe` | Yes | Your Echo CTI client ID. | |
| 48 | +| Client Secret | `client_secret` | `ECHOCTI_CLIENT_SECRET` | `ChangeMe` | Yes | Your Echo CTI client secret. | |
| 49 | +| Verify SSL | `verify_ssl` | `ECHOCTI_VERIFY_SSL` | `true` | No | Whether to verify SSL certificates. | |
| 50 | +| Type | `type` | `ECHOCTI_TYPE` | `all` | No | IOC type filter: `ip`, `url`, `hash`, `ip-range`, `all` (comma-separated for multiple). | |
| 51 | +| State | `state` | `ECHOCTI_STATE` | `active` | No | IOC state filter: `active`, `removed`, `false-positive`, `white-listed`, `all`. | |
| 52 | +| Time Since Created | `time_since_created` | `ECHOCTI_TIME_SINCE_CREATED` | / | No | Time filter for creation: `1h`, `1d`, `7d`, `30d`, `1y`. | |
| 53 | +| Time Since Updated | `time_since_updated` | `ECHOCTI_TIME_SINCE_UPDATED` | / | No | Time filter for last update: `1h`, `1d`, `7d`, `30d`, `1y`. | |
| 54 | +| Max Count | `max_count` | `ECHOCTI_MAX_COUNT` | `0` | No | Maximum number of IOCs to fetch (0 = all). | |
| 55 | +| Vendor | `vendor` | `ECHOCTI_VENDOR` | / | No | Optional vendor filter. | |
| 56 | +| Tag | `tag` | `ECHOCTI_TAG` | / | No | Optional tag filter. | |
| 57 | +| Default Confidence | `default_confidence` | `ECHOCTI_DEFAULT_CONFIDENCE` | `50` | No | Default confidence score for indicators (0-100). | |
| 58 | + |
| 59 | +## Deployment |
| 60 | + |
| 61 | +### Docker Deployment |
| 62 | + |
| 63 | +Build and run the connector using Docker: |
| 64 | + |
| 65 | +```bash |
| 66 | +docker build -t opencti/connector-echocti:latest . |
| 67 | +docker compose up -d |
| 68 | +``` |
| 69 | + |
| 70 | +### Manual Deployment |
| 71 | + |
| 72 | +1. Install dependencies: |
| 73 | +```bash |
| 74 | +pip install -r requirements.txt |
| 75 | +``` |
| 76 | + |
| 77 | +2. Copy and configure the sample configuration: |
| 78 | +```bash |
| 79 | +cp src/config.yml.sample src/config.yml |
| 80 | +# Edit src/config.yml with your settings |
| 81 | +``` |
| 82 | + |
| 83 | +3. Run the connector: |
| 84 | +```bash |
| 85 | +cd src |
| 86 | +python -m echocti |
| 87 | +``` |
| 88 | + |
| 89 | +## Behavior |
| 90 | + |
| 91 | +The connector will: |
| 92 | +1. Connect to the Echo CTI API using the provided credentials |
| 93 | +2. Fetch IOCs based on the configured filters (type, state, time range, etc.) |
| 94 | +3. Convert the IOCs to STIX 2.1 format |
| 95 | +4. Send the STIX bundle to OpenCTI |
| 96 | +5. Wait for the configured duration period before the next run |
0 commit comments