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
106 ## for these files, changes in signature, timestamps, and size are ignored
113 #####################################################################
115 # This would be the proper syntax for parts that should only be
116 # included for certain hosts.
117 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
118 # result still has the proper syntax for the config file.
119 # You may have any number of @HOSTNAME/@end brackets.
120 # HOSTNAME should be the fully qualified 'official' name
121 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
122 # No IP number - except if samhain cannot determine the
123 # fully qualified hostname.
129 # These are two examples for conditional inclusion/exclusion
130 # of a machine based on the output from 'uname -srm'
140 #####################################################################
144 ## for these files, changes in signature, timestamps, and increase in size
148 file=/var/log/messages
150 file=/var/log/faillog
151 file=/var/log/auth.log
152 file=/var/log/daemon.log
153 file=/var/log/user.log
154 file=/var/log/kern.log
160 ## for these files, no modifications are reported
162 ## This file might be created or removed by the system sometimes.
164 file=/etc/resolv.conf.pcmcia.save
166 file=/etc/postfix/debian.db
167 file=/etc/postfix/debian
168 file=/etc/ssh/ssh_known_hosts
169 file=/etc/ssh/ssh-rsa-shadow
170 file=/var/lib/misc/ssh-rsa-shadow
171 file=/etc/.da-backup.trace
172 file=/etc/postfix/debianhosts
173 file=/etc/postfix/debianhosts.db
175 # We handle these files with puppet - please to not be bothering us
176 file=/etc/samhain/samhainrc
177 file=/etc/munin/munin-node.conf
178 file=/etc/exim4/blacklist
179 file=/etc/exim4/callout_users
180 file=/etc/exim4/exim4.conf
181 file=/etc/exim4/grey_users
182 file=/etc/exim4/helo-check
183 file=/etc/exim4/locals
184 file=/etc/exim4/localusers
185 file=/etc/exim4/rbllist
186 file=/etc/exim4/rcpthosts
187 file=/etc/exim4/rhsbllist
188 file=/etc/exim4/virtualdomains
189 file=/etc/exim4/whitelist
190 file=/etc/apt/sources.list.d/volatile.list
191 file=/etc/apt/sources.list.d/security.list
192 file=/etc/apt/sources.list.d/debian.org.list
193 file=/etc/apt/sources.list.d/debian.restricted.list
194 file=/etc/apt/sources.list.d/debian.list
195 file=/etc/apt/sources.list.d/backports.org.list
196 file=/etc/apt/apt.conf.d/local-recommends
197 file=/etc/puppet/puppet.conf
198 file=/etc/default/puppet
202 ## for these files, all modifications (even access time) are reported
203 ## - you may create some interesting-looking file (like /etc/safe_passwd),
204 ## just to watch whether someone will access it ...
209 ## Use for prelinked files or directories holding them
215 ## for these files, only access time is ignored
221 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
222 # so we go 3 levels deep
229 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
230 # so we go 3 levels deep there too
234 # Various directories / files that may include / be SUID/SGID binaries
237 file=/usr/lib/pt_chown
238 # X11, in Debian X7 this is now a symlink
240 #dir=/usr/X11R6/lib/X11/xmcd/bin
242 #file=/usr/lib/apache/suexec
243 #file=/usr/lib/apache/suexec.disabled
250 ## User0 and User1 are sections for files/dirs with user-definable checking
256 ## Here you can assign severities to policy violations.
257 ## If this severity exceeds the treshold of a log facility (see below),
258 ## a policy violation will be logged to that facility.
260 ## Severity for verification failures.
262 # SeverityReadOnly=crit
263 # SeverityLogFiles=crit
264 # SeverityGrowingLogs=crit
265 # SeverityIgnoreNone=crit
266 # SeverityAttributes=crit
271 SeverityReadOnly=crit
272 SeverityLogFiles=crit
273 SeverityGrowingLogs=warn
274 SeverityIgnoreNone=crit
275 SeverityAttributes=crit
279 ## We have a file in IgnoreAll that might or might not be present.
280 ## Setting the severity to 'info' prevents messages about deleted/new file.
282 # SeverityIgnoreAll=crit
283 SeverityIgnoreAll=info
285 ## Files : file access problems
288 ## Dirs : directory access problems
291 ## Names : suspect (non-printable) characters in a pathname
302 ## Switch on/OFF log facilities and set their threshold severity
304 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
305 ## 'mark' is used for timestamps.
308 ## Use 'none' to SWITCH OFF a log facility
310 ## By default, everything equal to and above the threshold is logged.
311 ## The specifiers '*', '!', and '=' are interpreted as
312 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
313 ## at least on Linux). Examples:
315 ## MailSeverity=!warn
316 ## MailSeverity==crit
332 # SyslogSeverity=none
334 ## Remote server (yule)
336 # ExportSeverity=none
338 ## External script or program
340 # ExternalSeverity = none
342 ## Logging to a database
344 # DatabaseSeverity = none
357 #####################################################
361 #####################################################
365 ## --- Check the filesystem for SUID/SGID binaries
370 # SuidCheckActive = yes
372 ## Interval for check (seconds)
374 # SuidCheckInterval = 7200
376 ## Alternative: crontab-like schedule
378 # SuidCheckSchedule = NULL
380 ## Directory to exclude
382 # SuidCheckExclude = NULL
384 ## Limit on files per second (0 == no limit)
388 ## Alternative: yield after every file
390 # SuidCheckYield = no
392 ## Severity of a detection
394 # SeveritySuidCheck = crit
396 ## Quarantine SUID/SGID files if found
398 # SuidCheckQuarantineFiles = yes
400 ## Method for Quarantining files:
401 # 0 - Delete or truncate the file.
402 # 1 - Remove SUID/SGID permissions from file.
403 # 2 - Move SUID/SGID file to quarantine dir.
405 # SuidCheckQuarantineMethod = 0
407 ## For method 1 and 3, really delete instead of truncating
409 # SuidCheckQuarantineDelete = yes
413 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
418 KernelCheckActive = True
420 ## Check interval (seconds); btw., the check is VERY fast
422 # KernelCheckInterval = 300
426 # SeverityKernel = crit
431 ## --- Logging of login/logout events
436 LoginCheckActive = True
438 ## Severity for logins, multiple logins, logouts
441 # SeverityLoginMulti=warn
442 # SeverityLogout=info
444 ## Interval for login/logout checks
446 # LoginCheckInterval = 300
451 ## --- Logging to a relational database
456 # SetDBName = samhain
464 # SetDBUser = samhain
468 # SetDBPassword = (default: none)
472 # SetDBHost = localhost
474 ## Log the server timestamp for received messages
476 # SetDBServerTstamp = True
478 ## Use a persistent connection
480 # UsePersistent = True
484 ## Interface to call external scripts/programs for logging
487 ## The absolute path to the command
488 ## - Each invocation of this directive will end the definition of the
489 ## preceding command, and start the definition of
490 ## an additional, new command
492 # OpenCommand = (no default)
495 ## - log for log messages, srv for messages received by the server
499 ## The command (full command line) to execute
501 # SetCommandLine = (no default)
503 ## The environment (KEY=value; repeat for more)
505 # SetEnviron = TZ=(your timezone)
507 ## The TIGER192 checksum (optional)
509 # SetChecksum = (no default)
511 ## User who runs the command
513 # SetCredentials = (default: samhain process uid)
515 ## Words not allowed in message
517 # SetFilterNot = (none)
519 ## Words required (ALL of them)
521 # SetFilterAnd = (none)
523 ## Words required (at least one)
525 # SetFilterOr = (none)
527 ## Deadtime between consecutive calls
531 ## Add default environment (HOME, PATH, SHELL)
536 #####################################################
538 # Miscellaneous configuration options
540 #####################################################
544 ## whether to become a daemon process
545 ## (this is not honoured on database initialisation)
550 ## whether to test signature of files (init/check/none)
551 ## - if 'none', then we have to decide this on the command line -
553 # ChecksumTest = none
556 ## whether to drop linux capabilities that are not required
557 ## - will make a root process a 'mere mortal' in many respects
561 ## Set nice level (-19 to 19, see 'man nice'),
562 ## and I/O limit (kilobytes per second; 0 == off)
563 ## to reduce load on host.
568 ## The version string to embed in file signature databases
570 # VersionString = NULL
572 ## Interval between time stamp messages
577 ## Interval between file checks
579 # SetFileCheckTime = 600
580 SetFileCheckTime = 7200
582 ## Alternative: crontab-like schedule
584 # FileCheckScheduleOne = NULL
586 ## Alternative: crontab-like schedule(2)
588 # FileCheckScheduleTwo = NULL
590 ## Report only once on modified fles
591 ## Setting this to 'FALSE' will generate a report for any policy
592 ## violation (old and new ones) each time the daemon checks the file system.
594 # ReportOnlyOnce = True
596 ## Report in full detail
598 # ReportFullDetail = False
600 ## Report file timestamps in local time rather than GMT
604 ## The console device (can also be a file or named pipe)
605 ## - There are two console devices. Accordingly, you can use
606 ## this directive a second time to set the second console device.
607 ## If you have not defined the second device at compile time,
608 ## and you don't want to use it, then:
609 ## setting it to /dev/null is less effective than just leaving
610 ## it alone (setting to /dev/null will waste time by opening
611 ## /dev/null and writing to it)
613 # SetConsole = /dev/console
615 ## Activate the SysV IPC message queue
617 # MessageQueueActive = False
620 ## If false, skip reverse lookup when connecting to a host known
621 ## by name rather than IP address (i.e. trust the DNS)
623 # SetReverseLookup = True
627 # Only highest-level (alert) reports will be mailed immediately,
628 # others will be queued. Here you can define, when the queue will
629 # be flushed (Note: the queue is automatically flushed after
630 # completing a file check).
634 ## Maximum number of mails to queue
638 ## Recipient (max. 8)
640 SetMailAddress=samhain-reports@debian.org
642 ## Mail relay (IP address)
644 SetMailRelay = master.debian.org
646 ## Custom subject format
648 MailSubject = [Samhain at %H] %T: %S
650 ## --- end E-Mail ---
652 ## Path to the prelink executable
654 # SetPrelinkPath = /usr/sbin/prelink
656 ## TIGER192 checksum of the prelink executable
658 # SetPrelinkChecksum = (no default)
661 ## Path to the executable. If set, will be checksummed after startup
664 # SamhainPath = (no default)
667 ## The IP address of the log server
669 # SetLogServer = (default: compiled-in)
671 ## The IP address of the time server
673 # SetTimeServer = (default: compiled-in)
675 ## Trusted Users (comma delimited list of user names)
677 # TrustedUser = (no default; this adds to the compiled-in list)
679 ## Path to the file signature database
681 # SetDatabasePath = (default: compiled-in)
683 ## Path to the log file
685 # SetLogfilePath = (default: compiled-in)
687 ## Path to the PID file
689 # SetLockPath = (default: compiled-in)
692 ## The digest/checksum/hash algorithm
694 # DigestAlgo = TIGER192
697 ## Custom format for message header.
698 ## CAREFUL if you use XML logfile format.
707 # MessageHeader="%S %T "
710 ## Don't log path to config/database file on startup
714 ## The syslog facility, if you log to syslog
716 # SyslogFacility = LOG_AUTHPRIV
717 SyslogFacility=LOG_LOCAL2
719 ## The message authentication method
720 ## - If you change this, you *must* change it
721 ## on client *and* server
723 # MACType = HMAC-TIGER
726 ## everything below is ignored
729 #####################################################################
730 # This would be the proper syntax for parts that should only be
731 # included for certain hosts.
732 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
733 # result still has the proper syntax for the config file.
734 # You may have any number of @HOSTNAME/@end brackets.
735 # HOSTNAME should be the fully qualified 'official' name
736 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
737 # No IP number - except if samhain cannot determine the
738 # fully qualified hostname.
744 # These are two examples for conditional inclusion/exclusion
745 # of a machine based on the output from 'uname -srm'
754 #####################################################################