OpenCTI Hands-on Handbook繁中

OpenCTI Connectors: Imports, Exports and Work Queues

Understand connector types, worker processing and service-account permissions. Verify an import from connector registration through object queries.

Handbook v1.10.1OpenCTI 7.261124.0About 15 minutes

Connecting OpenCTI: choose a data path you can verify.

A connector catalog can make it tempting to enable everything: MITRE, vulnerabilities, public intelligence, reputation lookups. More integrations can look like a more complete platform. Yet somebody still has to understand the incoming data. Start with a small, clear requirement, such as importing one STIX report and checking that its objects and relationships survive.

A connector is an integration component that runs independently of the platform. Depending on its type, it handles external imports, enrichment, file imports or exports, streams, or specialized analysis. During import, data is often converted into a STIX bundle before the processing pipeline writes it to the platform. A running container, successful registration, a completed job, and usable data are therefore four different checkpoints. Official connector development documentation

Establish one complete data path first.

This chapter introduces a reusable verification workflow, then follows a real import through the official MITRE connector to verify the source, job, and technique relationships. Credentials, quotas, and data licenses must still be checked for each third-party source. One successful integration does not validate the rest.

Different connector types answer different needs.

TypeWhat you want to doWhat to check first
EXTERNAL_IMPORTRetrieve external intelligence regularlySource scope, synchronization interval, and initial backfill size
INTERNAL_ENRICHMENTAdd context to existing objectsWhether outgoing queries disclose sensitive internal data
INTERNAL_IMPORT_FILEParse uploaded filesSupported MIME types and content formats
INTERNAL_EXPORT_FILEGenerate files for deliveryPermissions of the connector account and the user requesting the export
STREAMSend change events to another systemFilters, cursors, and reconnection behavior
INTERNAL_ANALYSISAnalyze particular contentInput scope and human review of analysis results

Use this table to choose a route. A continuous external import does not decide relevance for you, and enrichment is not necessarily more reliable than the original source. For every integration, identify who will check its results so failed jobs do not accumulate unnoticed in the background.

Understand the configuration before copying YAML.

Read the connector's README for the matching version, then check each setting. At minimum, understand the platform URL, API token, connector ID, name, and processing scope. Within one Compose network, the platform URL normally uses its service name, such as http://opencti:8080; inside a container, localhost refers to that container, not your computer.

Configuration checklist · Conceptual example, not deployable Compose
OPENCTI_URL       Platform address reachable within the container network
OPENCTI_TOKEN     Credential dedicated to this integration
CONNECTOR_ID     Stable, unique identifier; do not regenerate it on each restart
CONNECTOR_NAME   A name that helps an on-call colleague recognize its purpose
CONNECTOR_SCOPE  Object or file types handled by this integration
Source settings  Follow the README for the matching version

Integrations should generally have separate accounts and tokens so their activity can be traced and access revoked. File export connectors have a special requirement: the official documentation says they process exports as the requesting user and require administrator bypass capability. Least privilege does not mean assigning the same role to every connector. Understand the permissions required by its type, then restrict how its credentials are stored and used. Official configuration and permission reference

Verify one record from beginning to end.

  1. Confirm which service you are starting

    Run the following commands in the lab directory. List service names first rather than assuming a documentation example matches your configuration. config --quiet checks Compose configuration only; it does not prove that credentials or remote sources work.

Start in the repository root · Inspection commands
cd lab
docker compose config --quiet
docker compose config --services
docker compose ps
docker compose logs --tail=60 worker
  1. Match records from the same execution

    Use the handbook's STIX teaching data and follow the connector verification workflow in chapter 13 for a small import. That chapter explains how the verification script uploads, triggers, and checks the result. Read its prerequisites, then record the time, filename, connector name, and work identifier. Compare connector logs with worker logs. ‘Submitted’ is not enough: follow the job to completion and identify whether any failure occurred during retrieval, parsing, queuing, or writing.

  2. Search for an object you know should exist

    This import test uses connector-check.example, not login.example from the earlier report exercise. Match the new report's suffix with its work identifier, then check object type, source, time, and report membership instead of relying on the homepage total increasing. If it is missing, check search filters and account visibility before concluding that data was lost.

  3. Run it again and inspect the difference

    The import verification script deliberately creates a differently named report on each run so old data cannot impersonate a new success. An increased report count is expected. To test deduplication of identical input, use a fixed-identity dataset for a separate comparison, or examine the report rerun verification in verify.py. Deduplication depends on identifiers and processing logic; a rerun without errors is not a data-quality check.

