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
101 file=/etc/apt/sources.list.d/volatile.list
102 file=/etc/apt/sources.list.d/security.list
103 file=/etc/apt/sources.list.d/debian.org.list
104 file=/etc/apt/sources.list.d/debian.list
105 file=/etc/apt/sources.list.d/backports.org.list
106 file=/etc/apt/apt.conf.d/local-recommends
110 # There are files in /etc that might change, thus changing the directory
111 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
115 file=/etc/network/run
118 # These are the directories for the files we handle with puppet
122 file=/etc/apt/apt.conf.d
123 file=/etc/apt/sources.list.d
127 ## for these files, changes in signature, timestamps, and size are ignored
134 #####################################################################
136 # This would be the proper syntax for parts that should only be
137 # included for certain hosts.
138 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
139 # result still has the proper syntax for the config file.
140 # You may have any number of @HOSTNAME/@end brackets.
141 # HOSTNAME should be the fully qualified 'official' name
142 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
143 # No IP number - except if samhain cannot determine the
144 # fully qualified hostname.
150 # These are two examples for conditional inclusion/exclusion
151 # of a machine based on the output from 'uname -srm'
161 #####################################################################
165 ## for these files, changes in signature, timestamps, and increase in size
169 file=/var/log/messages
171 file=/var/log/faillog
172 file=/var/log/auth.log
173 file=/var/log/daemon.log
174 file=/var/log/user.log
175 file=/var/log/kern.log
181 ## for these files, no modifications are reported
183 ## This file might be created or removed by the system sometimes.
185 file=/etc/resolv.conf.pcmcia.save
187 file=/etc/postfix/debian.db
188 file=/etc/postfix/debian
189 file=/etc/ssh/ssh_known_hosts
190 file=/etc/ssh/ssh-rsa-shadow
191 file=/var/lib/misc/ssh-rsa-shadow
192 file=/etc/.da-backup.trace
193 file=/etc/postfix/debianhosts
194 file=/etc/postfix/debianhosts.db
198 ## for these files, all modifications (even access time) are reported
199 ## - you may create some interesting-looking file (like /etc/safe_passwd),
200 ## just to watch whether someone will access it ...
205 ## Use for prelinked files or directories holding them
211 ## for these files, only access time is ignored
217 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
218 # so we go 3 levels deep
225 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
226 # so we go 3 levels deep there too
230 # Various directories / files that may include / be SUID/SGID binaries
233 file=/usr/lib/pt_chown
234 # X11, in Debian X7 this is now a symlink
236 #dir=/usr/X11R6/lib/X11/xmcd/bin
238 #file=/usr/lib/apache/suexec
239 #file=/usr/lib/apache/suexec.disabled
246 ## User0 and User1 are sections for files/dirs with user-definable checking
252 ## Here you can assign severities to policy violations.
253 ## If this severity exceeds the treshold of a log facility (see below),
254 ## a policy violation will be logged to that facility.
256 ## Severity for verification failures.
258 # SeverityReadOnly=crit
259 # SeverityLogFiles=crit
260 # SeverityGrowingLogs=crit
261 # SeverityIgnoreNone=crit
262 # SeverityAttributes=crit
267 SeverityReadOnly=crit
268 SeverityLogFiles=crit
269 SeverityGrowingLogs=warn
270 SeverityIgnoreNone=crit
271 SeverityAttributes=crit
275 ## We have a file in IgnoreAll that might or might not be present.
276 ## Setting the severity to 'info' prevents messages about deleted/new file.
278 # SeverityIgnoreAll=crit
279 SeverityIgnoreAll=info
281 ## Files : file access problems
284 ## Dirs : directory access problems
287 ## Names : suspect (non-printable) characters in a pathname
298 ## Switch on/OFF log facilities and set their threshold severity
300 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
301 ## 'mark' is used for timestamps.
304 ## Use 'none' to SWITCH OFF a log facility
306 ## By default, everything equal to and above the threshold is logged.
307 ## The specifiers '*', '!', and '=' are interpreted as
308 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
309 ## at least on Linux). Examples:
311 ## MailSeverity=!warn
312 ## MailSeverity==crit
328 # SyslogSeverity=none
330 ## Remote server (yule)
332 # ExportSeverity=none
334 ## External script or program
336 # ExternalSeverity = none
338 ## Logging to a database
340 # DatabaseSeverity = none
353 #####################################################
357 #####################################################
361 ## --- Check the filesystem for SUID/SGID binaries
366 # SuidCheckActive = yes
368 ## Interval for check (seconds)
370 # SuidCheckInterval = 7200
372 ## Alternative: crontab-like schedule
374 # SuidCheckSchedule = NULL
376 ## Directory to exclude
378 # SuidCheckExclude = NULL
380 ## Limit on files per second (0 == no limit)
384 ## Alternative: yield after every file
386 # SuidCheckYield = no
388 ## Severity of a detection
390 # SeveritySuidCheck = crit
392 ## Quarantine SUID/SGID files if found
394 # SuidCheckQuarantineFiles = yes
396 ## Method for Quarantining files:
397 # 0 - Delete or truncate the file.
398 # 1 - Remove SUID/SGID permissions from file.
399 # 2 - Move SUID/SGID file to quarantine dir.
401 # SuidCheckQuarantineMethod = 0
403 ## For method 1 and 3, really delete instead of truncating
405 # SuidCheckQuarantineDelete = yes
409 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
414 KernelCheckActive = True
416 ## Check interval (seconds); btw., the check is VERY fast
418 # KernelCheckInterval = 300
422 # SeverityKernel = crit
427 ## --- Logging of login/logout events
432 LoginCheckActive = True
434 ## Severity for logins, multiple logins, logouts
437 # SeverityLoginMulti=warn
438 # SeverityLogout=info
440 ## Interval for login/logout checks
442 # LoginCheckInterval = 300
447 ## --- Logging to a relational database
452 # SetDBName = samhain
460 # SetDBUser = samhain
464 # SetDBPassword = (default: none)
468 # SetDBHost = localhost
470 ## Log the server timestamp for received messages
472 # SetDBServerTstamp = True
474 ## Use a persistent connection
476 # UsePersistent = True
480 ## Interface to call external scripts/programs for logging
483 ## The absolute path to the command
484 ## - Each invocation of this directive will end the definition of the
485 ## preceding command, and start the definition of
486 ## an additional, new command
488 # OpenCommand = (no default)
491 ## - log for log messages, srv for messages received by the server
495 ## The command (full command line) to execute
497 # SetCommandLine = (no default)
499 ## The environment (KEY=value; repeat for more)
501 # SetEnviron = TZ=(your timezone)
503 ## The TIGER192 checksum (optional)
505 # SetChecksum = (no default)
507 ## User who runs the command
509 # SetCredentials = (default: samhain process uid)
511 ## Words not allowed in message
513 # SetFilterNot = (none)
515 ## Words required (ALL of them)
517 # SetFilterAnd = (none)
519 ## Words required (at least one)
521 # SetFilterOr = (none)
523 ## Deadtime between consecutive calls
527 ## Add default environment (HOME, PATH, SHELL)
532 #####################################################
534 # Miscellaneous configuration options
536 #####################################################
540 ## whether to become a daemon process
541 ## (this is not honoured on database initialisation)
546 ## whether to test signature of files (init/check/none)
547 ## - if 'none', then we have to decide this on the command line -
549 # ChecksumTest = none
552 ## whether to drop linux capabilities that are not required
553 ## - will make a root process a 'mere mortal' in many respects
557 ## Set nice level (-19 to 19, see 'man nice'),
558 ## and I/O limit (kilobytes per second; 0 == off)
559 ## to reduce load on host.
564 ## The version string to embed in file signature databases
566 # VersionString = NULL
568 ## Interval between time stamp messages
573 ## Interval between file checks
575 # SetFileCheckTime = 600
576 SetFileCheckTime = 7200
578 ## Alternative: crontab-like schedule
580 # FileCheckScheduleOne = NULL
582 ## Alternative: crontab-like schedule(2)
584 # FileCheckScheduleTwo = NULL
586 ## Report only once on modified fles
587 ## Setting this to 'FALSE' will generate a report for any policy
588 ## violation (old and new ones) each time the daemon checks the file system.
590 # ReportOnlyOnce = True
592 ## Report in full detail
594 # ReportFullDetail = False
596 ## Report file timestamps in local time rather than GMT
600 ## The console device (can also be a file or named pipe)
601 ## - There are two console devices. Accordingly, you can use
602 ## this directive a second time to set the second console device.
603 ## If you have not defined the second device at compile time,
604 ## and you don't want to use it, then:
605 ## setting it to /dev/null is less effective than just leaving
606 ## it alone (setting to /dev/null will waste time by opening
607 ## /dev/null and writing to it)
609 # SetConsole = /dev/console
611 ## Activate the SysV IPC message queue
613 # MessageQueueActive = False
616 ## If false, skip reverse lookup when connecting to a host known
617 ## by name rather than IP address (i.e. trust the DNS)
619 # SetReverseLookup = True
623 # Only highest-level (alert) reports will be mailed immediately,
624 # others will be queued. Here you can define, when the queue will
625 # be flushed (Note: the queue is automatically flushed after
626 # completing a file check).
630 ## Maximum number of mails to queue
634 ## Recipient (max. 8)
636 SetMailAddress=samhain-reports@debian.org
638 ## Mail relay (IP address)
640 SetMailRelay = master.debian.org
642 ## Custom subject format
644 MailSubject = [Samhain at %H] %T: %S
646 ## --- end E-Mail ---
648 ## Path to the prelink executable
650 # SetPrelinkPath = /usr/sbin/prelink
652 ## TIGER192 checksum of the prelink executable
654 # SetPrelinkChecksum = (no default)
657 ## Path to the executable. If set, will be checksummed after startup
660 # SamhainPath = (no default)
663 ## The IP address of the log server
665 # SetLogServer = (default: compiled-in)
667 ## The IP address of the time server
669 # SetTimeServer = (default: compiled-in)
671 ## Trusted Users (comma delimited list of user names)
673 # TrustedUser = (no default; this adds to the compiled-in list)
675 ## Path to the file signature database
677 # SetDatabasePath = (default: compiled-in)
679 ## Path to the log file
681 # SetLogfilePath = (default: compiled-in)
683 ## Path to the PID file
685 # SetLockPath = (default: compiled-in)
688 ## The digest/checksum/hash algorithm
690 # DigestAlgo = TIGER192
693 ## Custom format for message header.
694 ## CAREFUL if you use XML logfile format.
703 # MessageHeader="%S %T "
706 ## Don't log path to config/database file on startup
710 ## The syslog facility, if you log to syslog
712 # SyslogFacility = LOG_AUTHPRIV
713 SyslogFacility=LOG_LOCAL2
715 ## The message authentication method
716 ## - If you change this, you *must* change it
717 ## on client *and* server
719 # MACType = HMAC-TIGER
722 ## everything below is ignored
725 #####################################################################
726 # This would be the proper syntax for parts that should only be
727 # included for certain hosts.
728 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
729 # result still has the proper syntax for the config file.
730 # You may have any number of @HOSTNAME/@end brackets.
731 # HOSTNAME should be the fully qualified 'official' name
732 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
733 # No IP number - except if samhain cannot determine the
734 # fully qualified hostname.
740 # These are two examples for conditional inclusion/exclusion
741 # of a machine based on the output from 'uname -srm'
750 #####################################################################