8b87dc
# Example configuration file for AIDE.
8b87dc
8b87dc
@@define DBDIR /var/lib/aide
8b87dc
@@define LOGDIR /var/log/aide
8b87dc
8b87dc
# The location of the database to be read.
8b87dc
database=file:@@{DBDIR}/aide.db.gz
8b87dc
8b87dc
# The location of the database to be written.
8b87dc
#database_out=sql:host:port:database:login_name:passwd:table
8b87dc
#database_out=file:aide.db.new
8b87dc
database_out=file:@@{DBDIR}/aide.db.new.gz
8b87dc
8b87dc
# Whether to gzip the output to database
8b87dc
gzip_dbout=yes
8b87dc
8b87dc
# Default.
8b87dc
verbose=5
8b87dc
8b87dc
report_url=file:@@{LOGDIR}/aide.log
8b87dc
report_url=stdout
8b87dc
#report_url=stderr
8b87dc
#NOT IMPLEMENTED report_url=mailto:root@foo.com
8b87dc
#NOT IMPLEMENTED report_url=syslog:LOG_AUTH
8b87dc
8b87dc
# These are the default rules.
8b87dc
#
8b87dc
#p:      permissions
8b87dc
#i:      inode:
8b87dc
#n:      number of links
8b87dc
#u:      user
8b87dc
#g:      group
8b87dc
#s:      size
8b87dc
#b:      block count
8b87dc
#m:      mtime
8b87dc
#a:      atime
8b87dc
#c:      ctime
8b87dc
#S:      check for growing size
8b87dc
#acl:           Access Control Lists
8b87dc
#selinux        SELinux security context
8b87dc
#xattrs:        Extended file attributes
8b87dc
#md5:    md5 checksum
8b87dc
#sha1:   sha1 checksum
8b87dc
#sha256:        sha256 checksum
8b87dc
#sha512:        sha512 checksum
8b87dc
#rmd160: rmd160 checksum
8b87dc
#tiger:  tiger checksum
8b87dc
8b87dc
#haval:  haval checksum (MHASH only)
8b87dc
#gost:   gost checksum (MHASH only)
8b87dc
#crc32:  crc32 checksum (MHASH only)
8b87dc
#whirlpool:     whirlpool checksum (MHASH only)
8b87dc
8b87dc
FIPSR = p+i+n+u+g+s+m+c+acl+selinux+xattrs+sha256
8b87dc
8b87dc
#R:             p+i+n+u+g+s+m+c+acl+selinux+xattrs+md5
8b87dc
#L:             p+i+n+u+g+acl+selinux+xattrs
8b87dc
#E:             Empty group
8b87dc
#>:             Growing logfile p+u+g+i+n+S+acl+selinux+xattrs
8b87dc
8b87dc
# You can create custom rules like this.
8b87dc
# With MHASH...
8b87dc
# ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32
8b87dc
ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger
8b87dc
# Everything but access time (Ie. all changes)
8b87dc
EVERYTHING = R+ALLXTRAHASHES
8b87dc
8b87dc
# Sane, with multiple hashes
8b87dc
# NORMAL = R+rmd160+sha256+whirlpool
8b87dc
NORMAL = FIPSR+sha512
8b87dc
8b87dc
# For directories, don't bother doing hashes
8b87dc
DIR = p+i+n+u+g+acl+selinux+xattrs
8b87dc
8b87dc
# Access control only
8b87dc
PERMS = p+i+u+g+acl+selinux
8b87dc
8b87dc
# Logfile are special, in that they often change
8b87dc
LOG = >
8b87dc
8b87dc
# Just do sha256 and sha512 hashes
8b87dc
LSPP = FIPSR+sha512
8b87dc
8b87dc
# Some files get updated automatically, so the inode/ctime/mtime change
8b87dc
# but we want to know when the data inside them changes
8b87dc
DATAONLY =  p+n+u+g+s+acl+selinux+xattrs+sha256
8b87dc
8b87dc
# Next decide what directories/files you want in the database.
8b87dc
8b87dc
/boot   NORMAL
8b87dc
/bin    NORMAL
8b87dc
/sbin   NORMAL
8b87dc
/lib    NORMAL
8b87dc
/lib64  NORMAL
8b87dc
/opt    NORMAL
8b87dc
/usr    NORMAL
8b87dc
/root   NORMAL
8b87dc
# These are too volatile
8b87dc
!/usr/src
8b87dc
!/usr/tmp
8b87dc
8b87dc
# Check only permissions, inode, user and group for /etc, but
8b87dc
# cover some important files closely.
8b87dc
/etc    PERMS
8b87dc
!/etc/mtab
8b87dc
# Ignore backup files
8b87dc
!/etc/.*~
8b87dc
/etc/exports  NORMAL
8b87dc
/etc/fstab    NORMAL
8b87dc
/etc/passwd   NORMAL
8b87dc
/etc/group    NORMAL
8b87dc
/etc/gshadow  NORMAL
8b87dc
/etc/shadow   NORMAL
8b87dc
/etc/security/opasswd   NORMAL
8b87dc
8b87dc
/etc/hosts.allow   NORMAL
8b87dc
/etc/hosts.deny    NORMAL
8b87dc
8b87dc
/etc/sudoers NORMAL
8b87dc
/etc/skel NORMAL
8b87dc
8b87dc
/etc/logrotate.d NORMAL
8b87dc
8b87dc
/etc/resolv.conf DATAONLY
8b87dc
8b87dc
/etc/nscd.conf NORMAL
8b87dc
/etc/securetty NORMAL
8b87dc
8b87dc
# Shell/X starting files
8b87dc
/etc/profile NORMAL
8b87dc
/etc/bashrc NORMAL
8b87dc
/etc/bash_completion.d/ NORMAL
8b87dc
/etc/login.defs NORMAL
8b87dc
/etc/zprofile NORMAL
8b87dc
/etc/zshrc NORMAL
8b87dc
/etc/zlogin NORMAL
8b87dc
/etc/zlogout NORMAL
8b87dc
/etc/profile.d/ NORMAL
8b87dc
/etc/X11/ NORMAL
8b87dc
8b87dc
# Pkg manager
8b87dc
/etc/yum.conf NORMAL
8b87dc
/etc/yumex.conf NORMAL
8b87dc
/etc/yumex.profiles.conf NORMAL
8b87dc
/etc/yum/ NORMAL
8b87dc
/etc/yum.repos.d/ NORMAL
8b87dc
8b87dc
/var/log   LOG
8b87dc
/var/run/utmp LOG
8b87dc
8b87dc
# This gets new/removes-old filenames daily
8b87dc
!/var/log/sa
8b87dc
# As we are checking it, we've truncated yesterdays size to zero.
8b87dc
!/var/log/aide.log
8b87dc
8b87dc
# LSPP rules...
8b87dc
# AIDE produces an audit record, so this becomes perpetual motion.
8b87dc
# /var/log/audit/ LSPP
8b87dc
/etc/audit/ LSPP
8b87dc
/etc/libaudit.conf LSPP
8b87dc
/usr/sbin/stunnel LSPP
8b87dc
/var/spool/at LSPP
8b87dc
/etc/at.allow LSPP
8b87dc
/etc/at.deny LSPP
8b87dc
/etc/cron.allow LSPP
8b87dc
/etc/cron.deny LSPP
8b87dc
/etc/cron.d/ LSPP
8b87dc
/etc/cron.daily/ LSPP
8b87dc
/etc/cron.hourly/ LSPP
8b87dc
/etc/cron.monthly/ LSPP
8b87dc
/etc/cron.weekly/ LSPP
8b87dc
/etc/crontab LSPP
8b87dc
/var/spool/cron/root LSPP
8b87dc
8b87dc
/etc/login.defs LSPP
8b87dc
/etc/securetty LSPP
8b87dc
/var/log/faillog LSPP
8b87dc
/var/log/lastlog LSPP
8b87dc
8b87dc
/etc/hosts LSPP
8b87dc
/etc/sysconfig LSPP
8b87dc
8b87dc
/etc/inittab LSPP
8b87dc
/etc/grub/ LSPP
8b87dc
/etc/rc.d LSPP
8b87dc
8b87dc
/etc/ld.so.conf LSPP
8b87dc
8b87dc
/etc/localtime LSPP
8b87dc
8b87dc
/etc/sysctl.conf LSPP
8b87dc
8b87dc
/etc/modprobe.conf LSPP
8b87dc
8b87dc
/etc/pam.d LSPP
8b87dc
/etc/security LSPP
8b87dc
/etc/aliases LSPP
8b87dc
/etc/postfix LSPP
8b87dc
8b87dc
/etc/ssh/sshd_config LSPP
8b87dc
/etc/ssh/ssh_config LSPP
8b87dc
8b87dc
/etc/stunnel LSPP
8b87dc
8b87dc
/etc/vsftpd.ftpusers LSPP
8b87dc
/etc/vsftpd LSPP
8b87dc
8b87dc
/etc/issue LSPP
8b87dc
/etc/issue.net LSPP
8b87dc
8b87dc
/etc/cups LSPP
8b87dc
8b87dc
# With AIDE's default verbosity level of 5, these would give lots of
8b87dc
# warnings upon tree traversal. It might change with future version.
8b87dc
#
8b87dc
#=/lost\+found    DIR
8b87dc
#=/home           DIR
8b87dc
8b87dc
# Ditto /var/log/sa reason...
8b87dc
!/var/log/and-httpd
8b87dc
8b87dc
# Admins dot files constantly change, just check perms
8b87dc
/root/\..* PERMS