Skip to content

Instantly share code, notes, and snippets.

@automine
Last active June 7, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save automine/2fe88e6ae33878f875562d8837ce69af to your computer and use it in GitHub Desktop.
Save automine/2fe88e6ae33878f875562d8837ce69af to your computer and use it in GitHub Desktop.
fun with CEF
[cef_sourcetype]
KV_MODE = none
EXTRACT-cef-message = \sCEF:\d\|(?<vendor>[^\|]+)\|(?<product>[^\|]+)\|(?<version>[^\|]+)\|(?<signature_id>[^\|]+)\|(?<signature>[^\|]+)\|(?<vendor_severity>[^\|]+)\|(?<cef_message>.*)
REPORT-cefLabelFirst = cefLabelFirst
REPORT-cefLabelSecond = cefLabelSecond
REPORT-builtInCefFields = builtInCefFields
[cefLabelFirst]
SOURCE_KEY = cef_message
REGEX = \bc(s|n)(\d+)(?:Label)?=(?<_KEY_1>[^=]+)(?=\s+\w+=).*?c\1\2=(?<_VAL_1>[^=]+)(?=\s+\w+=)
KEEP_EMPTY_VALS = True
MV_ADD = True
[cefLabelSecond]
SOURCE_KEY = cef_message
REGEX = \bc(s|n)(\d+)=(?<_VAL_1>[^=]+)(?=\s+\w+=).*?c\1\2(?:Label)?=(?<_KEY_1>[^=]+)(?=\s+\w+=)
KEEP_EMPTY_VALS = True
MV_ADD = True
[builtInCefFields]
SOURCE_KEY = cef_message
REGEX = \b(?<_KEY_1>(?!c[sn])\w+)=(?<_VAL_1>[^=]+)(?=(?:\s+\w+=|$))
KEEP_EMPTY_VALS = True
MV_ADD = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment