-
Notifications
You must be signed in to change notification settings - Fork 453
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
[ti_misp] Wrong timestamp cause no events fetched from MISP #8554
Comments
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
Same finding as me in https://discuss.elastic.co/t/bug-threatintel-misp-plugin-runs-in-endless-loop/344798/2 |
@kowalczyk-p @htioekb for troubleshooting purposes, what version(s) of MISP are you using the integration alongside? |
@ebeahan I'm using 2.4.173. |
@ebeahan I'm using 2.4.178. The bug reported in MISP/MISP#9359 is fixed in more recent versions only. |
@kowalczyk-p @htioekb Thanks for the reports! There are several issues. I'll try to fix them here first, in the MISP integration. Then I'll try to apply those and some earlier changes to the Filebeat Threat Intel module's These reports refer to the data from @kowalczyk-p's Issue: No events, timestamp is nowSeveral changes between v1.10.1 and v1.27.0 may affect the observed behavior, especially:
Looking at the current logic I can see the following problem, which matches the observed behavior: FIX 1: Initialize the timestamp parameter once only. If response data doesn't provide a timestamp value for the next request, the last request's timestamp value should be reused. @htioekb's Issue: Endless loopObservation: an endless loop that generates a lot of data, which may have been triggered by an event with a lot of attributes, and which was stopped by removing the split logic. An exact explanation of this is unclear, but there are several issues that may played a role. The pagination logic in the Threat Intel module wasn't kept up with fixes in the MISP integration, so that may have contributed to some different behavior. Sort order is not requested. When requested it was not applied, until fixed in MISP v2.4.179. From what I could see in the code of MISP itself, no default order is applied unless one is explicitly set. Under certain conditions, this would be enough to cause an infinite loop over a section of data. FIX 2: Set the Revisiting the same data multiple times should not cause multiple copies of the same document to be indexed, since each event document has the
MISP's bug Events restSearch API does not filter out events that has same timestamp value as filter ( The observed behavior may have been related to a problem handling the large amount of data generated by an event with so many attributes (27759 attributes and 3863 objects). Disabling the split logic may reduce such a problem. I think we should revisit a potential problem with processing large events if that is observed again after fixing the other issues. |
@kowalczyk-p @htioekb I've fixed several pagination bugs in #9073. That includes the two fixes described above (the third fix isn't necessary since we have another de-duplication mechanism for the This issue will close when that PR is merged. If there are remaining issues, either handing large data or other cases, let's handle them in a new issue. |
I'm struggling with MISP integration to ElasticAgent, it worked in integration version 1.10.1 but in version 1.27.0 there are no events or attributes I enabled request tracing and found this:
I think the problem is value of timestamp filter: 1700572607 which is "Tue 21 November 2023 13:16:47 UTC" and this is exactly same time as log timestamp "2023-11-21T14:16:47.068+0100".
As per MISP/MISP#6803
timestamp filter should have value of last api query minus of some look-back time.
The text was updated successfully, but these errors were encountered: