11423e
# Example configuration file for AIDE.
11423e
11423e
@@define DBDIR /var/lib/aide
11423e
@@define LOGDIR /var/log/aide
11423e
11423e
# The location of the database to be read.
11423e
database=file:@@{DBDIR}/aide.db.gz
11423e
11423e
# The location of the database to be written.
11423e
#database_out=sql:host:port:database:login_name:passwd:table
11423e
#database_out=file:aide.db.new
11423e
database_out=file:@@{DBDIR}/aide.db.new.gz
11423e
11423e
# Whether to gzip the output to database
11423e
gzip_dbout=yes
11423e
11423e
# Default.
11423e
verbose=5
11423e
11423e
report_url=file:@@{LOGDIR}/aide.log
11423e
report_url=stdout
11423e
#report_url=stderr
11423e
#NOT IMPLEMENTED report_url=mailto:root@foo.com
11423e
#NOT IMPLEMENTED report_url=syslog:LOG_AUTH
11423e
11423e
# These are the default rules.
11423e
#
11423e
#p:      permissions
11423e
#i:      inode:
11423e
#n:      number of links
11423e
#u:      user
11423e
#g:      group
11423e
#s:      size
11423e
#b:      block count
11423e
#m:      mtime
11423e
#a:      atime
11423e
#c:      ctime
11423e
#S:      check for growing size
11423e
#acl:           Access Control Lists
11423e
#selinux        SELinux security context
11423e
#xattrs:        Extended file attributes
11423e
#md5:    md5 checksum
11423e
#sha1:   sha1 checksum
11423e
#sha256:        sha256 checksum
11423e
#sha512:        sha512 checksum
11423e
#rmd160: rmd160 checksum
11423e
#tiger:  tiger checksum
11423e
11423e
#haval:  haval checksum (MHASH only)
11423e
#gost:   gost checksum (MHASH only)
11423e
#crc32:  crc32 checksum (MHASH only)
11423e
#whirlpool:     whirlpool checksum (MHASH only)
11423e
11423e
#R:             p+i+n+u+g+s+m+c+acl+selinux+xattrs+md5
11423e
#L:             p+i+n+u+g+acl+selinux+xattrs
11423e
#E:             Empty group
11423e
#>:             Growing logfile p+u+g+i+n+S+acl+selinux+xattrs
11423e
11423e
# You can create custom rules like this.
11423e
# With MHASH...
11423e
# ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32
11423e
ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger
11423e
# Everything but access time (Ie. all changes)
11423e
EVERYTHING = R+ALLXTRAHASHES
11423e
11423e
# Sane
11423e
# NORMAL = R+sha512
11423e
NORMAL = p+i+n+u+g+s+m+c+acl+selinux+xattrs+sha512
11423e
11423e
# For directories, don't bother doing hashes
11423e
DIR = p+i+n+u+g+acl+selinux+xattrs
11423e
11423e
# Access control only
11423e
PERMS = p+u+g+acl+selinux+xattrs
11423e
11423e
# Logfile are special, in that they often change
11423e
LOG = p+u+g+n+S+acl+selinux+xattrs
11423e
11423e
# Content + file type.
11423e
CONTENT = sha512+ftype
11423e
11423e
# Extended content + file type + access.
11423e
CONTENT_EX = sha512+ftype+p+u+g+n+acl+selinux+xattrs
11423e
11423e
# Some files get updated automatically, so the inode/ctime/mtime change
11423e
# but we want to know when the data inside them changes
11423e
DATAONLY =  p+n+u+g+s+acl+selinux+xattrs+sha512
11423e
11423e
# Next decide what directories/files you want in the database.
11423e
1fe35b
/boot       CONTENT_EX
1fe35b
/opt        CONTENT
11423e
11423e
# Admins dot files constantly change, just check perms
11423e
/root/\..* PERMS
11423e
# Otherwise get all of /root.
1fe35b
/root   CONTENT_EX
11423e
11423e
# These are too volatile
1fe35b
!/usr/src
1fe35b
!/usr/tmp
11423e
11423e
# Otherwise get all of /usr.
1fe35b
/usr    CONTENT_EX
11423e
11423e
# trusted databases
11423e
/etc/hosts$      CONTENT_EX
11423e
/etc/host.conf$  CONTENT_EX
11423e
/etc/hostname$   CONTENT_EX
11423e
/etc/issue$      CONTENT_EX
11423e
/etc/issue.net$  CONTENT_EX
11423e
/etc/protocols$  CONTENT_EX
11423e
/etc/services$   CONTENT_EX
11423e
/etc/localtime$  CONTENT_EX
1fe35b
/etc/alternatives CONTENT_EX
1fe35b
/etc/sysconfig   CONTENT_EX
11423e
/etc/mime.types$ CONTENT_EX
1fe35b
/etc/terminfo    CONTENT_EX
11423e
/etc/exports$    CONTENT_EX
11423e
/etc/fstab$      CONTENT_EX
11423e
/etc/passwd$     CONTENT_EX
11423e
/etc/group$      CONTENT_EX
11423e
/etc/gshadow$    CONTENT_EX
11423e
/etc/shadow$     CONTENT_EX
11423e
/etc/subgid$     CONTENT_EX
11423e
/etc/subuid$     CONTENT_EX
11423e
/etc/security/opasswd$ CONTENT_EX
1fe35b
/etc/skel        CONTENT_EX
11423e
/etc/subuid$     CONTENT_EX
11423e
/etc/subgid$     CONTENT_EX
1fe35b
/etc/sssd        CONTENT_EX
11423e
/etc/machine-id$ CONTENT_EX
1fe35b
/etc/swid        CONTENT_EX
11423e
/etc/system-release-cpe$ CONTENT_EX
11423e
/etc/shells$     CONTENT_EX
11423e
/etc/tmux.conf$  CONTENT_EX
11423e
/etc/xattr.conf$ CONTENT_EX
11423e
11423e
11423e
# networking
11423e
/etc/hosts.allow$   CONTENT_EX
11423e
/etc/hosts.deny$    CONTENT_EX
1fe35b
/etc/firewalld      CONTENT_EX
1fe35b
!/etc/NetworkManager/system-connections
1fe35b
/etc/NetworkManager CONTENT_EX
11423e
/etc/networks$ CONTENT_EX
1fe35b
/etc/dhcp CONTENT_EX
1fe35b
/etc/wpa_supplicant CONTENT_EX
11423e
/etc/resolv.conf$ DATAONLY
11423e
/etc/nscd.conf$ CONTENT_EX
11423e
11423e
# logins and accounts
11423e
/etc/login.defs$ CONTENT_EX
11423e
/etc/libuser.conf$ CONTENT_EX
11423e
/var/log/faillog$ PERMS
11423e
/var/log/lastlog$ PERMS
1fe35b
/var/run/faillock PERMS
1fe35b
/etc/pam.d CONTENT_EX
1fe35b
/etc/security CONTENT_EX
11423e
/etc/securetty$ CONTENT_EX
1fe35b
/etc/polkit-1 CONTENT_EX
11423e
/etc/sudo.conf$ CONTENT_EX
11423e
/etc/sudoers$ CONTENT_EX
1fe35b
/etc/sudoers.d CONTENT_EX
11423e
11423e
# Shell/X startup files
11423e
/etc/profile$ CONTENT_EX
1fe35b
/etc/profile.d CONTENT_EX
11423e
/etc/bashrc$ CONTENT_EX
1fe35b
/etc/bash_completion.d CONTENT_EX
11423e
/etc/zprofile$ CONTENT_EX
11423e
/etc/zshrc$ CONTENT_EX
11423e
/etc/zlogin$ CONTENT_EX
11423e
/etc/zlogout$ CONTENT_EX
1fe35b
/etc/X11 CONTENT_EX
11423e
11423e
# Pkg manager
1fe35b
/etc/dnf CONTENT_EX
11423e
/etc/yum.conf$ CONTENT_EX
1fe35b
/etc/yum CONTENT_EX
1fe35b
/etc/yum.repos.d CONTENT_EX
11423e
11423e
# This gets new/removes-old filenames daily
11423e
!/var/log/sa
11423e
# As we are checking it, we've truncated yesterdays size to zero.
11423e
!/var/log/aide.log
11423e
11423e
# auditing
11423e
# AIDE produces an audit record, so this becomes perpetual motion.
1fe35b
/var/log/audit PERMS
1fe35b
/etc/audit CONTENT_EX
11423e
/etc/libaudit.conf$ CONTENT_EX
11423e
/etc/aide.conf$  CONTENT_EX
11423e
11423e
# System logs
11423e
/etc/rsyslog.conf$ CONTENT_EX
1fe35b
/etc/rsyslog.d CONTENT_EX
11423e
/etc/logrotate.conf$ CONTENT_EX
1fe35b
/etc/logrotate.d CONTENT_EX
11423e
/etc/systemd/journald.conf$ CONTENT_EX
1fe35b
/var/log LOG+ANF+ARF
1fe35b
/var/run/utmp LOG
11423e
11423e
# secrets
1fe35b
/etc/pkcs11 CONTENT_EX
1fe35b
/etc/pki CONTENT_EX
1fe35b
/etc/crypto-policies CONTENT_EX
1fe35b
/etc/certmonger CONTENT_EX
11423e
/var/lib/systemd/random-seed$ PERMS
11423e
11423e
# init system
1fe35b
/etc/systemd CONTENT_EX
1fe35b
/etc/rc.d CONTENT_EX
1fe35b
/etc/tmpfiles.d CONTENT_EX
11423e
11423e
# boot config
1fe35b
/etc/default CONTENT_EX
1fe35b
/etc/grub.d CONTENT_EX
11423e
/etc/dracut.conf$ CONTENT_EX
1fe35b
/etc/dracut.conf.d CONTENT_EX
11423e
11423e
# glibc linker
11423e
/etc/ld.so.cache$ CONTENT_EX
11423e
/etc/ld.so.conf$ CONTENT_EX
1fe35b
/etc/ld.so.conf.d CONTENT_EX
11423e
/etc/ld.so.preload$ CONTENT_EX
11423e
11423e
# kernel config
11423e
/etc/sysctl.conf$ CONTENT_EX
1fe35b
/etc/sysctl.d CONTENT_EX
1fe35b
/etc/modprobe.d CONTENT_EX
1fe35b
/etc/modules-load.d CONTENT_EX
1fe35b
/etc/depmod.d CONTENT_EX
1fe35b
/etc/udev CONTENT_EX
11423e
/etc/crypttab$ CONTENT_EX
11423e
11423e
#### Daemons ####
11423e
11423e
# cron jobs
1fe35b
/var/spool/at CONTENT
11423e
/etc/at.allow$ CONTENT
11423e
/etc/at.deny$ CONTENT
1fe35b
/var/spool/anacron CONTENT
11423e
/etc/anacrontab$ CONTENT_EX
11423e
/etc/cron.allow$ CONTENT_EX
11423e
/etc/cron.deny$ CONTENT_EX
1fe35b
/etc/cron.d CONTENT_EX
1fe35b
/etc/cron.daily CONTENT_EX
1fe35b
/etc/cron.hourly CONTENT_EX
1fe35b
/etc/cron.monthly CONTENT_EX
1fe35b
/etc/cron.weekly CONTENT_EX
11423e
/etc/crontab$ CONTENT_EX
1fe35b
/var/spool/cron/root CONTENT
11423e
11423e
# time keeping
11423e
/etc/chrony.conf$ CONTENT_EX
11423e
/etc/chrony.keys$ CONTENT_EX
11423e
11423e
# mail
11423e
/etc/aliases$ CONTENT_EX
11423e
/etc/aliases.db$ CONTENT_EX
1fe35b
/etc/postfix CONTENT_EX
11423e
11423e
# ssh
11423e
/etc/ssh/sshd_config$ CONTENT_EX
11423e
/etc/ssh/ssh_config$ CONTENT_EX
11423e
11423e
# stunnel
1fe35b
/etc/stunnel CONTENT_EX
11423e
11423e
# printing
1fe35b
/etc/cups CONTENT_EX
1fe35b
/etc/cupshelpers CONTENT_EX
1fe35b
/etc/avahi CONTENT_EX
11423e
11423e
# web server
1fe35b
/etc/httpd CONTENT_EX
11423e
11423e
# dns
1fe35b
/etc/named CONTENT_EX
11423e
/etc/named.conf$ CONTENT_EX
11423e
/etc/named.iscdlv.key$ CONTENT_EX
11423e
/etc/named.rfc1912.zones$ CONTENT_EX
11423e
/etc/named.root.key$ CONTENT_EX
11423e
11423e
# xinetd
11423e
/etc/xinetd.conf$ CONTENT_EX
1fe35b
/etc/xinetd.d CONTENT_EX
11423e
11423e
# IPsec
11423e
/etc/ipsec.conf$ CONTENT_EX
11423e
/etc/ipsec.secrets$ CONTENT_EX
1fe35b
/etc/ipsec.d CONTENT_EX
11423e
11423e
# USB guard
1fe35b
/etc/usbguard CONTENT_EX
11423e
11423e
# Ignore some files
11423e
!/etc/mtab$
11423e
!/etc/.*~
11423e
11423e
# Now everything else
1fe35b
/etc    PERMS
11423e
11423e
11423e
# With AIDE's default verbosity level of 5, these would give lots of
11423e
# warnings upon tree traversal. It might change with future version.
11423e
#
11423e
#=/lost\+found    DIR
11423e
#=/home           DIR
11423e
11423e
# Ditto /var/log/sa reason...
11423e
!/var/log/and-httpd
11423e
11423e
# Admins dot files constantly change, just check perms
11423e
/root/\..* PERMS
11423e
!/root/.xauth*