Back to Beats

Sophos module [filebeat-module-sophos]

docs/reference/filebeat/filebeat-module-sophos.md

9.4.06.0 KB
Original Source

% This file is generated! See filebeat/scripts/mage/docs.go

Sophos module [filebeat-module-sophos]

:::::{admonition} Prefer to use {{agent}} for this use case? Refer to the Elastic Integrations documentation.

::::{dropdown} Learn more {{agent}} is a single, unified way to add monitoring for logs, metrics, and other types of data to a host. It can also protect hosts from security threats, query data from operating systems, forward data from remote services or hardware, and more. Refer to the documentation for a detailed comparison of {{beats}} and {{agent}}.

::::

:::::

This is a module for Sophos Products, currently it accepts logs in syslog format or from a file for the following devices:

  • xg fileset: supports Sophos XG SFOS logs.

To configure a remote syslog destination, please reference the SophosXG/SFOS Documentation.

The syslog format choosen in Sophos configuration should be Central Reporting Format.

::::{tip} Read the quick start to learn how to configure and run modules. ::::

Compatibility [_compatibility_35]

This module has been tested against SFOS version 17.5.x, 18.0.x, and 18.5.x. Versions above this and between 18.0 - 18.5 are expected to work but have not been tested.

Configure the module [configuring-sophos-module]

You can further refine the behavior of the sophos module by specifying variable settings in the modules.d/sophos.yml file, or overriding settings at the command line.

You must enable at least one fileset in the module. Filesets are disabled by default.

Variable settings [sophos-settings]

Each fileset has separate variable settings for configuring the behavior of the module. If you don’t specify variable settings, the sophos module uses the defaults.

For advanced use cases, you can also override input settings. See Override input settings.

::::{tip} When you specify a setting at the command line, remember to prefix the setting with the module name, for example, sophos.xg.var.paths instead of xg.var.paths. ::::

xg fileset settings [_xg_fileset_settings]

The Sophos XG firewalls do not include hostname in either the syslog header or body, and the only unique identifier for each firewall is the related serial number.

Below you will see an example configuration file, that sets the default hostname (if no serial number is included in the config file), and example on how to map serial numbers to a hostname

yaml
- module: sophos
  xg:
    enabled: true
    var.input: udp
    var.syslog_host: 0.0.0.0
    var.syslog_port: 9005
    var.default_host_name: firewall.localgroup.local
    var.known_devices:
      - serial_number: "1234567890123457"
        hostname: "a.host.local"
      - serial_number: "1234234590678557"
        hostname: "b.host.local"

var.paths : An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.

var.input : The input to use, can be either the value tcp, udp or file.

var.syslog_host : The interface to listen to all syslog traffic. Defaults to localhost. Set to 0.0.0.0 to bind to all available interfaces.

var.syslog_port : The port to listen for syslog traffic. Defaults to 9005.

var.host_name : Host name / Observer name, since SophosXG does not provide this in the syslog file. Default to firewall.localgroup.local

SophosXG ECS fields [_sophosxg_ecs_fields]

This is a list of SophosXG fields that are mapped to ECS.

SophosXG FieldsECS Fields
applicationnetwork.protocol
classificationrule.category
device_idobserver.serial_number
domainnameurl.domain
dst_hostdestination.address
dst_intobserver.egress.interface.name
dstzonetypeobserver.egress.zone
dst_ipdestination.ip
destinationipdestination.ip
dst_macdestination.mac
dstnamedestination.address
dst_portdestination.port
dst_domainnameurl.domain
durationevent.duration
filenamefile.name
filetypefile.extension
file_sizefile.size
file_pathfile.directory
fw_rule_idrule.id
from_email_addresssource.user.email
httpstatushttp.response.status_code
in_interfaceobserver.ingress.interface.name
log_idevent.code
log_subtypeevent.action
messagemessage
methodhttp.request.method
policy_typerule.ruleset
protocolnetwork.transport
recv_bytesdestination.bytes
recv_pktsdestination.packets
refererhttp.request.referrer
sent_bytessource.bytes
sent_pktssource.packets
sha1sumfile.hash.sha1
srczonetypeobserver.ingress.zone
src_ipsource.ip
src_domainnameurl.domain
sourceipsource.ip
src_macsource.mac
src_portsource.port
status_codehttp.response.status_code
time_zoneevent.timezone
to_email_addressdestination.user.email
tran_dst_ipdestination.nat.ip
tran_dst_portdestination.nat.port
tran_src_ipsource.nat.ip
tran_src_portsource.nat.port
urlurl.original
user_agentuser_agent.original
useragentuser_agent.original
user_gpsource.user.group
user_namesource.user.name
ws_protocolhttp.version

Fields [_fields]

For a description of each field in the module, see the exported fields section.