]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/samhain/files/samhainrc
First pass at this.
[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 # We handle these files with puppet - please to not be bothering us
87 file=/etc/samhain/samhainrc
88 file=/etc/munin/munin-node.conf
89
90 #
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'.
93 #
94 file=/etc
95 file=/etc/ssh
96 file=/etc/network/run
97 file=/etc/bind
98
99 # These are the directories for the files we handle with puppet
100 file=/etc/samhain/
101 file=/etc/munin/
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 [IgnoreNone]
175 ##
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 ...
179 ##
180
181 [Prelink]
182 ##
183 ## Use for prelinked files or directories holding them
184 ##
185
186
187 [ReadOnly]
188 ##
189 ## for these files, only access time is ignored
190 ##
191 dir=/usr/bin
192 dir=/bin
193 dir=/boot
194 #
195 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
196 # so we go 3 levels deep
197 #
198 dir=3/sbin
199 dir=/usr/sbin
200 dir=/lib
201 dir=3/usr/lib
202 #
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
205 #
206 dir=3/etc
207
208 # Various directories / files that may include / be SUID/SGID binaries
209 #
210 #
211 file=/usr/lib/pt_chown
212 # X11, in Debian X7 this is now a symlink
213 #dir=/usr/X11R6/bin
214 #dir=/usr/X11R6/lib/X11/xmcd/bin
215 # Apache:
216 #file=/usr/lib/apache/suexec
217 #file=/usr/lib/apache/suexec.disabled
218 # Extra directories:
219 #dir=/opt/gnome/bin
220 #dir=/opt/kde/bin
221
222 [User0]
223 [User1]
224 ## User0 and User1 are sections for files/dirs with user-definable checking
225 ## (see the manual) 
226
227
228 [EventSeverity]
229 ##
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.
233 ##
234 ## Severity for verification failures.
235 ##
236 # SeverityReadOnly=crit
237 # SeverityLogFiles=crit
238 # SeverityGrowingLogs=crit
239 # SeverityIgnoreNone=crit
240 # SeverityAttributes=crit
241 # SeverityUser0=crit
242 # SeverityUser1=crit
243
244 # Default behaviour
245 SeverityReadOnly=crit
246 SeverityLogFiles=crit
247 SeverityGrowingLogs=warn
248 SeverityIgnoreNone=crit
249 SeverityAttributes=crit
250
251
252 ##
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.
255 ##
256 # SeverityIgnoreAll=crit
257 SeverityIgnoreAll=info
258
259 ## Files : file access problems
260 # SeverityFiles=crit
261
262 ## Dirs  : directory access problems
263 # SeverityDirs=crit
264
265 ## Names : suspect (non-printable) characters in a pathname
266 # SeverityNames=crit
267
268 # Default behaviour
269 SeverityFiles=crit
270 SeverityDirs=crit
271 SeverityNames=warn
272
273
274 [Log]
275 ##
276 ## Switch on/OFF log facilities and set their threshold severity
277 ##
278 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
279 ## 'mark' is used for timestamps.
280 ##
281 ##
282 ## Use 'none' to SWITCH OFF a log facility
283 ## 
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:
288 ## MailSeverity=*
289 ## MailSeverity=!warn
290 ## MailSeverity==crit
291
292 ## E-mail
293 ##
294 # MailSeverity=none
295
296 ## Console
297 ##
298 # PrintSeverity=info
299
300 ## Logfile
301 ##
302 # LogSeverity=mark
303
304 ## Syslog
305 ##
306 # SyslogSeverity=none
307
308 ## Remote server (yule)
309 ##
310 # ExportSeverity=none
311
312 ## External script or program
313 ##
314 # ExternalSeverity = none
315
316 ## Logging to a database
317 ##
318 # DatabaseSeverity = none
319
320 # Default behaviour
321 MailSeverity=crit
322 PrintSeverity=none
323 LogSeverity=info
324 SyslogSeverity=alert
325 ExportSeverity=none
326
327
328
329
330
331 #####################################################
332 #
333 # Optional modules
334 #
335 #####################################################
336
337 # [SuidCheck]
338 ##
339 ## --- Check the filesystem for SUID/SGID binaries
340 ## 
341
342 ## Switch on
343 #
344 # SuidCheckActive = yes
345
346 ## Interval for check (seconds)
347 #
348 # SuidCheckInterval = 7200
349
350 ## Alternative: crontab-like schedule
351 #
352 # SuidCheckSchedule = NULL
353  
354 ## Directory to exclude 
355 #
356 # SuidCheckExclude = NULL
357
358 ## Limit on files per second (0 == no limit)
359 #
360 # SuidCheckFps = 0
361
362 ## Alternative: yield after every file
363 #
364 # SuidCheckYield = no
365
366 ## Severity of a detection
367 #
368 # SeveritySuidCheck = crit
369
370 ## Quarantine SUID/SGID files if found
371 #
372 # SuidCheckQuarantineFiles = yes
373
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.
378 #
379 # SuidCheckQuarantineMethod = 0
380
381 ## For method 1 and 3, really delete instead of truncating
382
383 # SuidCheckQuarantineDelete = yes
384
385 # [Kernel]
386 ##
387 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only) 
388 ##
389
390 ## Switch on/off
391 #
392 KernelCheckActive = True
393
394 ## Check interval (seconds); btw., the check is VERY fast
395 #
396 # KernelCheckInterval = 300
397
398 ## Severity
399 #
400 # SeverityKernel = crit
401
402
403 # [Utmp]
404 ##
405 ## --- Logging of login/logout events
406 ##
407
408 ## Switch on/off
409 #
410 LoginCheckActive = True
411
412 ## Severity for logins, multiple logins, logouts
413
414 # SeverityLogin=info
415 # SeverityLoginMulti=warn
416 # SeverityLogout=info
417
418 ## Interval for login/logout checks
419 #
420 # LoginCheckInterval = 300
421
422
423 # [Database]
424 ##
425 ## --- Logging to a relational database
426 ##
427
428 ## Database name
429 #
430 # SetDBName = samhain
431
432 ## Database table
433 #
434 # SetDBTable = log
435
436 ## Database user
437 #
438 # SetDBUser = samhain
439
440 ## Database password
441 #
442 # SetDBPassword = (default: none)
443
444 ## Database host
445 #
446 # SetDBHost = localhost
447
448 ## Log the server timestamp for received messages
449 #
450 # SetDBServerTstamp = True
451
452 ## Use a persistent connection
453 #
454 # UsePersistent = True
455
456 # [External]
457 ##
458 ## Interface to call external scripts/programs for logging
459 ##
460
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
465 #
466 # OpenCommand = (no default)
467
468 ## Type (log or rv)
469 ## - log for log messages, srv for messages received by the server
470 #
471 # SetType = log
472
473 ## The command (full command line) to execute
474 #
475 # SetCommandLine = (no default)
476
477 ## The environment (KEY=value; repeat for more)
478 #
479 # SetEnviron = TZ=(your timezone)
480
481 ## The TIGER192 checksum (optional)
482 #
483 # SetChecksum = (no default)
484
485 ## User who runs the command
486 #
487 # SetCredentials = (default: samhain process uid)
488
489 ## Words not allowed in message
490 #
491 # SetFilterNot = (none)
492
493 ## Words required (ALL of them)
494 #
495 # SetFilterAnd = (none)
496
497 ## Words required (at least one)
498 #
499 # SetFilterOr = (none)
500
501 ## Deadtime between consecutive calls
502 #
503 # SetDeadtime = 0
504
505 ## Add default environment (HOME, PATH, SHELL)
506 #
507 # SetDefault = no
508
509
510 #####################################################
511 #
512 # Miscellaneous configuration options
513 #
514 #####################################################
515
516 [Misc]
517
518 ## whether to become a daemon process
519 ## (this is not honoured on database initialisation)
520 #
521 # Daemon = no
522 Daemon = yes
523
524 ## whether to test signature of files (init/check/none)
525 ## - if 'none', then we have to decide this on the command line -
526 #
527 # ChecksumTest = none
528 ChecksumTest=check
529
530 ## whether to drop linux capabilities that are not required
531 ## - will make a root process a 'mere mortal' in many respects
532 #
533 # UseCaps = yes
534
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.
538 #
539 # SetNiceLevel = 0
540 # SetIOLimit = 0
541
542 ## The version string to embed in file signature databases
543 #
544 # VersionString = NULL
545
546 ## Interval between time stamp messages
547 #
548 # SetLoopTime = 60
549 SetLoopTime = 600
550
551 ## Interval between file checks 
552 #
553 # SetFileCheckTime = 600
554 SetFileCheckTime = 7200
555
556 ## Alternative: crontab-like schedule
557 #
558 # FileCheckScheduleOne = NULL
559
560 ## Alternative: crontab-like schedule(2)
561 #
562 # FileCheckScheduleTwo = NULL
563
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.
567 #
568 # ReportOnlyOnce = True
569
570 ## Report in full detail
571 #
572 # ReportFullDetail = False
573
574 ## Report file timestamps in local time rather than GMT
575 #
576 # UseLocalTime = No
577
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)
586 #
587 # SetConsole = /dev/console
588
589 ## Activate the SysV IPC message queue
590 #
591 # MessageQueueActive = False
592
593
594 ## If false, skip reverse lookup when connecting to a host known 
595 ## by name rather than IP address (i.e. trust the DNS)
596 #
597 # SetReverseLookup = True
598
599 ## --- E-Mail ---
600
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).
605 #
606 SetMailTime = 86400
607
608 ## Maximum number of mails to queue
609 #
610 SetMailNum = 10
611
612 ## Recipient (max. 8)
613 #
614 SetMailAddress=samhain-reports@debian.org
615
616 ## Mail relay (IP address)
617 #
618 SetMailRelay = master.debian.org
619
620 ## Custom subject format
621 #
622 MailSubject = [Samhain at %H] %T: %S
623
624 ## --- end E-Mail ---
625
626 ## Path to the prelink executable
627 #
628 # SetPrelinkPath = /usr/sbin/prelink
629
630 ## TIGER192 checksum of the prelink executable
631 #
632 # SetPrelinkChecksum = (no default)
633
634
635 ## Path to the executable. If set, will be checksummed after startup
636 ## and before exit.
637 #
638 # SamhainPath = (no default)
639
640
641 ## The IP address of the log server
642 #
643 # SetLogServer = (default: compiled-in)
644
645 ## The IP address of the time server
646 #
647 # SetTimeServer = (default: compiled-in)
648
649 ## Trusted Users (comma delimited list of user names) 
650 #
651 # TrustedUser = (no default; this adds to the compiled-in list)
652
653 ## Path to the file signature database
654 #
655 # SetDatabasePath = (default: compiled-in)
656
657 ## Path to the log file
658 #
659 # SetLogfilePath = (default: compiled-in)
660
661 ## Path to the PID file
662 #
663 # SetLockPath = (default: compiled-in)
664
665
666 ## The digest/checksum/hash algorithm
667 #
668 # DigestAlgo = TIGER192
669
670
671 ## Custom format for message header. 
672 ## CAREFUL if you use XML logfile format.
673 ##
674 ## %S severity
675 ## %T timestamp
676 ## %C class
677 ##
678 ## %F source file
679 ## %L source line
680 #
681 # MessageHeader="%S %T "
682
683
684 ## Don't log path to config/database file on startup
685 #
686 # HideSetup = False
687
688 ## The syslog facility, if you log to syslog
689 #
690 # SyslogFacility = LOG_AUTHPRIV
691 SyslogFacility=LOG_LOCAL2
692
693 ## The message authentication method
694 ## - If you change this, you *must* change it
695 ##   on client *and* server
696 #
697 # MACType = HMAC-TIGER
698
699
700 ## everything below is ignored
701 [EOF]
702
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.
713 #
714 # @HOSTNAME
715 # file=/foo/bar
716 # @end
717 #
718 # These are two examples for conditional inclusion/exclusion
719 # of a machine based on the output from 'uname -srm'
720 # $Linux:2.*.7:i666
721 # file=/foo/bar3
722 # $end
723 #
724 # !$Linux:2.*.7:i686
725 # file=/foo/bar2
726 # $end
727 #
728 #####################################################################