Import real MITRE ATT&CK data: techniques, sources, and relationships through the official connector.

The fictional data establishes the processing path. Now replace the source with real, openly available threat knowledge. This exercise uses the official OpenCTI MITRE connector image 7.261124.0. The connector downloads MITRE's official Enterprise ATT&CK 19.1 dataset and submits it to the queue; the existing worker writes it to the platform. The verifier reads the source and results only. It does not manually create MITRE techniques to simulate a successful integration.

The dataset version and Git commit are pinned to make reproduction and comparison possible. Version 19.1 is the snapshot selected for this exercise, not a claim about the latest ATT&CK release. This run imports Enterprise only, excluding Mobile, ICS, and CAPEC. When updating later, include snapshot differences and data retention rules in your upgrade process. The configuration follows the matching official connector source and documentation, using the pinned MITRE dataset.

Understand the scale: a 50 MiB JSON file does not require only 50 MiB of memory

The source file is 53,277,393 bytes, approximately 50.8 MiB, containing 25,843 STIX objects. Parsing, relationship references, queues, indexes, and Python objects all add overhead. The local Docker memory allocation was about 15.58 GiB; before the run, the containers used roughly 4 GiB in total. This connector was given a 2 GiB limit. These are lab configuration values, not production capacity guarantees or measured peak consumption.

A connector exiting does not mean the worker is finished. In this run, the official connector submitted its work and exited after a few seconds, while the backend continued processing many relationships. Reserve capacity for Elasticsearch, RabbitMQ, the platform, and the worker, and judge progress from the actual job. If your lab lacks memory, adjust resources or schedule a quieter period rather than repeatedly restarting the connector and submitting duplicate work.

Download the configuration and start a one-time import

Complete chapter 2 first and confirm the platform and worker are healthy. Obtain the MITRE Compose override and read-only verifier, placing them in the repository's lab directory without modifying the base Compose file. The first run requires access to Docker Hub for the image and GitHub raw content for the data.

Repository root · Add only the MITRE connector
docker --context colima-opencti-tutorial compose \
  -f lab/compose.yaml -f lab/compose.mitre.yaml \
  up -d --no-deps connector-mitre

docker --context colima-opencti-tutorial compose -f lab/compose.yaml \
  exec -T worker python < lab/mitre-check.py

Replace the Docker context name if you use another context. Compose reuses the lab token, so secrets do not need to appear in command arguments; the verifier reads credentials from the worker's existing environment. This lab used the existing administrator account. Production deployments should first create a dedicated service account with appropriate permissions and a suitable confidence ceiling, then replace the connector token. The lab account is not a least-privilege template.

SettingLab value and rationale
imageopencti/connector-mitre:${OPENCTI_VERSION}; the lab pins 7.261124.0 to match the platform.
CONNECTOR_ID/NAMEUse the independent UUID in the override and the name SecTools Lab MITRE Enterprise ATT&CK 19.1 so the run is easy to identify.
CONNECTOR_RUN_AND_TERMINATEtrue; exit after submitting this run, with restart: no. The platform and worker continue processing queued data.
MITRE_ENTERPRISE_FILE_URLThe enterprise-attack-19.1.json file at a fixed commit; the downloaded override contains the complete URL.
MITRE_MOBILE_ATTACK_FILE_URL/MITRE_ICS_ATTACK_FILE_URL/MITRE_CAPEC_FILE_URLSet each to the string false. This connector version excludes those URLs; this is not an unsupported enterprise_attack=true setting or a platform-wide feature switch.
MITRE_REMOVE_STATEMENT_MARKINGfalse, preserving the source's statement marking.
CONNECTOR_SCOPEKeep the official default. Do not add source types this version does not map simply to increase record counts.

