Skip to content
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

Filterx parse leef 2.0 #343

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

bshifter
Copy link
Member

This PR adds support for the LEEF 2.0 format, specifically focusing on its dynamic header field, delimiter. The task required a significant refactor of the event-parser base module and the unit test framework. Additionally, it introduces optional named arguments for the filterx function, allowing for forced overrides of pair-separator and value-separator. This enhancement will enable us to parse specific non-standard CEF/LEEF messages more effectively.

examples:

filterx {
  dict = {};
  dict.A = parse_cef($MSG, pair_separator="^", value_separator="#");
  dict.B = parse_cef($MSG);
  dict.C = parse_leef($MSG);
  dict.D = parse_leef($MSG, pair_separator="|");
}

… data without using expected columns mode

Signed-off-by: shifter <shifter@axoflow.com>
…for improved thread safety. This was required to accommodate the dynamic parsing of the optional delimiter field in LEEF 2.0.

Additionally, introduce optional arguments named `field_separator` and `value_separator` in the filterx function to enforce specific separators.

Signed-off-by: shifter <shifter@axoflow.com>
…lterx function.

Signed-off-by: shifter <shifter@axoflow.com>
…EEF 2.0 version.

Changes include:
- Updated usage message
- Enhanced version parsing
- Added optional 'delimiter' field to parse and configure the LEEF extension's pair separator based on the specified delimiter value.

Signed-off-by: shifter <shifter@axoflow.com>
- Moved to a separate unit to improve organization due to their size
- Implemented `va_args` functions for more flexible construction of filterx function arguments
- Generalized helper functions to reduce code duplication in CEF/LEEF tests

Signed-off-by: shifter <shifter@axoflow.com>
- Utilize the updated test helpers module
- Include additional tests for enforcing pair-separator and value-separator functionality

Signed-off-by: shifter <shifter@axoflow.com>
- Utilize the updated test helpers module
- Include additional tests for enforcing pair-separator and value-separator functionality
- Add extra tests for parsing and utilizing the optional `delimiter` field in LEEF 2.0

Signed-off-by: shifter <shifter@axoflow.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant