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
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
174 # We handle these files with puppet - please to not be bothering us
175 file=/etc/samhain/samhainrc
176 file=/etc/munin/munin-node.conf
177 file=/etc/exim4/blacklist
178 file=/etc/exim4/callout_users
179 file=/etc/exim4/exim4.conf
180 file=/etc/exim4/grey_users
181 file=/etc/exim4/helo-check
182 file=/etc/exim4/locals
183 file=/etc/exim4/localusers
184 file=/etc/exim4/rbllist
185 file=/etc/exim4/rcpthosts
186 file=/etc/exim4/rhsbllist
187 file=/etc/exim4/virtualdomains
188 file=/etc/exim4/whitelist
189 file=/etc/apt/sources.list.d/volatile.list
190 file=/etc/apt/sources.list.d/security.list
191 file=/etc/apt/sources.list.d/debian.org.list
192 file=/etc/apt/sources.list.d/debian.list
193 file=/etc/apt/sources.list.d/backports.org.list
194 file=/etc/apt/apt.conf.d/local-recommends
199 ## for these files, all modifications (even access time) are reported
200 ## - you may create some interesting-looking file (like /etc/safe_passwd),
201 ## just to watch whether someone will access it ...
206 ## Use for prelinked files or directories holding them
212 ## for these files, only access time is ignored
218 # SuSE (old) has the boot init scripts in /sbin/init.d/*,
219 # so we go 3 levels deep
226 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*,
227 # so we go 3 levels deep there too
231 # Various directories / files that may include / be SUID/SGID binaries
234 file=/usr/lib/pt_chown
235 # X11, in Debian X7 this is now a symlink
237 #dir=/usr/X11R6/lib/X11/xmcd/bin
239 #file=/usr/lib/apache/suexec
240 #file=/usr/lib/apache/suexec.disabled
247 ## User0 and User1 are sections for files/dirs with user-definable checking
253 ## Here you can assign severities to policy violations.
254 ## If this severity exceeds the treshold of a log facility (see below),
255 ## a policy violation will be logged to that facility.
257 ## Severity for verification failures.
259 # SeverityReadOnly=crit
260 # SeverityLogFiles=crit
261 # SeverityGrowingLogs=crit
262 # SeverityIgnoreNone=crit
263 # SeverityAttributes=crit
268 SeverityReadOnly=crit
269 SeverityLogFiles=crit
270 SeverityGrowingLogs=warn
271 SeverityIgnoreNone=crit
272 SeverityAttributes=crit
276 ## We have a file in IgnoreAll that might or might not be present.
277 ## Setting the severity to 'info' prevents messages about deleted/new file.
279 # SeverityIgnoreAll=crit
280 SeverityIgnoreAll=info
282 ## Files : file access problems
285 ## Dirs : directory access problems
288 ## Names : suspect (non-printable) characters in a pathname
299 ## Switch on/OFF log facilities and set their threshold severity
301 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
302 ## 'mark' is used for timestamps.
305 ## Use 'none' to SWITCH OFF a log facility
307 ## By default, everything equal to and above the threshold is logged.
308 ## The specifiers '*', '!', and '=' are interpreted as
309 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
310 ## at least on Linux). Examples:
312 ## MailSeverity=!warn
313 ## MailSeverity==crit
329 # SyslogSeverity=none
331 ## Remote server (yule)
333 # ExportSeverity=none
335 ## External script or program
337 # ExternalSeverity = none
339 ## Logging to a database
341 # DatabaseSeverity = none
354 #####################################################
358 #####################################################
362 ## --- Check the filesystem for SUID/SGID binaries
367 # SuidCheckActive = yes
369 ## Interval for check (seconds)
371 # SuidCheckInterval = 7200
373 ## Alternative: crontab-like schedule
375 # SuidCheckSchedule = NULL
377 ## Directory to exclude
379 # SuidCheckExclude = NULL
381 ## Limit on files per second (0 == no limit)
385 ## Alternative: yield after every file
387 # SuidCheckYield = no
389 ## Severity of a detection
391 # SeveritySuidCheck = crit
393 ## Quarantine SUID/SGID files if found
395 # SuidCheckQuarantineFiles = yes
397 ## Method for Quarantining files:
398 # 0 - Delete or truncate the file.
399 # 1 - Remove SUID/SGID permissions from file.
400 # 2 - Move SUID/SGID file to quarantine dir.
402 # SuidCheckQuarantineMethod = 0
404 ## For method 1 and 3, really delete instead of truncating
406 # SuidCheckQuarantineDelete = yes
410 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
415 KernelCheckActive = True
417 ## Check interval (seconds); btw., the check is VERY fast
419 # KernelCheckInterval = 300
423 # SeverityKernel = crit
428 ## --- Logging of login/logout events
433 LoginCheckActive = True
435 ## Severity for logins, multiple logins, logouts
438 # SeverityLoginMulti=warn
439 # SeverityLogout=info
441 ## Interval for login/logout checks
443 # LoginCheckInterval = 300
448 ## --- Logging to a relational database
453 # SetDBName = samhain
461 # SetDBUser = samhain
465 # SetDBPassword = (default: none)
469 # SetDBHost = localhost
471 ## Log the server timestamp for received messages
473 # SetDBServerTstamp = True
475 ## Use a persistent connection
477 # UsePersistent = True
481 ## Interface to call external scripts/programs for logging
484 ## The absolute path to the command
485 ## - Each invocation of this directive will end the definition of the
486 ## preceding command, and start the definition of
487 ## an additional, new command
489 # OpenCommand = (no default)
492 ## - log for log messages, srv for messages received by the server
496 ## The command (full command line) to execute
498 # SetCommandLine = (no default)
500 ## The environment (KEY=value; repeat for more)
502 # SetEnviron = TZ=(your timezone)
504 ## The TIGER192 checksum (optional)
506 # SetChecksum = (no default)
508 ## User who runs the command
510 # SetCredentials = (default: samhain process uid)
512 ## Words not allowed in message
514 # SetFilterNot = (none)
516 ## Words required (ALL of them)
518 # SetFilterAnd = (none)
520 ## Words required (at least one)
522 # SetFilterOr = (none)
524 ## Deadtime between consecutive calls
528 ## Add default environment (HOME, PATH, SHELL)
533 #####################################################
535 # Miscellaneous configuration options
537 #####################################################
541 ## whether to become a daemon process
542 ## (this is not honoured on database initialisation)
547 ## whether to test signature of files (init/check/none)
548 ## - if 'none', then we have to decide this on the command line -
550 # ChecksumTest = none
553 ## whether to drop linux capabilities that are not required
554 ## - will make a root process a 'mere mortal' in many respects
558 ## Set nice level (-19 to 19, see 'man nice'),
559 ## and I/O limit (kilobytes per second; 0 == off)
560 ## to reduce load on host.
565 ## The version string to embed in file signature databases
567 # VersionString = NULL
569 ## Interval between time stamp messages
574 ## Interval between file checks
576 # SetFileCheckTime = 600
577 SetFileCheckTime = 7200
579 ## Alternative: crontab-like schedule
581 # FileCheckScheduleOne = NULL
583 ## Alternative: crontab-like schedule(2)
585 # FileCheckScheduleTwo = NULL
587 ## Report only once on modified fles
588 ## Setting this to 'FALSE' will generate a report for any policy
589 ## violation (old and new ones) each time the daemon checks the file system.
591 # ReportOnlyOnce = True
593 ## Report in full detail
595 # ReportFullDetail = False
597 ## Report file timestamps in local time rather than GMT
601 ## The console device (can also be a file or named pipe)
602 ## - There are two console devices. Accordingly, you can use
603 ## this directive a second time to set the second console device.
604 ## If you have not defined the second device at compile time,
605 ## and you don't want to use it, then:
606 ## setting it to /dev/null is less effective than just leaving
607 ## it alone (setting to /dev/null will waste time by opening
608 ## /dev/null and writing to it)
610 # SetConsole = /dev/console
612 ## Activate the SysV IPC message queue
614 # MessageQueueActive = False
617 ## If false, skip reverse lookup when connecting to a host known
618 ## by name rather than IP address (i.e. trust the DNS)
620 # SetReverseLookup = True
624 # Only highest-level (alert) reports will be mailed immediately,
625 # others will be queued. Here you can define, when the queue will
626 # be flushed (Note: the queue is automatically flushed after
627 # completing a file check).
631 ## Maximum number of mails to queue
635 ## Recipient (max. 8)
637 SetMailAddress=samhain-reports@debian.org
639 ## Mail relay (IP address)
641 SetMailRelay = master.debian.org
643 ## Custom subject format
645 MailSubject = [Samhain at %H] %T: %S
647 ## --- end E-Mail ---
649 ## Path to the prelink executable
651 # SetPrelinkPath = /usr/sbin/prelink
653 ## TIGER192 checksum of the prelink executable
655 # SetPrelinkChecksum = (no default)
658 ## Path to the executable. If set, will be checksummed after startup
661 # SamhainPath = (no default)
664 ## The IP address of the log server
666 # SetLogServer = (default: compiled-in)
668 ## The IP address of the time server
670 # SetTimeServer = (default: compiled-in)
672 ## Trusted Users (comma delimited list of user names)
674 # TrustedUser = (no default; this adds to the compiled-in list)
676 ## Path to the file signature database
678 # SetDatabasePath = (default: compiled-in)
680 ## Path to the log file
682 # SetLogfilePath = (default: compiled-in)
684 ## Path to the PID file
686 # SetLockPath = (default: compiled-in)
689 ## The digest/checksum/hash algorithm
691 # DigestAlgo = TIGER192
694 ## Custom format for message header.
695 ## CAREFUL if you use XML logfile format.
704 # MessageHeader="%S %T "
707 ## Don't log path to config/database file on startup
711 ## The syslog facility, if you log to syslog
713 # SyslogFacility = LOG_AUTHPRIV
714 SyslogFacility=LOG_LOCAL2
716 ## The message authentication method
717 ## - If you change this, you *must* change it
718 ## on client *and* server
720 # MACType = HMAC-TIGER
723 ## everything below is ignored
726 #####################################################################
727 # This would be the proper syntax for parts that should only be
728 # included for certain hosts.
729 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
730 # result still has the proper syntax for the config file.
731 # You may have any number of @HOSTNAME/@end brackets.
732 # HOSTNAME should be the fully qualified 'official' name
733 # (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
734 # No IP number - except if samhain cannot determine the
735 # fully qualified hostname.
741 # These are two examples for conditional inclusion/exclusion
742 # of a machine based on the output from 'uname -srm'
751 #####################################################################