State associated with a fixed connector ID retains last_run. Starting it again in the same environment may not fetch new data until MITRE_INTERVAL has elapsed; this is normal state management. Rerunning the read-only verifier checks existing work without starting a new import. If a forced refresh is needed, confirm the previous job has ended, manage connector state using the official procedure, and record the new run separately. Do not delete the entire platform to repeat an import.

An observed startup problem: automatic service-account creation failed

The first configuration enabled automatic service-account creation, but the local pycti existing_token lookup encountered KeyError: 'name' before connector registration or source download. The workaround disabled that automatic creation step and restarted only the MITRE connector with an already authorized lab account. No official image or package source was modified. This does not establish that every environment has the same problem or recommend administrators for production integrations.

If startup stalls at a similar point, distinguish configuration validation, platform connectivity, account creation, and source retrieval. When a work record exists and processed continues increasing, wait for the worker. If work is complete but errors is nonempty, investigate each error rather than delivering on the strength of a connector ‘successfully run’ log message alone. The full record preserves both the initial failure and the successful later run instead of presenting them as a flawless first startup.

Verify real intelligence: compare job counts, then trace PowerShell to its MITRE source.

The most useful question after import is whether one piece of knowledge can be traced to its source, with source statements distinguished from observations in your own environment. This run compared the complete paginated technique set and uses PowerShell as a sample readers can inspect themselves.

Completed run: 2026-11-29, approximately 14 minutes 44 seconds

The work was created at 12:16:15 UTC and completed at 12:30:59 UTC, shown locally in UTC+8 as 20:16 to 20:30. Its status was complete, expected and processed were both 22,357, and errors was empty. This is a processed-work count, not proof that 22,357 unique new platform objects were created.

Verification layerObserved result
Official source snapshot25,843 STIX objects; 25,528 after filtering revoked entries and their associated relationships.
Official connector work22,357 expected / 22,357 processed / 0 errors. Scope, framework metadata, and processing behavior make this different from the raw source count.
Complete paginated Attack Pattern comparison709 records within the MITRE author scope, matching all 709 source external_id values and names, with no extra technique IDs.
Retained historical entriesThe 709 records include 12 marked x_mitre_deprecated in the source. Not revoked and not deprecated are different conditions.
Relationship readbackT1059.001 subtechnique-of T1059 and FIN10 uses PowerShell were checked for direction, source, and direct relationship status.
Actual output excerpt · FIN10 was checked in a separate focused read-only follow-up
PASS official connector work complete; expected=processed; errors empty
PASS all 709 non-revoked source technique IDs and names read back with MITRE author; pagination complete
PASS PowerShell T1059.001: official MITRE URL, versioned execution tactic, and direct subtechnique-of T1059 relation verified
PASS FIN10 -> PowerShell direct uses relation: exact pinned-source description and both reference name/URL pairs verified
FAILURES []

The complete work ID, source SHA-256, image digest, 709 platform technique IDs, and staged progress are recorded in mitre.txt. The official connector container finished exited with exit code 0 and no OOM. The 2 GiB value is its configured limit, not a measured peak. The MITRE data was written by work submitted through the official connector; the verifier did not create missing knowledge itself.

  1. Find the MITRE connector under Integrations → Deployed.Open Works and verify the run's name, start time, expected, processed, and errors. If the interface presents completion counters in separate fields, compare them with raw work tracking. Connector exit alone does not establish that ingestion is complete.
  2. Search T1059.001 under Techniques → Attack patterns.Open PowerShell and confirm x_mitre_id, its name, and author The MITRE Corporation. Avoid opening a similarly named object created for testing.
  3. Open External references.Find source mitre-attack with external_id = T1059.001 and verify that the link points to the corresponding official MITRE technique page. The verifier compares the URL exactly with the downloaded pinned snapshot.
  4. Check Kill chain phases.Look for execution and recognize the additional versioned tactic name mitre-attack-v19 created by this connector. Source and platform versions are separate: 19.1 is not the OpenCTI version.
  5. Follow subtechnique-of to T1059.PowerShell is a sub-technique of Command and Scripting Interpreter, with direction T1059.001 → T1059. This direct relationship comes from MITRE data and has is_inferred = false. It is not a new relationship derived by the Rules engine discussed in chapter 17.
  6. Compare the entire source-scoped collection.Filter techniques by the MITRE author ID, follow cursors through every page, and compare source external_id values. Checking only the first 100 records is not a complete comparison.
