Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
CONN\:.*?prio=(?<severity>\d)\s+id=(?<vmid>\d+).*?event=(?<tag1>\w+)\s+rule=(?<tag2>\w+)\s+conn=(?<tag3>\w+)\s+connipproto=(?<protname>\w+)\s+connrecvif=(?<dinterface>\w+)\s+connsrcip=(?<sip>(\d{1,3}\.){3}\d{1,3})\s+connsrcport=(?<sport>\d+).*?conndestip=(?<dip>(\d{1,3}\.){3}\d{1,3})\s+conndestport=(?<dport>\d+)
/
g

Description

Parses out Clavister FW logs for SIEM mapping

Submitted by anonymous - 7 years ago