GreyNoise-Intelligence / greynoise-fluentbit-lua

A prototype GreyNoise integration for FluentBit with Lua scripts.

Home Page:https://greynoise.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tail regex is capturing IPs that start with a 0 causing HTTP 500 errors

Obsecurus opened this issue · comments

IPs starting with `0 with more than one digit in the first octet are incorrectly handled by the iputil module and then passed to GreyNoise which results in an HTTP 500.

See https://github.com/GreyNoise-Intelligence/greynoise-fluentbit-lua/blob/main/examples/parsers.conf#L4 but this should also be marked as an invalid IP in check_ip and never sent to the API.

Fixed with: Regex /(?<host>(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))/