PowerShell technique page showing T1059.001, the MITRE author, Copyright marking, execution, and mitre-attack-v19.Enlarge
PowerShell after import by the official connectorThe external ID, author, and tactics can be checked in the interface. The data comes from the pinned MITRE snapshot. This screenshot verifies imported source data in the UI; it does not show a PowerShell attack detected in the lab.Actual local screenshot · OpenCTI 7.261124.0 · MITRE Enterprise ATT&CK 19.1 · 2026-11-29

Follow a real source relationship and its citations: FIN10 uses PowerShell

In PowerShell's Knowledge view, switch to Intrusion sets and select FIN10's uses relationship. Check that its direction is FIN10 → PowerShell, then read the author and source citations. A separate read-only API check verified the description and the names and URLs of both references against the pinned MITRE file; is_inferred was false. The relationship ID in the API record is adc25da6-9500-42b4-aa5d-ac80e0cd2018. The presence of citations does not mean this project independently rechecked all contents of those two external studies, or that FIN10 interacted with this lab.

OpenCTI relationship details showing FIN10 uses PowerShell, the MITRE author, and source citation text.Enlarge
Reading relationship direction and source togetherThe interface shows the MITRE-imported FIN10 uses PowerShell relationship. The full names and URLs of both references were verified through the focused API check in mitre.txt. This screenshot does not claim the activity occurred locally or that the Rules engine produced an attack determination.Actual local screenshot · OpenCTI 7.261124.0 · MITRE Enterprise ATT&CK 19.1 · 2026-11-29
An ATT&CK technique is not a malicious observable

PowerShell also has legitimate uses. MITRE techniques and relationships involving threat groups do not establish that your domain, host, or organization has been attacked. Connecting them to a local incident requires your own logs, observations, and analysis. This lab does not attach login.example or other fictional domains to real intrusion sets.

The source contains 709 attack-pattern objects that are not revoked, including 12 marked x_mitre_deprecated. The count therefore does not mean ‘709 current techniques still recommended for use.’ The raw file also includes types such as x-mitre-analytic and x-mitre-detection-strategy. A complete technique comparison does not establish that this connector version fully supports every new MITRE type. Raw source count, filtered count, processed-work count, and final technique count describe different stages.

The tested path covers the official connector, queue, worker, and API readback. Separately listed UI screenshots establish only the inspection results they display. Testing does not cover Mobile, ICS, CAPEC, a production least-privilege matrix, or continuous updates across multiple versions. Once this traceable path works, visit SecTools.tw to find another security tool or intelligence source to evaluate using the same method to judge its value to your team.

Before connecting a production source, write an integration handover card.

Suppose your next goal is daily synchronization with a public intelligence source. Do not begin with a one-minute polling interval. Record the source URL, data license, expected update frequency, initial synchronization scope, acceptable delay, and responsible person's contact details. Excessive polling of a daily source consumes quota and creates more opportunities for failure without making its intelligence fresher.

Plan two small tests. First, temporarily stop the connector, confirm existing data remains searchable, and record whether restarting catches up on the interruption. Second, revoke the integration credential on a test account and confirm that failure is explicit and logs do not expose the secret. Run both in an isolated environment, not as an improvised experiment against a production source serving your team.

