Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to import STIX2 with a resolves-to relationship between two observables results in an error #1794

Closed
h1lll0ck opened this issue Dec 23, 2021 · 2 comments
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@h1lll0ck
Copy link

h1lll0ck commented Dec 23, 2021

Description

When trying to import a STIX2 bundle that contains two observables (one domain and one IPv4 address) and a relationship of type resolves-to there is an error relating to the relationship and the relationship is not created.

Perhaps this is currently an intended result, so this might be more of a feature request than a bug report.

Environment

  1. OS (where OpenCTI server runs): Ubuntu 20.04 LTS
  2. OpenCTI version: 5.1.2
  3. OpenCTI client: Web UI
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Create a STIX2 JSON bundle containing two observables and a relationship of type resolves-to between them (see below for an example)
  2. Upload the JSON file via Data Import in the web frontend: /dashboard/import
  3. Import the JSON bundle via the connector ImportFileStix2

Expected Output

Import succeeds and the resolves-to relationship is created between the two observables.

Actual Output

No relationship between the two observables is created.

One error results from the import:

{ "name": "FunctionalError", "message": "Only stix-core-relationship can be created through this method." }

Additional information

Example STIX2 JSON bundle:

{
  "id": "bundle--7a9f86ad-a114-404a-95c9-cc5c21e085d3",
  "objects": [
    {
      "description": "test",
      "id": "x-opencti-simple-observable--6e85bf65-6370-11ec-a769-005056b29af4",
      "key": "IPv4-Addr.value",
      "labels": [
        "test"
      ],
      "object_marking_refs": [
        "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9"
      ],
      "spec_version": "2.1",
      "type": "x-opencti-simple-observable",
      "value": "93.184.216.34"
    },
    {
      "description": "test",
      "id": "x-opencti-simple-observable--6e860765-6370-11ec-b916-005056b29af4",
      "key": "Domain-Name.value",
      "labels": [
        "test"
      ],
      "object_marking_refs": [
        "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9"
      ],
      "spec_version": "2.1",
      "type": "x-opencti-simple-observable",
      "value": "example.com"
    },
    {
      "confidence": 50,
      "created": "2021-12-01T07:35:30.001Z",
      "description": "test",
      "id": "relationship--6e864ebb-6370-11ec-b8bc-005056b29af4",
      "modified": "2021-12-01T23:59:59.000Z",
      "object_marking_refs": [
        "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9"
      ],
      "relationship_type": "resolves-to",
      "source_ref": "x-opencti-simple-observable--6e860765-6370-11ec-b916-005056b29af4",
      "spec_version": "2.1",
      "start_time": "2021-12-01T23:59:59.000Z",
      "stop_time": "2021-12-01T23:59:59.000Z",
      "target_ref": "x-opencti-simple-observable--6e85bf65-6370-11ec-a769-005056b29af4",
      "type": "relationship"
    }
  ],
  "type": "bundle"
}
@SamuelHassine SamuelHassine added the feature use for describing a new feature to develop label Dec 26, 2021
@SamuelHassine SamuelHassine added this to the Release 5.2.0 milestone Dec 26, 2021
@SamuelHassine
Copy link
Member

Hello,

Please for the moment use stix_cyber_observable_relationship which refers to resolves_to_refs.

SRO resolves-to is conflicting with this one in the current OpenCTI implementation, we will fix this in the future.

Kind regards,
Samuel

@h1lll0ck h1lll0ck changed the title Trying to importing STIX2 with a resolves-to relationship between two observables results in an error Trying to import STIX2 with a resolves-to relationship between two observables results in an error Jan 4, 2022
@SamuelHassine
Copy link
Member

resolves-to is now allowed as a STIX Core relationship since version 5.3.5.

@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Sep 29, 2022
@SamuelHassine SamuelHassine removed this from the Release 5.4.0 milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

2 participants