# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. gnatbox_syslog_required = { plugin_version = "1.0.1" # Initial creation - 1.0 # 2010-11-22 - 1.0.1 - MSG - Edited info lines. info.1.manfacturer = "Global Technology Associates" info.1.device = "GNAT Box (sylog required)" info.1.version.1 = "" # The name of the log format log.format.format_label = "GNAT Box Log Format (Syslog Required)" log.miscellaneous.log_data_type = "syslog_required" log.miscellaneous.log_format_type = "firewall" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "(NAT|FILTER|PASS|WWW)[: ].*(->|<-)" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { category = { label = "$lang_stats.field_labels.category" type = "flat" index = 0 subindex = 0 } # category direction = { label = "$lang_stats.field_labels.direction" type = "flat" index = 0 subindex = 0 } # direction protocol = { label = "$lang_stats.field_labels.protocol" type = "flat" index = 0 subindex = 0 } # protocol operation = { label = "$lang_stats.field_labels.operation" type = "flat" index = 0 subindex = 0 } # operation url = { label = "$lang_stats.field_labels.url" type = "page" index = 0 subindex = 0 hierarchy_dividers = "/?" left_to_right = true leading_divider = "false" } # url source_host = { label = "$lang_stats.field_labels.source_host" type = "host" index = 0 subindex = 0 hierarchy_dividers = "." left_to_right = false leading_divider = "false" } # source_host source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" index = 0 subindex = 0 } # source_port intermediate_host = { label = "$lang_stats.field_labels.intermediate_host" type = "flat" index = 0 subindex = 0 } # intermediate_host intermediate_port = { label = "$lang_stats.field_labels.intermediate_port" type = "flat" index = 0 subindex = 0 } # intermediate_port destination_host = { label = "$lang_stats.field_labels.destination_host" type = "flat" index = 0 subindex = 0 } # destination_host destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" index = 0 subindex = 0 } # destination_port packets_sent = { label = "$lang_stats.field_labels.packets_sent" type = "integer" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # packets_sent packets_received = { label = "$lang_stats.field_labels.packets_received" type = "integer" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # packets_received bytes_sent = { label = "$lang_stats.field_labels.bytes_sent" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # bytes_sent bytes_received = { label = "$lang_stats.field_labels.bytes_received" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # bytes_received duration = { label = "$lang_stats.field_labels.duration" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = ":" left_to_right = false leading_divider = "false" } # duration } # log.fields # Log Parsing Filters log.parsing_filters = { # Parse out the NAT information 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('() (NAT):( | -->| <--) (Open.*|Close.*) (TCP|UDP|tunnel) ', '*KEY*,category,direction,operation,protocol')" } # 1 # Parse out the WWW information 2 = { label = "2" comment = "" value = "collect_fields_using_regexp('() (WWW):( | -->| <--) [^ ]* ([A-Z]*) (.*)\\\\.$', 'v*KEY*,category,direction,operation,url')" } # 2 # Parse out NAT: WWW information 3 = { label = "3" comment = "" value = "collect_fields_using_regexp('() (NAT: WWW) - (Close) (TCP) .* bytes=[^ ]* (.*)$', '*KEY*,category,operation,protocol,url')" } # 3 # Parse out "WWW - " information 3 = { label = "3" comment = "" value = "collect_fields_using_regexp('() (WWW) - (Close tunnel) (TCP)', '*KEY*,category,operation,protocol')" } # 3 # Parse out the FILTER information 4 = { label = "4" comment = "" value = "collect_fields_using_regexp('() (FILTER): (.*):* (TCP|UDP) ', '*KEY*,category,operation,protocol')" } # 4 # Parse out the PASS information 5 = { label = "5" comment = "" value = "collect_fields_using_regexp('() (PASS): (.*) (TCP|UDP) ', '*KEY*,category,operation,protocol')" } # 5 # Parse out the hosts and ports, <- with intermediate hosts 6 = { label = "6" comment = "" value = "collect_fields_using_regexp('() \\\\[([^/:]*)[/:]([0-9]*)\\\\]<-\\\\[([^/:]*)[/:]([0-9]*)\\\\]<-\\\\[([^/:]*)[/:]([0-9]*)\\\\]', '*KEY*,destination_host,destination_port,intermediate_host,intermediate_port,source_host,source_port')" } # 6 # Parse out the hosts and ports, -> with intermediate hosts 7 = { label = "7" comment = "" value = "collect_fields_using_regexp('() \\\\[([^/:]*)[/:]([0-9]*)\\\\]->\\\\[([^/:]*)[/:]([0-9]*)\\\\]->\\\\[([^/:]*)[/:]([0-9]*)\\\\]', '*KEY*,source_host,source_port,intermediate_host,intermediate_port,destination_host,destination_port')" } # 7 # Parse out the hosts and ports, <- without intermediate hosts 8 = { label = "8" comment = "" value = "collect_fields_using_regexp('() \\\\[([^/:]*)[/:]([0-9]*)\\\\]<-\\\\[([^/:]*)[/:]([0-9]*)\\\\]', '*KEY*,destination_host,destination_port,source_host,source_port')" } # 8 # Parse out the hosts and ports, -> without intermediate hosts 9 = { label = "9" comment = "" value = "collect_fields_using_regexp('() \\\\[([^/:]*)[/:]([0-9]*)\\\\]->\\\\[([^/:]*)[/:]([0-9]*)\\\\]', '*KEY*,source_host,source_port,destination_host,destination_port')" } # 9 # Parse the duration, packets, and bytes 10 = { label = "10" comment = "" value = "collect_fields_using_regexp('() dur=([0-9][0-9]:[0-9][0-9]:[0-9][0-9]) pkts=([0-9]*):([0-9]*) bytes=([0-9]*):([0-9]*)', '*KEY*,duration,packets_sent,packets_received,bytes_sent,bytes_received')" } # 10 # Parse an alternate format packets and bytes 11 = { label = "11" comment = "" value = "collect_fields_using_regexp('() Pkts ([0-9]*) ([0-9]*), Bytes ([0-9]*) ([0-9]*)', '*KEY*,packets_sent,packets_received,bytes_sent,bytes_received')" } # 11 # Accept this log entry 12 = { label = "12" comment = "" value = "accept_collected_entry_using_regexp('() (WWW:|WWW - |NAT:|FILTER:|PASS:)', false)" } # 12 } # log.parsing_filters # Database fields database.fields = { category = { label = "$lang_stats.field_labels.category" log_field = "category" type = "string" suppress_top = 0 suppress_bottom = 2 } # category protocol = { label = "$lang_stats.field_labels.protocol" log_field = "protocol" type = "string" suppress_top = 0 suppress_bottom = 2 } # protocol direction = { label = "$lang_stats.field_labels.direction" log_field = "direction" type = "string" suppress_top = 0 suppress_bottom = 2 } # direction operation = { label = "$lang_stats.field_labels.operation" log_field = "operation" type = "string" suppress_top = 0 suppress_bottom = 2 } # operation url = { label = "$lang_stats.field_labels.url" log_field = "url" type = "string" suppress_top = 1 suppress_bottom = 3 } # url file_type = { label = "$lang_stats.field_labels.file_type" log_field = "file_type" type = "string" suppress_top = 0 suppress_bottom = 2 } # file_type worm = { label = "$lang_stats.field_labels.worm" log_field = "worm" type = "string" suppress_top = 0 suppress_bottom = 2 } # worm source_host = { label = "$lang_stats.field_labels.source_host" log_field = "source_host" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_host source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_port intermediate_host = { label = "$lang_stats.field_labels.intermediate_host" log_field = "intermediate_host" type = "string" suppress_top = 0 suppress_bottom = 2 } # intermediate_host intermediate_port = { label = "$lang_stats.field_labels.intermediate_port" log_field = "intermediate_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # intermediate_port destination_host = { label = "$lang_stats.field_labels.destination_host" log_field = "destination_host" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_host destination_port = { label = "$lang_stats.field_labels.destination_port" log_field = "destination_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_port } # database.fields # Log Filters log.filters = { remove_query = { label = "$lang_admin.log_filters.remove_query_label" comment = "$lang_admin.log_filters.remove_query_comment" value = "if (contains(url, '?')) then url = substr(url, 0, index(url, '?') + 1) . '(parameters)';" } # remove_query detect_page_views = { label = '$lang_admin.log_filters.detect_page_views_label' comment = '$lang_admin.log_filters.detect_page_views_comment' value = "if ((file_type eq 'JPEG') or (file_type eq 'JPG') or (file_type eq 'GIF') or (file_type eq 'ICO') or (file_type eq 'PNG') or (file_type eq 'CSS') or (file_type eq 'SWF') or (file_type eq 'JS')) then page_views = 0; else page_views = 1;" } # detect_page_views simplify_url = { label = "$lang_admin.log_filters.simplify_url_label" comment = "$lang_admin.log_filters.simplify_url_comment" value = "if (matches_regular_expression(url, '^([^:]+://[^/]+/)')) then url = $1 . '(omitted)'" } # simplify_url strip_non_page_views = { label = '$lang_admin.log_filters.strip_non_page_views_label' comment = '$lang_admin.log_filters.strip_non_page_views_comment' value = "if (page_views == 0) then url = substr(url, 0, last_index(url, '/') + 1) . '(nonpage)';" } # strip_non_page_views mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'hits = 1;' } # mark_entry } # log.filters log.field_options = { sessions_page_field = "url" sessions_visitor_id_field = "source_host" sessions_event_field = "page_views" } # log.field_options database.numerical_fields = { hits = { label = "$lang_stats.field_labels.hits" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # hits page_views = { label = "$lang_stats.field_labels.page_views" default = false requires_log_field = false type = "int" display_format_type = "integer" } # page_views visitors = { label = "$lang_stats.field_labels.visitors" default = false requires_log_field = true log_field = "source_host" type = "unique" display_format_type = "integer" } # visitors bytes_received = { label = "$lang_stats.field_labels.bytes_received" default = false requires_log_field = true log_field = "bytes_received" type = "float" display_format_type = "bandwidth" } # bytes_received bytes_sent = { label = "$lang_stats.field_labels.bytes_sent" default = false requires_log_field = true log_field = "bytes_sent" type = "float" display_format_type = "bandwidth" } # bytes_sent duration = { label = "$lang_stats.field_labels.duration" default = false requires_log_field = true log_field = "duration" type = "int" display_format_type = "duration_compact" } # duration } # database.numerical_fields create_profile_wizard_options = { date_time_tracking = true host_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" category = true protocol = true direction = true operation = true url = true file_type = true worm = true source_host = true source_port = true intermediate_host = true intermediate_port = true destination_host = true destination_port = true } # report_groups } # create_profile_wizard_options not_supported = { } # not_supported } # gnatbox_syslog_required