replace kbn/ecs with official npm package holding ecs schema (#176128)

## Summary

This PR replaces kbn/ecs package with the official ecs typescript defs
available on npm https://www.npmjs.com/package/@elastic/ecs

The idea here is to be able to update and maintain ecs type defs
independently, and in a transparent way.

ECS version used in kibana currently is 8.10.0, and after this PR is
merged I will generate current version typings & file another PR to
update the kibana dependency,

The `alpha` suffix will be removed once this new flow of ecs management
stabilizes.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Luke G 2024-02-13 22:03:30 +01:00 committed by GitHub
parent 06d4b3e246
commit b5e1ef0740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
127 changed files with 428 additions and 71675 deletions

2
.github/CODEOWNERS vendored
View file

@ -353,7 +353,6 @@ packages/kbn-doc-links @elastic/docs
packages/kbn-docs-utils @elastic/kibana-operations
packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery
packages/kbn-ebt-tools @elastic/kibana-core
packages/kbn-ecs @elastic/kibana-core @elastic/security-threat-hunting-investigations
x-pack/packages/security-solution/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
packages/kbn-elastic-agent-utils @elastic/obs-ux-logs-team
@ -1501,7 +1500,6 @@ x-pack/test/security_solution_api_integration/test_suites/entity_analytics @elas
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics @elastic/security-entity-analytics
x-pack/plugins/security_solution/public/flyout/entity_details @elastic/security-entity-analytics
x-pack/plugins/security_solution/common/api/entity_analytics @elastic/security-entity-analytics
x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score @elastic/security-entity-analytics
## Security Solution sub teams - GenAI
x-pack/test/security_solution_api_integration/test_suites/genai @elastic/security-generative-ai

View file

@ -103,6 +103,7 @@
"@elastic/apm-rum-react": "^2.0.2",
"@elastic/charts": "63.1.0",
"@elastic/datemath": "5.0.3",
"@elastic/ecs": "^8.11.1",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.9.1-canary.1",
"@elastic/ems-client": "8.5.1",
"@elastic/eui": "93.0.0",
@ -400,7 +401,6 @@
"@kbn/doc-links": "link:packages/kbn-doc-links",
"@kbn/dom-drag-drop": "link:packages/kbn-dom-drag-drop",
"@kbn/ebt-tools": "link:packages/kbn-ebt-tools",
"@kbn/ecs": "link:packages/kbn-ecs",
"@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard",
"@kbn/ecs-data-quality-dashboard-plugin": "link:x-pack/plugins/ecs_data_quality_dashboard",
"@kbn/elastic-agent-utils": "link:packages/kbn-elastic-agent-utils",

View file

@ -16,7 +16,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 1`] = `
Object {
"@timestamp": "2012-01-30T22:33:22.011-05:00",
"ecs": Object {
"version": "8.6.1",
"version": "8.11.0",
},
"log": Object {
"level": "TRACE",
@ -34,7 +34,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 2`] = `
Object {
"@timestamp": "2012-01-30T17:33:22.011-05:00",
"ecs": Object {
"version": "8.6.1",
"version": "8.11.0",
},
"log": Object {
"level": "INFO",
@ -53,7 +53,7 @@ exports[`asLoggerFactory() only allows to create new loggers. 3`] = `
Object {
"@timestamp": "2012-01-30T12:33:22.011-05:00",
"ecs": Object {
"version": "8.6.1",
"version": "8.11.0",
},
"log": Object {
"level": "FATAL",
@ -71,7 +71,7 @@ exports[`flushes memory buffer logger and switches to real logger once config is
Object {
"@timestamp": "2012-02-01T09:33:22.011-05:00",
"ecs": Object {
"version": "8.6.1",
"version": "8.11.0",
},
"log": Object {
"level": "INFO",
@ -90,7 +90,7 @@ exports[`flushes memory buffer logger and switches to real logger once config is
Object {
"@timestamp": "2012-01-31T23:33:22.011-05:00",
"ecs": Object {
"version": "8.6.1",
"version": "8.11.0",
},
"log": Object {
"level": "INFO",

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { LogLevel, LogRecord } from '@kbn/logging';
import { JsonLayout } from './json_layout';

View file

@ -9,7 +9,7 @@
import moment from 'moment-timezone';
import { merge } from '@kbn/std';
import { schema } from '@kbn/config-schema';
import { Ecs, EcsVersion } from '@kbn/ecs';
import { Ecs, EcsVersion } from '@elastic/ecs';
import { LogRecord, Layout } from '@kbn/logging';
const { literal, object } = schema;

View file

@ -17,7 +17,7 @@ import { createWriteStream } from 'fs';
const mockCreateWriteStream = createWriteStream as unknown as jest.Mock<typeof createWriteStream>;
import { LoggingSystem, config } from '..';
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { unsafeConsole } from '@kbn/security-hardening';
let system: LoggingSystem;

View file

@ -21,7 +21,6 @@
"@kbn/std",
"@kbn/utility-types-jest",
"@kbn/utility-types",
"@kbn/ecs",
"@kbn/security-hardening",
],
"exclude": [

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { EcsFlat } from '@kbn/ecs';
import { EcsFlat } from '@elastic/ecs';
import { EcsMetadata, FieldMap } from './types';
const EXCLUDED_TYPES = ['constant_keyword'];

View file

@ -159,6 +159,7 @@ const EcsOptional = rt.partial({
'container.network.egress.bytes': schemaStringOrNumber,
'container.network.ingress.bytes': schemaStringOrNumber,
'container.runtime': schemaString,
'container.security_context.privileged': schemaBoolean,
'destination.address': schemaString,
'destination.as.number': schemaStringOrNumber,
'destination.as.organization.name': schemaString,
@ -220,10 +221,28 @@ const EcsOptional = rt.partial({
'dll.pe.company': schemaString,
'dll.pe.description': schemaString,
'dll.pe.file_version': schemaString,
'dll.pe.go_import_hash': schemaString,
'dll.pe.go_imports': schemaUnknown,
'dll.pe.go_imports_names_entropy': schemaStringOrNumber,
'dll.pe.go_imports_names_var_entropy': schemaStringOrNumber,
'dll.pe.go_stripped': schemaBoolean,
'dll.pe.imphash': schemaString,
'dll.pe.import_hash': schemaString,
'dll.pe.imports': schemaUnknownArray,
'dll.pe.imports_names_entropy': schemaStringOrNumber,
'dll.pe.imports_names_var_entropy': schemaStringOrNumber,
'dll.pe.original_file_name': schemaString,
'dll.pe.pehash': schemaString,
'dll.pe.product': schemaString,
'dll.pe.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'dns.answers': rt.array(
rt.partial({
class: schemaString,
@ -331,6 +350,11 @@ const EcsOptional = rt.partial({
'file.elf.cpu_type': schemaString,
'file.elf.creation_date': schemaDate,
'file.elf.exports': schemaUnknownArray,
'file.elf.go_import_hash': schemaString,
'file.elf.go_imports': schemaUnknown,
'file.elf.go_imports_names_entropy': schemaStringOrNumber,
'file.elf.go_imports_names_var_entropy': schemaStringOrNumber,
'file.elf.go_stripped': schemaBoolean,
'file.elf.header.abi_version': schemaString,
'file.elf.header.class': schemaString,
'file.elf.header.data': schemaString,
@ -339,7 +363,10 @@ const EcsOptional = rt.partial({
'file.elf.header.os_abi': schemaString,
'file.elf.header.type': schemaString,
'file.elf.header.version': schemaString,
'file.elf.import_hash': schemaString,
'file.elf.imports': schemaUnknownArray,
'file.elf.imports_names_entropy': schemaStringOrNumber,
'file.elf.imports_names_var_entropy': schemaStringOrNumber,
'file.elf.sections': rt.array(
rt.partial({
chi2: schemaStringOrNumber,
@ -349,6 +376,7 @@ const EcsOptional = rt.partial({
physical_offset: schemaString,
physical_size: schemaStringOrNumber,
type: schemaString,
var_entropy: schemaStringOrNumber,
virtual_address: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
@ -373,6 +401,25 @@ const EcsOptional = rt.partial({
'file.hash.ssdeep': schemaString,
'file.hash.tlsh': schemaString,
'file.inode': schemaString,
'file.macho.go_import_hash': schemaString,
'file.macho.go_imports': schemaUnknown,
'file.macho.go_imports_names_entropy': schemaStringOrNumber,
'file.macho.go_imports_names_var_entropy': schemaStringOrNumber,
'file.macho.go_stripped': schemaBoolean,
'file.macho.import_hash': schemaString,
'file.macho.imports': schemaUnknownArray,
'file.macho.imports_names_entropy': schemaStringOrNumber,
'file.macho.imports_names_var_entropy': schemaStringOrNumber,
'file.macho.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'file.macho.symhash': schemaString,
'file.mime_type': schemaString,
'file.mode': schemaString,
'file.mtime': schemaDate,
@ -383,10 +430,28 @@ const EcsOptional = rt.partial({
'file.pe.company': schemaString,
'file.pe.description': schemaString,
'file.pe.file_version': schemaString,
'file.pe.go_import_hash': schemaString,
'file.pe.go_imports': schemaUnknown,
'file.pe.go_imports_names_entropy': schemaStringOrNumber,
'file.pe.go_imports_names_var_entropy': schemaStringOrNumber,
'file.pe.go_stripped': schemaBoolean,
'file.pe.imphash': schemaString,
'file.pe.import_hash': schemaString,
'file.pe.imports': schemaUnknownArray,
'file.pe.imports_names_entropy': schemaStringOrNumber,
'file.pe.imports_names_var_entropy': schemaStringOrNumber,
'file.pe.original_file_name': schemaString,
'file.pe.pehash': schemaString,
'file.pe.product': schemaString,
'file.pe.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'file.size': schemaStringOrNumber,
'file.target_path': schemaString,
'file.type': schemaString,
@ -532,8 +597,10 @@ const EcsOptional = rt.partial({
'orchestrator.cluster.version': schemaString,
'orchestrator.namespace': schemaString,
'orchestrator.organization': schemaString,
'orchestrator.resource.annotation': schemaStringArray,
'orchestrator.resource.id': schemaString,
'orchestrator.resource.ip': schemaStringArray,
'orchestrator.resource.label': schemaStringArray,
'orchestrator.resource.name': schemaString,
'orchestrator.resource.parent.type': schemaString,
'orchestrator.resource.type': schemaString,
@ -570,6 +637,11 @@ const EcsOptional = rt.partial({
'process.elf.cpu_type': schemaString,
'process.elf.creation_date': schemaDate,
'process.elf.exports': schemaUnknownArray,
'process.elf.go_import_hash': schemaString,
'process.elf.go_imports': schemaUnknown,
'process.elf.go_imports_names_entropy': schemaStringOrNumber,
'process.elf.go_imports_names_var_entropy': schemaStringOrNumber,
'process.elf.go_stripped': schemaBoolean,
'process.elf.header.abi_version': schemaString,
'process.elf.header.class': schemaString,
'process.elf.header.data': schemaString,
@ -578,7 +650,10 @@ const EcsOptional = rt.partial({
'process.elf.header.os_abi': schemaString,
'process.elf.header.type': schemaString,
'process.elf.header.version': schemaString,
'process.elf.import_hash': schemaString,
'process.elf.imports': schemaUnknownArray,
'process.elf.imports_names_entropy': schemaStringOrNumber,
'process.elf.imports_names_var_entropy': schemaStringOrNumber,
'process.elf.sections': rt.array(
rt.partial({
chi2: schemaStringOrNumber,
@ -588,6 +663,7 @@ const EcsOptional = rt.partial({
physical_offset: schemaString,
physical_size: schemaStringOrNumber,
type: schemaString,
var_entropy: schemaStringOrNumber,
virtual_address: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
@ -621,7 +697,9 @@ const EcsOptional = rt.partial({
'process.entry_leader.parent.session_leader.entity_id': schemaString,
'process.entry_leader.parent.session_leader.pid': schemaStringOrNumber,
'process.entry_leader.parent.session_leader.start': schemaDate,
'process.entry_leader.parent.session_leader.vpid': schemaStringOrNumber,
'process.entry_leader.parent.start': schemaDate,
'process.entry_leader.parent.vpid': schemaStringOrNumber,
'process.entry_leader.pid': schemaStringOrNumber,
'process.entry_leader.real_group.id': schemaString,
'process.entry_leader.real_group.name': schemaString,
@ -638,6 +716,7 @@ const EcsOptional = rt.partial({
'process.entry_leader.tty': schemaUnknown,
'process.entry_leader.user.id': schemaString,
'process.entry_leader.user.name': schemaString,
'process.entry_leader.vpid': schemaStringOrNumber,
'process.entry_leader.working_directory': schemaString,
'process.env_vars': schemaStringArray,
'process.executable': schemaString,
@ -667,6 +746,7 @@ const EcsOptional = rt.partial({
'process.group_leader.tty': schemaUnknown,
'process.group_leader.user.id': schemaString,
'process.group_leader.user.name': schemaString,
'process.group_leader.vpid': schemaStringOrNumber,
'process.group_leader.working_directory': schemaString,
'process.hash.md5': schemaString,
'process.hash.sha1': schemaString,
@ -677,6 +757,25 @@ const EcsOptional = rt.partial({
'process.hash.tlsh': schemaString,
'process.interactive': schemaBoolean,
'process.io': schemaUnknown,
'process.macho.go_import_hash': schemaString,
'process.macho.go_imports': schemaUnknown,
'process.macho.go_imports_names_entropy': schemaStringOrNumber,
'process.macho.go_imports_names_var_entropy': schemaStringOrNumber,
'process.macho.go_stripped': schemaBoolean,
'process.macho.import_hash': schemaString,
'process.macho.imports': schemaUnknownArray,
'process.macho.imports_names_entropy': schemaStringOrNumber,
'process.macho.imports_names_var_entropy': schemaStringOrNumber,
'process.macho.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'process.macho.symhash': schemaString,
'process.name': schemaString,
'process.parent.args': schemaStringArray,
'process.parent.args_count': schemaStringOrNumber,
@ -695,6 +794,11 @@ const EcsOptional = rt.partial({
'process.parent.elf.cpu_type': schemaString,
'process.parent.elf.creation_date': schemaDate,
'process.parent.elf.exports': schemaUnknownArray,
'process.parent.elf.go_import_hash': schemaString,
'process.parent.elf.go_imports': schemaUnknown,
'process.parent.elf.go_imports_names_entropy': schemaStringOrNumber,
'process.parent.elf.go_imports_names_var_entropy': schemaStringOrNumber,
'process.parent.elf.go_stripped': schemaBoolean,
'process.parent.elf.header.abi_version': schemaString,
'process.parent.elf.header.class': schemaString,
'process.parent.elf.header.data': schemaString,
@ -703,7 +807,10 @@ const EcsOptional = rt.partial({
'process.parent.elf.header.os_abi': schemaString,
'process.parent.elf.header.type': schemaString,
'process.parent.elf.header.version': schemaString,
'process.parent.elf.import_hash': schemaString,
'process.parent.elf.imports': schemaUnknownArray,
'process.parent.elf.imports_names_entropy': schemaStringOrNumber,
'process.parent.elf.imports_names_var_entropy': schemaStringOrNumber,
'process.parent.elf.sections': rt.array(
rt.partial({
chi2: schemaStringOrNumber,
@ -713,6 +820,7 @@ const EcsOptional = rt.partial({
physical_offset: schemaString,
physical_size: schemaStringOrNumber,
type: schemaString,
var_entropy: schemaStringOrNumber,
virtual_address: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
@ -734,6 +842,7 @@ const EcsOptional = rt.partial({
'process.parent.group_leader.entity_id': schemaString,
'process.parent.group_leader.pid': schemaStringOrNumber,
'process.parent.group_leader.start': schemaDate,
'process.parent.group_leader.vpid': schemaStringOrNumber,
'process.parent.hash.md5': schemaString,
'process.parent.hash.sha1': schemaString,
'process.parent.hash.sha256': schemaString,
@ -742,15 +851,52 @@ const EcsOptional = rt.partial({
'process.parent.hash.ssdeep': schemaString,
'process.parent.hash.tlsh': schemaString,
'process.parent.interactive': schemaBoolean,
'process.parent.macho.go_import_hash': schemaString,
'process.parent.macho.go_imports': schemaUnknown,
'process.parent.macho.go_imports_names_entropy': schemaStringOrNumber,
'process.parent.macho.go_imports_names_var_entropy': schemaStringOrNumber,
'process.parent.macho.go_stripped': schemaBoolean,
'process.parent.macho.import_hash': schemaString,
'process.parent.macho.imports': schemaUnknownArray,
'process.parent.macho.imports_names_entropy': schemaStringOrNumber,
'process.parent.macho.imports_names_var_entropy': schemaStringOrNumber,
'process.parent.macho.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'process.parent.macho.symhash': schemaString,
'process.parent.name': schemaString,
'process.parent.pe.architecture': schemaString,
'process.parent.pe.company': schemaString,
'process.parent.pe.description': schemaString,
'process.parent.pe.file_version': schemaString,
'process.parent.pe.go_import_hash': schemaString,
'process.parent.pe.go_imports': schemaUnknown,
'process.parent.pe.go_imports_names_entropy': schemaStringOrNumber,
'process.parent.pe.go_imports_names_var_entropy': schemaStringOrNumber,
'process.parent.pe.go_stripped': schemaBoolean,
'process.parent.pe.imphash': schemaString,
'process.parent.pe.import_hash': schemaString,
'process.parent.pe.imports': schemaUnknownArray,
'process.parent.pe.imports_names_entropy': schemaStringOrNumber,
'process.parent.pe.imports_names_var_entropy': schemaStringOrNumber,
'process.parent.pe.original_file_name': schemaString,
'process.parent.pe.pehash': schemaString,
'process.parent.pe.product': schemaString,
'process.parent.pe.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'process.parent.pgid': schemaStringOrNumber,
'process.parent.pid': schemaStringOrNumber,
'process.parent.real_group.id': schemaString,
@ -764,6 +910,8 @@ const EcsOptional = rt.partial({
'process.parent.start': schemaDate,
'process.parent.supplemental_groups.id': schemaString,
'process.parent.supplemental_groups.name': schemaString,
'process.parent.thread.capabilities.effective': schemaStringArray,
'process.parent.thread.capabilities.permitted': schemaStringArray,
'process.parent.thread.id': schemaStringOrNumber,
'process.parent.thread.name': schemaString,
'process.parent.title': schemaString,
@ -771,15 +919,34 @@ const EcsOptional = rt.partial({
'process.parent.uptime': schemaStringOrNumber,
'process.parent.user.id': schemaString,
'process.parent.user.name': schemaString,
'process.parent.vpid': schemaStringOrNumber,
'process.parent.working_directory': schemaString,
'process.pe.architecture': schemaString,
'process.pe.company': schemaString,
'process.pe.description': schemaString,
'process.pe.file_version': schemaString,
'process.pe.go_import_hash': schemaString,
'process.pe.go_imports': schemaUnknown,
'process.pe.go_imports_names_entropy': schemaStringOrNumber,
'process.pe.go_imports_names_var_entropy': schemaStringOrNumber,
'process.pe.go_stripped': schemaBoolean,
'process.pe.imphash': schemaString,
'process.pe.import_hash': schemaString,
'process.pe.imports': schemaUnknownArray,
'process.pe.imports_names_entropy': schemaStringOrNumber,
'process.pe.imports_names_var_entropy': schemaStringOrNumber,
'process.pe.original_file_name': schemaString,
'process.pe.pehash': schemaString,
'process.pe.product': schemaString,
'process.pe.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'process.pgid': schemaStringOrNumber,
'process.pid': schemaStringOrNumber,
'process.previous.args': schemaStringArray,
@ -807,7 +974,9 @@ const EcsOptional = rt.partial({
'process.session_leader.parent.session_leader.entity_id': schemaString,
'process.session_leader.parent.session_leader.pid': schemaStringOrNumber,
'process.session_leader.parent.session_leader.start': schemaDate,
'process.session_leader.parent.session_leader.vpid': schemaStringOrNumber,
'process.session_leader.parent.start': schemaDate,
'process.session_leader.parent.vpid': schemaStringOrNumber,
'process.session_leader.pid': schemaStringOrNumber,
'process.session_leader.real_group.id': schemaString,
'process.session_leader.real_group.name': schemaString,
@ -824,10 +993,13 @@ const EcsOptional = rt.partial({
'process.session_leader.tty': schemaUnknown,
'process.session_leader.user.id': schemaString,
'process.session_leader.user.name': schemaString,
'process.session_leader.vpid': schemaStringOrNumber,
'process.session_leader.working_directory': schemaString,
'process.start': schemaDate,
'process.supplemental_groups.id': schemaString,
'process.supplemental_groups.name': schemaString,
'process.thread.capabilities.effective': schemaStringArray,
'process.thread.capabilities.permitted': schemaStringArray,
'process.thread.id': schemaStringOrNumber,
'process.thread.name': schemaString,
'process.title': schemaString,
@ -835,6 +1007,7 @@ const EcsOptional = rt.partial({
'process.uptime': schemaStringOrNumber,
'process.user.id': schemaString,
'process.user.name': schemaString,
'process.vpid': schemaStringOrNumber,
'process.working_directory': schemaString,
'registry.data.bytes': schemaString,
'registry.data.strings': schemaStringArray,
@ -1008,6 +1181,11 @@ const EcsOptional = rt.partial({
'threat.indicator.file.elf.cpu_type': schemaString,
'threat.indicator.file.elf.creation_date': schemaDate,
'threat.indicator.file.elf.exports': schemaUnknownArray,
'threat.indicator.file.elf.go_import_hash': schemaString,
'threat.indicator.file.elf.go_imports': schemaUnknown,
'threat.indicator.file.elf.go_imports_names_entropy': schemaStringOrNumber,
'threat.indicator.file.elf.go_imports_names_var_entropy': schemaStringOrNumber,
'threat.indicator.file.elf.go_stripped': schemaBoolean,
'threat.indicator.file.elf.header.abi_version': schemaString,
'threat.indicator.file.elf.header.class': schemaString,
'threat.indicator.file.elf.header.data': schemaString,
@ -1016,7 +1194,10 @@ const EcsOptional = rt.partial({
'threat.indicator.file.elf.header.os_abi': schemaString,
'threat.indicator.file.elf.header.type': schemaString,
'threat.indicator.file.elf.header.version': schemaString,
'threat.indicator.file.elf.import_hash': schemaString,
'threat.indicator.file.elf.imports': schemaUnknownArray,
'threat.indicator.file.elf.imports_names_entropy': schemaStringOrNumber,
'threat.indicator.file.elf.imports_names_var_entropy': schemaStringOrNumber,
'threat.indicator.file.elf.sections': rt.array(
rt.partial({
chi2: schemaStringOrNumber,
@ -1026,6 +1207,7 @@ const EcsOptional = rt.partial({
physical_offset: schemaString,
physical_size: schemaStringOrNumber,
type: schemaString,
var_entropy: schemaStringOrNumber,
virtual_address: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
@ -1060,10 +1242,28 @@ const EcsOptional = rt.partial({
'threat.indicator.file.pe.company': schemaString,
'threat.indicator.file.pe.description': schemaString,
'threat.indicator.file.pe.file_version': schemaString,
'threat.indicator.file.pe.go_import_hash': schemaString,
'threat.indicator.file.pe.go_imports': schemaUnknown,
'threat.indicator.file.pe.go_imports_names_entropy': schemaStringOrNumber,
'threat.indicator.file.pe.go_imports_names_var_entropy': schemaStringOrNumber,
'threat.indicator.file.pe.go_stripped': schemaBoolean,
'threat.indicator.file.pe.imphash': schemaString,
'threat.indicator.file.pe.import_hash': schemaString,
'threat.indicator.file.pe.imports': schemaUnknownArray,
'threat.indicator.file.pe.imports_names_entropy': schemaStringOrNumber,
'threat.indicator.file.pe.imports_names_var_entropy': schemaStringOrNumber,
'threat.indicator.file.pe.original_file_name': schemaString,
'threat.indicator.file.pe.pehash': schemaString,
'threat.indicator.file.pe.product': schemaString,
'threat.indicator.file.pe.sections': rt.array(
rt.partial({
entropy: schemaStringOrNumber,
name: schemaString,
physical_size: schemaStringOrNumber,
var_entropy: schemaStringOrNumber,
virtual_size: schemaStringOrNumber,
})
),
'threat.indicator.file.size': schemaStringOrNumber,
'threat.indicator.file.target_path': schemaString,
'threat.indicator.file.type': schemaString,
@ -1109,6 +1309,7 @@ const EcsOptional = rt.partial({
'threat.indicator.marking.tlp': schemaString,
'threat.indicator.marking.tlp_version': schemaString,
'threat.indicator.modified_at': schemaDate,
'threat.indicator.name': schemaString,
'threat.indicator.port': schemaStringOrNumber,
'threat.indicator.provider': schemaString,
'threat.indicator.reference': schemaString,

View file

@ -14,7 +14,6 @@
"target/**/*"
],
"kbn_references": [
"@kbn/ecs",
"@kbn/rule-data-utils",
"@kbn/safer-lodash-set",
]

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { EcsFlat } from '@kbn/ecs';
import { EcsFlat } from '@elastic/ecs';
import type { EcsMetadata, FieldMap } from './types';
const EXCLUDED_TYPES = ['constant_keyword'];

View file

@ -15,7 +15,6 @@
"kbn_references": [
"@kbn/core",
"@kbn/std",
"@kbn/ecs",
"@kbn/alerts-as-data-utils",
"@kbn/safer-lodash-set",
"@kbn/logging-mocks",

View file

@ -1,7 +0,0 @@
# @kbn/ecs
Base types for Elastic common schema. These types are used for `logging` and any extensions to the types declared in this package need to be in their own dedicated packages.
https://www.elastic.co/guide/en/ecs/current/index.html
Type definitions are autogenerated with https://github.com/elastic/ecs-typescript

View file

@ -1,46 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host.
* Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken.
*/
export interface EcsAgent {
build?: {
/**
* Extended build information for the agent.
* This field is intended to contain any build information that a data source may provide, no specific formatting is required.
*/
original?: string;
};
/**
* Ephemeral identifier of this agent (if one exists).
* This id normally changes across restarts, but `agent.id` does not.
*/
ephemeral_id?: string;
/**
* Unique identifier of this agent (if one exists).
* Example: For Beats this would be beat.id.
*/
id?: string;
/**
* Custom name of the agent.
* This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from.
*/
name?: string;
/**
* Type of the agent.
* The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine.
*/
type?: string;
/**
* Version of the agent.
*/
version?: string;
}

View file

@ -1,23 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain that presents a common, clearly defined routing policy to the internet.
*/
export interface EcsAs {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
}

View file

@ -1,36 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The `base` field set contains all fields which are at the root of the events. These fields are common across all types of events.
*/
export interface EcsBase {
/**
* Date/time when the event originated.
* This is the date/time extracted from the event, typically representing when the event was generated by the source.
* If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.
* Required field for all events.
*/
'@timestamp': string;
/**
* Custom key/value pairs.
* Can be used to add meta information to events. Should not contain nested objects. All values are stored as keyword.
* Example: `docker` and `k8s` labels.
*/
labels?: Record<string, unknown>;
/**
* For log events the message field contains the log message, optimized for viewing in a log viewer.
* For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event.
* If multiple messages exist, they can be combined into one message.
*/
message?: string;
/**
* List of keywords used to tag each event.
*/
tags?: string[];
}

View file

@ -1,186 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* A client is defined as the initiator of a network connection for events regarding sessions, connections, or bidirectional flow records.
* For TCP events, the client is the initiator of the TCP connection that sends the SYN packet(s). For other protocols, the client is generally the initiator or requestor in the network transaction. Some systems use the term "originator" to refer the client in TCP connections. The client fields describe details about the system acting as the client in the network event. Client fields are usually populated in conjunction with server fields. Client fields are generally not populated for packet-level events.
* Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
*/
export interface EcsClient {
/**
* Some event client addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
* Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
*/
address?: string;
as?: {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
};
/**
* Bytes sent from the client to the server.
*/
bytes?: number;
/**
* The domain name of the client system.
* This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
*/
domain?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* IP address of the client (IPv4 or IPv6).
*/
ip?: string;
/**
* MAC address of the client.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string;
nat?: {
/**
* Translated IP of source based NAT sessions (e.g. internal client to internet).
* Typically connections traversing load balancers, firewalls, or routers.
*/
ip?: string;
/**
* Translated port of source based NAT sessions (e.g. internal client to internet).
* Typically connections traversing load balancers, firewalls, or routers.
*/
port?: number;
};
/**
* Packets sent from the client to the server.
*/
packets?: number;
/**
* Port of the client.
*/
port?: number;
/**
* The highest registered client domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
user?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
}

View file

@ -1,208 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields related to the cloud or infrastructure the events are coming from.
*/
export interface EcsCloud {
account?: {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
* Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
*/
id?: string;
/**
* The cloud account name or alias used to identify different entities in a multi-tenant environment.
* Examples: AWS account name, Google Cloud ORG display name.
*/
name?: string;
};
/**
* Availability zone in which this host, resource, or service is located.
*/
availability_zone?: string;
instance?: {
/**
* Instance ID of the host machine.
*/
id?: string;
/**
* Instance name of the host machine.
*/
name?: string;
};
machine?: {
/**
* Machine type of the host machine.
*/
type?: string;
};
origin?: {
account?: {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
* Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
*/
id?: string;
/**
* The cloud account name or alias used to identify different entities in a multi-tenant environment.
* Examples: AWS account name, Google Cloud ORG display name.
*/
name?: string;
};
/**
* Availability zone in which this host, resource, or service is located.
*/
availability_zone?: string;
instance?: {
/**
* Instance ID of the host machine.
*/
id?: string;
/**
* Instance name of the host machine.
*/
name?: string;
};
machine?: {
/**
* Machine type of the host machine.
*/
type?: string;
};
project?: {
/**
* The cloud project identifier.
* Examples: Google Cloud Project id, Azure Project id.
*/
id?: string;
/**
* The cloud project name.
* Examples: Google Cloud Project name, Azure Project name.
*/
name?: string;
};
/**
* Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
*/
provider?: string;
/**
* Region in which this host, resource, or service is located.
*/
region?: string;
service?: {
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
* Examples: app engine, app service, cloud run, fargate, lambda.
*/
name?: string;
};
};
project?: {
/**
* The cloud project identifier.
* Examples: Google Cloud Project id, Azure Project id.
*/
id?: string;
/**
* The cloud project name.
* Examples: Google Cloud Project name, Azure Project name.
*/
name?: string;
};
/**
* Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
*/
provider?: string;
/**
* Region in which this host, resource, or service is located.
*/
region?: string;
service?: {
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
* Examples: app engine, app service, cloud run, fargate, lambda.
*/
name?: string;
};
target?: {
account?: {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
* Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
*/
id?: string;
/**
* The cloud account name or alias used to identify different entities in a multi-tenant environment.
* Examples: AWS account name, Google Cloud ORG display name.
*/
name?: string;
};
/**
* Availability zone in which this host, resource, or service is located.
*/
availability_zone?: string;
instance?: {
/**
* Instance ID of the host machine.
*/
id?: string;
/**
* Instance name of the host machine.
*/
name?: string;
};
machine?: {
/**
* Machine type of the host machine.
*/
type?: string;
};
project?: {
/**
* The cloud project identifier.
* Examples: Google Cloud Project id, Azure Project id.
*/
id?: string;
/**
* The cloud project name.
* Examples: Google Cloud Project name, Azure Project name.
*/
name?: string;
};
/**
* Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
*/
provider?: string;
/**
* Region in which this host, resource, or service is located.
*/
region?: string;
service?: {
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
* Examples: app engine, app service, cloud run, fargate, lambda.
*/
name?: string;
};
};
}

View file

@ -1,55 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain information about binary code signatures.
*/
export interface EcsCodeSignature {
/**
* The hashing algorithm used to sign the process.
* This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.
*/
digest_algorithm?: string;
/**
* Boolean to capture if a signature is present.
*/
exists?: boolean;
/**
* The identifier used to sign the process.
* This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
*/
signing_id?: string;
/**
* Additional information about the certificate status.
* This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
*/
status?: string;
/**
* Subject name of the code signer
*/
subject_name?: string;
/**
* The team identifier used to sign the process.
* This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
*/
team_id?: string;
/**
* Date and time when the code signature was generated and signed.
*/
timestamp?: string;
/**
* Stores the trust status of the certificate chain.
* Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
*/
trusted?: boolean;
/**
* Boolean to capture if the digital signature is verified against the binary content.
* Leave unpopulated if a certificate was unchecked.
*/
valid?: boolean;
}

View file

@ -1,94 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Container fields are used for meta information about the specific container that is the source of information.
* These fields help correlate data based containers from any runtime.
*/
export interface EcsContainer {
cpu?: {
/**
* Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1. Scaling factor: 1000.
*/
usage?: number;
};
disk?: {
read?: {
/**
* The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.
*/
bytes?: number;
};
write?: {
/**
* The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.
*/
bytes?: number;
};
};
/**
* Unique container id.
*/
id?: string;
image?: {
hash?: {
/**
* An array of digests of the image the container was built on. Each digest consists of the hash algorithm and value in this format: `algorithm:value`. Algorithm names should align with the field names in the ECS hash field set.
*/
all?: string[];
};
/**
* Name of the image the container was built on.
*/
name?: string;
/**
* Container image tags.
*/
tag?: string[];
};
/**
* Image labels.
*/
labels?: Record<string, unknown>;
memory?: {
/**
* Memory usage percentage and it ranges from 0 to 1. Scaling factor: 1000.
*/
usage?: number;
};
/**
* Container name.
*/
name?: string;
network?: {
egress?: {
/**
* The number of bytes (gauge) sent out on all network interfaces by the container since the last metric collection.
*/
bytes?: number;
};
ingress?: {
/**
* The number of bytes received (gauge) on all network interfaces by the container since the last metric collection.
*/
bytes?: number;
};
};
/**
* Runtime managing this container.
*/
runtime?: string;
}

View file

@ -1,36 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The data_stream fields take part in defining the new data stream naming scheme.
* In the new data stream naming scheme the value of the data stream fields combine to the name of the actual data stream in the following manner: `{data_stream.type}-{data_stream.dataset}-{data_stream.namespace}`. This means the fields can only contain characters that are valid as part of names of data streams. More details about this can be found in this https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme[blog post].
* An Elasticsearch data stream consists of one or more backing indices, and a data stream name forms part of the backing indices names. Due to this convention, data streams must also follow index naming restrictions. For example, data stream names cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`. Please see the Elasticsearch reference for additional https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params[restrictions].
*/
export interface EcsDataStream {
/**
* The field can contain anything that makes sense to signify the source of the data.
* Examples include `nginx.access`, `prometheus`, `endpoint` etc. For data streams that otherwise fit, but that do not have dataset set we use the value "generic" for the dataset value. `event.dataset` should have the same value as `data_stream.dataset`.
* Beyond the Elasticsearch data stream naming criteria noted above, the `dataset` value has additional restrictions:
* * Must not contain `-`
* * No longer than 100 characters
*/
dataset?: string;
/**
* A user defined namespace. Namespaces are useful to allow grouping of data.
* Many users already organize their indices this way, and the data stream naming scheme now provides this best practice as a default. Many users will populate this field with `default`. If no value is used, it falls back to `default`.
* Beyond the Elasticsearch index naming criteria noted above, `namespace` value has the additional restrictions:
* * Must not contain `-`
* * No longer than 100 characters
*/
namespace?: string;
/**
* An overarching type for the data stream.
* Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future.
*/
type?: string;
}

View file

@ -1,185 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Destination fields capture details about the receiver of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.
* Destination fields are usually populated in conjunction with source fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
*/
export interface EcsDestination {
/**
* Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
* Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
*/
address?: string;
as?: {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
};
/**
* Bytes sent from the destination to the source.
*/
bytes?: number;
/**
* The domain name of the destination system.
* This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
*/
domain?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* IP address of the destination (IPv4 or IPv6).
*/
ip?: string;
/**
* MAC address of the destination.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string;
nat?: {
/**
* Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
* Typically used with load balancers, firewalls, or routers.
*/
ip?: string;
/**
* Port the source session is translated to by NAT Device.
* Typically used with load balancers, firewalls, or routers.
*/
port?: number;
};
/**
* Packets sent from the destination to the source.
*/
packets?: number;
/**
* Port of the destination.
*/
port?: number;
/**
* The highest registered destination domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
user?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
}

View file

@ -1,34 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields that describe a device instance and its characteristics. Data collected for applications and processes running on a (mobile) device can be enriched with these fields to describe the identity, type and other characteristics of the device.
* This field group definition is based on the Device namespace of the OpenTelemetry Semantic Conventions (https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/).
*/
export interface EcsDevice {
/**
* The unique identifier of a device. The identifier must not change across application sessions but stay fixex for an instance of a (mobile) device.
* On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android, this value must be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application.
* For GDPR and data protection law reasons this identifier should not carry information that would allow to identify a user.
*/
id?: string;
/**
* The vendor name of the device manufacturer.
*/
manufacturer?: string;
model?: {
/**
* The machine readable identifier of the device model.
*/
identifier?: string;
/**
* The human readable marketing name of the device model.
*/
name?: string;
};
}

View file

@ -1,139 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain information about code libraries dynamically loaded into processes.
*
* Many operating systems refer to "shared code libraries" with different names, but this field set refers to all of the following:
* * Dynamic-link library (`.dll`) commonly used on Windows
* * Shared Object (`.so`) commonly used on Unix-like operating systems
* * Dynamic library (`.dylib`) commonly used on macOS
*/
export interface EcsDll {
code_signature?: {
/**
* The hashing algorithm used to sign the process.
* This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.
*/
digest_algorithm?: string;
/**
* Boolean to capture if a signature is present.
*/
exists?: boolean;
/**
* The identifier used to sign the process.
* This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
*/
signing_id?: string;
/**
* Additional information about the certificate status.
* This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
*/
status?: string;
/**
* Subject name of the code signer
*/
subject_name?: string;
/**
* The team identifier used to sign the process.
* This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
*/
team_id?: string;
/**
* Date and time when the code signature was generated and signed.
*/
timestamp?: string;
/**
* Stores the trust status of the certificate chain.
* Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
*/
trusted?: boolean;
/**
* Boolean to capture if the digital signature is verified against the binary content.
* Leave unpopulated if a certificate was unchecked.
*/
valid?: boolean;
};
hash?: {
/**
* MD5 hash.
*/
md5?: string;
/**
* SHA1 hash.
*/
sha1?: string;
/**
* SHA256 hash.
*/
sha256?: string;
/**
* SHA384 hash.
*/
sha384?: string;
/**
* SHA512 hash.
*/
sha512?: string;
/**
* SSDEEP hash.
*/
ssdeep?: string;
/**
* TLSH hash.
*/
tlsh?: string;
};
/**
* Name of the library.
* This generally maps to the name of the file on disk.
*/
name?: string;
/**
* Full file path of the library.
*/
path?: string;
pe?: {
/**
* CPU architecture target for the file.
*/
architecture?: string;
/**
* Internal company name of the file, provided at compile-time.
*/
company?: string;
/**
* Internal description of the file, provided at compile-time.
*/
description?: string;
/**
* Internal version of the file, provided at compile-time.
*/
file_version?: string;
/**
* A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
*/
imphash?: string;
/**
* Internal name of the file, provided at compile-time.
*/
original_file_name?: string;
/**
* A hash of the PE header and data from one or more PE sections. An pehash can be used to cluster files by transforming structural information about a file into a hash value.
* Learn more at https://www.usenix.org/legacy/events/leet09/tech/full_papers/wicherski/wicherski_html/index.html.
*/
pehash?: string;
/**
* Internal product name of the file, provided at compile-time.
*/
product?: string;
};
}

View file

@ -1,79 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields describing DNS queries and answers.
* DNS events should either represent a single DNS query prior to getting answers (`dns.type:query`) or they should represent a full exchange and contain the query details as well as all of the answers that were provided for this query (`dns.type:answer`).
*/
export interface EcsDns {
/**
* An array containing an object for each answer section returned by the server.
* The main keys that should be present in these objects are defined by ECS. Records that have more information may contain more keys than what ECS defines.
* Not all DNS data sources give all details about DNS answers. At minimum, answer objects must contain the `data` key. If more information is available, map as much of it to ECS as possible, and add any additional fields to the answer objects as custom fields.
*/
answers?: Array<Record<string, unknown>>;
/**
* Array of 2 letter DNS header flags.
*/
header_flags?: string[];
/**
* The DNS packet identifier assigned by the program that generated the query. The identifier is copied to the response.
*/
id?: string;
/**
* The DNS operation code that specifies the kind of query in the message. This value is set by the originator of a query and copied into the response.
*/
op_code?: string;
question?: {
/**
* The class of records being queried.
*/
class?: string;
/**
* The name being queried.
* If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively.
*/
name?: string;
/**
* The highest registered domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* The subdomain is all of the labels under the registered_domain.
* If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
/**
* The type of record being queried.
*/
type?: string;
};
/**
* Array containing all IPs seen in `answers.data`.
* The `answers` array can be difficult to use, because of the variety of data formats it can contain. Extracting all IP addresses seen in there to `dns.resolved_ip` makes it possible to index them as IP addresses, and makes them easier to visualize and query for.
*/
resolved_ip?: string[];
/**
* The DNS response code.
*/
response_code?: string;
/**
* The type of DNS event captured, query or answer.
* If your source of DNS events only gives you DNS queries, you should only create dns events of type `dns.type:query`.
* If your source of DNS events gives you answers as well, you should create one event per query (optionally as soon as the query is seen). And a second event containing all query details as well as an array of answers.
*/
type?: string;
}

View file

@ -1,18 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Meta-information specific to ECS.
*/
export interface EcsEcs {
/**
* ECS version this event conforms to. `ecs.version` is a required field and must exist in all events.
* When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events.
*/
version: '8.6.1';
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,90 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain Linux Executable Linkable Format (ELF) metadata.
*/
export interface EcsElf {
/**
* Machine architecture of the ELF file.
*/
architecture?: string;
/**
* Byte sequence of ELF file.
*/
byte_order?: string;
/**
* CPU type of the ELF file.
*/
cpu_type?: string;
/**
* Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators.
*/
creation_date?: string;
/**
* List of exported element names and types.
*/
exports?: Array<Record<string, unknown>>;
header?: {
/**
* Version of the ELF Application Binary Interface (ABI).
*/
abi_version?: string;
/**
* Header class of the ELF file.
*/
class?: string;
/**
* Data table of the ELF header.
*/
data?: string;
/**
* Header entrypoint of the ELF file.
*/
entrypoint?: number;
/**
* "0x1" for original ELF files.
*/
object_version?: string;
/**
* Application Binary Interface (ABI) of the Linux OS.
*/
os_abi?: string;
/**
* Header type of the ELF file.
*/
type?: string;
/**
* Version of the ELF header.
*/
version?: string;
};
/**
* List of imported element names and types.
*/
imports?: Array<Record<string, unknown>>;
/**
* An array containing an object for each section of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`.
*/
sections?: Array<Record<string, unknown>>;
/**
* An array containing an object for each segment of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`.
*/
segments?: Array<Record<string, unknown>>;
/**
* List of shared libraries used by this ELF object.
*/
shared_libraries?: string[];
/**
* telfhash symbol hash for ELF file.
*/
telfhash?: string;
}

View file

@ -1,94 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Event details relating to an email transaction.
* This field set focuses on the email message header, body, and attachments. Network protocols that send and receive email messages such as SMTP are outside the scope of the `email.*` fields.
*/
export interface EcsEmail {
/**
* A list of objects describing the attachment files sent along with an email message.
*/
attachments?: Array<Record<string, unknown>>;
bcc?: {
/**
* The email address of BCC recipient
*/
address?: string[];
};
cc?: {
/**
* The email address of CC recipient
*/
address?: string[];
};
/**
* Information about how the message is to be displayed.
* Typically a MIME type.
*/
content_type?: string;
/**
* The date and time when the email message was received by the service or client.
*/
delivery_timestamp?: string;
/**
* The direction of the message based on the sending and receiving domains.
*/
direction?: string;
from?: {
/**
* The email address of the sender, typically from the RFC 5322 `From:` header field.
*/
address?: string[];
};
/**
* Unique identifier given to the email by the source that created the event.
* Identifier is not persistent across hops.
*/
local_id?: string;
/**
* Identifier from the RFC 5322 `Message-ID:` email header that refers to a particular email message.
*/
message_id?: string;
/**
* The date and time the email message was composed. Many email clients will fill in this value automatically when the message is sent by a user.
*/
origination_timestamp?: string;
reply_to?: {
/**
* The address that replies should be delivered to based on the value in the RFC 5322 `Reply-To:` header.
*/
address?: string[];
};
sender?: {
/**
* Per RFC 5322, specifies the address responsible for the actual transmission of the message.
*/
address?: string;
};
/**
* A brief summary of the topic of the message.
*/
subject?: string;
to?: {
/**
* The email address of recipient
*/
address?: string[];
};
/**
* The name of the application that was used to draft and send the original email message.
*/
x_mailer?: string;
}

View file

@ -1,34 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields can represent errors of any kind.
* Use them for errors that happen while fetching events or in cases where the event itself contains an error.
*/
export interface EcsError {
/**
* Error code describing the error.
*/
code?: string;
/**
* Unique identifier for the error.
*/
id?: string;
/**
* Error message.
*/
message?: string;
/**
* The stack trace of this error in plain text.
*/
stack_trace?: string;
/**
* The type of the error, for example the class name of the exception.
*/
type?: string;
}

View file

@ -1,156 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The event fields are used for context information about the log or metric event itself.
* A log is defined as an event containing details of something that happened. Log events must include the time at which the thing happened. Examples of log events include a process starting on a host, a network packet being sent from a source to a destination, or a network connection between a client and a server being initiated or closed. A metric is defined as an event containing one or more numerical measurements and the time at which the measurement was taken. Examples of metric events include memory pressure measured on a host and device temperature. See the `event.kind` definition in this section for additional details about metric and state events.
*/
export interface EcsEvent {
/**
* The action captured by the event.
* This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer.
*/
action?: string;
/**
* Agents are normally responsible for populating the `agent.id` field value. If the system receiving events is capable of validating the value based on authentication information for the client then this field can be used to reflect the outcome of that validation.
* For example if the agent's connection is authenticated with mTLS and the client cert contains the ID of the agent to which the cert was issued then the `agent.id` value in events can be checked against the certificate. If the values match then `event.agent_id_status: verified` is added to the event, otherwise one of the other allowed values should be used.
* If no validation is performed then the field should be omitted.
* The allowed values are:
* `verified` - The `agent.id` field value matches expected value obtained from auth metadata.
* `mismatch` - The `agent.id` field value does not match the expected value obtained from auth metadata.
* `missing` - There was no `agent.id` field in the event to validate.
* `auth_metadata_missing` - There was no auth metadata or it was missing information about the agent ID.
*/
agent_id_status?: string;
/**
* This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.
* `event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.
* This field is an array. This will allow proper categorization of some events that fall in multiple categories.
*/
category?: string[];
/**
* Identification code for this event, if one exists.
* Some event sources use event codes to identify messages unambiguously, regardless of message language or wording adjustments over time. An example of this is the Windows Event ID.
*/
code?: string;
/**
* event.created contains the date/time when the event was first read by an agent, or by your pipeline.
* This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event.
* In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source.
* In case the two timestamps are identical, @timestamp should be used.
*/
created?: string;
/**
* Name of the dataset.
* If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from.
* It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name.
*/
dataset?: string;
/**
* Duration of the event in nanoseconds.
* If event.start and event.end are known this value should be the difference between the end and start time.
*/
duration?: number;
/**
* event.end contains the date when the event ended or when the activity was last observed.
*/
end?: string;
/**
* Hash (perhaps logstash fingerprint) of raw field to be able to demonstrate log integrity.
*/
hash?: string;
/**
* Unique ID to describe the event.
*/
id?: string;
/**
* Timestamp when an event arrived in the central data store.
* This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event.
* In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` < `event.created` < `event.ingested`.
*/
ingested?: string;
/**
* This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy.
* `event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events.
* The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not.
*/
kind?: string;
/**
* Name of the module this data is coming from.
* If your monitoring agent supports the concept of modules or plugins to process events of a given source (e.g. Apache logs), `event.module` should contain the name of this module.
*/
module?: string;
/**
* Raw text message of entire event. Used to demonstrate log integrity or where the full log message (before splitting it up in multiple parts) may be required, e.g. for reindex.
* This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, please see `Field data types` in the `Elasticsearch Reference`.
*/
original?: string;
/**
* This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy.
* `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event.
* Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective.
* Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer.
* Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense.
*/
outcome?: string;
/**
* Source of the event.
* Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing).
*/
provider?: string;
/**
* Reason why this event happened, according to the source.
* This describes the why of a particular action or outcome captured in the event. Where `event.action` captures the action from the event, `event.reason` describes why that action was taken. For example, a web proxy with an `event.action` which denied the request may also populate `event.reason` with the reason why (e.g. `blocked site`).
*/
reason?: string;
/**
* Reference URL linking to additional information about this event.
* This URL links to a static definition of this event. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
*/
reference?: string;
/**
* Risk score or priority of the event (e.g. security solutions). Use your system's original value here.
*/
risk_score?: number;
/**
* Normalized risk score or priority of the event, on a scale of 0 to 100.
* This is mainly useful if you use more than one system that assigns risk scores, and you want to see a normalized value across all systems.
*/
risk_score_norm?: number;
/**
* Sequence number of the event.
* The sequence number is a value published by some event sources, to make the exact ordering of events unambiguous, regardless of the timestamp precision.
*/
sequence?: number;
/**
* The numeric severity of the event according to your event source.
* What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source.
* The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`.
*/
severity?: number;
/**
* event.start contains the date when the event started or when the activity was first observed.
*/
start?: string;
/**
* This field should be populated when the event's timestamp does not include timezone information already (e.g. default Syslog timestamps). It's optional otherwise.
* Acceptable timezone formats are: a canonical ID (e.g. "Europe/Amsterdam"), abbreviated (e.g. "EST") or an HH:mm differential (e.g. "-05:00").
*/
timezone?: string;
/**
* This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy.
* `event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization.
* This field is an array. This will allow proper categorization of some events that fall in multiple event types.
*/
type?: string[];
/**
* URL linking to an external system to continue investigation of this event.
* This URL links to another system where in-depth investigation of the specific occurrence of this event can take place. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
*/
url?: string;
}

View file

@ -1,38 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The user fields describe information about the function as a service (FaaS) that is relevant to the event.
*/
export interface EcsFaas {
/**
* Boolean value indicating a cold start of a function.
*/
coldstart?: boolean;
/**
* The execution ID of the current function execution.
*/
execution?: string;
/**
* The unique identifier of a serverless function.
* For AWS Lambda it's the function ARN (Amazon Resource Name) without a version or alias suffix.
*/
id?: string;
/**
* The name of a serverless function.
*/
name?: string;
/**
* Details about the function trigger.
*/
trigger?: Record<string, unknown>;
/**
* The version of a serverless function.
*/
version?: string;
}

View file

@ -1,408 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* A file is defined as a set of information that has been created on, or has existed on a filesystem.
* File objects can be associated with host events, network events, and/or file events (e.g., those produced by File Integrity Monitoring [FIM] products or services). File fields provide details about the affected file associated with the event or metric.
*/
export interface EcsFile {
/**
* Last time the file was accessed.
* Note that not all filesystems keep track of access time.
*/
accessed?: string;
/**
* Array of file attributes.
* Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.
*/
attributes?: string[];
code_signature?: {
/**
* The hashing algorithm used to sign the process.
* This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.
*/
digest_algorithm?: string;
/**
* Boolean to capture if a signature is present.
*/
exists?: boolean;
/**
* The identifier used to sign the process.
* This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
*/
signing_id?: string;
/**
* Additional information about the certificate status.
* This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
*/
status?: string;
/**
* Subject name of the code signer
*/
subject_name?: string;
/**
* The team identifier used to sign the process.
* This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
*/
team_id?: string;
/**
* Date and time when the code signature was generated and signed.
*/
timestamp?: string;
/**
* Stores the trust status of the certificate chain.
* Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
*/
trusted?: boolean;
/**
* Boolean to capture if the digital signature is verified against the binary content.
* Leave unpopulated if a certificate was unchecked.
*/
valid?: boolean;
};
/**
* File creation time.
* Note that not all filesystems store the creation time.
*/
created?: string;
/**
* Last time the file attributes or metadata changed.
* Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file.
*/
ctime?: string;
/**
* Device that is the source of the file.
*/
device?: string;
/**
* Directory where the file is located. It should include the drive letter, when appropriate.
*/
directory?: string;
/**
* Drive letter where the file is located. This field is only relevant on Windows.
* The value should be uppercase, and not include the colon.
*/
drive_letter?: string;
elf?: {
/**
* Machine architecture of the ELF file.
*/
architecture?: string;
/**
* Byte sequence of ELF file.
*/
byte_order?: string;
/**
* CPU type of the ELF file.
*/
cpu_type?: string;
/**
* Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators.
*/
creation_date?: string;
/**
* List of exported element names and types.
*/
exports?: Array<Record<string, unknown>>;
header?: {
/**
* Version of the ELF Application Binary Interface (ABI).
*/
abi_version?: string;
/**
* Header class of the ELF file.
*/
class?: string;
/**
* Data table of the ELF header.
*/
data?: string;
/**
* Header entrypoint of the ELF file.
*/
entrypoint?: number;
/**
* "0x1" for original ELF files.
*/
object_version?: string;
/**
* Application Binary Interface (ABI) of the Linux OS.
*/
os_abi?: string;
/**
* Header type of the ELF file.
*/
type?: string;
/**
* Version of the ELF header.
*/
version?: string;
};
/**
* List of imported element names and types.
*/
imports?: Array<Record<string, unknown>>;
/**
* An array containing an object for each section of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`.
*/
sections?: Array<Record<string, unknown>>;
/**
* An array containing an object for each segment of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`.
*/
segments?: Array<Record<string, unknown>>;
/**
* List of shared libraries used by this ELF object.
*/
shared_libraries?: string[];
/**
* telfhash symbol hash for ELF file.
*/
telfhash?: string;
};
/**
* File extension, excluding the leading dot.
* Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
*/
extension?: string;
/**
* A fork is additional data associated with a filesystem object.
* On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.
* On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: `C:\path\to\filename.extension:some_fork_name`, and `some_fork_name` is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.
*/
fork_name?: string;
/**
* Primary group ID (GID) of the file.
*/
gid?: string;
/**
* Primary group name of the file.
*/
group?: string;
hash?: {
/**
* MD5 hash.
*/
md5?: string;
/**
* SHA1 hash.
*/
sha1?: string;
/**
* SHA256 hash.
*/
sha256?: string;
/**
* SHA384 hash.
*/
sha384?: string;
/**
* SHA512 hash.
*/
sha512?: string;
/**
* SSDEEP hash.
*/
ssdeep?: string;
/**
* TLSH hash.
*/
tlsh?: string;
};
/**
* Inode representing the file in the filesystem.
*/
inode?: string;
/**
* MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.
*/
mime_type?: string;
/**
* Mode of the file in octal representation.
*/
mode?: string;
/**
* Last time the file content was modified.
*/
mtime?: string;
/**
* Name of the file including the extension, without the directory.
*/
name?: string;
/**
* File owner's username.
*/
owner?: string;
/**
* Full path to the file, including the file name. It should include the drive letter, when appropriate.
*/
path?: string;
pe?: {
/**
* CPU architecture target for the file.
*/
architecture?: string;
/**
* Internal company name of the file, provided at compile-time.
*/
company?: string;
/**
* Internal description of the file, provided at compile-time.
*/
description?: string;
/**
* Internal version of the file, provided at compile-time.
*/
file_version?: string;
/**
* A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
*/
imphash?: string;
/**
* Internal name of the file, provided at compile-time.
*/
original_file_name?: string;
/**
* A hash of the PE header and data from one or more PE sections. An pehash can be used to cluster files by transforming structural information about a file into a hash value.
* Learn more at https://www.usenix.org/legacy/events/leet09/tech/full_papers/wicherski/wicherski_html/index.html.
*/
pehash?: string;
/**
* Internal product name of the file, provided at compile-time.
*/
product?: string;
};
/**
* File size in bytes.
* Only relevant when `file.type` is "file".
*/
size?: number;
/**
* Target path for symlinks.
*/
target_path?: string;
/**
* File type (file, dir, or symlink).
*/
type?: string;
/**
* The user ID (UID) or security identifier (SID) of the file owner.
*/
uid?: string;
x509?: {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
};
}

View file

@ -1,61 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Geo fields can carry data about a specific location related to an event.
* This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
*/
export interface EcsGeo {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
}

View file

@ -1,26 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The group fields are meant to represent groups that are relevant to the event.
*/
export interface EcsGroup {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
}

View file

@ -1,43 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The hash fields represent different bitwise hash algorithms and their values.
* Field names for common hashes (e.g. MD5, SHA1) are predefined. Add fields for other hashes by lowercasing the hash algorithm name and using underscore separators as appropriate (snake case, e.g. sha3_512).
* Note that this fieldset is used for common hashes that may be computed over a range of generic bytes. Entity-specific hashes such as ja3 or imphash are placed in the fieldsets to which they relate (tls and pe, respectively).
*/
export interface EcsHash {
/**
* MD5 hash.
*/
md5?: string;
/**
* SHA1 hash.
*/
sha1?: string;
/**
* SHA256 hash.
*/
sha256?: string;
/**
* SHA384 hash.
*/
sha384?: string;
/**
* SHA512 hash.
*/
sha512?: string;
/**
* SSDEEP hash.
*/
ssdeep?: string;
/**
* TLSH hash.
*/
tlsh?: string;
}

View file

@ -1,226 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* A host is defined as a general computing instance.
* ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.
*/
export interface EcsHost {
/**
* Operating system architecture.
*/
architecture?: string;
boot?: {
/**
* Linux boot uuid taken from /proc/sys/kernel/random/boot_id. Note the boot_id value from /proc may or may not be the same in containers as on the host. Some container runtimes will bind mount a new boot_id value onto the proc file in each container.
*/
id?: string;
};
cpu?: {
/**
* Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1.
* Scaling factor: 1000.
* For example: For a two core host, this value should be the average of the two cores, between 0 and 1.
*/
usage?: number;
};
disk?: {
read?: {
/**
* The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.
*/
bytes?: number;
};
write?: {
/**
* The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.
*/
bytes?: number;
};
};
/**
* Name of the domain of which the host is a member.
* For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider.
*/
domain?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* Hostname of the host.
* It normally contains what the `hostname` command returns on the host machine.
*/
hostname?: string;
/**
* Unique host id.
* As hostname is not always unique, use values that are meaningful in your environment.
* Example: The current usage of `beat.name`.
*/
id?: string;
/**
* Host ip addresses.
*/
ip?: string[];
/**
* Host MAC addresses.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string[];
/**
* Name of the host.
* It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.
*/
name?: string;
network?: {
egress?: {
/**
* The number of bytes (gauge) sent out on all network interfaces by the host since the last metric collection.
*/
bytes?: number;
/**
* The number of packets (gauge) sent out on all network interfaces by the host since the last metric collection.
*/
packets?: number;
};
ingress?: {
/**
* The number of bytes received (gauge) on all network interfaces by the host since the last metric collection.
*/
bytes?: number;
/**
* The number of packets (gauge) received on all network interfaces by the host since the last metric collection.
*/
packets?: number;
};
};
os?: {
/**
* OS family (such as redhat, debian, freebsd, windows).
*/
family?: string;
/**
* Operating system name, including the version or code name.
*/
full?: string;
/**
* Operating system kernel version as a raw string.
*/
kernel?: string;
/**
* Operating system name, without the version.
*/
name?: string;
/**
* Operating system platform (such centos, ubuntu, windows).
*/
platform?: string;
/**
* Use the `os.type` field to categorize the operating system into one of the broad commercial families.
* If the OS you're dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
*/
type?: string;
/**
* Operating system version as a raw string.
*/
version?: string;
};
/**
* This is the inode number of the namespace in the namespace file system (nsfs). Unsigned int inum in include/linux/ns_common.h.
*/
pid_ns_ino?: string;
risk?: {
/**
* A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_level?: string;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_score?: number;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring, and normalized to a range of 0 to 100.
*/
calculated_score_norm?: number;
/**
* A risk classification level obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_level?: string;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_score?: number;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform, and normalized to a range of 0 to 100.
*/
static_score_norm?: number;
};
/**
* Type of host.
* For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.
*/
type?: string;
/**
* Seconds the host has been up.
*/
uptime?: number;
}

View file

@ -1,81 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields related to HTTP activity. Use the `url` field set to store the url of the request.
*/
export interface EcsHttp {
request?: {
body?: {
/**
* Size in bytes of the request body.
*/
bytes?: number;
/**
* The full HTTP request body.
*/
content?: string;
};
/**
* Total size in bytes of the request (body and headers).
*/
bytes?: number;
/**
* A unique identifier for each HTTP request to correlate logs between clients and servers in transactions.
* The id may be contained in a non-standard HTTP header, such as `X-Request-ID` or `X-Correlation-ID`.
*/
id?: string;
/**
* HTTP request method.
* The value should retain its casing from the original event. For example, `GET`, `get`, and `GeT` are all considered valid values for this field.
*/
method?: string;
/**
* Mime type of the body of the request.
* This value must only be populated based on the content of the request body, not on the `Content-Type` header. Comparing the mime type of a request with the request's Content-Type header can be helpful in detecting threats or misconfigured clients.
*/
mime_type?: string;
/**
* Referrer for this HTTP request.
*/
referrer?: string;
};
response?: {
body?: {
/**
* Size in bytes of the response body.
*/
bytes?: number;
/**
* The full HTTP response body.
*/
content?: string;
};
/**
* Total size in bytes of the response (body and headers).
*/
bytes?: number;
/**
* Mime type of the body of the response.
* This value must only be populated based on the content of the response body, not on the `Content-Type` header. Comparing the mime type of a response with the response's Content-Type header can be helpful in detecting misconfigured servers.
*/
mime_type?: string;
/**
* HTTP response status code.
*/
status_code?: number;
};
/**
* HTTP version.
*/
version?: string;
}

View file

@ -1,160 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { EcsAgent } from './agent';
import { EcsAs } from './as';
import { EcsBase } from './base';
import { EcsClient } from './client';
import { EcsCloud } from './cloud';
import { EcsCodeSignature } from './code_signature';
import { EcsContainer } from './container';
import { EcsDataStream } from './data_stream';
import { EcsDestination } from './destination';
import { EcsDevice } from './device';
import { EcsDll } from './dll';
import { EcsDns } from './dns';
import { EcsEcs } from './ecs';
import { EcsElf } from './elf';
import { EcsEmail } from './email';
import { EcsError } from './error';
import { EcsEvent } from './event';
import { EcsFaas } from './faas';
import { EcsFile } from './file';
import { EcsGeo } from './geo';
import { EcsGroup } from './group';
import { EcsHash } from './hash';
import { EcsHost } from './host';
import { EcsHttp } from './http';
import { EcsInterface } from './interface';
import { EcsLog } from './log';
import { EcsNetwork } from './network';
import { EcsObserver } from './observer';
import { EcsOrchestrator } from './orchestrator';
import { EcsOrganization } from './organization';
import { EcsOs } from './os';
import { EcsPackage } from './package';
import { EcsPe } from './pe';
import { EcsProcess } from './process';
import { EcsRegistry } from './registry';
import { EcsRelated } from './related';
import { EcsRisk } from './risk';
import { EcsRule } from './rule';
import { EcsServer } from './server';
import { EcsService } from './service';
import { EcsSource } from './source';
import { EcsThreat } from './threat';
import { EcsTls } from './tls';
import { EcsTracing } from './tracing';
import { EcsUrl } from './url';
import { EcsUser } from './user';
import { EcsUserAgent } from './user_agent';
import { EcsVlan } from './vlan';
import { EcsVulnerability } from './vulnerability';
import { EcsX509 } from './x509';
export const EcsVersion = '8.6.1' as const;
/**
* Exporting raw schema files for easy programmatic use
*/
export { EcsFlat } from './ecs_flat';
export { EcsNested } from './ecs_nested';
export type {
EcsAgent,
EcsAs,
EcsBase,
EcsClient,
EcsCloud,
EcsCodeSignature,
EcsContainer,
EcsDataStream,
EcsDestination,
EcsDevice,
EcsDll,
EcsDns,
EcsEcs,
EcsElf,
EcsEmail,
EcsError,
EcsEvent,
EcsFaas,
EcsFile,
EcsGeo,
EcsGroup,
EcsHash,
EcsHost,
EcsHttp,
EcsInterface,
EcsLog,
EcsNetwork,
EcsObserver,
EcsOrchestrator,
EcsOrganization,
EcsOs,
EcsPackage,
EcsPe,
EcsProcess,
EcsRegistry,
EcsRelated,
EcsRisk,
EcsRule,
EcsServer,
EcsService,
EcsSource,
EcsThreat,
EcsTls,
EcsTracing,
EcsUrl,
EcsUser,
EcsUserAgent,
EcsVlan,
EcsVulnerability,
EcsX509,
};
export type Ecs = EcsBase &
EcsTracing & {
agent?: EcsAgent;
client?: EcsClient;
cloud?: EcsCloud;
container?: EcsContainer;
data_stream?: EcsDataStream;
destination?: EcsDestination;
device?: EcsDevice;
dll?: EcsDll;
dns?: EcsDns;
ecs: EcsEcs;
email?: EcsEmail;
error?: EcsError;
event?: EcsEvent;
faas?: EcsFaas;
file?: EcsFile;
group?: EcsGroup;
host?: EcsHost;
http?: EcsHttp;
log?: EcsLog;
network?: EcsNetwork;
observer?: EcsObserver;
orchestrator?: EcsOrchestrator;
organization?: EcsOrganization;
package?: EcsPackage;
process?: EcsProcess;
registry?: EcsRegistry;
related?: EcsRelated;
rule?: EcsRule;
server?: EcsServer;
service?: EcsService;
source?: EcsSource;
threat?: EcsThreat;
tls?: EcsTls;
url?: EcsUrl;
user?: EcsUser;
user_agent?: EcsUserAgent;
vulnerability?: EcsVulnerability;
};

View file

@ -1,25 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The interface fields are used to record ingress and egress interface information when reported by an observer (e.g. firewall, router, load balancer) in the context of the observer handling a network connection. In the case of a single observer interface (e.g. network sensor on a span port) only the observer.ingress information should be populated.
*/
export interface EcsInterface {
/**
* Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
*/
alias?: string;
/**
* Interface ID as reported by an observer (typically SNMP interface ID).
*/
id?: string;
/**
* Interface name as reported by the system.
*/
name?: string;
}

View file

@ -1,56 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Details about the event's logging mechanism or logging transport.
* The log.* fields are typically populated with details about the logging mechanism used to create and/or transport the event. For example, syslog details belong under `log.syslog.*`.
* The details specific to your event source are typically not logged under `log.*`, but rather in `event.*` or in other ECS fields.
*/
export interface EcsLog {
file?: {
/**
* Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate.
* If the event wasn't read from a log file, do not populate this field.
*/
path?: string;
};
/**
* Original log level of the log event.
* If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity).
* Some examples are `warn`, `err`, `i`, `informational`.
*/
level?: string;
/**
* The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name.
*/
logger?: string;
origin?: {
file?: {
/**
* The line number of the file containing the source code which originated the log event.
*/
line?: number;
/**
* The name of the file containing the source code which originated the log event.
* Note that this field is not meant to capture the log file. The correct field to capture the log file is `log.file.path`.
*/
name?: string;
};
/**
* The name of the function or method which originated the log event.
*/
function?: string;
};
/**
* The Syslog metadata of the event, if the event was transmitted via Syslog. Please see RFCs 5424 or 3164.
*/
syslog?: Record<string, unknown>;
}

View file

@ -1,61 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain Mac OS Mach Object file format (Mach-O) metadata.
*/
export interface EcsMacho {
/**
* A hash of the Go language imports in a Mach-O file excluding standard library imports. An import hash can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* The algorithm used to calculate the Go symbol hash and a reference implementation are available [here](https://github.com/elastic/toutoumomoma).
*/
go_import_hash?: string;
/**
* List of imported Go language element names and types.
*/
go_imports?: Record<string, unknown>;
/**
* Shannon entropy calculation from the list of Go imports.
*/
go_imports_names_entropy?: number;
/**
* Variance for Shannon entropy calculation from the list of Go imports.
*/
go_imports_names_var_entropy?: number;
/**
* Set to true if the file is a Go executable that has had its symbols stripped or obfuscated and false if an unobfuscated Go executable.
*/
go_stripped?: boolean;
/**
* A hash of the imports in a Mach-O file. An import hash can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* This is a synonym for symhash.
*/
import_hash?: string;
/**
* List of imported element names and types.
*/
imports?: Record<string, unknown>;
/**
* Shannon entropy calculation from the list of imported element names and types.
*/
imports_names_entropy?: number;
/**
* Variance for Shannon entropy calculation from the list of imported element names and types.
*/
imports_names_var_entropy?: number;
/**
* An array containing an object for each section of the Mach-O file.
* The keys that should be present in these objects are defined by sub-fields underneath `macho.sections.*`.
*/
sections?: Record<string, unknown>;
/**
* A hash of the imports in a Mach-O file. An import hash can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* This is a Mach-O implementation of the Windows PE imphash
*/
symhash?: string;
}

View file

@ -1,83 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The network is defined as the communication path over which a host or network event happens.
* The network.* fields should be populated with details about the network activity associated with an event.
*/
export interface EcsNetwork {
/**
* When a specific application or service is identified from network connection details (source/dest IPs, ports, certificates, or wire format), this field captures the application's or service's name.
* For example, the original event identifies the network connection being from a specific web service in a `https` network connection, like `facebook` or `twitter`.
* The field value must be normalized to lowercase for querying.
*/
application?: string;
/**
* Total bytes transferred in both directions.
* If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum.
*/
bytes?: number;
/**
* A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows.
* Learn more at https://github.com/corelight/community-id-spec.
*/
community_id?: string;
/**
* Direction of the network traffic.
* When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress".
* When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external".
* Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers.
*/
direction?: string;
/**
* Host IP address when the source IP address is the proxy.
*/
forwarded_ip?: string;
/**
* IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number.
*/
iana_number?: string;
/**
* Network.inner fields are added in addition to network.vlan fields to describe the innermost VLAN when q-in-q VLAN tagging is present. Allowed fields include vlan.id and vlan.name. Inner vlan fields are typically used when sending traffic with multiple 802.1q encapsulations to a network sensor (e.g. Zeek, Wireshark.)
*/
inner?: Record<string, unknown>;
/**
* Name given by operators to sections of their network.
*/
name?: string;
/**
* Total packets transferred in both directions.
* If `source.packets` and `destination.packets` are known, `network.packets` is their sum.
*/
packets?: number;
/**
* In the OSI Model this would be the Application Layer protocol. For example, `http`, `dns`, or `ssh`.
* The field value must be normalized to lowercase for querying.
*/
protocol?: string;
/**
* Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.)
* The field value must be normalized to lowercase for querying.
*/
transport?: string;
/**
* In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc
* The field value must be normalized to lowercase for querying.
*/
type?: string;
vlan?: {
/**
* VLAN ID as reported by the observer.
*/
id?: string;
/**
* Optional VLAN name as reported by the observer.
*/
name?: string;
};
}

View file

@ -1,144 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* An observer is defined as a special network, security, or application device used to detect, observe, or create network, security, or application-related events and metrics.
* This could be a custom hardware appliance or a server that has been configured to run special network, security, or application software. Examples include firewalls, web proxies, intrusion detection/prevention systems, network monitoring sensors, web application firewalls, data loss prevention systems, and APM servers. The observer.* fields shall be populated with details of the system, if any, that detects, observes and/or creates a network, security, or application event or metric. Message queues and ETL components used in processing events or metrics are not considered observers in ECS.
*/
export interface EcsObserver {
/**
* Observer.egress holds information like interface number and name, vlan, and zone information to classify egress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
*/
egress?: Record<string, unknown>;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* Hostname of the observer.
*/
hostname?: string;
/**
* Observer.ingress holds information like interface number and name, vlan, and zone information to classify ingress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
*/
ingress?: Record<string, unknown>;
/**
* IP addresses of the observer.
*/
ip?: string[];
/**
* MAC addresses of the observer.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string[];
/**
* Custom name of the observer.
* This is a name that can be given to an observer. This can be helpful for example if multiple firewalls of the same model are used in an organization.
* If no custom name is needed, the field can be left empty.
*/
name?: string;
os?: {
/**
* OS family (such as redhat, debian, freebsd, windows).
*/
family?: string;
/**
* Operating system name, including the version or code name.
*/
full?: string;
/**
* Operating system kernel version as a raw string.
*/
kernel?: string;
/**
* Operating system name, without the version.
*/
name?: string;
/**
* Operating system platform (such centos, ubuntu, windows).
*/
platform?: string;
/**
* Use the `os.type` field to categorize the operating system into one of the broad commercial families.
* If the OS you're dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
*/
type?: string;
/**
* Operating system version as a raw string.
*/
version?: string;
};
/**
* The product name of the observer.
*/
product?: string;
/**
* Observer serial number.
*/
serial_number?: string;
/**
* The type of the observer the data is coming from.
* There is no predefined list of observer types. Some examples are `forwarder`, `firewall`, `ids`, `ips`, `proxy`, `poller`, `sensor`, `APM server`.
*/
type?: string;
/**
* Vendor name of the observer.
*/
vendor?: string;
/**
* Observer version.
*/
version?: string;
}

View file

@ -1,74 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields that describe the resources which container orchestrators manage or act upon.
*/
export interface EcsOrchestrator {
/**
* API version being used to carry out the action
*/
api_version?: string;
cluster?: {
/**
* Unique ID of the cluster.
*/
id?: string;
/**
* Name of the cluster.
*/
name?: string;
/**
* URL of the API used to manage the cluster.
*/
url?: string;
/**
* The version of the cluster.
*/
version?: string;
};
/**
* Namespace in which the action is taking place.
*/
namespace?: string;
/**
* Organization affected by the event (for multi-tenant orchestrator setups).
*/
organization?: string;
resource?: {
/**
* Unique ID of the resource being acted upon.
*/
id?: string;
/**
* IP address assigned to the resource associated with the event being observed. In the case of a Kubernetes Pod, this array would contain only one element: the IP of the Pod (as opposed to the Node on which the Pod is running).
*/
ip?: string[];
/**
* Name of the resource being acted upon.
*/
name?: string;
parent?: {
/**
* Type or kind of the parent resource associated with the event being observed. In Kubernetes, this will be the name of a built-in workload resource (e.g., Deployment, StatefulSet, DaemonSet).
*/
type?: string;
};
/**
* Type of resource being acted upon.
*/
type?: string;
};
/**
* Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry).
*/
type?: string;
}

View file

@ -1,22 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The organization fields enrich data with information about the company or entity the data is associated with.
* These fields help you arrange or filter data stored in an index by one or multiple organizations.
*/
export interface EcsOrganization {
/**
* Unique identifier for the organization.
*/
id?: string;
/**
* Organization name.
*/
name?: string;
}

View file

@ -1,42 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The OS fields contain information about the operating system.
*/
export interface EcsOs {
/**
* OS family (such as redhat, debian, freebsd, windows).
*/
family?: string;
/**
* Operating system name, including the version or code name.
*/
full?: string;
/**
* Operating system kernel version as a raw string.
*/
kernel?: string;
/**
* Operating system name, without the version.
*/
name?: string;
/**
* Operating system platform (such centos, ubuntu, windows).
*/
platform?: string;
/**
* Use the `os.type` field to categorize the operating system into one of the broad commercial families.
* If the OS you're dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
*/
type?: string;
/**
* Operating system version as a raw string.
*/
version?: string;
}

View file

@ -1,68 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain information about an installed software package. It contains general information about a package, such as name, version or size. It also contains installation details, such as time or location.
*/
export interface EcsPackage {
/**
* Package architecture.
*/
architecture?: string;
/**
* Additional information about the build version of the installed package.
* For example use the commit SHA of a non-released package.
*/
build_version?: string;
/**
* Checksum of the installed package for verification.
*/
checksum?: string;
/**
* Description of the package.
*/
description?: string;
/**
* Indicating how the package was installed, e.g. user-local, global.
*/
install_scope?: string;
/**
* Time when package was installed.
*/
installed?: string;
/**
* License under which the package was released.
* Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/).
*/
license?: string;
/**
* Package name
*/
name?: string;
/**
* Path where the package is installed.
*/
path?: string;
/**
* Home page or reference URL of the software in this package, if available.
*/
reference?: string;
/**
* Package size in bytes.
*/
size?: number;
/**
* Type of package.
* This should contain the package file type, rather than the package manager name. Examples: rpm, dpkg, brew, npm, gem, nupkg, jar.
*/
type?: string;
/**
* Package version
*/
version?: string;
}

View file

@ -1,47 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* These fields contain Windows Portable Executable (PE) metadata.
*/
export interface EcsPe {
/**
* CPU architecture target for the file.
*/
architecture?: string;
/**
* Internal company name of the file, provided at compile-time.
*/
company?: string;
/**
* Internal description of the file, provided at compile-time.
*/
description?: string;
/**
* Internal version of the file, provided at compile-time.
*/
file_version?: string;
/**
* A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
*/
imphash?: string;
/**
* Internal name of the file, provided at compile-time.
*/
original_file_name?: string;
/**
* A hash of the PE header and data from one or more PE sections. An pehash can be used to cluster files by transforming structural information about a file into a hash value.
* Learn more at https://www.usenix.org/legacy/events/leet09/tech/full_papers/wicherski/wicherski_html/index.html.
*/
pehash?: string;
/**
* Internal product name of the file, provided at compile-time.
*/
product?: string;
}

File diff suppressed because it is too large Load diff

View file

@ -1,46 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields related to Windows Registry operations.
*/
export interface EcsRegistry {
data?: {
/**
* Original bytes written with base64 encoding.
* For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.
*/
bytes?: string;
/**
* Content when writing string types.
* Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`).
*/
strings?: string[];
/**
* Standard registry type for encoding contents
*/
type?: string;
};
/**
* Abbreviated name for the hive.
*/
hive?: string;
/**
* Hive-relative path of keys.
*/
key?: string;
/**
* Full path, including hive, key and value
*/
path?: string;
/**
* Name of the value written.
*/
value?: string;
}

View file

@ -1,31 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* This field set is meant to facilitate pivoting around a piece of data.
* Some pieces of information can be seen in many places in an ECS event. To facilitate searching for them, store an array of all seen values to their corresponding field in `related.`.
* A concrete example is IP addresses, which can be under host, observer, source, destination, client, server, and network.forwarded_ip. If you append all IPs to `related.ip`, you can then search for a given IP trivially, no matter where it appeared, by querying `related.ip:192.0.2.15`.
*/
export interface EcsRelated {
/**
* All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search).
*/
hash?: string[];
/**
* All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases.
*/
hosts?: string[];
/**
* All of the IPs seen on your event.
*/
ip?: string[];
/**
* All the user names or other user identifiers seen on the event.
*/
user?: string[];
}

View file

@ -1,37 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields for describing risk score and risk level of entities such as hosts and users. These fields are not allowed to be nested under `event.*`. Please continue to use `event.risk_score` and `event.risk_score_norm` for event risk.
*/
export interface EcsRisk {
/**
* A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_level?: string;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_score?: number;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring, and normalized to a range of 0 to 100.
*/
calculated_score_norm?: number;
/**
* A risk classification level obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_level?: string;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_score?: number;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform, and normalized to a range of 0 to 100.
*/
static_score_norm?: number;
}

View file

@ -1,55 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other notable events.
* Examples of data sources that would populate the rule fields include: network admission control platforms, network or host IDS/IPS, network firewalls, web application firewalls, url filters, endpoint detection and response (EDR) systems, etc.
*/
export interface EcsRule {
/**
* Name, organization, or pseudonym of the author or authors who created the rule used to generate this event.
*/
author?: string[];
/**
* A categorization value keyword used by the entity using the rule for detection of this event.
*/
category?: string;
/**
* The description of the rule generating the event.
*/
description?: string;
/**
* A rule ID that is unique within the scope of an agent, observer, or other entity using the rule for detection of this event.
*/
id?: string;
/**
* Name of the license under which the rule used to generate this event is made available.
*/
license?: string;
/**
* The name of the rule or signature generating the event.
*/
name?: string;
/**
* Reference URL to additional information about the rule used to generate this event.
* The URL can point to the vendor's documentation about the rule. If that's not available, it can also be a link to a more general page describing this type of alert.
*/
reference?: string;
/**
* Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member.
*/
ruleset?: string;
/**
* A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event.
*/
uuid?: string;
/**
* The version / revision of the rule being used for analysis.
*/
version?: string;
}

File diff suppressed because it is too large Load diff

View file

@ -1,186 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* A Server is defined as the responder in a network connection for events regarding sessions, connections, or bidirectional flow records.
* For TCP events, the server is the receiver of the initial SYN packet(s) of the TCP connection. For other protocols, the server is generally the responder in the network transaction. Some systems actually use the term "responder" to refer the server in TCP connections. The server fields describe details about the system acting as the server in the network event. Server fields are usually populated in conjunction with client fields. Server fields are generally not populated for packet-level events.
* Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
*/
export interface EcsServer {
/**
* Some event server addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
* Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
*/
address?: string;
as?: {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
};
/**
* Bytes sent from the server to the client.
*/
bytes?: number;
/**
* The domain name of the server system.
* This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
*/
domain?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* IP address of the server (IPv4 or IPv6).
*/
ip?: string;
/**
* MAC address of the server.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string;
nat?: {
/**
* Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
* Typically used with load balancers, firewalls, or routers.
*/
ip?: string;
/**
* Translated port of destination based NAT sessions (e.g. internet to private DMZ)
* Typically used with load balancers, firewalls, or routers.
*/
port?: number;
};
/**
* Packets sent from the server to the client.
*/
packets?: number;
/**
* Port of the server.
*/
port?: number;
/**
* The highest registered server domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
user?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
}

View file

@ -1,224 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The service fields describe the service for or from which the data was collected.
* These fields help you find and correlate logs for a specific service and version.
*/
export interface EcsService {
/**
* Address where data about this service was collected from.
* This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets).
*/
address?: string;
/**
* Identifies the environment where the service is running.
* If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment.
*/
environment?: string;
/**
* Ephemeral identifier of this service (if one exists).
* This id normally changes across restarts, but `service.id` does not.
*/
ephemeral_id?: string;
/**
* Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes.
* This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event.
* Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead.
*/
id?: string;
/**
* Name of the service data is collected from.
* The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name.
* In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified.
*/
name?: string;
node?: {
/**
* Name of a service node.
* This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service.
* In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set.
*/
name?: string;
/**
* Deprecated for removal in next major version release. This field will be superseded by `node.roles`.
* Role of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks`.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data`.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
role?: string;
/**
* Roles of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks` or both.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data` or both.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
roles?: string[];
};
origin?: {
/**
* Address where data about this service was collected from.
* This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets).
*/
address?: string;
/**
* Identifies the environment where the service is running.
* If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment.
*/
environment?: string;
/**
* Ephemeral identifier of this service (if one exists).
* This id normally changes across restarts, but `service.id` does not.
*/
ephemeral_id?: string;
/**
* Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes.
* This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event.
* Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead.
*/
id?: string;
/**
* Name of the service data is collected from.
* The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name.
* In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified.
*/
name?: string;
node?: {
/**
* Name of a service node.
* This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service.
* In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set.
*/
name?: string;
/**
* Deprecated for removal in next major version release. This field will be superseded by `node.roles`.
* Role of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks`.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data`.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
role?: string;
/**
* Roles of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks` or both.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data` or both.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
roles?: string[];
};
/**
* Current state of the service.
*/
state?: string;
/**
* The type of the service data is collected from.
* The type can be used to group and correlate logs and metrics from one service type.
* Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`.
*/
type?: string;
/**
* Version of the service the data was collected from.
* This allows to look at a data set only for a specific version of a service.
*/
version?: string;
};
/**
* Current state of the service.
*/
state?: string;
target?: {
/**
* Address where data about this service was collected from.
* This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets).
*/
address?: string;
/**
* Identifies the environment where the service is running.
* If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment.
*/
environment?: string;
/**
* Ephemeral identifier of this service (if one exists).
* This id normally changes across restarts, but `service.id` does not.
*/
ephemeral_id?: string;
/**
* Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes.
* This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event.
* Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead.
*/
id?: string;
/**
* Name of the service data is collected from.
* The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name.
* In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified.
*/
name?: string;
node?: {
/**
* Name of a service node.
* This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service.
* In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set.
*/
name?: string;
/**
* Deprecated for removal in next major version release. This field will be superseded by `node.roles`.
* Role of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks`.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data`.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
role?: string;
/**
* Roles of a service node.
* This allows for distinction between different running roles of the same service.
* In the case of Kibana, the `service.node.role` could be `ui` or `background_tasks` or both.
* In the case of Elasticsearch, the `service.node.role` could be `master` or `data` or both.
* Other services could use this to distinguish between a `web` and `worker` role running as part of the service.
*/
roles?: string[];
};
/**
* Current state of the service.
*/
state?: string;
/**
* The type of the service data is collected from.
* The type can be used to group and correlate logs and metrics from one service type.
* Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`.
*/
type?: string;
/**
* Version of the service the data was collected from.
* This allows to look at a data set only for a specific version of a service.
*/
version?: string;
};
/**
* The type of the service data is collected from.
* The type can be used to group and correlate logs and metrics from one service type.
* Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`.
*/
type?: string;
/**
* Version of the service the data was collected from.
* This allows to look at a data set only for a specific version of a service.
*/
version?: string;
}

View file

@ -1,185 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Source fields capture details about the sender of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.
* Source fields are usually populated in conjunction with destination fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
*/
export interface EcsSource {
/**
* Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field.
* Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
*/
address?: string;
as?: {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
};
/**
* Bytes sent from the source to the destination.
*/
bytes?: number;
/**
* The domain name of the source system.
* This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
*/
domain?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* IP address of the source (IPv4 or IPv6).
*/
ip?: string;
/**
* MAC address of the source.
* The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
*/
mac?: string;
nat?: {
/**
* Translated ip of source based NAT sessions (e.g. internal client to internet)
* Typically connections traversing load balancers, firewalls, or routers.
*/
ip?: string;
/**
* Translated port of source based NAT sessions. (e.g. internal client to internet)
* Typically used with load balancers, firewalls, or routers.
*/
port?: number;
};
/**
* Packets sent from the source to the destination.
*/
packets?: number;
/**
* Port of the source.
*/
port?: number;
/**
* The highest registered source domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
user?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
}

View file

@ -1,882 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields to classify events and alerts according to a threat taxonomy such as the MITRE ATT&CK® framework.
* These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a common taxonomy. The threat.tactic.* fields are meant to capture the high level category of the threat (e.g. "impact"). The threat.technique.* fields are meant to capture which kind of approach is used by this detected threat, to accomplish the goal (e.g. "endpoint denial of service").
*/
export interface EcsThreat {
/**
* A list of associated indicators objects enriching the event, and the context of that association/enrichment.
*/
enrichments?: Array<Record<string, unknown>>;
feed?: {
/**
* The saved object ID of the dashboard belonging to the threat feed for displaying dashboard links to threat feeds in Kibana.
*/
dashboard_id?: string;
/**
* Description of the threat feed in a UI friendly format.
*/
description?: string;
/**
* The name of the threat feed in UI friendly format.
*/
name?: string;
/**
* Reference information for the threat feed in a UI friendly format.
*/
reference?: string;
};
/**
* Name of the threat framework used to further categorize and classify the tactic and technique of the reported threat. Framework classification can be provided by detecting systems, evaluated at ingest time, or retrospectively tagged to events.
*/
framework?: string;
group?: {
/**
* The alias(es) of the group for a set of related intrusion activity that are tracked by a common name in the security community.
* While not required, you can use a MITRE ATT&CK® group alias(es).
*/
alias?: string[];
/**
* The id of the group for a set of related intrusion activity that are tracked by a common name in the security community.
* While not required, you can use a MITRE ATT&CK® group id.
*/
id?: string;
/**
* The name of the group for a set of related intrusion activity that are tracked by a common name in the security community.
* While not required, you can use a MITRE ATT&CK® group name.
*/
name?: string;
/**
* The reference URL of the group for a set of related intrusion activity that are tracked by a common name in the security community.
* While not required, you can use a MITRE ATT&CK® group reference URL.
*/
reference?: string;
};
indicator?: {
as?: {
/**
* Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
*/
number?: number;
organization?: {
/**
* Organization name.
*/
name?: string;
};
};
/**
* Identifies the vendor-neutral confidence rating using the None/Low/Medium/High scale defined in Appendix A of the STIX 2.1 framework. Vendor-specific confidence scales may be added as custom fields.
*/
confidence?: string;
/**
* Describes the type of action conducted by the threat.
*/
description?: string;
email?: {
/**
* Identifies a threat indicator as an email address (irrespective of direction).
*/
address?: string;
};
file?: {
/**
* Last time the file was accessed.
* Note that not all filesystems keep track of access time.
*/
accessed?: string;
/**
* Array of file attributes.
* Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.
*/
attributes?: string[];
code_signature?: {
/**
* The hashing algorithm used to sign the process.
* This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm.
*/
digest_algorithm?: string;
/**
* Boolean to capture if a signature is present.
*/
exists?: boolean;
/**
* The identifier used to sign the process.
* This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
*/
signing_id?: string;
/**
* Additional information about the certificate status.
* This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
*/
status?: string;
/**
* Subject name of the code signer
*/
subject_name?: string;
/**
* The team identifier used to sign the process.
* This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
*/
team_id?: string;
/**
* Date and time when the code signature was generated and signed.
*/
timestamp?: string;
/**
* Stores the trust status of the certificate chain.
* Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
*/
trusted?: boolean;
/**
* Boolean to capture if the digital signature is verified against the binary content.
* Leave unpopulated if a certificate was unchecked.
*/
valid?: boolean;
};
/**
* File creation time.
* Note that not all filesystems store the creation time.
*/
created?: string;
/**
* Last time the file attributes or metadata changed.
* Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file.
*/
ctime?: string;
/**
* Device that is the source of the file.
*/
device?: string;
/**
* Directory where the file is located. It should include the drive letter, when appropriate.
*/
directory?: string;
/**
* Drive letter where the file is located. This field is only relevant on Windows.
* The value should be uppercase, and not include the colon.
*/
drive_letter?: string;
elf?: {
/**
* Machine architecture of the ELF file.
*/
architecture?: string;
/**
* Byte sequence of ELF file.
*/
byte_order?: string;
/**
* CPU type of the ELF file.
*/
cpu_type?: string;
/**
* Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators.
*/
creation_date?: string;
/**
* List of exported element names and types.
*/
exports?: Array<Record<string, unknown>>;
header?: {
/**
* Version of the ELF Application Binary Interface (ABI).
*/
abi_version?: string;
/**
* Header class of the ELF file.
*/
class?: string;
/**
* Data table of the ELF header.
*/
data?: string;
/**
* Header entrypoint of the ELF file.
*/
entrypoint?: number;
/**
* "0x1" for original ELF files.
*/
object_version?: string;
/**
* Application Binary Interface (ABI) of the Linux OS.
*/
os_abi?: string;
/**
* Header type of the ELF file.
*/
type?: string;
/**
* Version of the ELF header.
*/
version?: string;
};
/**
* List of imported element names and types.
*/
imports?: Array<Record<string, unknown>>;
/**
* An array containing an object for each section of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`.
*/
sections?: Array<Record<string, unknown>>;
/**
* An array containing an object for each segment of the ELF file.
* The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`.
*/
segments?: Array<Record<string, unknown>>;
/**
* List of shared libraries used by this ELF object.
*/
shared_libraries?: string[];
/**
* telfhash symbol hash for ELF file.
*/
telfhash?: string;
};
/**
* File extension, excluding the leading dot.
* Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
*/
extension?: string;
/**
* A fork is additional data associated with a filesystem object.
* On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.
* On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: `C:\path\to\filename.extension:some_fork_name`, and `some_fork_name` is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.
*/
fork_name?: string;
/**
* Primary group ID (GID) of the file.
*/
gid?: string;
/**
* Primary group name of the file.
*/
group?: string;
hash?: {
/**
* MD5 hash.
*/
md5?: string;
/**
* SHA1 hash.
*/
sha1?: string;
/**
* SHA256 hash.
*/
sha256?: string;
/**
* SHA384 hash.
*/
sha384?: string;
/**
* SHA512 hash.
*/
sha512?: string;
/**
* SSDEEP hash.
*/
ssdeep?: string;
/**
* TLSH hash.
*/
tlsh?: string;
};
/**
* Inode representing the file in the filesystem.
*/
inode?: string;
/**
* MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.
*/
mime_type?: string;
/**
* Mode of the file in octal representation.
*/
mode?: string;
/**
* Last time the file content was modified.
*/
mtime?: string;
/**
* Name of the file including the extension, without the directory.
*/
name?: string;
/**
* File owner's username.
*/
owner?: string;
/**
* Full path to the file, including the file name. It should include the drive letter, when appropriate.
*/
path?: string;
pe?: {
/**
* CPU architecture target for the file.
*/
architecture?: string;
/**
* Internal company name of the file, provided at compile-time.
*/
company?: string;
/**
* Internal description of the file, provided at compile-time.
*/
description?: string;
/**
* Internal version of the file, provided at compile-time.
*/
file_version?: string;
/**
* A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
* Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
*/
imphash?: string;
/**
* Internal name of the file, provided at compile-time.
*/
original_file_name?: string;
/**
* A hash of the PE header and data from one or more PE sections. An pehash can be used to cluster files by transforming structural information about a file into a hash value.
* Learn more at https://www.usenix.org/legacy/events/leet09/tech/full_papers/wicherski/wicherski_html/index.html.
*/
pehash?: string;
/**
* Internal product name of the file, provided at compile-time.
*/
product?: string;
};
/**
* File size in bytes.
* Only relevant when `file.type` is "file".
*/
size?: number;
/**
* Target path for symlinks.
*/
target_path?: string;
/**
* File type (file, dir, or symlink).
*/
type?: string;
/**
* The user ID (UID) or security identifier (SID) of the file owner.
*/
uid?: string;
x509?: {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
};
};
/**
* The date and time when intelligence source first reported sighting this indicator.
*/
first_seen?: string;
geo?: {
/**
* City name.
*/
city_name?: string;
/**
* Two-letter code representing continent's name.
*/
continent_code?: string;
/**
* Name of the continent.
*/
continent_name?: string;
/**
* Country ISO code.
*/
country_iso_code?: string;
/**
* Country name.
*/
country_name?: string;
/**
* Longitude and latitude.
*/
location?: { lat: number; lon: number };
/**
* User-defined description of a location, at the level of granularity they care about.
* Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
* Not typically used in automated geolocation.
*/
name?: string;
/**
* Postal code associated with the location.
* Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
*/
postal_code?: string;
/**
* Region ISO code.
*/
region_iso_code?: string;
/**
* Region name.
*/
region_name?: string;
/**
* The time zone of the location, such as IANA time zone name.
*/
timezone?: string;
};
/**
* Identifies a threat indicator as an IP address (irrespective of direction).
*/
ip?: string;
/**
* The date and time when intelligence source last reported sighting this indicator.
*/
last_seen?: string;
marking?: {
/**
* Traffic Light Protocol sharing markings.
*/
tlp?: string;
/**
* Traffic Light Protocol version.
*/
tlp_version?: string;
};
/**
* The date and time when intelligence source last modified information for this indicator.
*/
modified_at?: string;
/**
* Identifies a threat indicator as a port number (irrespective of direction).
*/
port?: number;
/**
* The name of the indicator's provider.
*/
provider?: string;
/**
* Reference URL linking to additional information about this indicator.
*/
reference?: string;
registry?: {
data?: {
/**
* Original bytes written with base64 encoding.
* For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.
*/
bytes?: string;
/**
* Content when writing string types.
* Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`).
*/
strings?: string[];
/**
* Standard registry type for encoding contents
*/
type?: string;
};
/**
* Abbreviated name for the hive.
*/
hive?: string;
/**
* Hive-relative path of keys.
*/
key?: string;
/**
* Full path, including hive, key and value
*/
path?: string;
/**
* Name of the value written.
*/
value?: string;
};
/**
* Count of AV/EDR vendors that successfully detected malicious file or URL.
*/
scanner_stats?: number;
/**
* Number of times this indicator was observed conducting threat activity.
*/
sightings?: number;
/**
* Type of indicator as represented by Cyber Observable in STIX 2.0.
*/
type?: string;
url?: {
/**
* Domain of the url, such as "www.elastic.co".
* In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field.
* If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field.
*/
domain?: string;
/**
* The field contains the file extension from the original request url, excluding the leading dot.
* The file extension is only set if it exists, as not every url has a file extension.
* The leading period must not be included. For example, the value must be "png", not ".png".
* Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
*/
extension?: string;
/**
* Portion of the url after the `#`, such as "top".
* The `#` is not part of the fragment.
*/
fragment?: string;
/**
* If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source.
*/
full?: string;
/**
* Unmodified original url as seen in the event source.
* Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path.
* This field is meant to represent the URL as it was observed, complete or not.
*/
original?: string;
/**
* Password of the request.
*/
password?: string;
/**
* Path of the request, such as "/search".
*/
path?: string;
/**
* Port of the request, such as 443.
*/
port?: number;
/**
* The query field describes the query string of the request, such as "q=elasticsearch".
* The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases.
*/
query?: string;
/**
* The highest registered url domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* Scheme of the request, such as "https".
* Note: The `:` is not part of the scheme.
*/
scheme?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
/**
* Username of the request.
*/
username?: string;
};
x509?: {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
};
};
software?: {
/**
* The alias(es) of the software for a set of related intrusion activity that are tracked by a common name in the security community.
* While not required, you can use a MITRE ATT&CK® associated software description.
*/
alias?: string[];
/**
* The id of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®.
* While not required, you can use a MITRE ATT&CK® software id.
*/
id?: string;
/**
* The name of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®.
* While not required, you can use a MITRE ATT&CK® software name.
*/
name?: string;
/**
* The platforms of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®.
* While not required, you can use MITRE ATT&CK® software platform values.
*/
platforms?: string[];
/**
* The reference URL of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®.
* While not required, you can use a MITRE ATT&CK® software reference URL.
*/
reference?: string;
/**
* The type of software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®.
* While not required, you can use a MITRE ATT&CK® software type.
*/
type?: string;
};
tactic?: {
/**
* The id of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
*/
id?: string[];
/**
* Name of the type of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/)
*/
name?: string[];
/**
* The reference url of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
*/
reference?: string[];
};
technique?: {
/**
* The id of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
*/
id?: string[];
/**
* The name of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
*/
name?: string[];
/**
* The reference url of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
*/
reference?: string[];
subtechnique?: {
/**
* The full id of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
*/
id?: string[];
/**
* The name of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
*/
name?: string[];
/**
* The reference url of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
*/
reference?: string[];
};
};
}

View file

@ -1,349 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Fields related to a TLS connection. These fields focus on the TLS protocol itself and intentionally avoids in-depth analysis of the related x.509 certificate files.
*/
export interface EcsTls {
/**
* String indicating the cipher used during the current connection.
*/
cipher?: string;
client?: {
/**
* PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list.
*/
certificate?: string;
/**
* Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain.
*/
certificate_chain?: string[];
hash?: {
/**
* Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
md5?: string;
/**
* Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
sha1?: string;
/**
* Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
sha256?: string;
};
/**
* Distinguished name of subject of the issuer of the x.509 certificate presented by the client.
*/
issuer?: string;
/**
* A hash that identifies clients based on how they perform an SSL/TLS handshake.
*/
ja3?: string;
/**
* Date/Time indicating when client certificate is no longer considered valid.
*/
not_after?: string;
/**
* Date/Time indicating when client certificate is first considered valid.
*/
not_before?: string;
/**
* Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to `destination.domain`.
*/
server_name?: string;
/**
* Distinguished name of subject of the x.509 certificate presented by the client.
*/
subject?: string;
/**
* Array of ciphers offered by the client during the client hello.
*/
supported_ciphers?: string[];
x509?: {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
};
};
/**
* String indicating the curve used for the given cipher, when applicable.
*/
curve?: string;
/**
* Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.
*/
established?: boolean;
/**
* String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.
*/
next_protocol?: string;
/**
* Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
*/
resumed?: boolean;
server?: {
/**
* PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list.
*/
certificate?: string;
/**
* Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain.
*/
certificate_chain?: string[];
hash?: {
/**
* Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
md5?: string;
/**
* Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
sha1?: string;
/**
* Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
*/
sha256?: string;
};
/**
* Subject of the issuer of the x.509 certificate presented by the server.
*/
issuer?: string;
/**
* A hash that identifies servers based on how they perform an SSL/TLS handshake.
*/
ja3s?: string;
/**
* Timestamp indicating when server certificate is no longer considered valid.
*/
not_after?: string;
/**
* Timestamp indicating when server certificate is first considered valid.
*/
not_before?: string;
/**
* Subject of the x.509 certificate presented by the server.
*/
subject?: string;
x509?: {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
};
};
/**
* Numeric part of the version parsed from the original string.
*/
version?: string;
/**
* Normalized lowercase protocol name parsed from original string.
*/
version_protocol?: string;
}

View file

@ -1,37 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* Distributed tracing makes it possible to analyze performance throughout a microservice architecture all in one view. This is accomplished by tracing all of the requests - from the initial web request in the front-end service - to queries made through multiple back-end services.
* Unlike most field sets in ECS, the tracing fields are *not* nested under the field set name. In other words, the correct field name is `trace.id`, not `tracing.trace.id`, and so on.
*/
export interface EcsTracing {
span?: {
/**
* Unique identifier of the span within the scope of its trace.
* A span represents an operation within a transaction, such as a request to another service, or a database query.
*/
id?: string;
};
trace?: {
/**
* Unique identifier of the trace.
* A trace groups multiple events like transactions that belong together. For example, a user request handled by multiple inter-connected services.
*/
id?: string;
};
transaction?: {
/**
* Unique identifier of the transaction within the scope of its trace.
* A transaction is the highest level of work measured within a service, such as a request to a server.
*/
id?: string;
};
}

View file

@ -1,83 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* URL fields provide support for complete or partial URLs, and supports the breaking down into scheme, domain, path, and so on.
*/
export interface EcsUrl {
/**
* Domain of the url, such as "www.elastic.co".
* In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field.
* If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field.
*/
domain?: string;
/**
* The field contains the file extension from the original request url, excluding the leading dot.
* The file extension is only set if it exists, as not every url has a file extension.
* The leading period must not be included. For example, the value must be "png", not ".png".
* Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
*/
extension?: string;
/**
* Portion of the url after the `#`, such as "top".
* The `#` is not part of the fragment.
*/
fragment?: string;
/**
* If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source.
*/
full?: string;
/**
* Unmodified original url as seen in the event source.
* Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path.
* This field is meant to represent the URL as it was observed, complete or not.
*/
original?: string;
/**
* Password of the request.
*/
password?: string;
/**
* Path of the request, such as "/search".
*/
path?: string;
/**
* Port of the request, such as 443.
*/
port?: number;
/**
* The query field describes the query string of the request, such as "q=elasticsearch".
* The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases.
*/
query?: string;
/**
* The highest registered url domain, stripped of the subdomain.
* For example, the registered domain for "foo.example.com" is "example.com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
*/
registered_domain?: string;
/**
* Scheme of the request, such as "https".
* Note: The `:` is not part of the scheme.
*/
scheme?: string;
/**
* The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
* For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
*/
subdomain?: string;
/**
* The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
* This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
*/
top_level_domain?: string;
/**
* Username of the request.
*/
username?: string;
}

View file

@ -1,233 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The user fields describe information about the user that is relevant to the event.
* Fields can have one entry or multiple entries. If a user has more than one id, provide an array that includes all of them.
*/
export interface EcsUser {
changes?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
effective?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
risk?: {
/**
* A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_level?: string;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring.
*/
calculated_score?: number;
/**
* A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring, and normalized to a range of 0 to 100.
*/
calculated_score_norm?: number;
/**
* A risk classification level obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_level?: string;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform.
*/
static_score?: number;
/**
* A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform, and normalized to a range of 0 to 100.
*/
static_score_norm?: number;
};
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
target?: {
/**
* Name of the directory the user is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* User email address.
*/
email?: string;
/**
* User's full name, if available.
*/
full_name?: string;
group?: {
/**
* Name of the directory the group is a member of.
* For example, an LDAP or Active Directory domain name.
*/
domain?: string;
/**
* Unique identifier for the group on the system/platform.
*/
id?: string;
/**
* Name of the group.
*/
name?: string;
};
/**
* Unique user hash to correlate information for a user in anonymized form.
* Useful if `user.id` or `user.name` contain confidential information and cannot be used.
*/
hash?: string;
/**
* Unique identifier of the user.
*/
id?: string;
/**
* Short name or login of the user.
*/
name?: string;
/**
* Array of user roles at the time of the event.
*/
roles?: string[];
};
}

View file

@ -1,65 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The user_agent fields normally come from a browser request.
* They often show up in web service logs coming from the parsed user agent string.
*/
export interface EcsUserAgent {
device?: {
/**
* Name of the device.
*/
name?: string;
};
/**
* Name of the user agent.
*/
name?: string;
/**
* Unparsed user_agent string.
*/
original?: string;
os?: {
/**
* OS family (such as redhat, debian, freebsd, windows).
*/
family?: string;
/**
* Operating system name, including the version or code name.
*/
full?: string;
/**
* Operating system kernel version as a raw string.
*/
kernel?: string;
/**
* Operating system name, without the version.
*/
name?: string;
/**
* Operating system platform (such centos, ubuntu, windows).
*/
platform?: string;
/**
* Use the `os.type` field to categorize the operating system into one of the broad commercial families.
* If the OS you're dealing with is not listed as an expected value, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
*/
type?: string;
/**
* Operating system version as a raw string.
*/
version?: string;
};
/**
* Version of the user agent.
*/
version?: string;
}

View file

@ -1,24 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The VLAN fields are used to identify 802.1q tag(s) of a packet, as well as ingress and egress VLAN associations of an observer in relation to a specific packet or connection.
* Network.vlan fields are used to record a single VLAN tag, or the outer tag in the case of q-in-q encapsulations, for a packet or connection as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic.
* Network.inner VLAN fields are used to report inner q-in-q 802.1q tags (multiple 802.1q encapsulations) as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic. Network.inner VLAN fields should only be used in addition to network.vlan fields to indicate q-in-q tagging.
* Observer.ingress and observer.egress VLAN values are used to record observer specific information when observer events contain discrete ingress and egress VLAN information, typically provided by firewalls, routers, or load balancers.
*/
export interface EcsVlan {
/**
* VLAN ID as reported by the observer.
*/
id?: string;
/**
* Optional VLAN name as reported by the observer.
*/
name?: string;
}

View file

@ -1,76 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* The vulnerability fields describe information about a vulnerability that is relevant to an event.
*/
export interface EcsVulnerability {
/**
* The type of system or architecture that the vulnerability affects. These may be platform-specific (for example, Debian or SUSE) or general (for example, Database or Firewall). For example (https://qualysguard.qualys.com/qwebhelp/fo_portal/knowledgebase/vulnerability_categories.htm[Qualys vulnerability categories])
* This field must be an array.
*/
category?: string[];
/**
* The classification of the vulnerability scoring system. For example (https://www.first.org/cvss/)
*/
classification?: string;
/**
* The description of the vulnerability that provides additional context of the vulnerability. For example (https://cve.mitre.org/about/faqs.html#cve_entry_descriptions_created[Common Vulnerabilities and Exposure CVE description])
*/
description?: string;
/**
* The type of identifier used for this vulnerability. For example (https://cve.mitre.org/about/)
*/
enumeration?: string;
/**
* The identification (ID) is the number portion of a vulnerability entry. It includes a unique identification number for the vulnerability. For example (https://cve.mitre.org/about/faqs.html#what_is_cve_id)[Common Vulnerabilities and Exposure CVE ID]
*/
id?: string;
/**
* A resource that provides additional information, context, and mitigations for the identified vulnerability.
*/
reference?: string;
/**
* The report or scan identification number.
*/
report_id?: string;
scanner?: {
/**
* The name of the vulnerability scanner vendor.
*/
vendor?: string;
};
score?: {
/**
* Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
* Base scores cover an assessment for exploitability metrics (attack vector, complexity, privileges, and user interaction), impact metrics (confidentiality, integrity, and availability), and scope. For example (https://www.first.org/cvss/specification-document)
*/
base?: number;
/**
* Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
* Environmental scores cover an assessment for any modified Base metrics, confidentiality, integrity, and availability requirements. For example (https://www.first.org/cvss/specification-document)
*/
environmental?: number;
/**
* Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
* Temporal scores cover an assessment for code maturity, remediation level, and confidence. For example (https://www.first.org/cvss/specification-document)
*/
temporal?: number;
/**
* The National Vulnerability Database (NVD) provides qualitative severity rankings of "Low", "Medium", and "High" for CVSS v2.0 base score ranges in addition to the severity ratings for CVSS v3.0 as they are defined in the CVSS v3.0 specification.
* CVSS is owned and managed by FIRST.Org, Inc. (FIRST), a US-based non-profit organization, whose mission is to help computer security incident response teams across the world. For example (https://nvd.nist.gov/vuln-metrics/cvss)
*/
version?: string;
};
/**
* The severity of the vulnerability can help with metrics and internal prioritization regarding remediation. For example (https://nvd.nist.gov/vuln-metrics/cvss)
*/
severity?: string;
}

View file

@ -1,117 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/**
* This implements the common core fields for x509 certificates. This information is likely logged with TLS sessions, digital signatures found in executable binaries, S/MIME information in email bodies, or analysis of files on disk.
* When the certificate relates to a file, use the fields at `file.x509`. When hashes of the DER-encoded certificate are available, the `hash` data set should be populated as well (e.g. `file.hash.sha256`).
* Events that contain certificate information about network connections, should use the x509 fields under the relevant TLS fields: `tls.server.x509` and/or `tls.client.x509`.
*/
export interface EcsX509 {
/**
* List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
*/
alternative_names?: string[];
issuer?: {
/**
* List of common name (CN) of issuing certificate authority.
*/
common_name?: string[];
/**
* List of country \(C) codes
*/
country?: string[];
/**
* Distinguished name (DN) of issuing certificate authority.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of issuing certificate authority.
*/
organization?: string[];
/**
* List of organizational units (OU) of issuing certificate authority.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Time at which the certificate is no longer considered valid.
*/
not_after?: string;
/**
* Time at which the certificate is first considered valid.
*/
not_before?: string;
/**
* Algorithm used to generate the public key.
*/
public_key_algorithm?: string;
/**
* The curve used by the elliptic curve public key algorithm. This is algorithm specific.
*/
public_key_curve?: string;
/**
* Exponent used to derive the public key. This is algorithm specific.
*/
public_key_exponent?: number;
/**
* The size of the public key space in bits.
*/
public_key_size?: number;
/**
* Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
*/
serial_number?: string;
/**
* Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
*/
signature_algorithm?: string;
subject?: {
/**
* List of common names (CN) of subject.
*/
common_name?: string[];
/**
* List of country \(C) code
*/
country?: string[];
/**
* Distinguished name (DN) of the certificate subject entity.
*/
distinguished_name?: string;
/**
* List of locality names (L)
*/
locality?: string[];
/**
* List of organizations (O) of subject.
*/
organization?: string[];
/**
* List of organizational units (OU) of subject.
*/
organizational_unit?: string[];
/**
* List of state or province names (ST, S, or P)
*/
state_or_province?: string[];
};
/**
* Version of x509 format.
*/
version_number?: string;
}

View file

@ -1,9 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export * from './generated';

View file

@ -1,13 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-ecs'],
};

View file

@ -1,5 +0,0 @@
{
"type": "shared-common",
"id": "@kbn/ecs",
"owner": ["@elastic/kibana-core", "@elastic/security-threat-hunting-investigations"]
}

View file

@ -1,7 +0,0 @@
{
"name": "@kbn/ecs",
"version": "1.0.0",
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"sideEffects": false
}

View file

@ -1,16 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node"
]
},
"include": [
"**/*.ts",
],
"exclude": [
"target/**/*",
]
}

View file

@ -40,7 +40,7 @@ import {
EcsUserAgent,
EcsVulnerability,
EcsAgent,
} from '@kbn/ecs';
} from '@elastic/ecs';
/**
* Represents the ECS schema with the following reserved keys excluded:

View file

@ -11,7 +11,6 @@
"**/*.ts"
],
"kbn_references": [
"@kbn/ecs",
"@kbn/std"
],
"exclude": [

View file

@ -219,7 +219,7 @@ export type {
AppenderConfigType,
} from '@kbn/core-logging-server';
export type { Logger, LoggerFactory, LogMeta, LogRecord, LogLevel } from '@kbn/logging';
export type { Ecs, EcsEvent } from '@kbn/ecs';
export type { Ecs, EcsEvent } from '@elastic/ecs';
export type { NodeInfo, NodeRoles } from '@kbn/core-node-server';

View file

@ -115,7 +115,6 @@
"@kbn/core-capabilities-common",
"@kbn/core-base-common-internal",
"@kbn/core-http-common",
"@kbn/ecs",
"@kbn/core-node-server",
"@kbn/core-saved-objects-browser",
"@kbn/core-ui-settings-common",

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { EcsEvent } from '@kbn/ecs';
import { EcsEvent } from '@elastic/ecs';
import { AuditEvent } from '@kbn/security-plugin/server';
export type AuditAction = 'create' | 'delete';

View file

@ -26,7 +26,6 @@
"@kbn/std",
"@kbn/core-saved-objects-api-server",
"@kbn/core-logging-server-mocks",
"@kbn/ecs",
"@kbn/safer-lodash-set",
"@kbn/logging-mocks",
"@kbn/core-elasticsearch-server-mocks",

View file

@ -700,8 +700,6 @@
"@kbn/dom-drag-drop/*": ["packages/kbn-dom-drag-drop/*"],
"@kbn/ebt-tools": ["packages/kbn-ebt-tools"],
"@kbn/ebt-tools/*": ["packages/kbn-ebt-tools/*"],
"@kbn/ecs": ["packages/kbn-ecs"],
"@kbn/ecs/*": ["packages/kbn-ecs/*"],
"@kbn/ecs-data-quality-dashboard": ["x-pack/packages/security-solution/ecs_data_quality_dashboard"],
"@kbn/ecs-data-quality-dashboard/*": ["x-pack/packages/security-solution/ecs_data_quality_dashboard/*"],
"@kbn/ecs-data-quality-dashboard-plugin": ["x-pack/plugins/ecs_data_quality_dashboard"],

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsFlat } from '@kbn/ecs';
import { EcsFlat } from '@elastic/ecs';
import { omit } from 'lodash/fp';
import { getUnallowedValueRequestItems, getValidValues, hasAllowedValues } from './helpers';
@ -54,26 +54,28 @@ describe('helpers', () => {
describe('getValidValues', () => {
test('it returns the expected valid values', () => {
expect(getValidValues(ecsMetadata['event.category'])).toEqual([
'authentication',
'configuration',
'database',
'driver',
'email',
'file',
'host',
'iam',
'intrusion_detection',
'malware',
'network',
'package',
'process',
'registry',
'session',
'threat',
'vulnerability',
'web',
]);
expect(getValidValues(ecsMetadata['event.category'])).toEqual(
expect.arrayContaining([
'authentication',
'configuration',
'database',
'driver',
'email',
'file',
'host',
'iam',
'intrusion_detection',
'malware',
'network',
'package',
'process',
'registry',
'session',
'threat',
'vulnerability',
'web',
])
);
});
test('it returns an empty array when the `field` does NOT have `allowed_values`', () => {
@ -96,26 +98,33 @@ describe('helpers', () => {
allowed_values: missingDatabase,
};
expect(getValidValues(field)).toEqual([
'authentication',
'configuration',
// no entry for 'database'
'driver',
'email',
'file',
'host',
'iam',
'intrusion_detection',
'malware',
'network',
'package',
'process',
'registry',
'session',
'threat',
'vulnerability',
'web',
]);
expect(getValidValues(field)).toEqual(
expect.arrayContaining([
'authentication',
'configuration',
'driver',
'email',
'file',
'host',
'iam',
'intrusion_detection',
'malware',
'network',
'package',
'process',
'registry',
'session',
'threat',
'vulnerability',
'web',
])
);
expect(getValidValues(field)).not.toEqual(
expect.arrayContaining([
// there should be no entry for 'database'
'database',
])
);
});
});
@ -130,7 +139,7 @@ describe('helpers', () => {
{
indexName: 'auditbeat-*',
indexFieldName: 'event.category',
allowedValues: [
allowedValues: expect.arrayContaining([
'authentication',
'configuration',
'database',
@ -149,12 +158,12 @@ describe('helpers', () => {
'threat',
'vulnerability',
'web',
],
]),
},
{
indexName: 'auditbeat-*',
indexFieldName: 'event.kind',
allowedValues: [
allowedValues: expect.arrayContaining([
'alert',
'enrichment',
'event',
@ -162,17 +171,17 @@ describe('helpers', () => {
'state',
'pipeline_error',
'signal',
],
]),
},
{
indexName: 'auditbeat-*',
indexFieldName: 'event.outcome',
allowedValues: ['failure', 'success', 'unknown'],
allowedValues: expect.arrayContaining(['failure', 'success', 'unknown']),
},
{
indexName: 'auditbeat-*',
indexFieldName: 'event.type',
allowedValues: [
allowedValues: expect.arrayContaining([
'access',
'admin',
'allowed',
@ -190,7 +199,7 @@ describe('helpers', () => {
'protocol',
'start',
'user',
],
]),
},
]);
});

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsFlat, EcsVersion } from '@kbn/ecs';
import { EcsFlat, EcsVersion } from '@elastic/ecs';
import { checkIndex, EMPTY_PARTITIONED_FIELD_METADATA } from './check_index';
import { EMPTY_STAT } from '../../../../helpers';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsFlat, EcsVersion } from '@kbn/ecs';
import { EcsFlat, EcsVersion } from '@elastic/ecs';
import { EuiButton } from '@elastic/eui';
import React, { useCallback, useEffect, useRef, useState } from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsFlat } from '@kbn/ecs';
import { EcsFlat } from '@elastic/ecs';
import {
getMappingsProperties,
@ -121,543 +121,50 @@ describe('helpers', () => {
mappingsProperties: mockMappingsProperties,
unallowedValues,
})
).toEqual({
all: [
{
dashed_name: 'timestamp',
description:
'Date/time when the event originated.\nThis is the date/time extracted from the event, typically representing when the event was generated by the source.\nIf the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.\nRequired field for all events.',
example: '2016-05-23T08:05:34.853Z',
flat_name: '@timestamp',
level: 'core',
name: '@timestamp',
normalize: [],
required: true,
short: 'Date/time when the event originated.',
type: 'date',
indexFieldName: '@timestamp',
indexFieldType: 'date',
indexInvalidValues: [],
).toMatchObject({
all: expect.arrayContaining([
expect.objectContaining({
name: expect.any(String),
flat_name: expect.any(String),
dashed_name: expect.any(String),
description: expect.any(String),
hasEcsMetadata: true,
isEcsCompliant: expect.any(Boolean),
isInSameFamily: expect.any(Boolean),
}),
]),
ecsCompliant: expect.arrayContaining([
expect.objectContaining({
name: expect.any(String),
flat_name: expect.any(String),
dashed_name: expect.any(String),
description: expect.any(String),
hasEcsMetadata: true,
isEcsCompliant: true,
isInSameFamily: false,
},
{
allowed_values: [
{
description:
'Events in this category are related to the challenge and response process in which credentials are supplied and verified to allow the creation of a session. Common sources for these logs are Windows event logs and ssh logs. Visualize and analyze events in this category to look for failed logins, and other authentication-related activity.',
expected_event_types: ['start', 'end', 'info'],
name: 'authentication',
},
{
description:
'Events in the configuration category have to deal with creating, modifying, or deleting the settings or parameters of an application, process, or system.\nExample sources include security policy change logs, configuration auditing logging, and system integrity monitoring.',
expected_event_types: ['access', 'change', 'creation', 'deletion', 'info'],
name: 'configuration',
},
{
description:
'The database category denotes events and metrics relating to a data storage and retrieval system. Note that use of this category is not limited to relational database systems. Examples include event logs from MS SQL, MySQL, Elasticsearch, MongoDB, etc. Use this category to visualize and analyze database activity such as accesses and changes.',
expected_event_types: ['access', 'change', 'info', 'error'],
name: 'database',
},
{
description:
'Events in the driver category have to do with operating system device drivers and similar software entities such as Windows drivers, kernel extensions, kernel modules, etc.\nUse events and metrics in this category to visualize and analyze driver-related activity and status on hosts.',
expected_event_types: ['change', 'end', 'info', 'start'],
name: 'driver',
},
{
description:
'This category is used for events relating to email messages, email attachments, and email network or protocol activity.\nEmails events can be produced by email security gateways, mail transfer agents, email cloud service providers, or mail server monitoring applications.',
expected_event_types: ['info'],
name: 'email',
},
{
description:
'Relating to a set of information that has been created on, or has existed on a filesystem. Use this category of events to visualize and analyze the creation, access, and deletions of files. Events in this category can come from both host-based and network-based sources. An example source of a network-based detection of a file transfer would be the Zeek file.log.',
expected_event_types: ['change', 'creation', 'deletion', 'info'],
name: 'file',
},
{
description:
'Use this category to visualize and analyze information such as host inventory or host lifecycle events.\nMost of the events in this category can usually be observed from the outside, such as from a hypervisor or a control plane\'s point of view. Some can also be seen from within, such as "start" or "end".\nNote that this category is for information about hosts themselves; it is not meant to capture activity "happening on a host".',
expected_event_types: ['access', 'change', 'end', 'info', 'start'],
name: 'host',
},
{
description:
'Identity and access management (IAM) events relating to users, groups, and administration. Use this category to visualize and analyze IAM-related logs and data from active directory, LDAP, Okta, Duo, and other IAM systems.',
expected_event_types: [
'admin',
'change',
'creation',
'deletion',
'group',
'info',
'user',
],
name: 'iam',
},
{
description:
'Relating to intrusion detections from IDS/IPS systems and functions, both network and host-based. Use this category to visualize and analyze intrusion detection alerts from systems such as Snort, Suricata, and Palo Alto threat detections.',
expected_event_types: ['allowed', 'denied', 'info'],
name: 'intrusion_detection',
},
{
description:
'Malware detection events and alerts. Use this category to visualize and analyze malware detections from EDR/EPP systems such as Elastic Endpoint Security, Symantec Endpoint Protection, Crowdstrike, and network IDS/IPS systems such as Suricata, or other sources of malware-related events such as Palo Alto Networks threat logs and Wildfire logs.',
expected_event_types: ['info'],
name: 'malware',
},
{
description:
'Relating to all network activity, including network connection lifecycle, network traffic, and essentially any event that includes an IP address. Many events containing decoded network protocol transactions fit into this category. Use events in this category to visualize or analyze counts of network ports, protocols, addresses, geolocation information, etc.',
expected_event_types: [
'access',
'allowed',
'connection',
'denied',
'end',
'info',
'protocol',
'start',
],
name: 'network',
},
{
description:
'Relating to software packages installed on hosts. Use this category to visualize and analyze inventory of software installed on various hosts, or to determine host vulnerability in the absence of vulnerability scan data.',
expected_event_types: [
'access',
'change',
'deletion',
'info',
'installation',
'start',
],
name: 'package',
},
{
description:
'Use this category of events to visualize and analyze process-specific information such as lifecycle events or process ancestry.',
expected_event_types: ['access', 'change', 'end', 'info', 'start'],
name: 'process',
},
{
description:
'Having to do with settings and assets stored in the Windows registry. Use this category to visualize and analyze activity such as registry access and modifications.',
expected_event_types: ['access', 'change', 'creation', 'deletion'],
name: 'registry',
},
{
description:
'The session category is applied to events and metrics regarding logical persistent connections to hosts and services. Use this category to visualize and analyze interactive or automated persistent connections between assets. Data for this category may come from Windows Event logs, SSH logs, or stateless sessions such as HTTP cookie-based sessions, etc.',
expected_event_types: ['start', 'end', 'info'],
name: 'session',
},
{
description:
"Use this category to visualize and analyze events describing threat actors' targets, motives, or behaviors.",
expected_event_types: ['indicator'],
name: 'threat',
},
{
description:
'Relating to vulnerability scan results. Use this category to analyze vulnerabilities detected by Tenable, Qualys, internal scanners, and other vulnerability management sources.',
expected_event_types: ['info'],
name: 'vulnerability',
},
{
description:
'Relating to web server access. Use this category to create a dashboard of web server/proxy activity from apache, IIS, nginx web servers, etc. Note: events from network observers such as Zeek http log may also be included in this category.',
expected_event_types: ['access', 'error', 'info'],
name: 'web',
},
],
dashed_name: 'event-category',
description:
'This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.\n`event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.\nThis field is an array. This will allow proper categorization of some events that fall in multiple categories.',
example: 'authentication',
flat_name: 'event.category',
ignore_above: 1024,
level: 'core',
name: 'category',
normalize: ['array'],
short: 'Event category. The second categorization field in the hierarchy.',
type: 'keyword',
indexFieldName: 'event.category',
indexFieldType: 'keyword',
indexInvalidValues: [
{
count: 2,
fieldName: 'an_invalid_category',
},
{
count: 1,
fieldName: 'theory',
},
],
hasEcsMetadata: true,
}),
]),
custom: expect.arrayContaining([
expect.objectContaining({
indexFieldName: expect.any(String),
indexFieldType: expect.any(String),
indexInvalidValues: expect.any(Array),
hasEcsMetadata: expect.any(Boolean),
isEcsCompliant: expect.any(Boolean),
isInSameFamily: expect.any(Boolean),
}),
]),
incompatible: expect.arrayContaining([
expect.objectContaining({
name: expect.any(String),
flat_name: expect.any(String),
dashed_name: expect.any(String),
description: expect.any(String),
hasEcsMetadata: expect.any(Boolean),
isEcsCompliant: false,
isInSameFamily: false,
},
{
dashed_name: 'host-name',
description:
'Name of the host.\nIt can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.',
flat_name: 'host.name',
ignore_above: 1024,
level: 'core',
name: 'name',
normalize: [],
short: 'Name of the host.',
type: 'keyword',
indexFieldName: 'host.name',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'host.name.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'some.field',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'some.field.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
dashed_name: 'source-ip',
description: 'IP address of the source (IPv4 or IPv6).',
flat_name: 'source.ip',
level: 'core',
name: 'ip',
normalize: [],
short: 'IP address of the source.',
type: 'ip',
indexFieldName: 'source.ip',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'source.ip.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
dashed_name: 'source-port',
description: 'Port of the source.',
flat_name: 'source.port',
format: 'string',
level: 'core',
name: 'port',
normalize: [],
short: 'Port of the source.',
type: 'long',
indexFieldName: 'source.port',
indexFieldType: 'long',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: true,
isInSameFamily: false,
},
],
ecsCompliant: [
{
dashed_name: 'timestamp',
description:
'Date/time when the event originated.\nThis is the date/time extracted from the event, typically representing when the event was generated by the source.\nIf the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.\nRequired field for all events.',
example: '2016-05-23T08:05:34.853Z',
flat_name: '@timestamp',
level: 'core',
name: '@timestamp',
normalize: [],
required: true,
short: 'Date/time when the event originated.',
type: 'date',
indexFieldName: '@timestamp',
indexFieldType: 'date',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: true,
isInSameFamily: false,
},
{
dashed_name: 'source-port',
description: 'Port of the source.',
flat_name: 'source.port',
format: 'string',
level: 'core',
name: 'port',
normalize: [],
short: 'Port of the source.',
type: 'long',
indexFieldName: 'source.port',
indexFieldType: 'long',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: true,
isInSameFamily: false,
},
],
custom: [
{
indexFieldName: 'host.name.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'some.field',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'some.field.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
{
indexFieldName: 'source.ip.keyword',
indexFieldType: 'keyword',
indexInvalidValues: [],
hasEcsMetadata: false,
isEcsCompliant: false,
isInSameFamily: false,
},
],
incompatible: [
{
allowed_values: [
{
description:
'Events in this category are related to the challenge and response process in which credentials are supplied and verified to allow the creation of a session. Common sources for these logs are Windows event logs and ssh logs. Visualize and analyze events in this category to look for failed logins, and other authentication-related activity.',
expected_event_types: ['start', 'end', 'info'],
name: 'authentication',
},
{
description:
'Events in the configuration category have to deal with creating, modifying, or deleting the settings or parameters of an application, process, or system.\nExample sources include security policy change logs, configuration auditing logging, and system integrity monitoring.',
expected_event_types: ['access', 'change', 'creation', 'deletion', 'info'],
name: 'configuration',
},
{
description:
'The database category denotes events and metrics relating to a data storage and retrieval system. Note that use of this category is not limited to relational database systems. Examples include event logs from MS SQL, MySQL, Elasticsearch, MongoDB, etc. Use this category to visualize and analyze database activity such as accesses and changes.',
expected_event_types: ['access', 'change', 'info', 'error'],
name: 'database',
},
{
description:
'Events in the driver category have to do with operating system device drivers and similar software entities such as Windows drivers, kernel extensions, kernel modules, etc.\nUse events and metrics in this category to visualize and analyze driver-related activity and status on hosts.',
expected_event_types: ['change', 'end', 'info', 'start'],
name: 'driver',
},
{
description:
'This category is used for events relating to email messages, email attachments, and email network or protocol activity.\nEmails events can be produced by email security gateways, mail transfer agents, email cloud service providers, or mail server monitoring applications.',
expected_event_types: ['info'],
name: 'email',
},
{
description:
'Relating to a set of information that has been created on, or has existed on a filesystem. Use this category of events to visualize and analyze the creation, access, and deletions of files. Events in this category can come from both host-based and network-based sources. An example source of a network-based detection of a file transfer would be the Zeek file.log.',
expected_event_types: ['change', 'creation', 'deletion', 'info'],
name: 'file',
},
{
description:
'Use this category to visualize and analyze information such as host inventory or host lifecycle events.\nMost of the events in this category can usually be observed from the outside, such as from a hypervisor or a control plane\'s point of view. Some can also be seen from within, such as "start" or "end".\nNote that this category is for information about hosts themselves; it is not meant to capture activity "happening on a host".',
expected_event_types: ['access', 'change', 'end', 'info', 'start'],
name: 'host',
},
{
description:
'Identity and access management (IAM) events relating to users, groups, and administration. Use this category to visualize and analyze IAM-related logs and data from active directory, LDAP, Okta, Duo, and other IAM systems.',
expected_event_types: [
'admin',
'change',
'creation',
'deletion',
'group',
'info',
'user',
],
name: 'iam',
},
{
description:
'Relating to intrusion detections from IDS/IPS systems and functions, both network and host-based. Use this category to visualize and analyze intrusion detection alerts from systems such as Snort, Suricata, and Palo Alto threat detections.',
expected_event_types: ['allowed', 'denied', 'info'],
name: 'intrusion_detection',
},
{
description:
'Malware detection events and alerts. Use this category to visualize and analyze malware detections from EDR/EPP systems such as Elastic Endpoint Security, Symantec Endpoint Protection, Crowdstrike, and network IDS/IPS systems such as Suricata, or other sources of malware-related events such as Palo Alto Networks threat logs and Wildfire logs.',
expected_event_types: ['info'],
name: 'malware',
},
{
description:
'Relating to all network activity, including network connection lifecycle, network traffic, and essentially any event that includes an IP address. Many events containing decoded network protocol transactions fit into this category. Use events in this category to visualize or analyze counts of network ports, protocols, addresses, geolocation information, etc.',
expected_event_types: [
'access',
'allowed',
'connection',
'denied',
'end',
'info',
'protocol',
'start',
],
name: 'network',
},
{
description:
'Relating to software packages installed on hosts. Use this category to visualize and analyze inventory of software installed on various hosts, or to determine host vulnerability in the absence of vulnerability scan data.',
expected_event_types: [
'access',
'change',
'deletion',
'info',
'installation',
'start',
],
name: 'package',
},
{
description:
'Use this category of events to visualize and analyze process-specific information such as lifecycle events or process ancestry.',
expected_event_types: ['access', 'change', 'end', 'info', 'start'],
name: 'process',
},
{
description:
'Having to do with settings and assets stored in the Windows registry. Use this category to visualize and analyze activity such as registry access and modifications.',
expected_event_types: ['access', 'change', 'creation', 'deletion'],
name: 'registry',
},
{
description:
'The session category is applied to events and metrics regarding logical persistent connections to hosts and services. Use this category to visualize and analyze interactive or automated persistent connections between assets. Data for this category may come from Windows Event logs, SSH logs, or stateless sessions such as HTTP cookie-based sessions, etc.',
expected_event_types: ['start', 'end', 'info'],
name: 'session',
},
{
description:
"Use this category to visualize and analyze events describing threat actors' targets, motives, or behaviors.",
expected_event_types: ['indicator'],
name: 'threat',
},
{
description:
'Relating to vulnerability scan results. Use this category to analyze vulnerabilities detected by Tenable, Qualys, internal scanners, and other vulnerability management sources.',
expected_event_types: ['info'],
name: 'vulnerability',
},
{
description:
'Relating to web server access. Use this category to create a dashboard of web server/proxy activity from apache, IIS, nginx web servers, etc. Note: events from network observers such as Zeek http log may also be included in this category.',
expected_event_types: ['access', 'error', 'info'],
name: 'web',
},
],
dashed_name: 'event-category',
description:
'This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.\n`event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.\nThis field is an array. This will allow proper categorization of some events that fall in multiple categories.',
example: 'authentication',
flat_name: 'event.category',
ignore_above: 1024,
level: 'core',
name: 'category',
normalize: ['array'],
short: 'Event category. The second categorization field in the hierarchy.',
type: 'keyword',
indexFieldName: 'event.category',
indexFieldType: 'keyword',
indexInvalidValues: [
{
count: 2,
fieldName: 'an_invalid_category',
},
{
count: 1,
fieldName: 'theory',
},
],
hasEcsMetadata: true,
isEcsCompliant: false,
isInSameFamily: false,
},
{
dashed_name: 'host-name',
description:
'Name of the host.\nIt can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.',
flat_name: 'host.name',
ignore_above: 1024,
level: 'core',
name: 'name',
normalize: [],
short: 'Name of the host.',
type: 'keyword',
indexFieldName: 'host.name',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: false,
isInSameFamily: false,
},
{
dashed_name: 'source-ip',
description: 'IP address of the source (IPv4 or IPv6).',
flat_name: 'source.ip',
level: 'core',
name: 'ip',
normalize: [],
short: 'IP address of the source.',
type: 'ip',
indexFieldName: 'source.ip',
indexFieldType: 'text',
indexInvalidValues: [],
hasEcsMetadata: true,
isEcsCompliant: false,
isInSameFamily: false,
},
],
}),
]),
sameFamily: [],
});
});

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsFlat, EcsVersion } from '@kbn/ecs';
import { EcsFlat, EcsVersion } from '@elastic/ecs';
import type {
FlameElementEvent,
HeatmapElementEvent,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { EuiCallOut, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { render, screen } from '@testing-library/react';
import React from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { EuiCallOut, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { render, screen } from '@testing-library/react';
import React from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { EuiCallOut, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { render, screen } from '@testing-library/react';
import React from 'react';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui';
import React, { useMemo } from 'react';

View file

@ -6,7 +6,7 @@
*/
import numeral from '@elastic/numeral';
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { euiThemeVars } from '@kbn/ui-theme';
import { ECS_IS_A_PERMISSIVE_SCHEMA } from '../../index_properties/translations';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { euiThemeVars } from '@kbn/ui-theme';
import { FIELD, INDEX_MAPPING_TYPE } from '../../../compare_fields_table/translations';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { EuiCallOut, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';

View file

@ -6,7 +6,7 @@
*/
import numeral from '@elastic/numeral';
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { euiThemeVars } from '@kbn/ui-theme';
import {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import {
getSummaryMarkdownComment,

View file

@ -6,7 +6,7 @@
*/
import numeral from '@elastic/numeral';
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import {
getAllSameFamilyMarkdownComments,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import {
FIELD,

View file

@ -6,7 +6,7 @@
*/
import numeral from '@elastic/numeral';
import { EcsVersion } from '@kbn/ecs';
import { EcsVersion } from '@elastic/ecs';
import { euiThemeVars } from '@kbn/ui-theme';
import { EMPTY_STAT } from '../../../helpers';

Some files were not shown because too many files have changed in this diff Show more