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