-
Notifications
You must be signed in to change notification settings - Fork 35
Configure and run FW1 LogGrabber
Starting with version 1.11, FW1-LogGrabber uses the default connection configuration procedure for OPSEC applications. This includes server, port and authentication settings. From now on, all this parameters can only be configured using the configuration file lea.conf
(see --leaconfigfile
option to use a different LEA configuration file) and not using the command-line as before.
-
lea_server ip <IP address>
specifies the IP address of the FW1 management station, to which FW1-LogGrabber should connect to. -
lea_server port <port number>
is the port on the FW1 management station to which FW1-LogGrabber should connect to (for unauthenticated connections only). -
lea_server auth_port <port number>
is the port to be used for authenticated connection to your FW1 management station. -
lea_server auth_type <authentication mechanism>
you can use this parameter to specify the authentication mechanism to be used (default issslca
); valid values aresslca
,sslca_clear
,sslca_comp
,sslca_rc4
,sslca_rc4_comp
,asym_sslca
,asym_sslca_comp
,asym_sslca_rc4
,asym_sslca_rc4_comp
,ssl
,ssl_opsec
,ssl_clear
,ssl_clear_opsec
,fwn1
andauth_opsec
. -
opsec_sslca_file <p12-file>
specify the location of the PKCS#12 certificate, when using authenticated connections. -
opsec_sic_name <LEA client SIC name>
is the SIC name of the LEA client for authenticated connections. -
lea_server opsec_entity_sic_name <LEA server SIC name>
is the SIC name of your FW1 management station when using authenticated connections.
This paragraph deals with the options that can be set within the configuration file. The default configuration file is fw1-loggrabber.conf
(see --configfile
option to use a different configuration file). The precedence of given options is as follows: command line, configuration file, default value. E.g. if you set the resolve-mode to be used in the configuration file, this can be overwritten by command line option --noresolve
; only if an option isn't set neither on command line nor in the configuration file, the default value will be used.
-
DEBUG_LEVEL=<0-3>
sets the debug level to the specified value; zero means no output of debug information, and further levels will cause output of program specific as well as OPSEC specific debug information. -
FW1_LOGFILE=<name of log file>
specifies the name of the FW1 logfile to be read; this can be either done exactly or using only a part of the filename; if no exact match can be found in the list of logfiles returned by the FW-1 management station, all logfiles which contain the specified string are processed; if this parameter is omitted, the default logfilefw.log
will be processed. -
FW1_OUTPUT=<files|logs>
specifies whether FW1-LogGrabber should only display the available logfiles (files
) on the FW11 server or display the content of these logfiles (logs
). -
FW1_TYPE=<ng|2000>
choose which version of FW1 to connect to; for Checkpoint FW-1 5.0 you have to specifyNG
and for Checkpoint FW-1 4.1 you have to specify2000
. -
FW1_MODE=<audit|normal>
specifies whether to displayaudit
logs, which contain administrative actions, ornormal
security logs, which contain data about dropped and accepted connections. -
MODE=<online|online-resume|offline>
when using online mode, FW1-LogGrabber starts retrieving logging data from the end of the specified logfile and displays all future log entries (mainly used for continuously processing); the online-resume mode is similar to the online mode, but if FW1-LogGrabber is stopped and started again, it resumes processing from where it was stopped; if you instead choose the offline mode, FW1-LogGrabber quits after having displayed the last log entry. -
RESOLVE_MODE=<yes|no>
with this option (enabled by default), IP addresses will be resolved to names using FW1 name resolving behaviour; this resolving mechanism will not cause the machine running FW1-LogGrabber to initiate DNS requests, but the name resolution will be done directly on the FW1 machine; if you disable resolving mode, IP addresses will be displayed in log output instead of names. -
RECORD_SEPARATOR=<char>
can be used to change the default record separator|
(pipe) into another character; if you choose a character which is contained in some log data, the occurrence within the logdata will be escaped by a backslash. -
LOGGING_CONFIGURATION=<screen|file|syslog>
can be used for redirecting logging output to other destinations than the default destinationSTDOUT
; currently it is possible to redirect output to a file or to the syslog daemon. -
OUTPUT_FILE_PREFIX=<prefix of output file>
when using file output, this parameter defines a prefix for the output filename; default value is simplyfw1-loggrabber
. -
OUTPUT_FILE_ROTATESIZE=<rotatesize in bytes>
when using file output, this parameter specifies the maximum size of the output files, before they will be rotated with suffix-YYYY-MM-DD-hhmmss[-x].log
; default value is 1048576 bytes, which equals 1 MB; setting a zero value disables file rotation. -
SYSLOG_FACILITY=<USER|LOCAL0|...|LOCAL7>
when using syslog output, this parameter sets the syslog facility to be used. -
FW1_FILTER_RULE="<filterexpression1>[;<filterexpression2>]"
defines filters fornormal
log mode; you can find a more detailed description of filter rules, along with some examples, in a separate chapter below. -
AUDIT_FILTER_RULE="<filterexpression1>[;<filterexpression2>]"
defines filters foraudit
log mode; you can find a more detailed description of filter rules, along with some examples, in a separate chapter below.
In the following section, all available command line options are described in detail. Most of the options can also be configured using the file fw1-loggrabber.conf
(see --configfile
option to use a different configuration file). The precedence of given options is as follows: command line, configuration file, default value. E.g. if you set the resolve-mode to be used in the configuration file, this can be overwritten by command line option --noresolve
; only if an option isn't set neither on command line nor in the configuration file, the default value will be used.
Use --help
to display basic help and usage information.
The --debuglevel
option sets the debug level to the specified value. A zero debug level means no output of debug information, while further levels will cause output of program specific as well as OPSEC specific debug
information.
The -c <configfilename>
or --configfile <configfilename>
options allow to specify a non-default configuration file, in which most of the command line options can be configured, as well as other options which are not available as command line parameters.
If this parameter is omitted, the file fw1-loggrabber.conf
inside $LOGGRABBER_CONFIG_PATH
will be used. See above for a description of all available configuration file options.
Using -l <leaconfigfilename>
or --leaconfigfile <leaconfigfilename>
instead, it's possible to use a non-default LEA configuration file. In this file, all connection parameters such as FW1 server, port, authentication method as well as SIC names have to be configured, as usual procedure for OPSEC applications.
If this parameter is omitted, the file lea.conf
inside $LOGGRABBER_CONFIG_PATH
will be used. See above for a description of all available LEA configuration file options.
With -f <logfilename|pattern|ALL>
or --logfile <logfilename|pattern|ALL>
you can specify the name of the remote FW1 logfile to be read.
This can be either done exactly or using only a part of the filename. If no exact match can be found in the list of logfiles returned by the FW1 management station, all logfiles which contain the specified string are processed.
A special case is the usage of ALL
instead of a logfile name or pattern. In that case all logfiles that are available on the management station, will be processed. If this parameter is omitted, only the default logfile fw.log
will be processed.
The first example displays the logfile 2003-03-27_213652.log
, while the second one processes all logfiles which contain 2003-03
in their filename.
--logfile 2003-03-27_213652.log
--logfile 2003-03
The default behaviour of FW1-LogGrabber is to display the content of the logfiles and not just their names. This can be explicitely specified using the --showlogs
option.
The option --showfiles
can be used instead to simply show the available logfiles on the FW1 management station. After the names of the logfiles have been displayed, FW1-LogGrabber quits.
Using the --resolve
option, IP addresses will be resolved to names using FW1 name resolving behaviour. This resolving mechanism will not cause the machine running FW1-LogGrabber to initiate DNS requests, but the name resolution will be done directly on the FW1 machine.
This is the default behavior of FW1-LogGrabber which can be disabled by using --no-resolve
. That option will cause IP addresses to be displayed in log output instead of names.
The default FW1 version, for which this tool is being developed, is Checkpoint FW1 5.0 (NG) and above. If no other version is explicitly specified, the default version is --ng
.
The option --2000
has to be used if you want to connect to older Checkpoint FW1 4.1 (2000) firewalls. You should keep in mind that some options are not available for non-NG firewalls; these include --auth
, --showfiles
, --auditlog
and some more.
Using --online
mode, FW1-LogGrabber starts output of logging data at the end of the specified logfile (or fw.log
if no logfile name has been specified). This mode is mainly used for continuously processing FW1 log data and continues to display log entries also after scheduled and manual log switches. If you use --logfile
to specify another logfile to be processed, you have to consider that no data will be shown, if the file isn't active anymore.
The --online-resume
mode is similar to the above online mode, but starts output of logging data at the last known processed position (which is stored inside a cursor).
In contrast to online mode, when using --offline
mode FW1-LogGrabber quits after having displayed the last
log entry. This is the default behavior and is mainly used for analysis of historic log data.
Using the --auditlog
mode, content of the audit logfile (fw.adtlog
) can be displayed. This includes administrator actions and uses different fields than normal log data.
The default --normallog
mode of FW1-LogGrabber processes normal FW1 logfiles. In contrast to the --auditlog
option, no administrative actions are displayed in this mode, but all regular log data is.
Filter rules provide the possibility to display only log entries that match a given set of rules. There can be
specified one or more filter rules using one or multiple --filter
arguments on the command line.
All individual filter rules are related by OR. That means a log entry will be displayed if at least one of the filter rules matches. You can specify multiple argument values by separating the values by ,
(comma).
Within one filter rule, there can be specified multiple arguments which have to be separated by ;
(semi-colon). All these arguments are related by AND. That means a filter rule matches a given log entry only, if all of the filter arguments match.
If you specify !=
instead of =
between name and value of the filter argument, you can negate the name/value pair.
For arguments that expect IP addresses, you can specify either a single IP address, multiple IP addresses separated by ,
(comma) or a network address with netmask (e.g. 10.0.0.0/255.0.0.0
). Currently it is not possible to specify a network address and a single IP address within the same filter argument.
Normal mode:
action=<ctl|accept|drop|reject|encrypt|decrypt|keyinst>
dst=<IP address>
endtime=<YYYYMMDDhhmmss>
orig=<IP address>
product=<VPN-1 & FireWall-1|SmartDefense>
proto=<icmp|tcp|udp>
rule=<rulenumber|startrule-endrule>
service=<portnumber|startport-endport>
src=<IP address>
starttime=<YYYYMMDDhhmmss>
Audit mode:
action=<ctl|accept|drop|reject|encrypt|decrypt|keyinst>
administrator=<string>
endtime=<YYYYMMDDhhmmss>
orig=<IP address>
product=<SmartDashboard|Policy Editor|SmartView Tracker|SmartView Status|SmartView Monitor|System Monitor|cpstat_monitor|SmartUpdate|CPMI Client>
starttime=<YYYYMMDDhhmmss>
Display all dropped connections:
--filter "action=drop"
Display all dropped and rejected connections:
--filter "action=drop,reject"
--filter "action!=accept"
Display all log entries generated by rules 20 to 23:
--filter "rule=20,21,22,23"
--filter "rule=20-23"
Display all log entries generated by rules 20 to 23, 30 or 40 to 42:
--filter "rule=20-23,30,40-42"
Display all log entries to 10.1.1.1
and 10.1.1.2
:
--filter "dst=10.1.1.1,10.1.1.2"
Display all log entries from 192.168.1.0/255.255.255.0
:
--filter "src=192.168.1.0/255.255.255.0"
Display all log entries starting from 2004/03/02 14:00:00
:
--filter "starttime=20040302140000"