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
88 # There are files in /etc that might change, thus changing the directory
89 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
96 # These are the directories for the files we handle with puppet
100 file=/etc/apt/apt.conf.d
101 file=/etc/apt/sources.list.d
107 ## for these files, changes in signature, timestamps, and size are ignored
114 #####################################################################
116 # This would be the proper syntax for parts that should only be
117 # included for certain hosts.
118 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
119 # result still has the proper syntax for the config file.
120 # You may have any number of @HOSTNAME/@end brackets.
121 # HOSTNAME should be the fully qualified 'official' name
122 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
123 # No IP number - except if samhain cannot determine the
124 # fully qualified hostname.
130 # These are two examples for conditional inclusion/exclusion
131 # of a machine based on the output from 'uname -srm'
141 #####################################################################
145 ## for these files, changes in signature, timestamps, and increase in size
149 file=/var/log/messages
151 file=/var/log/faillog
152 file=/var/log/auth.log
153 file=/var/log/daemon.log
154 file=/var/log/user.log
155 file=/var/log/kern.log
161 ## for these files, no modifications are reported
163 ## This file might be created or removed by the system sometimes.
165 file=/etc/resolv.conf.pcmcia.save
167 file=/etc/postfix/debian.db
168 file=/etc/postfix/debian
169 file=/etc/ssh/ssh_known_hosts
170 file=/etc/ssh/ssh-rsa-shadow
171 file=/var/lib/misc/ssh-rsa-shadow
172 file=/etc/.da-backup.trace
173 file=/etc/postfix/debianhosts
174 file=/etc/postfix/debianhosts.db
176 # We handle these files with puppet - please to not be bothering us
177 file=/etc/samhain/samhainrc
178 file=/etc/munin/munin-node.conf
179 file=/etc/exim4/blacklist
180 file=/etc/exim4/callout_users
181 file=/etc/exim4/exim4.conf
182 file=/etc/exim4/grey_users
183 file=/etc/exim4/helo-check
184 file=/etc/exim4/locals
185 file=/etc/exim4/localusers
186 file=/etc/exim4/rbllist
187 file=/etc/exim4/rcpthosts
188 file=/etc/exim4/rhsbllist
189 file=/etc/exim4/virtualdomains
190 file=/etc/exim4/whitelist
191 file=/etc/apt/sources.list.d/volatile.list
192 file=/etc/apt/sources.list.d/security.list
193 file=/etc/apt/sources.list.d/debian.org.list
194 file=/etc/apt/sources.list.d/debian.restricted.list
195 file=/etc/apt/sources.list.d/debian.list
196 file=/etc/apt/sources.list.d/backports.org.list
197 file=/etc/apt/apt.conf.d/local-recommends
198 file=/etc/puppet/puppet.conf
199 file=/etc/default/puppet
203 ## for these files, all modifications (even access time) are reported
204 ## - you may create some interesting-looking file (like /etc/safe_passwd),
205 ## just to watch whether someone will access it ...
210 ## Use for prelinked files or directories holding them
216 ## for these files, only access time is ignored
222 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
223 # so we go 3 levels deep
230 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
231 # so we go 3 levels deep there too
235 # Various directories / files that may include / be SUID/SGID binaries
238 file=/usr/lib/pt_chown
239 # X11, in Debian X7 this is now a symlink
241 #dir=/usr/X11R6/lib/X11/xmcd/bin
243 #file=/usr/lib/apache/suexec
244 #file=/usr/lib/apache/suexec.disabled
251 ## User0 and User1 are sections for files/dirs with user-definable checking
257 ## Here you can assign severities to policy violations.
258 ## If this severity exceeds the treshold of a log facility (see below),
259 ## a policy violation will be logged to that facility.
261 ## Severity for verification failures.
263 # SeverityReadOnly=crit
264 # SeverityLogFiles=crit
265 # SeverityGrowingLogs=crit
266 # SeverityIgnoreNone=crit
267 # SeverityAttributes=crit
272 SeverityReadOnly=crit
273 SeverityLogFiles=crit
274 SeverityGrowingLogs=warn
275 SeverityIgnoreNone=crit
276 SeverityAttributes=crit
280 ## We have a file in IgnoreAll that might or might not be present.
281 ## Setting the severity to 'info' prevents messages about deleted/new file.
283 # SeverityIgnoreAll=crit
284 SeverityIgnoreAll=info
286 ## Files : file access problems
289 ## Dirs : directory access problems
292 ## Names : suspect (non-printable) characters in a pathname
303 ## Switch on/OFF log facilities and set their threshold severity
305 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
306 ## 'mark' is used for timestamps.
309 ## Use 'none' to SWITCH OFF a log facility
311 ## By default, everything equal to and above the threshold is logged.
312 ## The specifiers '*', '!', and '=' are interpreted as
313 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
314 ## at least on Linux). Examples:
316 ## MailSeverity=!warn
317 ## MailSeverity==crit
333 # SyslogSeverity=none
335 ## Remote server (yule)
337 # ExportSeverity=none
339 ## External script or program
341 # ExternalSeverity = none
343 ## Logging to a database
345 # DatabaseSeverity = none
358 #####################################################
362 #####################################################
366 ## --- Check the filesystem for SUID/SGID binaries
371 # SuidCheckActive = yes
373 ## Interval for check (seconds)
375 # SuidCheckInterval = 7200
377 ## Alternative: crontab-like schedule
379 # SuidCheckSchedule = NULL
381 ## Directory to exclude
383 # SuidCheckExclude = NULL
385 ## Limit on files per second (0 == no limit)
389 ## Alternative: yield after every file
391 # SuidCheckYield = no
393 ## Severity of a detection
395 # SeveritySuidCheck = crit
397 ## Quarantine SUID/SGID files if found
399 # SuidCheckQuarantineFiles = yes
401 ## Method for Quarantining files:
402 # 0 - Delete or truncate the file.
403 # 1 - Remove SUID/SGID permissions from file.
404 # 2 - Move SUID/SGID file to quarantine dir.
406 # SuidCheckQuarantineMethod = 0
408 ## For method 1 and 3, really delete instead of truncating
410 # SuidCheckQuarantineDelete = yes
414 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
419 KernelCheckActive = True
421 ## Check interval (seconds); btw., the check is VERY fast
423 # KernelCheckInterval = 300
427 # SeverityKernel = crit
432 ## --- Logging of login/logout events
437 LoginCheckActive = True
439 ## Severity for logins, multiple logins, logouts
442 # SeverityLoginMulti=warn
443 # SeverityLogout=info
445 ## Interval for login/logout checks
447 # LoginCheckInterval = 300
452 ## --- Logging to a relational database
457 # SetDBName = samhain
465 # SetDBUser = samhain
469 # SetDBPassword = (default: none)
473 # SetDBHost = localhost
475 ## Log the server timestamp for received messages
477 # SetDBServerTstamp = True
479 ## Use a persistent connection
481 # UsePersistent = True
485 ## Interface to call external scripts/programs for logging
488 ## The absolute path to the command
489 ## - Each invocation of this directive will end the definition of the
490 ## preceding command, and start the definition of
491 ## an additional, new command
493 # OpenCommand = (no default)
496 ## - log for log messages, srv for messages received by the server
500 ## The command (full command line) to execute
502 # SetCommandLine = (no default)
504 ## The environment (KEY=value; repeat for more)
506 # SetEnviron = TZ=(your timezone)
508 ## The TIGER192 checksum (optional)
510 # SetChecksum = (no default)
512 ## User who runs the command
514 # SetCredentials = (default: samhain process uid)
516 ## Words not allowed in message
518 # SetFilterNot = (none)
520 ## Words required (ALL of them)
522 # SetFilterAnd = (none)
524 ## Words required (at least one)
526 # SetFilterOr = (none)
528 ## Deadtime between consecutive calls
532 ## Add default environment (HOME, PATH, SHELL)
537 #####################################################
539 # Miscellaneous configuration options
541 #####################################################
545 ## whether to become a daemon process
546 ## (this is not honoured on database initialisation)
551 ## whether to test signature of files (init/check/none)
552 ## - if 'none', then we have to decide this on the command line -
554 # ChecksumTest = none
557 ## whether to drop linux capabilities that are not required
558 ## - will make a root process a 'mere mortal' in many respects
562 ## Set nice level (-19 to 19, see 'man nice'),
563 ## and I/O limit (kilobytes per second; 0 == off)
564 ## to reduce load on host.
569 ## The version string to embed in file signature databases
571 # VersionString = NULL
573 ## Interval between time stamp messages
578 ## Interval between file checks
580 # SetFileCheckTime = 600
581 SetFileCheckTime = 7200
583 ## Alternative: crontab-like schedule
585 # FileCheckScheduleOne = NULL
587 ## Alternative: crontab-like schedule(2)
589 # FileCheckScheduleTwo = NULL
591 ## Report only once on modified fles
592 ## Setting this to 'FALSE' will generate a report for any policy
593 ## violation (old and new ones) each time the daemon checks the file system.
595 # ReportOnlyOnce = True
597 ## Report in full detail
599 # ReportFullDetail = False
601 ## Report file timestamps in local time rather than GMT
605 ## The console device (can also be a file or named pipe)
606 ## - There are two console devices. Accordingly, you can use
607 ## this directive a second time to set the second console device.
608 ## If you have not defined the second device at compile time,
609 ## and you don't want to use it, then:
610 ## setting it to /dev/null is less effective than just leaving
611 ## it alone (setting to /dev/null will waste time by opening
612 ## /dev/null and writing to it)
614 # SetConsole = /dev/console
616 ## Activate the SysV IPC message queue
618 # MessageQueueActive = False
621 ## If false, skip reverse lookup when connecting to a host known
622 ## by name rather than IP address (i.e. trust the DNS)
624 # SetReverseLookup = True
628 # Only highest-level (alert) reports will be mailed immediately,
629 # others will be queued. Here you can define, when the queue will
630 # be flushed (Note: the queue is automatically flushed after
631 # completing a file check).
635 ## Maximum number of mails to queue
639 ## Recipient (max. 8)
641 SetMailAddress=samhain-reports@debian.org
643 ## Mail relay (IP address)
645 SetMailRelay = master.debian.org
647 ## Custom subject format
649 MailSubject = [Samhain at %H] %T: %S
651 ## --- end E-Mail ---
653 ## Path to the prelink executable
655 # SetPrelinkPath = /usr/sbin/prelink
657 ## TIGER192 checksum of the prelink executable
659 # SetPrelinkChecksum = (no default)
662 ## Path to the executable. If set, will be checksummed after startup
665 # SamhainPath = (no default)
668 ## The IP address of the log server
670 # SetLogServer = (default: compiled-in)
672 ## The IP address of the time server
674 # SetTimeServer = (default: compiled-in)
676 ## Trusted Users (comma delimited list of user names)
678 # TrustedUser = (no default; this adds to the compiled-in list)
680 ## Path to the file signature database
682 # SetDatabasePath = (default: compiled-in)
684 ## Path to the log file
686 # SetLogfilePath = (default: compiled-in)
688 ## Path to the PID file
690 # SetLockPath = (default: compiled-in)
693 ## The digest/checksum/hash algorithm
695 # DigestAlgo = TIGER192
698 ## Custom format for message header.
699 ## CAREFUL if you use XML logfile format.
708 # MessageHeader="%S %T "
711 ## Don't log path to config/database file on startup
715 ## The syslog facility, if you log to syslog
717 # SyslogFacility = LOG_AUTHPRIV
718 SyslogFacility=LOG_LOCAL2
720 ## The message authentication method
721 ## - If you change this, you *must* change it
722 ## on client *and* server
724 # MACType = HMAC-TIGER
727 ## everything below is ignored
730 #####################################################################
731 # This would be the proper syntax for parts that should only be
732 # included for certain hosts.
733 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
734 # result still has the proper syntax for the config file.
735 # You may have any number of @HOSTNAME/@end brackets.
736 # HOSTNAME should be the fully qualified 'official' name
737 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
738 # No IP number - except if samhain cannot determine the
739 # fully qualified hostname.
745 # These are two examples for conditional inclusion/exclusion
746 # of a machine based on the output from 'uname -srm'
755 #####################################################################