]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/samhain/files/samhainrc
Some day I'll get the hang of samhain
[dsa-puppet.git] / modules / samhain / files / samhainrc
1 #####################################################################
2 #
3 # Configuration file template for samhain.
4 #
5 #####################################################################
6
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
12 #
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).
16 #
17 #####################################################################
18 #
19 # SETUP for file system checking:
20
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).
29 #
30 #####################################################################
31
32 #####################################################################
33 #
34 # Files are defined with: file = /absolute/path
35 #
36 # Directories are defined with:                  dir = /absolute/path
37 # or with an optional recursion depth (N <= 99): dir = N/absolute/path
38 #
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.):
41 #
42 # [ReadOnly]
43 # dir = /some/directory
44 # [IgnoreAll]
45 # file = /some/directory
46 #
47 # You can use shell-style globbing patterns, like: file = /path/foo*
48
49 ######################################################################
50
51 [Misc]
52 ##
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
56 ##
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)
65
66 [Attributes]
67 ##
68 ## for these files, only changes in permissions and ownership are checked
69 ##
70 file=/etc/mtab
71 file=/etc/ssh_random_seed
72 file=/etc/asound.conf
73 file=/etc/resolv.conf
74 file=/etc/localtime
75 file=/etc/ioctl.save
76 file=/etc/passwd.backup
77 file=/etc/shadow.backup
78 file=/etc/postfix/prng_exch
79 file=/etc/adjtime
80 file=/etc/lvm/.cache
81 file=/etc/network/run/ifstate
82 file=/var/state/samhain/samhain_file
83 file=/etc/bind/db.debian.net
84 file=/etc/exim4/bsmtp
85
86
87 #
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'.
90 #
91 file=/etc
92 file=/etc/ssh
93 file=/etc/network/run
94 file=/etc/bind
95
96 # These are the directories for the files we handle with puppet
97 file=/etc/samhain
98 file=/etc/munin
99 file=/etc/exim4
100 file=/etc/apt/apt.conf.d
101 file=/etc/apt/sources.list.d
102
103 [LogFiles]
104 ##
105 ## for these files, changes in signature, timestamps, and size are ignored 
106 ##
107 file=/var/run/utmp
108 file=/etc/motd
109
110
111
112 #####################################################################
113 #
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.
123 #
124 # @HOSTNAME
125 # file=/foo/bar
126 # @end
127 #
128 # These are two examples for conditional inclusion/exclusion
129 # of a machine based on the output from 'uname -srm'
130 #
131 # $Linux:2.*.7:i666
132 # file=/foo/bar3
133 # $end
134 #
135 # !$Linux:2.*.7:i686
136 # file=/foo/bar2
137 # $end
138 #
139 #####################################################################
140
141 [GrowingLogFiles]
142 ##
143 ## for these files, changes in signature, timestamps, and increase in size
144 ##                  are ignored 
145 ##
146 file=/var/log/warn
147 file=/var/log/messages
148 file=/var/log/wtmp
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
154 file=/var/log/syslog
155
156
157 [IgnoreAll]
158 ##
159 ## for these files, no modifications are reported
160 ##
161 ## This file might be created or removed by the system sometimes.
162 ##
163 file=/etc/resolv.conf.pcmcia.save
164 file=/etc/nologin
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
173
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
195
196 [IgnoreNone]
197 ##
198 ## for these files, all modifications (even access time) are reported
199 ##    - you may create some interesting-looking file (like /etc/safe_passwd),
200 ##      just to watch whether someone will access it ...
201 ##
202
203 [Prelink]
204 ##
205 ## Use for prelinked files or directories holding them
206 ##
207
208
209 [ReadOnly]
210 ##
211 ## for these files, only access time is ignored
212 ##
213 dir=/usr/bin
214 dir=/bin
215 dir=/boot
216 #
217 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
218 # so we go 3 levels deep
219 #
220 dir=3/sbin
221 dir=/usr/sbin
222 dir=/lib
223 dir=3/usr/lib
224 #
225 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*, 
226 #        so we go 3 levels deep there too
227 #
228 dir=3/etc
229
230 # Various directories / files that may include / be SUID/SGID binaries
231 #
232 #
233 file=/usr/lib/pt_chown
234 # X11, in Debian X7 this is now a symlink
235 #dir=/usr/X11R6/bin
236 #dir=/usr/X11R6/lib/X11/xmcd/bin
237 # Apache:
238 #file=/usr/lib/apache/suexec
239 #file=/usr/lib/apache/suexec.disabled
240 # Extra directories:
241 #dir=/opt/gnome/bin
242 #dir=/opt/kde/bin
243
244 [User0]
245 [User1]
246 ## User0 and User1 are sections for files/dirs with user-definable checking
247 ## (see the manual) 
248
249
250 [EventSeverity]
251 ##
252 ## Here you can assign severities to policy violations.
253 ## If this severity exceeds the treshold of a log facility (see below),
254 ## a policy violation will be logged to that facility.
255 ##
256 ## Severity for verification failures.
257 ##
258 # SeverityReadOnly=crit
259 # SeverityLogFiles=crit
260 # SeverityGrowingLogs=crit
261 # SeverityIgnoreNone=crit
262 # SeverityAttributes=crit
263 # SeverityUser0=crit
264 # SeverityUser1=crit
265
266 # Default behaviour
267 SeverityReadOnly=crit
268 SeverityLogFiles=crit
269 SeverityGrowingLogs=warn
270 SeverityIgnoreNone=crit
271 SeverityAttributes=crit
272
273
274 ##
275 ## We have a file in IgnoreAll that might or might not be present.
276 ## Setting the severity to 'info' prevents messages about deleted/new file.
277 ##
278 # SeverityIgnoreAll=crit
279 SeverityIgnoreAll=info
280
281 ## Files : file access problems
282 # SeverityFiles=crit
283
284 ## Dirs  : directory access problems
285 # SeverityDirs=crit
286
287 ## Names : suspect (non-printable) characters in a pathname
288 # SeverityNames=crit
289
290 # Default behaviour
291 SeverityFiles=crit
292 SeverityDirs=crit
293 SeverityNames=warn
294
295
296 [Log]
297 ##
298 ## Switch on/OFF log facilities and set their threshold severity
299 ##
300 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
301 ## 'mark' is used for timestamps.
302 ##
303 ##
304 ## Use 'none' to SWITCH OFF a log facility
305 ## 
306 ## By default, everything equal to and above the threshold is logged.
307 ## The specifiers '*', '!', and '=' are interpreted as  
308 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does, 
309 ## at least on Linux). Examples:
310 ## MailSeverity=*
311 ## MailSeverity=!warn
312 ## MailSeverity==crit
313
314 ## E-mail
315 ##
316 # MailSeverity=none
317
318 ## Console
319 ##
320 # PrintSeverity=info
321
322 ## Logfile
323 ##
324 # LogSeverity=mark
325
326 ## Syslog
327 ##
328 # SyslogSeverity=none
329
330 ## Remote server (yule)
331 ##
332 # ExportSeverity=none
333
334 ## External script or program
335 ##
336 # ExternalSeverity = none
337
338 ## Logging to a database
339 ##
340 # DatabaseSeverity = none
341
342 # Default behaviour
343 MailSeverity=crit
344 PrintSeverity=none
345 LogSeverity=info
346 SyslogSeverity=alert
347 ExportSeverity=none
348
349
350
351
352
353 #####################################################
354 #
355 # Optional modules
356 #
357 #####################################################
358
359 # [SuidCheck]
360 ##
361 ## --- Check the filesystem for SUID/SGID binaries
362 ## 
363
364 ## Switch on
365 #
366 # SuidCheckActive = yes
367
368 ## Interval for check (seconds)
369 #
370 # SuidCheckInterval = 7200
371
372 ## Alternative: crontab-like schedule
373 #
374 # SuidCheckSchedule = NULL
375  
376 ## Directory to exclude 
377 #
378 # SuidCheckExclude = NULL
379
380 ## Limit on files per second (0 == no limit)
381 #
382 # SuidCheckFps = 0
383
384 ## Alternative: yield after every file
385 #
386 # SuidCheckYield = no
387
388 ## Severity of a detection
389 #
390 # SeveritySuidCheck = crit
391
392 ## Quarantine SUID/SGID files if found
393 #
394 # SuidCheckQuarantineFiles = yes
395
396 ## Method for Quarantining files:
397 #  0 - Delete or truncate the file.
398 #  1 - Remove SUID/SGID permissions from file.
399 #  2 - Move SUID/SGID file to quarantine dir.
400 #
401 # SuidCheckQuarantineMethod = 0
402
403 ## For method 1 and 3, really delete instead of truncating
404
405 # SuidCheckQuarantineDelete = yes
406
407 # [Kernel]
408 ##
409 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only) 
410 ##
411
412 ## Switch on/off
413 #
414 KernelCheckActive = True
415
416 ## Check interval (seconds); btw., the check is VERY fast
417 #
418 # KernelCheckInterval = 300
419
420 ## Severity
421 #
422 # SeverityKernel = crit
423
424
425 # [Utmp]
426 ##
427 ## --- Logging of login/logout events
428 ##
429
430 ## Switch on/off
431 #
432 LoginCheckActive = True
433
434 ## Severity for logins, multiple logins, logouts
435
436 # SeverityLogin=info
437 # SeverityLoginMulti=warn
438 # SeverityLogout=info
439
440 ## Interval for login/logout checks
441 #
442 # LoginCheckInterval = 300
443
444
445 # [Database]
446 ##
447 ## --- Logging to a relational database
448 ##
449
450 ## Database name
451 #
452 # SetDBName = samhain
453
454 ## Database table
455 #
456 # SetDBTable = log
457
458 ## Database user
459 #
460 # SetDBUser = samhain
461
462 ## Database password
463 #
464 # SetDBPassword = (default: none)
465
466 ## Database host
467 #
468 # SetDBHost = localhost
469
470 ## Log the server timestamp for received messages
471 #
472 # SetDBServerTstamp = True
473
474 ## Use a persistent connection
475 #
476 # UsePersistent = True
477
478 # [External]
479 ##
480 ## Interface to call external scripts/programs for logging
481 ##
482
483 ## The absolute path to the command
484 ## - Each invocation of this directive will end the definition of the
485 ##   preceding command, and start the definition of 
486 ##   an additional, new command
487 #
488 # OpenCommand = (no default)
489
490 ## Type (log or rv)
491 ## - log for log messages, srv for messages received by the server
492 #
493 # SetType = log
494
495 ## The command (full command line) to execute
496 #
497 # SetCommandLine = (no default)
498
499 ## The environment (KEY=value; repeat for more)
500 #
501 # SetEnviron = TZ=(your timezone)
502
503 ## The TIGER192 checksum (optional)
504 #
505 # SetChecksum = (no default)
506
507 ## User who runs the command
508 #
509 # SetCredentials = (default: samhain process uid)
510
511 ## Words not allowed in message
512 #
513 # SetFilterNot = (none)
514
515 ## Words required (ALL of them)
516 #
517 # SetFilterAnd = (none)
518
519 ## Words required (at least one)
520 #
521 # SetFilterOr = (none)
522
523 ## Deadtime between consecutive calls
524 #
525 # SetDeadtime = 0
526
527 ## Add default environment (HOME, PATH, SHELL)
528 #
529 # SetDefault = no
530
531
532 #####################################################
533 #
534 # Miscellaneous configuration options
535 #
536 #####################################################
537
538 [Misc]
539
540 ## whether to become a daemon process
541 ## (this is not honoured on database initialisation)
542 #
543 # Daemon = no
544 Daemon = yes
545
546 ## whether to test signature of files (init/check/none)
547 ## - if 'none', then we have to decide this on the command line -
548 #
549 # ChecksumTest = none
550 ChecksumTest=check
551
552 ## whether to drop linux capabilities that are not required
553 ## - will make a root process a 'mere mortal' in many respects
554 #
555 # UseCaps = yes
556
557 ## Set nice level (-19 to 19, see 'man nice'),
558 ## and I/O limit (kilobytes per second; 0 == off)
559 ## to reduce load on host.
560 #
561 # SetNiceLevel = 0
562 # SetIOLimit = 0
563
564 ## The version string to embed in file signature databases
565 #
566 # VersionString = NULL
567
568 ## Interval between time stamp messages
569 #
570 # SetLoopTime = 60
571 SetLoopTime = 600
572
573 ## Interval between file checks 
574 #
575 # SetFileCheckTime = 600
576 SetFileCheckTime = 7200
577
578 ## Alternative: crontab-like schedule
579 #
580 # FileCheckScheduleOne = NULL
581
582 ## Alternative: crontab-like schedule(2)
583 #
584 # FileCheckScheduleTwo = NULL
585
586 ## Report only once on modified fles 
587 ## Setting this to 'FALSE' will generate a report for any policy 
588 ## violation (old and new ones) each time the daemon checks the file system.
589 #
590 # ReportOnlyOnce = True
591
592 ## Report in full detail
593 #
594 # ReportFullDetail = False
595
596 ## Report file timestamps in local time rather than GMT
597 #
598 # UseLocalTime = No
599
600 ## The console device (can also be a file or named pipe)
601 ## - There are two console devices. Accordingly, you can use
602 ##   this directive a second time to set the second console device.
603 ##   If you have not defined the second device at compile time,
604 ##   and you don't want to use it, then:
605 ##   setting it to /dev/null is less effective than just leaving
606 ##   it alone (setting to /dev/null will waste time by opening
607 ##   /dev/null and writing to it)
608 #
609 # SetConsole = /dev/console
610
611 ## Activate the SysV IPC message queue
612 #
613 # MessageQueueActive = False
614
615
616 ## If false, skip reverse lookup when connecting to a host known 
617 ## by name rather than IP address (i.e. trust the DNS)
618 #
619 # SetReverseLookup = True
620
621 ## --- E-Mail ---
622
623 # Only highest-level (alert) reports will be mailed immediately,
624 # others will be queued. Here you can define, when the queue will
625 # be flushed (Note: the queue is automatically flushed after
626 # completing a file check).
627 #
628 SetMailTime = 86400
629
630 ## Maximum number of mails to queue
631 #
632 SetMailNum = 10
633
634 ## Recipient (max. 8)
635 #
636 SetMailAddress=samhain-reports@debian.org
637
638 ## Mail relay (IP address)
639 #
640 SetMailRelay = master.debian.org
641
642 ## Custom subject format
643 #
644 MailSubject = [Samhain at %H] %T: %S
645
646 ## --- end E-Mail ---
647
648 ## Path to the prelink executable
649 #
650 # SetPrelinkPath = /usr/sbin/prelink
651
652 ## TIGER192 checksum of the prelink executable
653 #
654 # SetPrelinkChecksum = (no default)
655
656
657 ## Path to the executable. If set, will be checksummed after startup
658 ## and before exit.
659 #
660 # SamhainPath = (no default)
661
662
663 ## The IP address of the log server
664 #
665 # SetLogServer = (default: compiled-in)
666
667 ## The IP address of the time server
668 #
669 # SetTimeServer = (default: compiled-in)
670
671 ## Trusted Users (comma delimited list of user names) 
672 #
673 # TrustedUser = (no default; this adds to the compiled-in list)
674
675 ## Path to the file signature database
676 #
677 # SetDatabasePath = (default: compiled-in)
678
679 ## Path to the log file
680 #
681 # SetLogfilePath = (default: compiled-in)
682
683 ## Path to the PID file
684 #
685 # SetLockPath = (default: compiled-in)
686
687
688 ## The digest/checksum/hash algorithm
689 #
690 # DigestAlgo = TIGER192
691
692
693 ## Custom format for message header. 
694 ## CAREFUL if you use XML logfile format.
695 ##
696 ## %S severity
697 ## %T timestamp
698 ## %C class
699 ##
700 ## %F source file
701 ## %L source line
702 #
703 # MessageHeader="%S %T "
704
705
706 ## Don't log path to config/database file on startup
707 #
708 # HideSetup = False
709
710 ## The syslog facility, if you log to syslog
711 #
712 # SyslogFacility = LOG_AUTHPRIV
713 SyslogFacility=LOG_LOCAL2
714
715 ## The message authentication method
716 ## - If you change this, you *must* change it
717 ##   on client *and* server
718 #
719 # MACType = HMAC-TIGER
720
721
722 ## everything below is ignored
723 [EOF]
724
725 #####################################################################
726 # This would be the proper syntax for parts that should only be
727 #    included for certain hosts.
728 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
729 #    result still has the proper syntax for the config file.
730 # You may have any number of @HOSTNAME/@end brackets.
731 # HOSTNAME should be the fully qualified 'official' name 
732 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
733 #    No IP number - except if samhain cannot determine the 
734 #    fully qualified hostname.
735 #
736 # @HOSTNAME
737 # file=/foo/bar
738 # @end
739 #
740 # These are two examples for conditional inclusion/exclusion
741 # of a machine based on the output from 'uname -srm'
742 # $Linux:2.*.7:i666
743 # file=/foo/bar3
744 # $end
745 #
746 # !$Linux:2.*.7:i686
747 # file=/foo/bar2
748 # $end
749 #
750 #####################################################################