-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][CTI] Add non-ECS Security Solution and CTI mappings (RAC) #101547
Changes from 1 commit
c0f1f07
34abeff
1accd4f
b056a69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const ctiFieldMap = { | ||
'threat.indicator': { | ||
type: 'nested', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.as.number': { | ||
type: 'long', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.as.organization.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.confidence': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.dataset': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.description': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.domain': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.email.address': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.first_seen': { | ||
type: 'date', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.city_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.continent_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.country_iso_code': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.country_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.location': { | ||
type: 'geo_point', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.region_iso_code': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.geo.region_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.ip': { | ||
type: 'ip', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.last_seen': { | ||
type: 'date', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.marking.tlp': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.matched.atomic': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.matched.field': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.matched.type': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.module': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.port': { | ||
type: 'long', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.provider': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.scanner_stats': { | ||
type: 'long', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.sightings': { | ||
type: 'long', | ||
array: false, | ||
required: false, | ||
}, | ||
'threat.indicator.type': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { merge } from 'lodash'; | ||
import { ClusterPutComponentTemplateBody } from '../../../../../rule_registry/common/types'; | ||
import { mappingFromFieldMap } from '../../../../../rule_registry/common/mapping_from_field_map'; | ||
import { ctiFieldMap } from './cti_field_map'; | ||
import { securityFieldMap } from './security_field_map'; | ||
|
||
export const securityComponentTemplate: ClusterPutComponentTemplateBody = { | ||
template: { | ||
settings: { | ||
number_of_shards: 1, | ||
}, | ||
mappings: merge({}, mappingFromFieldMap(ctiFieldMap), mappingFromFieldMap(securityFieldMap)), | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const securityFieldMap = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For posterity: what was the logic used to generate this list of fields? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Answered offline: these are all the fields in the existing signals index that were NOT either:
|
||
'as.number': { | ||
type: 'long', | ||
array: false, | ||
required: false, | ||
}, | ||
'as.organization.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'code_signature.exists': { | ||
type: 'boolean', | ||
array: false, | ||
required: false, | ||
}, | ||
'code_signature.status': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'code_signature.subject_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'code_signature.trusted': { | ||
type: 'boolean', | ||
array: false, | ||
required: false, | ||
}, | ||
'code_signature.valid': { | ||
type: 'boolean', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.city_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.continent_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.country_iso_code': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.country_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.location': { | ||
type: 'geo_point', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.region_iso_code': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'geo.region_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'hash.md5': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'hash.sha1': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'hash.sha256': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'hash.sha512': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'interface.alias': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'interface.id': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'interface.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.family': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.full': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.kernel': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.platform': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'os.version': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'pe.company': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'pe.description': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'pe.file_version': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'pe.original_file_name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'pe.product': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'vlan.id': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
'vlan.name': { | ||
type: 'keyword', | ||
array: false, | ||
required: false, | ||
}, | ||
}; |
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.
We are removing the
as
,geo
, and most other nested fields fromthreat.indicator
as per the current RFC.If these mappings will be used in 7.14, the current implementation makes sense. If these aren't going to be in effect until 7.15, we should strive to use the fields as presented in the RFC.