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
104 file=/etc/logrotate.d
108 ## for these files, changes in signature, timestamps, and size are ignored
115 #####################################################################
117 # This would be the proper syntax for parts that should only be
118 # included for certain hosts.
119 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
120 # result still has the proper syntax for the config file.
121 # You may have any number of @HOSTNAME/@end brackets.
122 # HOSTNAME should be the fully qualified 'official' name
123 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
124 # No IP number - except if samhain cannot determine the
125 # fully qualified hostname.
131 # These are two examples for conditional inclusion/exclusion
132 # of a machine based on the output from 'uname -srm'
142 #####################################################################
146 ## for these files, changes in signature, timestamps, and increase in size
150 file=/var/log/messages
152 file=/var/log/faillog
153 file=/var/log/auth.log
154 file=/var/log/daemon.log
155 file=/var/log/user.log
156 file=/var/log/kern.log
162 ## for these files, no modifications are reported
164 ## This file might be created or removed by the system sometimes.
166 file=/etc/resolv.conf.pcmcia.save
168 file=/etc/postfix/debian.db
169 file=/etc/postfix/debian
170 file=/etc/ssh/ssh_known_hosts
171 file=/etc/ssh/ssh-rsa-shadow
172 file=/var/lib/misc/ssh-rsa-shadow
173 file=/etc/.da-backup.trace
174 file=/etc/postfix/debianhosts
175 file=/etc/postfix/debianhosts.db
177 # We handle these files with puppet - please to not be bothering us
178 file=/etc/samhain/samhainrc
179 file=/etc/munin/munin-node.conf
180 file=/etc/exim4/blacklist
181 file=/etc/exim4/callout_users
182 file=/etc/exim4/exim4.conf
183 file=/etc/exim4/grey_users
184 file=/etc/exim4/helo-check
185 file=/etc/exim4/locals
186 file=/etc/exim4/localusers
187 file=/etc/exim4/rbllist
188 file=/etc/exim4/rcpthosts
189 file=/etc/exim4/rhsbllist
190 file=/etc/exim4/virtualdomains
191 file=/etc/exim4/whitelist
192 file=/etc/apt/sources.list.d/volatile.list
193 file=/etc/apt/sources.list.d/security.list
194 file=/etc/apt/sources.list.d/debian.org.list
195 file=/etc/apt/sources.list.d/debian.restricted.list
196 file=/etc/apt/sources.list.d/debian.list
197 file=/etc/apt/sources.list.d/backports.org.list
198 file=/etc/apt/apt.conf.d/local-recommends
199 file=/etc/puppet/puppet.conf
200 file=/etc/default/puppet
201 file=/etc/logrotate.d/exim4-paniclog
202 file=/etc/logrotate.d/exim4-base
206 ## for these files, all modifications (even access time) are reported
207 ## - you may create some interesting-looking file (like /etc/safe_passwd),
208 ## just to watch whether someone will access it ...
213 ## Use for prelinked files or directories holding them
219 ## for these files, only access time is ignored
225 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
226 # so we go 3 levels deep
233 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
234 # so we go 3 levels deep there too
238 # Various directories / files that may include / be SUID/SGID binaries
241 file=/usr/lib/pt_chown
242 # X11, in Debian X7 this is now a symlink
244 #dir=/usr/X11R6/lib/X11/xmcd/bin
246 #file=/usr/lib/apache/suexec
247 #file=/usr/lib/apache/suexec.disabled
254 ## User0 and User1 are sections for files/dirs with user-definable checking
260 ## Here you can assign severities to policy violations.
261 ## If this severity exceeds the treshold of a log facility (see below),
262 ## a policy violation will be logged to that facility.
264 ## Severity for verification failures.
266 # SeverityReadOnly=crit
267 # SeverityLogFiles=crit
268 # SeverityGrowingLogs=crit
269 # SeverityIgnoreNone=crit
270 # SeverityAttributes=crit
275 SeverityReadOnly=crit
276 SeverityLogFiles=crit
277 SeverityGrowingLogs=warn
278 SeverityIgnoreNone=crit
279 SeverityAttributes=crit
283 ## We have a file in IgnoreAll that might or might not be present.
284 ## Setting the severity to 'info' prevents messages about deleted/new file.
286 # SeverityIgnoreAll=crit
287 SeverityIgnoreAll=info
289 ## Files : file access problems
292 ## Dirs : directory access problems
295 ## Names : suspect (non-printable) characters in a pathname
306 ## Switch on/OFF log facilities and set their threshold severity
308 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
309 ## 'mark' is used for timestamps.
312 ## Use 'none' to SWITCH OFF a log facility
314 ## By default, everything equal to and above the threshold is logged.
315 ## The specifiers '*', '!', and '=' are interpreted as
316 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
317 ## at least on Linux). Examples:
319 ## MailSeverity=!warn
320 ## MailSeverity==crit
336 # SyslogSeverity=none
338 ## Remote server (yule)
340 # ExportSeverity=none
342 ## External script or program
344 # ExternalSeverity = none
346 ## Logging to a database
348 # DatabaseSeverity = none
361 #####################################################
365 #####################################################
369 ## --- Check the filesystem for SUID/SGID binaries
374 # SuidCheckActive = yes
376 ## Interval for check (seconds)
378 # SuidCheckInterval = 7200
380 ## Alternative: crontab-like schedule
382 # SuidCheckSchedule = NULL
384 ## Directory to exclude
386 # SuidCheckExclude = NULL
388 ## Limit on files per second (0 == no limit)
392 ## Alternative: yield after every file
394 # SuidCheckYield = no
396 ## Severity of a detection
398 # SeveritySuidCheck = crit
400 ## Quarantine SUID/SGID files if found
402 # SuidCheckQuarantineFiles = yes
404 ## Method for Quarantining files:
405 # 0 - Delete or truncate the file.
406 # 1 - Remove SUID/SGID permissions from file.
407 # 2 - Move SUID/SGID file to quarantine dir.
409 # SuidCheckQuarantineMethod = 0
411 ## For method 1 and 3, really delete instead of truncating
413 # SuidCheckQuarantineDelete = yes
417 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
422 KernelCheckActive = True
424 ## Check interval (seconds); btw., the check is VERY fast
426 # KernelCheckInterval = 300
430 # SeverityKernel = crit
435 ## --- Logging of login/logout events
440 LoginCheckActive = True
442 ## Severity for logins, multiple logins, logouts
445 # SeverityLoginMulti=warn
446 # SeverityLogout=info
448 ## Interval for login/logout checks
450 # LoginCheckInterval = 300
455 ## --- Logging to a relational database
460 # SetDBName = samhain
468 # SetDBUser = samhain
472 # SetDBPassword = (default: none)
476 # SetDBHost = localhost
478 ## Log the server timestamp for received messages
480 # SetDBServerTstamp = True
482 ## Use a persistent connection
484 # UsePersistent = True
488 ## Interface to call external scripts/programs for logging
491 ## The absolute path to the command
492 ## - Each invocation of this directive will end the definition of the
493 ## preceding command, and start the definition of
494 ## an additional, new command
496 # OpenCommand = (no default)
499 ## - log for log messages, srv for messages received by the server
503 ## The command (full command line) to execute
505 # SetCommandLine = (no default)
507 ## The environment (KEY=value; repeat for more)
509 # SetEnviron = TZ=(your timezone)
511 ## The TIGER192 checksum (optional)
513 # SetChecksum = (no default)
515 ## User who runs the command
517 # SetCredentials = (default: samhain process uid)
519 ## Words not allowed in message
521 # SetFilterNot = (none)
523 ## Words required (ALL of them)
525 # SetFilterAnd = (none)
527 ## Words required (at least one)
529 # SetFilterOr = (none)
531 ## Deadtime between consecutive calls
535 ## Add default environment (HOME, PATH, SHELL)
540 #####################################################
542 # Miscellaneous configuration options
544 #####################################################
548 ## whether to become a daemon process
549 ## (this is not honoured on database initialisation)
554 ## whether to test signature of files (init/check/none)
555 ## - if 'none', then we have to decide this on the command line -
557 # ChecksumTest = none
560 ## whether to drop linux capabilities that are not required
561 ## - will make a root process a 'mere mortal' in many respects
565 ## Set nice level (-19 to 19, see 'man nice'),
566 ## and I/O limit (kilobytes per second; 0 == off)
567 ## to reduce load on host.
572 ## The version string to embed in file signature databases
574 # VersionString = NULL
576 ## Interval between time stamp messages
581 ## Interval between file checks
583 # SetFileCheckTime = 600
584 SetFileCheckTime = 7200
586 ## Alternative: crontab-like schedule
588 # FileCheckScheduleOne = NULL
590 ## Alternative: crontab-like schedule(2)
592 # FileCheckScheduleTwo = NULL
594 ## Report only once on modified fles
595 ## Setting this to 'FALSE' will generate a report for any policy
596 ## violation (old and new ones) each time the daemon checks the file system.
598 # ReportOnlyOnce = True
600 ## Report in full detail
602 # ReportFullDetail = False
604 ## Report file timestamps in local time rather than GMT
608 ## The console device (can also be a file or named pipe)
609 ## - There are two console devices. Accordingly, you can use
610 ## this directive a second time to set the second console device.
611 ## If you have not defined the second device at compile time,
612 ## and you don't want to use it, then:
613 ## setting it to /dev/null is less effective than just leaving
614 ## it alone (setting to /dev/null will waste time by opening
615 ## /dev/null and writing to it)
617 # SetConsole = /dev/console
619 ## Activate the SysV IPC message queue
621 # MessageQueueActive = False
624 ## If false, skip reverse lookup when connecting to a host known
625 ## by name rather than IP address (i.e. trust the DNS)
627 # SetReverseLookup = True
631 # Only highest-level (alert) reports will be mailed immediately,
632 # others will be queued. Here you can define, when the queue will
633 # be flushed (Note: the queue is automatically flushed after
634 # completing a file check).
638 ## Maximum number of mails to queue
642 ## Recipient (max. 8)
644 SetMailAddress=samhain-reports@debian.org
646 ## Mail relay (IP address)
648 SetMailRelay = master.debian.org
650 ## Custom subject format
652 MailSubject = [Samhain at %H] %T: %S
654 ## --- end E-Mail ---
656 ## Path to the prelink executable
658 # SetPrelinkPath = /usr/sbin/prelink
660 ## TIGER192 checksum of the prelink executable
662 # SetPrelinkChecksum = (no default)
665 ## Path to the executable. If set, will be checksummed after startup
668 # SamhainPath = (no default)
671 ## The IP address of the log server
673 # SetLogServer = (default: compiled-in)
675 ## The IP address of the time server
677 # SetTimeServer = (default: compiled-in)
679 ## Trusted Users (comma delimited list of user names)
681 # TrustedUser = (no default; this adds to the compiled-in list)
683 ## Path to the file signature database
685 # SetDatabasePath = (default: compiled-in)
687 ## Path to the log file
689 # SetLogfilePath = (default: compiled-in)
691 ## Path to the PID file
693 # SetLockPath = (default: compiled-in)
696 ## The digest/checksum/hash algorithm
698 # DigestAlgo = TIGER192
701 ## Custom format for message header.
702 ## CAREFUL if you use XML logfile format.
711 # MessageHeader="%S %T "
714 ## Don't log path to config/database file on startup
718 ## The syslog facility, if you log to syslog
720 # SyslogFacility = LOG_AUTHPRIV
721 SyslogFacility=LOG_LOCAL2
723 ## The message authentication method
724 ## - If you change this, you *must* change it
725 ## on client *and* server
727 # MACType = HMAC-TIGER
730 ## everything below is ignored
733 #####################################################################
734 # This would be the proper syntax for parts that should only be
735 # included for certain hosts.
736 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
737 # result still has the proper syntax for the config file.
738 # You may have any number of @HOSTNAME/@end brackets.
739 # HOSTNAME should be the fully qualified 'official' name
740 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
741 # No IP number - except if samhain cannot determine the
742 # fully qualified hostname.
748 # These are two examples for conditional inclusion/exclusion
749 # of a machine based on the output from 'uname -srm'
758 #####################################################################