nl-kat-coordination icon indicating copy to clipboard operation
nl-kat-coordination copied to clipboard

fix first and last seen in (findings)reports by basing them off the OOI, not the finding.

Open underdarknl opened this issue 2 years ago • 4 comments

see https://github.com/minvws/nl-kat-coordination/pull/2154#discussion_r1430533352 Describe the bug Our first and last seen timestamps are not collected on the OOI (or source) but from the finding. As findings are usually created by Bits, they

underdarknl avatar Dec 19 '23 10:12 underdarknl

According to @dekkers in https://github.com/minvws/nl-kat-coordination/pull/2308, we should leave it as is, then we should either add a first seen of ooi and or remove the last seen. What does everyone think?

noamblitz avatar Jan 11 '24 15:01 noamblitz

So, findings are created in one of two ways: Either directly by a boefje/normalizer combi. which means we have a meaningfull first date for the finding, and we could also collect the last run that still showed this finding to be present. Or, they are created from a BIT, which takes a set of OOI's as its input. These all eventually have a first-seen and a last-seen date, but more importantly, the BIT itself has created the finding on a given date (because at that point the combination of inputs led to the BIT creating the FindingOOI. A last-date would then be the last validation time for the sum of all input OOI's for that BIT (which might be a bit complex and recursive if bits have been acting on other bit-created OOI's).

underdarknl avatar Jan 17 '24 15:01 underdarknl

So the first one is correct for all findings created by the Shodan boefje/normalizer. I agree that there we can simply do first seen -> first time shodan returned finding and last seem -> last time shodan returned finding.

For the BITs:

First seen can be: First time input OOI is created First time finding is created

The last seen would make sense in case its the OOI, but in case of the finding, it doesnt, since BITs that create findings usually only run once -> when the SoftwareInstance is created (or when it changes clearence level). In that case, first and last seen will almost always be equal.

noamblitz avatar Jan 17 '24 15:01 noamblitz

We will add four different ways cves are "proven" in KAT and discuss solutions afterward.

noamblitz avatar Feb 13 '24 15:02 noamblitz