-
Notifications
You must be signed in to change notification settings - Fork 617
[Zeek] Add additional data sets #3340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e3c16d0
Add Software Log
legoguy1000 9e5e007
Add Known Certs
legoguy1000 58141c1
Add Known Hosts
legoguy1000 7fdfff9
Add Known Services
legoguy1000 764a4f8
add samples
legoguy1000 5aeba45
update changelog
legoguy1000 7a93917
Updates per comments
legoguy1000 d9d019a
fixed spelling
legoguy1000 6864493
fix errors
legoguy1000 031b6dc
Merge remote-tracking branch 'upstream/main' into zeek-additional-logs
legoguy1000 b6301d8
fix dataset
legoguy1000 e3c1028
Default to `forwarded` tag to not add host fields to Zeek data
legoguy1000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"ts":"2021-01-03T00:16:22.694616Z","host":"192.168.4.25","software_type":"HTTP::BROWSER","name":"Windows-Update-Agent","version.major":10,"version.minor":0,"version.minor2":10011,"version.minor3":16384,"version.addl":"Client","unparsed_version":"Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.0"} |
1 change: 1 addition & 0 deletions
1
packages/zeek/data_stream/software/_dev/test/pipeline/test-software.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"ts":"2021-01-03T00:16:22.694616Z","host":"192.168.4.25","software_type":"HTTP::BROWSER","name":"Windows-Update-Agent","version.major":10,"version.minor":0,"version.minor2":10011,"version.minor3":16384,"version.addl":"Client","unparsed_version":"Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.0"} |
4 changes: 4 additions & 0 deletions
4
packages/zeek/data_stream/software/_dev/test/pipeline/test-software.log-config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| fields: | ||
| "@timestamp": "2020-04-28T11:07:58.223Z" | ||
| tags: | ||
| - preserve_original_event |
44 changes: 44 additions & 0 deletions
44
packages/zeek/data_stream/software/_dev/test/pipeline/test-software.log-expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "expected": [ | ||
| { | ||
| "@timestamp": "2021-01-03T00:16:22.694Z", | ||
| "ecs": { | ||
| "version": "8.2.0" | ||
| }, | ||
| "event": { | ||
| "category": "network", | ||
| "created": "2020-04-28T11:07:58.223Z", | ||
| "kind": "info", | ||
| "original": "{\"ts\":\"2021-01-03T00:16:22.694616Z\",\"host\":\"192.168.4.25\",\"software_type\":\"HTTP::BROWSER\",\"name\":\"Windows-Update-Agent\",\"version.major\":10,\"version.minor\":0,\"version.minor2\":10011,\"version.minor3\":16384,\"version.addl\":\"Client\",\"unparsed_version\":\"Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.0\"}" | ||
| }, | ||
| "host": { | ||
| "ip": "192.168.4.25" | ||
| }, | ||
| "network": { | ||
| "type": "ipv4" | ||
| }, | ||
| "related": { | ||
| "ip": [ | ||
| "192.168.4.25" | ||
| ] | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event" | ||
| ], | ||
| "zeek": { | ||
| "software": { | ||
| "name": "Windows-Update-Agent", | ||
| "type": "HTTP::BROWSER", | ||
| "version": { | ||
| "additional": "Client", | ||
| "full": "Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.0", | ||
| "major": 10, | ||
| "minor": 0, | ||
| "minor2": 10011, | ||
| "minor3": 16384 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/zeek/data_stream/software/_dev/test/system/test-logs-config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| vars: | ||
| base_paths: | ||
| - "{{SERVICE_LOGS_DIR}}" | ||
| input: logfile | ||
| data_stream: | ||
| vars: ~ | ||
|
legoguy1000 marked this conversation as resolved.
|
||
21 changes: 21 additions & 0 deletions
21
packages/zeek/data_stream/software/agent/stream/log.yml.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| paths: | ||
| {{#each base_paths}} | ||
| {{#each ../filenames}} | ||
| - {{../this}}/{{this}} | ||
| {{/each}} | ||
| {{/each}} | ||
| exclude_files: [".gz$"] | ||
| tags: | ||
| {{#if preserve_original_event}} | ||
| - preserve_original_event | ||
| {{/if}} | ||
| {{#each tags as |tag i|}} | ||
| - {{tag}} | ||
| {{/each}} | ||
| {{#contains "forwarded" tags}} | ||
| publisher_pipeline.disable_host: true | ||
| {{/contains}} | ||
| {{#if processors}} | ||
| processors: | ||
| {{processors}} | ||
| {{/if}} |
96 changes: 96 additions & 0 deletions
96
packages/zeek/data_stream/software/elasticsearch/ingest_pipeline/default.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| --- | ||
| description: Pipeline for normalizing Zeek conn.log | ||
| processors: | ||
| - rename: | ||
| field: message | ||
| target_field: event.original | ||
| - json: | ||
| field: event.original | ||
| target_field: _temp_ | ||
| - drop: | ||
| description: Drop if no timestamp (invalid json) | ||
| if: 'ctx?._temp_?.ts == null' | ||
| - rename: | ||
| field: _temp_ | ||
| target_field: zeek.software | ||
| ignore_failure: true | ||
|
|
||
| # Sets event.created from the @timestamp field generated by filebeat before being overwritten further down | ||
| - set: | ||
| field: event.created | ||
| copy_from: "@timestamp" | ||
| - set: | ||
| field: ecs.version | ||
| value: '8.2.0' | ||
| - set: | ||
| field: event.kind | ||
| value: info | ||
| - set: | ||
| field: event.category | ||
| value: network | ||
| - rename: | ||
| field: zeek.software.host | ||
| target_field: host.ip | ||
| ignore_missing: true | ||
| - date: | ||
| field: zeek.software.ts | ||
| formats: | ||
| - UNIX | ||
| - ISO8601 | ||
| - set: | ||
| field: network.type | ||
| value: ipv4 | ||
| if: ctx.host?.ip.contains('.') | ||
| - set: | ||
| field: network.type | ||
| value: ipv6 | ||
| if: ctx.host?.ip.contains(':') | ||
| - append: | ||
| field: related.ip | ||
| value: "{{host.ip}}" | ||
| if: ctx?.host?.ip != null | ||
| allow_duplicates: false | ||
| - geoip: | ||
| field: host.ip | ||
| target_field: host.geo | ||
| ignore_missing: true | ||
| - rename: | ||
| field: zeek.software.software_type | ||
| target_field: zeek.software.type | ||
| ignore_missing: true | ||
| - rename: | ||
| field: zeek.software.unparsed_version | ||
| target_field: zeek.software.version.full | ||
| ignore_missing: true | ||
| - dot_expander: | ||
| field: version.major | ||
| path: zeek.software | ||
| - dot_expander: | ||
| field: version.minor | ||
| path: zeek.software | ||
| - dot_expander: | ||
| field: version.minor2 | ||
| path: zeek.software | ||
| - dot_expander: | ||
| field: version.minor3 | ||
| path: zeek.software | ||
| - dot_expander: | ||
| field: version.addl | ||
| path: zeek.software | ||
| - rename: | ||
| field: zeek.software.version.addl | ||
| target_field: zeek.software.version.additional | ||
| ignore_missing: true | ||
| - remove: | ||
| field: | ||
| - zeek.software.ts | ||
| ignore_missing: true | ||
| - remove: | ||
| field: event.original | ||
| if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))" | ||
| ignore_failure: true | ||
| ignore_missing: true | ||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: "{{ _ingest.on_failure_message }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| - name: cloud | ||
| title: Cloud | ||
| group: 2 | ||
| description: Fields related to the cloud or infrastructure the events are coming from. | ||
| footnote: "Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on." | ||
| type: group | ||
| fields: | ||
| - name: account.id | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: "The cloud account or organization id used to identify different entities in a multi-tenant environment.\nExamples: AWS account id, Google Cloud ORG Id, or other unique identifier." | ||
| example: 666777888999 | ||
| - name: availability_zone | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Availability zone in which this host is running. | ||
| example: us-east-1c | ||
| - name: instance.id | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Instance ID of the host machine. | ||
| example: i-1234567890abcdef0 | ||
| - name: instance.name | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Instance name of the host machine. | ||
| - name: machine.type | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Machine type of the host machine. | ||
| example: t2.medium | ||
| - name: provider | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | ||
| example: aws | ||
| - name: region | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Region in which this host is running. | ||
| example: us-east-1 | ||
| - name: project.id | ||
| type: keyword | ||
| description: Name of the project in Google Cloud. | ||
| - name: image.id | ||
| type: keyword | ||
| description: Image ID for the cloud instance. | ||
| - name: container | ||
| title: Container | ||
| group: 2 | ||
| description: "Container fields are used for meta information about the specific container that is the source of information.\nThese fields help correlate data based containers from any runtime." | ||
| type: group | ||
| fields: | ||
| - name: id | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Unique container id. | ||
| - name: image.name | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Name of the image the container was built on. | ||
| - name: labels | ||
| level: extended | ||
| type: object | ||
| object_type: keyword | ||
| description: Image labels. | ||
| - name: name | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Container name. | ||
| - name: host | ||
| title: Host | ||
| group: 2 | ||
| description: "A host is defined as a general computing instance.\nECS 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." | ||
| type: group | ||
| fields: | ||
| - name: architecture | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Operating system architecture. | ||
| example: x86_64 | ||
| - name: domain | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: "Name of the domain of which the host is a member.\nFor 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." | ||
| example: CONTOSO | ||
| default_field: false | ||
| - name: hostname | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: "Hostname of the host.\nIt normally contains what the `hostname` command returns on the host machine." | ||
| - name: id | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: "Unique host id.\nAs hostname is not always unique, use values that are meaningful in your environment.\nExample: The current usage of `beat.name`." | ||
| - name: ip | ||
| level: core | ||
| type: ip | ||
| description: Host ip addresses. | ||
| - name: mac | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Host mac addresses. | ||
| - name: name | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| 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." | ||
| - name: os.family | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: OS family (such as redhat, debian, freebsd, windows). | ||
| example: debian | ||
| - name: os.kernel | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Operating system kernel version as a raw string. | ||
| example: 4.4.0-112-generic | ||
| - name: os.name | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| multi_fields: | ||
| - name: text | ||
| type: text | ||
| norms: false | ||
| default_field: false | ||
| description: Operating system name, without the version. | ||
| example: Mac OS X | ||
| - name: os.platform | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Operating system platform (such centos, ubuntu, windows). | ||
| example: darwin | ||
| - name: os.version | ||
| level: extended | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: Operating system version as a raw string. | ||
| example: 10.14.1 | ||
| - name: type | ||
| level: core | ||
| type: keyword | ||
| ignore_above: 1024 | ||
| description: "Type of host.\nFor 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." | ||
| - name: containerized | ||
| type: boolean | ||
| description: > | ||
| If the host is a container. | ||
|
|
||
| - name: os.build | ||
| type: keyword | ||
| example: "18D109" | ||
| description: > | ||
| OS build information. | ||
|
|
||
| - name: os.codename | ||
| type: keyword | ||
| example: "stretch" | ||
| description: > | ||
| OS codename, if any. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| - name: data_stream.type | ||
| type: constant_keyword | ||
| description: Data stream type. | ||
| - name: data_stream.dataset | ||
| type: constant_keyword | ||
| description: Data stream dataset. | ||
| - name: data_stream.namespace | ||
| type: constant_keyword | ||
| description: Data stream namespace. | ||
| - name: event.module | ||
| type: constant_keyword | ||
| description: Event module | ||
| value: zeek | ||
| - name: event.dataset | ||
| type: constant_keyword | ||
| description: Event dataset | ||
| value: zeek.software | ||
| - name: '@timestamp' | ||
| type: date | ||
| description: Event timestamp. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.