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
91 # There are files in /etc that might change, thus changing the directory
92 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
99 # These are the directories for the files we handle with puppet
105 ## for these files, changes in signature, timestamps, and size are ignored
112 #####################################################################
114 # This would be the proper syntax for parts that should only be
115 # included for certain hosts.
116 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
117 # result still has the proper syntax for the config file.
118 # You may have any number of @HOSTNAME/@end brackets.
119 # HOSTNAME should be the fully qualified 'official' name
120 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
121 # No IP number - except if samhain cannot determine the
122 # fully qualified hostname.
128 # These are two examples for conditional inclusion/exclusion
129 # of a machine based on the output from 'uname -srm'
139 #####################################################################
143 ## for these files, changes in signature, timestamps, and increase in size
147 file=/var/log/messages
149 file=/var/log/faillog
150 file=/var/log/auth.log
151 file=/var/log/daemon.log
152 file=/var/log/user.log
153 file=/var/log/kern.log
159 ## for these files, no modifications are reported
161 ## This file might be created or removed by the system sometimes.
163 file=/etc/resolv.conf.pcmcia.save
165 file=/etc/postfix/debian.db
166 file=/etc/postfix/debian
167 file=/etc/ssh/ssh_known_hosts
168 file=/etc/ssh/ssh-rsa-shadow
169 file=/var/lib/misc/ssh-rsa-shadow
170 file=/etc/.da-backup.trace
171 file=/etc/postfix/debianhosts
172 file=/etc/postfix/debianhosts.db
176 ## for these files, all modifications (even access time) are reported
177 ## - you may create some interesting-looking file (like /etc/safe_passwd),
178 ## just to watch whether someone will access it ...
183 ## Use for prelinked files or directories holding them
189 ## for these files, only access time is ignored
195 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
196 # so we go 3 levels deep
203 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
204 # so we go 3 levels deep there too
208 # Various directories / files that may include / be SUID/SGID binaries
211 file=/usr/lib/pt_chown
212 # X11, in Debian X7 this is now a symlink
214 #dir=/usr/X11R6/lib/X11/xmcd/bin
216 #file=/usr/lib/apache/suexec
217 #file=/usr/lib/apache/suexec.disabled
224 ## User0 and User1 are sections for files/dirs with user-definable checking
230 ## Here you can assign severities to policy violations.
231 ## If this severity exceeds the treshold of a log facility (see below),
232 ## a policy violation will be logged to that facility.
234 ## Severity for verification failures.
236 # SeverityReadOnly=crit
237 # SeverityLogFiles=crit
238 # SeverityGrowingLogs=crit
239 # SeverityIgnoreNone=crit
240 # SeverityAttributes=crit
245 SeverityReadOnly=crit
246 SeverityLogFiles=crit
247 SeverityGrowingLogs=warn
248 SeverityIgnoreNone=crit
249 SeverityAttributes=crit
253 ## We have a file in IgnoreAll that might or might not be present.
254 ## Setting the severity to 'info' prevents messages about deleted/new file.
256 # SeverityIgnoreAll=crit
257 SeverityIgnoreAll=info
259 ## Files : file access problems
262 ## Dirs : directory access problems
265 ## Names : suspect (non-printable) characters in a pathname
276 ## Switch on/OFF log facilities and set their threshold severity
278 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
279 ## 'mark' is used for timestamps.
282 ## Use 'none' to SWITCH OFF a log facility
284 ## By default, everything equal to and above the threshold is logged.
285 ## The specifiers '*', '!', and '=' are interpreted as
286 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
287 ## at least on Linux). Examples:
289 ## MailSeverity=!warn
290 ## MailSeverity==crit
306 # SyslogSeverity=none
308 ## Remote server (yule)
310 # ExportSeverity=none
312 ## External script or program
314 # ExternalSeverity = none
316 ## Logging to a database
318 # DatabaseSeverity = none
331 #####################################################
335 #####################################################
339 ## --- Check the filesystem for SUID/SGID binaries
344 # SuidCheckActive = yes
346 ## Interval for check (seconds)
348 # SuidCheckInterval = 7200
350 ## Alternative: crontab-like schedule
352 # SuidCheckSchedule = NULL
354 ## Directory to exclude
356 # SuidCheckExclude = NULL
358 ## Limit on files per second (0 == no limit)
362 ## Alternative: yield after every file
364 # SuidCheckYield = no
366 ## Severity of a detection
368 # SeveritySuidCheck = crit
370 ## Quarantine SUID/SGID files if found
372 # SuidCheckQuarantineFiles = yes
374 ## Method for Quarantining files:
375 # 0 - Delete or truncate the file.
376 # 1 - Remove SUID/SGID permissions from file.
377 # 2 - Move SUID/SGID file to quarantine dir.
379 # SuidCheckQuarantineMethod = 0
381 ## For method 1 and 3, really delete instead of truncating
383 # SuidCheckQuarantineDelete = yes
387 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
392 KernelCheckActive = True
394 ## Check interval (seconds); btw., the check is VERY fast
396 # KernelCheckInterval = 300
400 # SeverityKernel = crit
405 ## --- Logging of login/logout events
410 LoginCheckActive = True
412 ## Severity for logins, multiple logins, logouts
415 # SeverityLoginMulti=warn
416 # SeverityLogout=info
418 ## Interval for login/logout checks
420 # LoginCheckInterval = 300
425 ## --- Logging to a relational database
430 # SetDBName = samhain
438 # SetDBUser = samhain
442 # SetDBPassword = (default: none)
446 # SetDBHost = localhost
448 ## Log the server timestamp for received messages
450 # SetDBServerTstamp = True
452 ## Use a persistent connection
454 # UsePersistent = True
458 ## Interface to call external scripts/programs for logging
461 ## The absolute path to the command
462 ## - Each invocation of this directive will end the definition of the
463 ## preceding command, and start the definition of
464 ## an additional, new command
466 # OpenCommand = (no default)
469 ## - log for log messages, srv for messages received by the server
473 ## The command (full command line) to execute
475 # SetCommandLine = (no default)
477 ## The environment (KEY=value; repeat for more)
479 # SetEnviron = TZ=(your timezone)
481 ## The TIGER192 checksum (optional)
483 # SetChecksum = (no default)
485 ## User who runs the command
487 # SetCredentials = (default: samhain process uid)
489 ## Words not allowed in message
491 # SetFilterNot = (none)
493 ## Words required (ALL of them)
495 # SetFilterAnd = (none)
497 ## Words required (at least one)
499 # SetFilterOr = (none)
501 ## Deadtime between consecutive calls
505 ## Add default environment (HOME, PATH, SHELL)
510 #####################################################
512 # Miscellaneous configuration options
514 #####################################################
518 ## whether to become a daemon process
519 ## (this is not honoured on database initialisation)
524 ## whether to test signature of files (init/check/none)
525 ## - if 'none', then we have to decide this on the command line -
527 # ChecksumTest = none
530 ## whether to drop linux capabilities that are not required
531 ## - will make a root process a 'mere mortal' in many respects
535 ## Set nice level (-19 to 19, see 'man nice'),
536 ## and I/O limit (kilobytes per second; 0 == off)
537 ## to reduce load on host.
542 ## The version string to embed in file signature databases
544 # VersionString = NULL
546 ## Interval between time stamp messages
551 ## Interval between file checks
553 # SetFileCheckTime = 600
554 SetFileCheckTime = 7200
556 ## Alternative: crontab-like schedule
558 # FileCheckScheduleOne = NULL
560 ## Alternative: crontab-like schedule(2)
562 # FileCheckScheduleTwo = NULL
564 ## Report only once on modified fles
565 ## Setting this to 'FALSE' will generate a report for any policy
566 ## violation (old and new ones) each time the daemon checks the file system.
568 # ReportOnlyOnce = True
570 ## Report in full detail
572 # ReportFullDetail = False
574 ## Report file timestamps in local time rather than GMT
578 ## The console device (can also be a file or named pipe)
579 ## - There are two console devices. Accordingly, you can use
580 ## this directive a second time to set the second console device.
581 ## If you have not defined the second device at compile time,
582 ## and you don't want to use it, then:
583 ## setting it to /dev/null is less effective than just leaving
584 ## it alone (setting to /dev/null will waste time by opening
585 ## /dev/null and writing to it)
587 # SetConsole = /dev/console
589 ## Activate the SysV IPC message queue
591 # MessageQueueActive = False
594 ## If false, skip reverse lookup when connecting to a host known
595 ## by name rather than IP address (i.e. trust the DNS)
597 # SetReverseLookup = True
601 # Only highest-level (alert) reports will be mailed immediately,
602 # others will be queued. Here you can define, when the queue will
603 # be flushed (Note: the queue is automatically flushed after
604 # completing a file check).
608 ## Maximum number of mails to queue
612 ## Recipient (max. 8)
614 SetMailAddress=samhain-reports@debian.org
616 ## Mail relay (IP address)
618 SetMailRelay = master.debian.org
620 ## Custom subject format
622 MailSubject = [Samhain at %H] %T: %S
624 ## --- end E-Mail ---
626 ## Path to the prelink executable
628 # SetPrelinkPath = /usr/sbin/prelink
630 ## TIGER192 checksum of the prelink executable
632 # SetPrelinkChecksum = (no default)
635 ## Path to the executable. If set, will be checksummed after startup
638 # SamhainPath = (no default)
641 ## The IP address of the log server
643 # SetLogServer = (default: compiled-in)
645 ## The IP address of the time server
647 # SetTimeServer = (default: compiled-in)
649 ## Trusted Users (comma delimited list of user names)
651 # TrustedUser = (no default; this adds to the compiled-in list)
653 ## Path to the file signature database
655 # SetDatabasePath = (default: compiled-in)
657 ## Path to the log file
659 # SetLogfilePath = (default: compiled-in)
661 ## Path to the PID file
663 # SetLockPath = (default: compiled-in)
666 ## The digest/checksum/hash algorithm
668 # DigestAlgo = TIGER192
671 ## Custom format for message header.
672 ## CAREFUL if you use XML logfile format.
681 # MessageHeader="%S %T "
684 ## Don't log path to config/database file on startup
688 ## The syslog facility, if you log to syslog
690 # SyslogFacility = LOG_AUTHPRIV
691 SyslogFacility=LOG_LOCAL2
693 ## The message authentication method
694 ## - If you change this, you *must* change it
695 ## on client *and* server
697 # MACType = HMAC-TIGER
700 ## everything below is ignored
703 #####################################################################
704 # This would be the proper syntax for parts that should only be
705 # included for certain hosts.
706 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
707 # result still has the proper syntax for the config file.
708 # You may have any number of @HOSTNAME/@end brackets.
709 # HOSTNAME should be the fully qualified 'official' name
710 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
711 # No IP number - except if samhain cannot determine the
712 # fully qualified hostname.
718 # These are two examples for conditional inclusion/exclusion
719 # of a machine based on the output from 'uname -srm'
728 #####################################################################