elastic / integrations

Elastic Integrations
https://www.elastic.co/integrations
Other
196 stars 425 forks source link

[Network Packet Capture] Add `with_vlans` and `ignore_outgoing` options #10059

Open jvalente-salemstate opened 3 months ago

jvalente-salemstate commented 3 months ago

Description

Packetbeat's Documentation includes configuration options that are not included in the integration (at least with managed agents).

...[I]f the traffic contains VLAN tags, the filter that Packetbeat generates is ineffective because the offset is moved by four bytes. To fix this, you can enable the with_vlans option, which generates a BPF filter that looks like this: "port 80 or port 3306 or (vlan and (port 80 or port 3306))"

Aside from fixing that issue,this would also enrich the event with extra information. These fields are included in the exported fields list, but they're not in any of the generated sample events.

Allow users to toggle whether outgoing packets are included. This would support scenarios where only inbound traffic is wanted, or avoiding duplicate captures if both source and destination are running packet capture

Proposed Enhancement

Include toggles in the package manifest for Network Packet Capture to enable/disable the with_vlans and ignore_outgoing configuration options.

elasticmachine commented 3 months ago

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

elasticmachine commented 3 months ago

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

elasticmachine commented 2 months ago

Package network_traffic - 1.31.0 containing this change is available at https://epr.elastic.co/search?package=network_traffic