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

MITRE TAXII server doesn't support 2.1, but 2.0. #12

Closed
Cyb3rWard0g opened this issue Apr 3, 2020 · 0 comments
Closed

MITRE TAXII server doesn't support 2.1, but 2.0. #12

Cyb3rWard0g opened this issue Apr 3, 2020 · 0 comments

Comments

@Cyb3rWard0g
Copy link
Collaborator

Yesterday a new version of taxii2-client (oasis-open / cti-taxii-client) was released (version 2.0.0) and this results in an error in attackcti:

Traceback (most recent call last):
File "/Users/ruben/vscode-projects/vscode-attackcti/testit.py", line 4, in
mitre = attack_client()
File "/Users/ruben/vscode-projects/venv-attackcti/lib/python3.8/site-packages/attackcti-0.3.1-py3.8.egg/attackcti/attack_api.py", line 46, in init
File "/Users/ruben/vscode-projects/venv-attackcti/lib/python3.8/site-packages/stix2-1.3.1-py3.8.egg/stix2/datastore/taxii.py", line 164, in init
raise DataSourceError(
stix2.datastore.DataSourceError: The underlying TAXII Collection resource defined in the supplied
Ruben Bouman:
TAXII Collection object provided could not be reached. Recieved error: "406 Client Error: Not Acceptable for url: https://cti-taxii.mitre.org/stix/collections/95ecc380-afe9-11e4-9b6c-751b66dd541e/"

I've investigated the issue and it's because taxii2-client now load TAXII 2.1 classes by default. And the MITRE TAXII server doesn't support 2.1, but 2.0.
When having taxtii2client already installed, there's no problem. But when you install attackcti in a fresh clean environment, taxii2-client==2.0.0 will be installed as dependency.
In my opinion there are two solutions:

  • Import the 2.0 Collection class in attack_api.py: from taxii2client.v20 import Collection (line 14). This is also mentioned in the release page of taxii2-client: https://github.com/oasis-open/cti-taxii-client/releases
  • Somehow make sure when attackcti is installed on a system, that taxii2-client==1.0.1 is installed instead of 2.0.0. I'm not sure how this works and if it's possible.
    I've tested the first bullet and that's working. Please let me know how what your opinion is and how we can try to tackle this the best way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant