-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[CISA KEV] Fix for updating existing vulnerabilities #3316
base: master
Are you sure you want to change the base?
[CISA KEV] Fix for updating existing vulnerabilities #3316
Conversation
80 and 100 are the same confidence level (1- Confirmed by other sources) but if the score is already at 100 the hardcoded 80 prevents the object being updated. Passing the update=True is also required to update existing vulnerabilities, otherwise this connector has to create the vulnerability and won't update exisiting vulnerabilities.
9818df2
to
0f4b30d
Compare
Note: my employer and I independently tested this fix and it worked to fix our issues! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @security-penguin, thanks for your contribution!
I was not able to reproduce the issue, neither on OCTI 6.4.5 or OCTI 6.5.0 (latest) 🫤
We suppose that the issue you encounter might be due to the confidence policies specific to your OCTI instance. Please find links to the official documentation, I hope it'll help:
https://docs.opencti.io/latest/usage/reliability-confidence/
https://docs.opencti.io/latest/administration/users/
https://filigran.io/fine-tune-your-confidence-level-policy-in-opencti-6-2/
About the PR itself:
confidence
level are now defined by confidence policies in OCTI settings and should/will be removed from STIX objects in connectors (see doc above)send_bundle
'supdate
arg should be removed as it's not used anymore internally (I admit it's very misleading as there's no deprecation warning, sorry about that)
Please let us know if you managed to fix the issue thanks to confidence policies changes, and so if we can close this issue/PR 😇
Feel free to ping us for any help 🙏
Thanks!
@Powlinett thank you for your reply. Unfortunately as other people have replicated this already and said this PR resolves their issue I would guess that your experience is due to my poor explanation of the testing rather than the issue not being present. Your statement on confidence being a problem is part of this multi step issue. There is 2 core issues at play that I called out the specific lines to in the issue so I would as you re-read that and fully walk through the explanation, but at a high level:
So to test please:
I'd kindly ask in future that you add what steps you took to try to reproduce the issue, especially after others has commented that it fixed their issue. This would make it easier to understand where there was a miscommunication and what I may have done wrong in my testing. Clearly in this case my reproduction steps weren't clear enough. |
I can confirm that this PR fixes our issue as we are currently seeing that the CISA KEV connector is not able to update existing Vulnerabilities to modify the CISA KEV value to True because Vulnerability objects are being imported / created by other connectors. We can see some Vulnerabilites are created by the CVE connector, while others may be created by Mandiant connector (which is creating these vulnerabilites to default them with a TLP of Initially I was thinking that maybe the CISA KEV conenctor was not able to update the vulnerabilites due to the TLP level, but it appears to be related to this confidence score and/or by not passing the I can confirm that we have deployed these changes to our environment running 6.4.10 and they are functioning as we would expect. If the "solution" here is to manually adjust every connector's default confidence so that connectors function as intended, this does not seem like a solution since the issue arises in how each of these connectors is suggested to be configured and as @security-penguin has mentioned, it is not possible to adjust this hard coded confidence score within this connector. Here is code in CVE connector that is setting confidence scores that is also hard coded, so you can see how if this sets 100, then CISA connector is now unable to update the Vulnerability. connectors/external-import/cve/src/services/converter/vulnerabilityToStix2.py Lines 102 to 104 in d3ec2fb
Edit: Here is Mandiant in how it is setting confidence: connectors/external-import/mandiant/src/connector/utils.py Lines 100 to 108 in d3ec2fb
Basically this creates a race condition on which connector creates the Vulnerability first... and Mandiant connector should not be taking And then it just seems to be that every connector should just be 100 confidence so that they can update things... so what is the point of the confidence? |
Hi @security-penguin and @animedbz16, thanks for your comments 🙏 You're right thinking that the issue is due to confidence levels and not to the TLP markings, let me precise a bit more:
Please let me know if these explanations are helpful 😊 |
@Powlinett Appreciate your response here as it provides a lot of background of how OpenCTI is leveraging the Since as you also mention that OpenCTI allows for the creation of user accounts to also set This conversation is definitely beyond the scope of this PR, but when looking at the STIX 2.1 documentation,
The issue here seems to primary stem from how the OpenCTI platform is implementing the restriction of not allowing objects to be updated based upon the confidence level. Specifically in this use case, if CISA KEV connector is attempting to update a Vulnerability to maintain the CISA KEV value of True or False, why should it matter what The CISA KEV connector is 100% responsible for maintaining the CISA KEV True / False value, so under what scenario would it matter what CISA KEV is attempting make this update to the Vulnerability: connectors/external-import/cisa-known-exploited-vulnerabilities/src/main.py Lines 153 to 162 in 70fde6f
So its setting several things, but when we look at the STIX 2.1 docs for what is required for Vulnerabilities (https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_q5ytzmajn6re), only the It feels like But here CISA KEV is is mainly needing to set the The It seems that |
Hi @animedbz16 🙂
It matters because one connector could be considered more or less trustworthy than another.
We can set connector's different confidence levels for specific entity types, but we can't set different confidence levels for specific entity fields . As CISA KEV connector is responsible to set
Not only for this purpose, but yes indeed, it prevents trusted data to be replaced by data from less trustworthy source. If 2 connectors have the same confidence level though, the last update will overwrite any previous value.
The main reason behind
But in fact,
Let us know how you want to solve this PR so we can help with the other connectors 😇 |
b513b96
to
11a05bf
Compare
80 and 100 are the same confidence level (1- Confirmed by other sources) but if the score is already at 100 the hardcoded 80 prevents the object being updated.
Passing the update=True is also required to update existing vulnerabilities, otherwise this connector has to create the vulnerability and won't update exisiting vulnerabilities.
Proposed changes
Related issues
Checklist
Further comments