-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crowdstrike: fix handling of network direction (#12508)
Assume that network direction that is not inbound can be validly semantically represented as outbound using the ECS fields available. This is probably not true; documented values of the ConnectionDirection are 0 - outbound, 1 - inbound, 2 - neither, and 3 - both[1]. Adhering strictly to inbound/outbound makes it impossible to map the data to ECS since neither and both would only be expressible as unknown. [1]https://docs.panther.com/data-onboarding/supported-logs/crowdstrike/falcon-data-replicator#crowdstrike.networkconnect
- Loading branch information
Showing
8 changed files
with
256 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -316,4 +316,4 @@ | |
} | ||
} | ||
] | ||
} | ||
} |
This file contains 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 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 |
---|---|---|
|
@@ -68,4 +68,4 @@ | |
} | ||
} | ||
] | ||
} | ||
} |
This file contains 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
90 changes: 90 additions & 0 deletions
90
packages/crowdstrike/data_stream/fdr/elasticsearch/ingest_pipeline/inbound_network.yml
This file contains 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,90 @@ | ||
--- | ||
description: Pipeline for processing inbound network details | ||
processors: | ||
- set: | ||
field: destination.ip | ||
if: ctx.destination?.ip == null && ctx.crowdstrike?.CurrentLocalIP != null | ||
value: '{{{crowdstrike.CurrentLocalIP}}}' | ||
- set: | ||
field: destination.ip | ||
if: ctx.destination?.ip == null && ctx.crowdstrike.LocalIP != null | ||
value: '{{{crowdstrike.LocalIP}}}' | ||
- set: | ||
field: destination.ip | ||
if: ctx.destination?.ip == null && ctx.crowdstrike?.LocalAddressIP4 instanceof List && ctx.crowdstrike.LocalAddressIP4.length > 0 | ||
value: '{{{crowdstrike.LocalAddressIP4.0}}}' | ||
- set: | ||
field: destination.ip | ||
if: ctx.destination?.ip == null && ctx.crowdstrike?.LocalAddressIP6 instanceof List && ctx.crowdstrike.LocalAddressIP6.length > 0 | ||
value: '{{{crowdstrike.LocalAddressIP6.0}}}' | ||
- convert: | ||
tag: convert_destination_ip | ||
field: destination.ip | ||
type: ip | ||
ignore_missing: true | ||
on_failure: | ||
- remove: | ||
field: destination.ip | ||
ignore_missing: true | ||
- append: | ||
field: error.message | ||
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | ||
- set: | ||
field: destination.address | ||
copy_from: destination.ip | ||
ignore_empty_value: true | ||
- rename: | ||
field: crowdstrike.LocalPort | ||
target_field: destination.port | ||
ignore_missing: true | ||
|
||
- rename: | ||
field: crowdstrike.MAC | ||
target_field: destination.mac | ||
ignore_missing: true | ||
- rename: | ||
if: ctx.destination?.mac == null | ||
field: crowdstrike.PhysicalAddress | ||
target_field: destination.mac | ||
ignore_missing: true | ||
|
||
- convert: | ||
tag: convert_RemoteAddressIP4_ip | ||
field: crowdstrike.RemoteAddressIP4 | ||
type: ip | ||
ignore_missing: true | ||
on_failure: | ||
- remove: | ||
field: crowdstrike.RemoteAddressIP4 | ||
ignore_missing: true | ||
- append: | ||
field: error.message | ||
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | ||
- rename: | ||
field: crowdstrike.RemoteAddressIP4 | ||
target_field: source.ip | ||
ignore_missing: true | ||
- convert: | ||
tag: convert_RemoteAddressIP6_ip | ||
field: crowdstrike.RemoteAddressIP6 | ||
type: ip | ||
ignore_missing: true | ||
on_failure: | ||
- remove: | ||
field: crowdstrike.RemoteAddressIP6 | ||
ignore_missing: true | ||
- append: | ||
field: error.message | ||
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | ||
- rename: | ||
field: crowdstrike.RemoteAddressIP6 | ||
target_field: source.ip | ||
ignore_missing: true | ||
- set: | ||
field: source.address | ||
copy_from: source.ip | ||
ignore_empty_value: true | ||
- rename: | ||
field: crowdstrike.RemotePort | ||
target_field: source.port | ||
ignore_missing: true |
Oops, something went wrong.