Skip to content

[Winlogbeat] Implement exclusion range support for event_id #38623

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

Closed
andrewkroh opened this issue Mar 26, 2024 · 2 comments · Fixed by #41639
Closed

[Winlogbeat] Implement exclusion range support for event_id #38623

andrewkroh opened this issue Mar 26, 2024 · 2 comments · Fixed by #41639
Assignees
Labels
enhancement Team:Security-Windows Platform Windows Platform Team in Security Solution Winlogbeat

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Mar 26, 2024

Describe the enhancement:

Explore if it is possible to add support for an exclusion range in the event_id configuration option for Winlogbeat (e.g. event_id: -4700-4800).

Describe a specific use case for the enhancement or feature:

Sometimes you want to exclude a range of event IDs, but that is not supported.

Workarounds

The current workaround is complicated (this is with the Fleet custom windows event log integration where xml_query is not supported). Outside of Fleet I assume you can craft an xml_query to exclude ranges.

processors:
  # Convert winlog.event_id from string to a number and store it in _tmp.event_id.
  - convert:
      fields:
        - from: winlog.event_id
          to: _tmp.event_id
          type: long
  # Use the numeric _tmp.event_id to drop the event based on range conditions which
  # only work on numeric values.
  - drop_event:
      when:
        range:
            _tmp.event_id.gte: 4700
            _tmp.event_id.lt: 4800
  # Remove the temporary _tmp object.
  - drop_fields:
      ignore_missing: true
      fields:
        - _tmp

References

@andrewkroh andrewkroh added enhancement Winlogbeat Team:Security-Windows Platform Windows Platform Team in Security Solution labels Mar 26, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@marc-gr
Copy link
Contributor

marc-gr commented Nov 11, 2024

Should we expose xml_query on the integration also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Team:Security-Windows Platform Windows Platform Team in Security Solution Winlogbeat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants