-
Notifications
You must be signed in to change notification settings - Fork 458
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 intelligence] logs-ti_abusech_latest.dest_threatfox-1 missing event.module field -> Threat Intel IP Match rule not working #10032
Comments
PS: using 8.13.4 on Elastic Cloud |
cc @elastic/security-threat-intelligence cc @elastic/threat-research-and-detection-engineering |
I was able to replicate this behaviour ( i.e., missing The destination index field Mapping difference between source-index and destination-index showed some fields missing from destination indices:
Note that, while
@jsoriano / @andrewkroh Do you think transform is dropping these fields because it doesn't query source index's runtime fields? Is there anyway to mitigate this? I think one way to temporarily fix this is to create a pipeline (adding |
It's reading the _source which doesn't include the static constant_keyword fields that are only present in the mapping. So it's not dropping them, instead it never saw them.
I think you have done the correct thing which is to define the same constant_keyword mappings within the template for the transform index. But when I look at the |
If I move these fields from base-fields.yml to fields.yml I get a different template. For transforms, it seems like there is some lack of merging between fields in different files. diff <(cat ~/Downloads/ti_abusech_mappings_orig.json | flatten-json) <(cat ~/Downloads/ti_abusech_mappings.json | flatten-json)
54,64c54,57
< .properties.event.properties.category.ignore_above = 1024
< .properties.event.properties.category.type = "keyword"
< .properties.event.properties.created.type = "date"
< .properties.event.properties.ingested.type = "date"
< .properties.event.properties.kind.ignore_above = 1024
< .properties.event.properties.kind.type = "keyword"
< .properties.event.properties.original.doc_values = false
< .properties.event.properties.original.index = false
< .properties.event.properties.original.type = "keyword"
< .properties.event.properties.type.ignore_above = 1024
< .properties.event.properties.type.type = "keyword"
---
> .properties.event.properties.dataset.type = "constant_keyword"
> .properties.event.properties.dataset.value = "ti_abusech.threatfox"
> .properties.event.properties.module.type = "constant_keyword"
> .properties.event.properties.module.value = "ti_abusech"
110,168c103,106
< .properties.threat.properties.indicator.properties.confidence.ignore_above = 1024
< .properties.threat.properties.indicator.properties.confidence.type = "keyword"
< .properties.threat.properties.indicator.properties.description.ignore_above = 1024
< .properties.threat.properties.indicator.properties.description.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.elf.properties.telfhash.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.elf.properties.telfhash.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.extension.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.extension.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.md5.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.md5.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha1.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha1.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha256.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha256.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha384.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.sha384.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.ssdeep.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.ssdeep.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.tlsh.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.hash.properties.tlsh.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.mime_type.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.mime_type.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.name.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.name.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.pe.properties.imphash.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.pe.properties.imphash.type = "keyword"
< .properties.threat.properties.indicator.properties.file.properties.size.type = "long"
< .properties.threat.properties.indicator.properties.file.properties.type.ignore_above = 1024
< .properties.threat.properties.indicator.properties.file.properties.type.type = "keyword"
< .properties.threat.properties.indicator.properties.first_seen.type = "date"
< .properties.threat.properties.indicator.properties.ip.type = "ip"
< .properties.threat.properties.indicator.properties.last_seen.type = "date"
< .properties.threat.properties.indicator.properties.name.ignore_above = 1024
< .properties.threat.properties.indicator.properties.name.type = "keyword"
< .properties.threat.properties.indicator.properties.port.type = "long"
< .properties.threat.properties.indicator.properties.provider.ignore_above = 1024
< .properties.threat.properties.indicator.properties.provider.type = "keyword"
< .properties.threat.properties.indicator.properties.reference.ignore_above = 1024
< .properties.threat.properties.indicator.properties.reference.type = "keyword"
< .properties.threat.properties.indicator.properties.type.ignore_above = 1024
< .properties.threat.properties.indicator.properties.type.type = "keyword"
< .properties.threat.properties.indicator.properties.url.properties.domain.ignore_above = 1024
< .properties.threat.properties.indicator.properties.url.properties.domain.type = "keyword"
< .properties.threat.properties.indicator.properties.url.properties.extension.ignore_above = 1024
< .properties.threat.properties.indicator.properties.url.properties.extension.type = "keyword"
< .properties.threat.properties.indicator.properties.url.properties.original.fields.text.type = "match_only_text"
< .properties.threat.properties.indicator.properties.url.properties.original.ignore_above = 1024
< .properties.threat.properties.indicator.properties.url.properties.original.type = "wildcard"
< .properties.threat.properties.indicator.properties.url.properties.path.ignore_above = 1024
< .properties.threat.properties.indicator.properties.url.properties.path.type = "wildcard"
< .properties.threat.properties.indicator.properties.url.properties.port.type = "long"
< .properties.threat.properties.indicator.properties.url.properties.scheme.ignore_above = 1024
< .properties.threat.properties.indicator.properties.url.properties.scheme.type = "keyword"
< .properties.threat.properties.software.properties.alias.ignore_above = 1024
< .properties.threat.properties.software.properties.alias.type = "keyword"
< .properties.threat.properties.software.properties.name.ignore_above = 1024
< .properties.threat.properties.software.properties.name.type = "keyword"
< .properties.threat.properties.software.properties.reference.ignore_above = 1024
< .properties.threat.properties.software.properties.reference.type = "keyword"
---
> .properties.threat.properties.feed.properties.dashboard_id.type = "constant_keyword"
> .properties.threat.properties.feed.properties.dashboard_id.value = "ti_abusech-c0d8d1f0-3b20-11ec-ae50-2fdf1e96c6a6"
> .properties.threat.properties.feed.properties.name.type = "constant_keyword"
> .properties.threat.properties.feed.properties.name.value = "AbuseCH Threat Fox" |
Thats what seems to be happening here. The issue is with how the field mappings are built for the transform. It is fixed in elastic/kibana#177608 which aims at For AbuseCH, this would mean moving all the 4 fields |
Fixed by #10049 Also another bug was identified in |
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Description
Abuse CH threat intel integration (2.0.0) is pulling ip addresses ioc in the data stream logs_ti-abusech.threatfox-default indice
The transform logs-ti_abusech.latest_threatfox-default-0.1.0 is pulling from there the iocs and send them in a destination index named logs-ti_abusech_latest.dest_threatfox-1.
But in this index the field
event.module
is missing and its missing because it's not in the mappingsProblem
the Threat Intel IP Match rule is looking in logs_ti-* with the following query :
@timestamp >= "now-30d/d" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:"true"
and event.category:"threat" and event.kind:"enrichment" and event.type:"indicator"As a result, since event.module is missing in the index, no match will be ever done for ip iocs coming from abuse ch threatfox
Same issues for other transforms below. The event.module field is missing in dest indexes and all Threat Intel * Math rules cannot trigger any alerts
Many thanks for the correction
The text was updated successfully, but these errors were encountered: