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

threat.indicator.first_seen ECS Field Coming as a Keyword on Kibana #1618

Open
mohitjha-elastic opened this issue Dec 29, 2023 · 5 comments
Open
Labels
bug Something isn't working

Comments

@mohitjha-elastic
Copy link

mohitjha-elastic commented Dec 29, 2023

threat.indicator.first_seen is coming as a keyword on kibana. Its type is mentioned as a date in the ECS documentation- https://www.elastic.co/guide/en/ecs/current/ecs-threat.html#field-threat-indicator-first-seen

Tried the following ways:

  1. Parsing the threat.indicator.first_seen field using the date processor.
  2. Using set processor to set the parsed date field to the threat.indicator.first seen

Using both the above ways, we are getting threat.indicator.first_seen as a keyword on kibana.

We have also observed the same behavior in threat.indicator.last_seen and threat.indicator.modified_at. They are also coming as keyword on the kibana.

Please find the attached screenshots for the same:

image (4)

@mohitjha-elastic mohitjha-elastic added the bug Something isn't working label Dec 29, 2023
@andrewkroh
Copy link
Member

This isn't a problem with ECS AFAICT. I think the problem is that your index template for that data stream is missing a mapping for the those fields and they are defaulting to keyword.

@brett-fitz
Copy link

brett-fitz commented Jan 4, 2024

As @andrewkroh noted this isn't a problem with the ECS artifact but to double check that your index template includes the required threat field mappings and your index template is being applied to the backing datastream/indice (hint: check priority of your index template). If this is not the case then elasticsearch will default to dynamic mapping.

However, @mohitjha-elastic looks like you are using the Crowdstrike threat intel integration from elastic, this doesn't seem to include the threat fields for falcon or fdr? This could likely be the issue and an issue ticket for that repo may be more applicable.

@mohitjha-elastic
Copy link
Author

@andrewkroh @brett-fitz
We have been facing this issue while developing the ti_crowdstrike integration for which we have already raised the PR in the integration repo.
We are using the import_mapping: true to dynamically map all the ECS fields according to their types.

As you can see here, we have used the date processor for parsing the created_on field and then used the set processor so it must set the threat.indicator.first_seen with the type date but it's coming as a keyword on kibana (Attached image for the same in the issue description).

Please let us know if you need anything more from our side.

@brett-fitz
Copy link

@mohitjha-elastic Unfortunately I haven't had any experience with the dynamic ECS mapping process but @P1llus would likely be a great resource here.

REF: elastic/integrations#5055

@andrewkroh andrewkroh transferred this issue from elastic/ecs Jan 9, 2024
@andrewkroh
Copy link
Member

I'm transferring this issue from elastic/ecs to elastic/elastic-package because I believe the problem is that when import_mappings is used that the included dynamic mappings may not include a mapping rule for {first,last}_seen and modified_at.

Relates to https://github.com/elastic/elastic-package/blob/85d6fcacad736e543e459a044a5e0fa48b5d43c6/internal/builder/_static/ecs_mappings.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants