1 #####################################################################
3 # Configuration file template for samhain.
5 #####################################################################
7 # -- empty lines and lines starting with '#', ';' or '//' are ignored
8 # -- boolean options can be Yes/No or True/False or 1/0
9 # -- you can PGP clearsign this file -- samhain will check (if compiled
10 # with support) or otherwise ignore the signature
11 # -- CHECK mail address
13 # To each log facility, you can assign a threshold severity. Only
14 # reports with at least the threshold severity will be logged
15 # to the respective facility (even further below).
17 #####################################################################
19 # SETUP for file system checking:
21 # (i) There are several policies, each has its own section. Put files
22 # into the section for the appropriate policy (see below).
23 # (ii) Section [EventSeverity]:
24 # To each policy, you can assign a severity (further below).
25 # (iii) Section [Log]:
26 # To each log facility, you can assign a threshold severity. Only
27 # reports with at least the threshold severity will be logged
28 # to the respective facility (even further below).
30 #####################################################################
32 #####################################################################
34 # Files are defined with: file = /absolute/path
36 # Directories are defined with: dir = /absolute/path
37 # or with an optional recursion depth (N <= 99): dir = N/absolute/path
39 # Directory inodes are checked. If you only want to check files
40 # in a directory, but not the directory inode itself, use (e.g.):
43 # dir = /some/directory
45 # file = /some/directory
47 # You can use shell-style globbing patterns, like: file = /path/foo*
49 ######################################################################
53 ## Add or subtract tests from the policies
54 ## - if you want to change their definitions,
55 ## you need to do that before using the policies
57 # RedefReadOnly = (no default)
58 # RedefAttributes=(no default)
59 # RedefLogFiles=(no default)
60 # RedefGrowingLogFiles=(no default)
61 # RedefIgnoreAll=(no default)
62 # RedefIgnoreNone=(no default)
63 # RedefUser0=(no default)
64 # RedefUser1=(no default)
68 ## for these files, only changes in permissions and ownership are checked
71 file=/etc/ssh_random_seed
76 file=/etc/passwd.backup
77 file=/etc/shadow.backup
78 file=/etc/postfix/prng_exch
81 file=/etc/network/run/ifstate
82 file=/var/state/samhain/samhain_file
83 file=/etc/bind/db.debian.net
86 # We handle these files with puppet - please to not be bothering us
87 file=/etc/samhain/samhainrc
88 file=/etc/munin/munin-node.conf
89 file=/etc/exim4/blacklist
90 file=/etc/exim4/callout_users
91 file=/etc/exim4/exim4.conf
92 file=/etc/exim4/grey_users
93 file=/etc/exim4/helo-check
94 file=/etc/exim4/locals
95 file=/etc/exim4/localusers
96 file=/etc/exim4/rbllist
97 file=/etc/exim4/rcpthosts
98 file=/etc/exim4/rhsbllist
99 file=/etc/exim4/virtualdomains
100 file=/etc/exim4/whitelist
103 # There are files in /etc that might change, thus changing the directory
104 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
108 file=/etc/network/run
111 # These are the directories for the files we handle with puppet
118 ## for these files, changes in signature, timestamps, and size are ignored
125 #####################################################################
127 # This would be the proper syntax for parts that should only be
128 # included for certain hosts.
129 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
130 # result still has the proper syntax for the config file.
131 # You may have any number of @HOSTNAME/@end brackets.
132 # HOSTNAME should be the fully qualified 'official' name
133 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
134 # No IP number - except if samhain cannot determine the
135 # fully qualified hostname.
141 # These are two examples for conditional inclusion/exclusion
142 # of a machine based on the output from 'uname -srm'
152 #####################################################################
156 ## for these files, changes in signature, timestamps, and increase in size
160 file=/var/log/messages
162 file=/var/log/faillog
163 file=/var/log/auth.log
164 file=/var/log/daemon.log
165 file=/var/log/user.log
166 file=/var/log/kern.log
172 ## for these files, no modifications are reported
174 ## This file might be created or removed by the system sometimes.
176 file=/etc/resolv.conf.pcmcia.save
178 file=/etc/postfix/debian.db
179 file=/etc/postfix/debian
180 file=/etc/ssh/ssh_known_hosts
181 file=/etc/ssh/ssh-rsa-shadow
182 file=/var/lib/misc/ssh-rsa-shadow
183 file=/etc/.da-backup.trace
184 file=/etc/postfix/debianhosts
185 file=/etc/postfix/debianhosts.db
189 ## for these files, all modifications (even access time) are reported
190 ## - you may create some interesting-looking file (like /etc/safe_passwd),
191 ## just to watch whether someone will access it ...
196 ## Use for prelinked files or directories holding them
202 ## for these files, only access time is ignored
208 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
209 # so we go 3 levels deep
216 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
217 # so we go 3 levels deep there too
221 # Various directories / files that may include / be SUID/SGID binaries
224 file=/usr/lib/pt_chown
225 # X11, in Debian X7 this is now a symlink
227 #dir=/usr/X11R6/lib/X11/xmcd/bin
229 #file=/usr/lib/apache/suexec
230 #file=/usr/lib/apache/suexec.disabled
237 ## User0 and User1 are sections for files/dirs with user-definable checking
243 ## Here you can assign severities to policy violations.
244 ## If this severity exceeds the treshold of a log facility (see below),
245 ## a policy violation will be logged to that facility.
247 ## Severity for verification failures.
249 # SeverityReadOnly=crit
250 # SeverityLogFiles=crit
251 # SeverityGrowingLogs=crit
252 # SeverityIgnoreNone=crit
253 # SeverityAttributes=crit
258 SeverityReadOnly=crit
259 SeverityLogFiles=crit
260 SeverityGrowingLogs=warn
261 SeverityIgnoreNone=crit
262 SeverityAttributes=crit
266 ## We have a file in IgnoreAll that might or might not be present.
267 ## Setting the severity to 'info' prevents messages about deleted/new file.
269 # SeverityIgnoreAll=crit
270 SeverityIgnoreAll=info
272 ## Files : file access problems
275 ## Dirs : directory access problems
278 ## Names : suspect (non-printable) characters in a pathname
289 ## Switch on/OFF log facilities and set their threshold severity
291 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
292 ## 'mark' is used for timestamps.
295 ## Use 'none' to SWITCH OFF a log facility
297 ## By default, everything equal to and above the threshold is logged.
298 ## The specifiers '*', '!', and '=' are interpreted as
299 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
300 ## at least on Linux). Examples:
302 ## MailSeverity=!warn
303 ## MailSeverity==crit
319 # SyslogSeverity=none
321 ## Remote server (yule)
323 # ExportSeverity=none
325 ## External script or program
327 # ExternalSeverity = none
329 ## Logging to a database
331 # DatabaseSeverity = none
344 #####################################################
348 #####################################################
352 ## --- Check the filesystem for SUID/SGID binaries
357 # SuidCheckActive = yes
359 ## Interval for check (seconds)
361 # SuidCheckInterval = 7200
363 ## Alternative: crontab-like schedule
365 # SuidCheckSchedule = NULL
367 ## Directory to exclude
369 # SuidCheckExclude = NULL
371 ## Limit on files per second (0 == no limit)
375 ## Alternative: yield after every file
377 # SuidCheckYield = no
379 ## Severity of a detection
381 # SeveritySuidCheck = crit
383 ## Quarantine SUID/SGID files if found
385 # SuidCheckQuarantineFiles = yes
387 ## Method for Quarantining files:
388 # 0 - Delete or truncate the file.
389 # 1 - Remove SUID/SGID permissions from file.
390 # 2 - Move SUID/SGID file to quarantine dir.
392 # SuidCheckQuarantineMethod = 0
394 ## For method 1 and 3, really delete instead of truncating
396 # SuidCheckQuarantineDelete = yes
400 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
405 KernelCheckActive = True
407 ## Check interval (seconds); btw., the check is VERY fast
409 # KernelCheckInterval = 300
413 # SeverityKernel = crit
418 ## --- Logging of login/logout events
423 LoginCheckActive = True
425 ## Severity for logins, multiple logins, logouts
428 # SeverityLoginMulti=warn
429 # SeverityLogout=info
431 ## Interval for login/logout checks
433 # LoginCheckInterval = 300
438 ## --- Logging to a relational database
443 # SetDBName = samhain
451 # SetDBUser = samhain
455 # SetDBPassword = (default: none)
459 # SetDBHost = localhost
461 ## Log the server timestamp for received messages
463 # SetDBServerTstamp = True
465 ## Use a persistent connection
467 # UsePersistent = True
471 ## Interface to call external scripts/programs for logging
474 ## The absolute path to the command
475 ## - Each invocation of this directive will end the definition of the
476 ## preceding command, and start the definition of
477 ## an additional, new command
479 # OpenCommand = (no default)
482 ## - log for log messages, srv for messages received by the server
486 ## The command (full command line) to execute
488 # SetCommandLine = (no default)
490 ## The environment (KEY=value; repeat for more)
492 # SetEnviron = TZ=(your timezone)
494 ## The TIGER192 checksum (optional)
496 # SetChecksum = (no default)
498 ## User who runs the command
500 # SetCredentials = (default: samhain process uid)
502 ## Words not allowed in message
504 # SetFilterNot = (none)
506 ## Words required (ALL of them)
508 # SetFilterAnd = (none)
510 ## Words required (at least one)
512 # SetFilterOr = (none)
514 ## Deadtime between consecutive calls
518 ## Add default environment (HOME, PATH, SHELL)
523 #####################################################
525 # Miscellaneous configuration options
527 #####################################################
531 ## whether to become a daemon process
532 ## (this is not honoured on database initialisation)
537 ## whether to test signature of files (init/check/none)
538 ## - if 'none', then we have to decide this on the command line -
540 # ChecksumTest = none
543 ## whether to drop linux capabilities that are not required
544 ## - will make a root process a 'mere mortal' in many respects
548 ## Set nice level (-19 to 19, see 'man nice'),
549 ## and I/O limit (kilobytes per second; 0 == off)
550 ## to reduce load on host.
555 ## The version string to embed in file signature databases
557 # VersionString = NULL
559 ## Interval between time stamp messages
564 ## Interval between file checks
566 # SetFileCheckTime = 600
567 SetFileCheckTime = 7200
569 ## Alternative: crontab-like schedule
571 # FileCheckScheduleOne = NULL
573 ## Alternative: crontab-like schedule(2)
575 # FileCheckScheduleTwo = NULL
577 ## Report only once on modified fles
578 ## Setting this to 'FALSE' will generate a report for any policy
579 ## violation (old and new ones) each time the daemon checks the file system.
581 # ReportOnlyOnce = True
583 ## Report in full detail
585 # ReportFullDetail = False
587 ## Report file timestamps in local time rather than GMT
591 ## The console device (can also be a file or named pipe)
592 ## - There are two console devices. Accordingly, you can use
593 ## this directive a second time to set the second console device.
594 ## If you have not defined the second device at compile time,
595 ## and you don't want to use it, then:
596 ## setting it to /dev/null is less effective than just leaving
597 ## it alone (setting to /dev/null will waste time by opening
598 ## /dev/null and writing to it)
600 # SetConsole = /dev/console
602 ## Activate the SysV IPC message queue
604 # MessageQueueActive = False
607 ## If false, skip reverse lookup when connecting to a host known
608 ## by name rather than IP address (i.e. trust the DNS)
610 # SetReverseLookup = True
614 # Only highest-level (alert) reports will be mailed immediately,
615 # others will be queued. Here you can define, when the queue will
616 # be flushed (Note: the queue is automatically flushed after
617 # completing a file check).
621 ## Maximum number of mails to queue
625 ## Recipient (max. 8)
627 SetMailAddress=samhain-reports@debian.org
629 ## Mail relay (IP address)
631 SetMailRelay = master.debian.org
633 ## Custom subject format
635 MailSubject = [Samhain at %H] %T: %S
637 ## --- end E-Mail ---
639 ## Path to the prelink executable
641 # SetPrelinkPath = /usr/sbin/prelink
643 ## TIGER192 checksum of the prelink executable
645 # SetPrelinkChecksum = (no default)
648 ## Path to the executable. If set, will be checksummed after startup
651 # SamhainPath = (no default)
654 ## The IP address of the log server
656 # SetLogServer = (default: compiled-in)
658 ## The IP address of the time server
660 # SetTimeServer = (default: compiled-in)
662 ## Trusted Users (comma delimited list of user names)
664 # TrustedUser = (no default; this adds to the compiled-in list)
666 ## Path to the file signature database
668 # SetDatabasePath = (default: compiled-in)
670 ## Path to the log file
672 # SetLogfilePath = (default: compiled-in)
674 ## Path to the PID file
676 # SetLockPath = (default: compiled-in)
679 ## The digest/checksum/hash algorithm
681 # DigestAlgo = TIGER192
684 ## Custom format for message header.
685 ## CAREFUL if you use XML logfile format.
694 # MessageHeader="%S %T "
697 ## Don't log path to config/database file on startup
701 ## The syslog facility, if you log to syslog
703 # SyslogFacility = LOG_AUTHPRIV
704 SyslogFacility=LOG_LOCAL2
706 ## The message authentication method
707 ## - If you change this, you *must* change it
708 ## on client *and* server
710 # MACType = HMAC-TIGER
713 ## everything below is ignored
716 #####################################################################
717 # This would be the proper syntax for parts that should only be
718 # included for certain hosts.
719 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
720 # result still has the proper syntax for the config file.
721 # You may have any number of @HOSTNAME/@end brackets.
722 # HOSTNAME should be the fully qualified 'official' name
723 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
724 # No IP number - except if samhain cannot determine the
725 # fully qualified hostname.
731 # These are two examples for conditional inclusion/exclusion
732 # of a machine based on the output from 'uname -srm'
741 #####################################################################