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.list
194 file=/etc/apt/sources.list.d/backports.org.list
195 file=/etc/apt/apt.conf.d/local-recommends
196 file=/etc/puppet/puppet.conf
200 ## for these files, all modifications (even access time) are reported
201 ## - you may create some interesting-looking file (like /etc/safe_passwd),
202 ## just to watch whether someone will access it ...
207 ## Use for prelinked files or directories holding them
213 ## for these files, only access time is ignored
219 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
220 # so we go 3 levels deep
227 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
228 # so we go 3 levels deep there too
232 # Various directories / files that may include / be SUID/SGID binaries
235 file=/usr/lib/pt_chown
236 # X11, in Debian X7 this is now a symlink
238 #dir=/usr/X11R6/lib/X11/xmcd/bin
240 #file=/usr/lib/apache/suexec
241 #file=/usr/lib/apache/suexec.disabled
248 ## User0 and User1 are sections for files/dirs with user-definable checking
254 ## Here you can assign severities to policy violations.
255 ## If this severity exceeds the treshold of a log facility (see below),
256 ## a policy violation will be logged to that facility.
258 ## Severity for verification failures.
260 # SeverityReadOnly=crit
261 # SeverityLogFiles=crit
262 # SeverityGrowingLogs=crit
263 # SeverityIgnoreNone=crit
264 # SeverityAttributes=crit
269 SeverityReadOnly=crit
270 SeverityLogFiles=crit
271 SeverityGrowingLogs=warn
272 SeverityIgnoreNone=crit
273 SeverityAttributes=crit
277 ## We have a file in IgnoreAll that might or might not be present.
278 ## Setting the severity to 'info' prevents messages about deleted/new file.
280 # SeverityIgnoreAll=crit
281 SeverityIgnoreAll=info
283 ## Files : file access problems
286 ## Dirs : directory access problems
289 ## Names : suspect (non-printable) characters in a pathname
300 ## Switch on/OFF log facilities and set their threshold severity
302 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
303 ## 'mark' is used for timestamps.
306 ## Use 'none' to SWITCH OFF a log facility
308 ## By default, everything equal to and above the threshold is logged.
309 ## The specifiers '*', '!', and '=' are interpreted as
310 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
311 ## at least on Linux). Examples:
313 ## MailSeverity=!warn
314 ## MailSeverity==crit
330 # SyslogSeverity=none
332 ## Remote server (yule)
334 # ExportSeverity=none
336 ## External script or program
338 # ExternalSeverity = none
340 ## Logging to a database
342 # DatabaseSeverity = none
355 #####################################################
359 #####################################################
363 ## --- Check the filesystem for SUID/SGID binaries
368 # SuidCheckActive = yes
370 ## Interval for check (seconds)
372 # SuidCheckInterval = 7200
374 ## Alternative: crontab-like schedule
376 # SuidCheckSchedule = NULL
378 ## Directory to exclude
380 # SuidCheckExclude = NULL
382 ## Limit on files per second (0 == no limit)
386 ## Alternative: yield after every file
388 # SuidCheckYield = no
390 ## Severity of a detection
392 # SeveritySuidCheck = crit
394 ## Quarantine SUID/SGID files if found
396 # SuidCheckQuarantineFiles = yes
398 ## Method for Quarantining files:
399 # 0 - Delete or truncate the file.
400 # 1 - Remove SUID/SGID permissions from file.
401 # 2 - Move SUID/SGID file to quarantine dir.
403 # SuidCheckQuarantineMethod = 0
405 ## For method 1 and 3, really delete instead of truncating
407 # SuidCheckQuarantineDelete = yes
411 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
416 KernelCheckActive = True
418 ## Check interval (seconds); btw., the check is VERY fast
420 # KernelCheckInterval = 300
424 # SeverityKernel = crit
429 ## --- Logging of login/logout events
434 LoginCheckActive = True
436 ## Severity for logins, multiple logins, logouts
439 # SeverityLoginMulti=warn
440 # SeverityLogout=info
442 ## Interval for login/logout checks
444 # LoginCheckInterval = 300
449 ## --- Logging to a relational database
454 # SetDBName = samhain
462 # SetDBUser = samhain
466 # SetDBPassword = (default: none)
470 # SetDBHost = localhost
472 ## Log the server timestamp for received messages
474 # SetDBServerTstamp = True
476 ## Use a persistent connection
478 # UsePersistent = True
482 ## Interface to call external scripts/programs for logging
485 ## The absolute path to the command
486 ## - Each invocation of this directive will end the definition of the
487 ## preceding command, and start the definition of
488 ## an additional, new command
490 # OpenCommand = (no default)
493 ## - log for log messages, srv for messages received by the server
497 ## The command (full command line) to execute
499 # SetCommandLine = (no default)
501 ## The environment (KEY=value; repeat for more)
503 # SetEnviron = TZ=(your timezone)
505 ## The TIGER192 checksum (optional)
507 # SetChecksum = (no default)
509 ## User who runs the command
511 # SetCredentials = (default: samhain process uid)
513 ## Words not allowed in message
515 # SetFilterNot = (none)
517 ## Words required (ALL of them)
519 # SetFilterAnd = (none)
521 ## Words required (at least one)
523 # SetFilterOr = (none)
525 ## Deadtime between consecutive calls
529 ## Add default environment (HOME, PATH, SHELL)
534 #####################################################
536 # Miscellaneous configuration options
538 #####################################################
542 ## whether to become a daemon process
543 ## (this is not honoured on database initialisation)
548 ## whether to test signature of files (init/check/none)
549 ## - if 'none', then we have to decide this on the command line -
551 # ChecksumTest = none
554 ## whether to drop linux capabilities that are not required
555 ## - will make a root process a 'mere mortal' in many respects
559 ## Set nice level (-19 to 19, see 'man nice'),
560 ## and I/O limit (kilobytes per second; 0 == off)
561 ## to reduce load on host.
566 ## The version string to embed in file signature databases
568 # VersionString = NULL
570 ## Interval between time stamp messages
575 ## Interval between file checks
577 # SetFileCheckTime = 600
578 SetFileCheckTime = 7200
580 ## Alternative: crontab-like schedule
582 # FileCheckScheduleOne = NULL
584 ## Alternative: crontab-like schedule(2)
586 # FileCheckScheduleTwo = NULL
588 ## Report only once on modified fles
589 ## Setting this to 'FALSE' will generate a report for any policy
590 ## violation (old and new ones) each time the daemon checks the file system.
592 # ReportOnlyOnce = True
594 ## Report in full detail
596 # ReportFullDetail = False
598 ## Report file timestamps in local time rather than GMT
602 ## The console device (can also be a file or named pipe)
603 ## - There are two console devices. Accordingly, you can use
604 ## this directive a second time to set the second console device.
605 ## If you have not defined the second device at compile time,
606 ## and you don't want to use it, then:
607 ## setting it to /dev/null is less effective than just leaving
608 ## it alone (setting to /dev/null will waste time by opening
609 ## /dev/null and writing to it)
611 # SetConsole = /dev/console
613 ## Activate the SysV IPC message queue
615 # MessageQueueActive = False
618 ## If false, skip reverse lookup when connecting to a host known
619 ## by name rather than IP address (i.e. trust the DNS)
621 # SetReverseLookup = True
625 # Only highest-level (alert) reports will be mailed immediately,
626 # others will be queued. Here you can define, when the queue will
627 # be flushed (Note: the queue is automatically flushed after
628 # completing a file check).
632 ## Maximum number of mails to queue
636 ## Recipient (max. 8)
638 SetMailAddress=samhain-reports@debian.org
640 ## Mail relay (IP address)
642 SetMailRelay = master.debian.org
644 ## Custom subject format
646 MailSubject = [Samhain at %H] %T: %S
648 ## --- end E-Mail ---
650 ## Path to the prelink executable
652 # SetPrelinkPath = /usr/sbin/prelink
654 ## TIGER192 checksum of the prelink executable
656 # SetPrelinkChecksum = (no default)
659 ## Path to the executable. If set, will be checksummed after startup
662 # SamhainPath = (no default)
665 ## The IP address of the log server
667 # SetLogServer = (default: compiled-in)
669 ## The IP address of the time server
671 # SetTimeServer = (default: compiled-in)
673 ## Trusted Users (comma delimited list of user names)
675 # TrustedUser = (no default; this adds to the compiled-in list)
677 ## Path to the file signature database
679 # SetDatabasePath = (default: compiled-in)
681 ## Path to the log file
683 # SetLogfilePath = (default: compiled-in)
685 ## Path to the PID file
687 # SetLockPath = (default: compiled-in)
690 ## The digest/checksum/hash algorithm
692 # DigestAlgo = TIGER192
695 ## Custom format for message header.
696 ## CAREFUL if you use XML logfile format.
705 # MessageHeader="%S %T "
708 ## Don't log path to config/database file on startup
712 ## The syslog facility, if you log to syslog
714 # SyslogFacility = LOG_AUTHPRIV
715 SyslogFacility=LOG_LOCAL2
717 ## The message authentication method
718 ## - If you change this, you *must* change it
719 ## on client *and* server
721 # MACType = HMAC-TIGER
724 ## everything below is ignored
727 #####################################################################
728 # This would be the proper syntax for parts that should only be
729 # included for certain hosts.
730 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
731 # result still has the proper syntax for the config file.
732 # You may have any number of @HOSTNAME/@end brackets.
733 # HOSTNAME should be the fully qualified 'official' name
734 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
735 # No IP number - except if samhain cannot determine the
736 # fully qualified hostname.
742 # These are two examples for conditional inclusion/exclusion
743 # of a machine based on the output from 'uname -srm'
752 #####################################################################