Skip to content

Comments

Improve grok pattern for firewall rules#1

Open
LoudSoftware wants to merge 1 commit intolawrencesystems:mainfrom
LoudSoftware:patch-1
Open

Improve grok pattern for firewall rules#1
LoudSoftware wants to merge 1 commit intolawrencesystems:mainfrom
LoudSoftware:patch-1

Conversation

@LoudSoftware
Copy link

After noticing some messages not matching against the current pattern, I took the liberty of tweaking it to add the following:

  • Added support for ICMP-specific fields: TYPE, CODE, ID, SEQ
  • Captured standalone TCP flags (SYN, ACK, RST, FIN, etc.) as optional literals
  • Switched IP fields to IPORHOST to allow for IPv6 matching
  • Made optional fields like MAC, UID, GID, LEN, SEQ, ACK more robust
  • Updated DESCR field parsing to support both [Group]Rule and plain text formats
  • Improved overall compatibility with varying log structures

Note: This was implemented and tested in a pipeline rule, while I'm almost confident it would work in an extractor, it should be tested first.

…ESCR

- Added support for ICMP-specific fields: TYPE, CODE, ID, SEQ
- Captured standalone TCP flags (SYN, ACK, RST, FIN, etc.) as optional literals
- Switched IP fields to IPORHOST to allow for IPv6 matching
- Made optional fields like MAC, UID, GID, LEN, SEQ, ACK more robust
- Updated DESCR field parsing to support both [Group]Rule and plain text formats
- Improved overall compatibility with varying log structures
@TXJustin
Copy link

@LoudSoftware I'm using your extractors and they work great -- thank you !

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.

2 participants