Agree on stop conditions. If a source starts sending many blank names, update counts grow unexpectedly, or job failure rates keep rising, pause new imports, preserve evidence, and let the responsible person investigate. Do not keep ingesting bad data simply to maintain the appearance of daily updates.

After the handover card is complete, a colleague who did not install the integration should be able to tell whether it is working today, where to investigate a failure, and when to pause it. If they cannot, the missing piece may be an operational process rather than a configuration value.

It looks active, but no data appears?

Reduce the problem to a testable statement: ‘An import work record was created, but the specified object is still missing five minutes later.’ That is more useful than ‘the connector is broken.’ If registration failed, check the URL, token, DNS, and version compatibility. If retrieval failed, check the source account, rate limits, and response format. If work is queued, compare worker state with queue-processing capacity.

Do not reset synchronization state at the first failure. It can trigger a large historical backfill and obscure the original error. Before posting logs to a public issue, remove tokens, internal addresses, and sensitive intelligence while retaining times, versions, error types, and reproduction conditions.

Chapter acceptance check

You should be able to explain one connector's purpose, account, source, and synchronization scope; find a job's processing record; and use a specified object to prove the data is available. Complete this path before connecting a second source.

To keep practicing how to choose and evaluate security tools, read more security articles and tool introductions at SecTools.tw. Understand the problem a tool addresses before deciding to connect it to your environment.

Match the test records to the interface in front of you.

Open Integrations, select SecTools Lab Import STIX, and switch to Works. Identify the correct work name, then compare status, processed counts, and errors. The screenshots preserve real health warnings so that job completion is clearly distinguished from production deployment readiness.

Integrations page showing one connected worker and service-account warnings for two connectors.Enlarge
Integrations and health statusRead queue, worker, and connector execution states separately from health warnings. This isolated lab reuses an administrator identity, producing the ‘User is not a service account’ warning. The limitation remains visible; production integrations should use dedicated service accounts.Actual local screenshot · OpenCTI 7.261124.0 · 2026-11-29
STIX import connector Works page showing Complete, 3 completed operations, and 0 errors.Enlarge
Import job verificationThe 732da3c34214 suffix in the work name matches the raw import record in the verification chapter. Complete, 3/3, and 0 errors are job-level evidence. Read back this run's report and connector-check.example as well to confirm that the data reached the intended area.Actual local screenshot · OpenCTI 7.261124.0 · 2026-11-29
The Exported Files area of a report's Data tab lists a completed STIX JSON file.Enlarge
Report export fileCheck Exported Files in the report's Data tab, then download and inspect the contents. The screenshot retains results from two earlier exports. Other areas are empty because no attachments or drafts were uploaded.Actual local screenshot · OpenCTI 7.261124.0 · 2026-11-29

Import an event from MISP

Follow a fictional event from MISP to OpenCTI. The lab checks how reports, indicators, observables, and TLP are mapped, and verifies distribution filtering, to_ids, and replay. Open the MISP connector lab.

There are other integration routes when no ready-made connector fits.

Start with the official integrations overview and choose an interface based on the receiving system. A table consumer may suit a CSV feed; a STIX exchange system may use a TAXII collection. For timely events, relationships, or deletion synchronization, evaluate live streams. Use GraphQL / PyCTI for precise queries and custom workflows.

Write down the required objects, update interval, and modification/deletion handling before creating a restricted test source. Detailed steps are in the data ingestion chapter and the sharing and automation chapter. Connectivity is only the beginning; verify the scope of data actually received at the destination.

Every step is worth recording

Finished this chapter?

Mark it when you are ready. Opening or scrolling through a chapter does not complete it automatically. You can undo your choice.

View my progress

Progress is saved only in this browser. No account or automatic device sync. Clearing site data also removes progress.

KEEP YOUR CURIOSITY ALIVE

Make sense of intelligence.
Keep exploring real security questions.

Explore incidents, perspectives and tools at SecTools.tw, and find your next question worth investigating.

SecTools.tw

Search the handbook