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

Report export to STIX2 brings start_time == stop_time for relations #8575

Closed
andurin opened this issue Oct 2, 2024 · 6 comments
Closed

Report export to STIX2 brings start_time == stop_time for relations #8575

andurin opened this issue Oct 2, 2024 · 6 comments
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@andurin
Copy link

andurin commented Oct 2, 2024

Description

While finished a report in OCTI I wanted to export the report to JSON(STIX) to import that manually into a MISP Instance.
MISP importer complained about start_time == stop_time values which could be found in the generated relations.

Environment

  1. OS (where OpenCTI server runs): Debian 11
  2. OpenCTI version: OpenCTI 6.3.3
  3. OpenCTI client: None used
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Browser: /dashboard/analyses/reports
  2. Choose a report which already has some relations
  3. Export that report:
  • Export format: application/json
  • Export Type: Full Export
  1. Download the report
  2. Open in favorite editor
  3. Search for "stop_time", find a relation object and compare with start_time

Expected Output

start_time != stop_time

Actual Output

start_time == stop_time

Additional information

Based on this it may be easy to just add an extra second or either microsecond to the stop_time.

OpenCTI-Platform/connectors@a7d6a3a

@andurin andurin added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Oct 2, 2024
@nino-filigran
Copy link

@andurin indeed, I noticed this behavior but not sure it's an export problem however.
Indeed, by default, start time and stop time are populated with the same values, which then causes the bug when exporting and importing to MISP.

@nino-filigran nino-filigran added needs more info Intel needed about the use case and removed needs triage use to identify issue needing triage from Filigran Product team labels Oct 3, 2024
@nino-filigran
Copy link

The fix is therefore for us to have at least 1s of difference between two dates on our side, when creating a relation.

@nino-filigran nino-filigran removed the needs more info Intel needed about the use case label Oct 3, 2024
@nino-filigran nino-filigran added this to the Bugs backlog milestone Oct 3, 2024
@andurin
Copy link
Author

andurin commented Oct 3, 2024 via email

@nino-filigran
Copy link

@andurin I'm not sure it will be in the next release: we have quite some high-priority bugs that also require our attention. We'll prioritize this bug in the top part of the bucket, but can't promise anything regarding when it will be fixed.

The "milestone" will be updated once the bug will be fixed, allowing you to know when the fix will be released.

@marieflorescontact marieflorescontact self-assigned this Oct 23, 2024
@marieflorescontact
Copy link
Member

@nino-filigran : start_time and stop_time have same value because relationship creation form is sent with default values.

Capture d'écran 2024-10-23 141406

We need to decide if the form should be send :

  • with differents start_time and stop_time default values
  • without default values as it is done in Cases

Check must be added to verify that start_time and stop_time are different

@nino-filigran
Copy link

@marieflorescontact I spoke internally with product team and we decided to always have a date at the creation of a relationship. This means the fix should consists in:

  • Add a start & stop time when creating a relationship in knowledge views and in investigations to ensure that we have the same behavior accross the platform
  • Ensure that the Start time differs from the stop time every time, by making start time =now-1sec and stop time = now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected 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

4 participants