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
a6cf34
/boot       CONTENT_EX
a6cf34
/opt        CONTENT
52ffe3
52ffe3
# Admins dot files constantly change, just check perms
52ffe3
/root/\..* PERMS
52ffe3
# Otherwise get all of /root.
a6cf34
/root   CONTENT_EX
52ffe3
6ac4f1
# These are too volatile
a6cf34
!/usr/src
a6cf34
!/usr/tmp
52ffe3
52ffe3
# Otherwise get all of /usr.
a6cf34
/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
a6cf34
/etc/alternatives CONTENT_EX
52ffe3
/etc/sysconfig   CONTENT_EX
52ffe3
/etc/mime.types$ CONTENT_EX
a6cf34
/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
a6cf34
/etc/skel        CONTENT_EX
52ffe3
/etc/subuid$     CONTENT_EX
52ffe3
/etc/subgid$     CONTENT_EX
a6cf34
/etc/sssd        CONTENT_EX
52ffe3
/etc/machine-id$ CONTENT_EX
a6cf34
/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
a6cf34
/etc/firewalld      CONTENT_EX
a6cf34
!/etc/NetworkManager/system-connections
a6cf34
/etc/NetworkManager CONTENT_EX
52ffe3
/etc/networks$ CONTENT_EX
a6cf34
/etc/dhcp CONTENT_EX
a6cf34
/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
a6cf34
/var/run/faillock PERMS
a6cf34
/etc/pam.d CONTENT_EX
a6cf34
/etc/security CONTENT_EX
52ffe3
/etc/securetty$ CONTENT_EX
a6cf34
/etc/polkit-1 CONTENT_EX
52ffe3
/etc/sudo.conf$ CONTENT_EX
a6cf34
/etc/sudoers$ CONTENT_EX
a6cf34
/etc/sudoers.d CONTENT_EX
52ffe3
52ffe3
# Shell/X startup files
52ffe3
/etc/profile$ CONTENT_EX
a6cf34
/etc/profile.d CONTENT_EX
52ffe3
/etc/bashrc$ CONTENT_EX
a6cf34
/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
a6cf34
/etc/X11 CONTENT_EX
6ac4f1
6ac4f1
# Pkg manager
a6cf34
/etc/dnf CONTENT_EX
52ffe3
/etc/yum.conf$ CONTENT_EX
a6cf34
/etc/yum CONTENT_EX
a6cf34
/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.
a6cf34
/var/log/audit PERMS
a6cf34
/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
a6cf34
/etc/rsyslog.d CONTENT_EX
52ffe3
/etc/logrotate.conf$ CONTENT_EX
a6cf34
/etc/logrotate.d CONTENT_EX
52ffe3
/etc/systemd/journald.conf$ CONTENT_EX
a6cf34
/var/log LOG+ANF+ARF
52ffe3
/var/run/utmp LOG
6ac4f1
52ffe3
# secrets
a6cf34
/etc/pkcs11 CONTENT_EX
a6cf34
/etc/pki CONTENT_EX
a6cf34
/etc/crypto-policies CONTENT_EX
a6cf34
/etc/certmonger CONTENT_EX
52ffe3
/var/lib/systemd/random-seed$ PERMS
52ffe3
52ffe3
# init system
a6cf34
/etc/systemd CONTENT_EX
a6cf34
/etc/rc.d CONTENT_EX
a6cf34
/etc/tmpfiles.d CONTENT_EX
52ffe3
52ffe3
# boot config
a6cf34
/etc/default CONTENT_EX
a6cf34
/etc/grub.d CONTENT_EX
a6cf34
/etc/dracut.conf$ CONTENT_EX
a6cf34
/etc/dracut.conf.d CONTENT_EX
52ffe3
52ffe3
# glibc linker
52ffe3
/etc/ld.so.cache$ CONTENT_EX
52ffe3
/etc/ld.so.conf$ CONTENT_EX
a6cf34
/etc/ld.so.conf.d CONTENT_EX
52ffe3
/etc/ld.so.preload$ CONTENT_EX
52ffe3
52ffe3
# kernel config
a6cf34
/etc/sysctl.conf$ CONTENT_EX
a6cf34
/etc/sysctl.d CONTENT_EX
a6cf34
/etc/modprobe.d CONTENT_EX
a6cf34
/etc/modules-load.d CONTENT_EX
a6cf34
/etc/depmod.d CONTENT_EX
a6cf34
/etc/udev CONTENT_EX
52ffe3
/etc/crypttab$ CONTENT_EX
52ffe3
52ffe3
#### Daemons ####
52ffe3
52ffe3
# cron jobs
a6cf34
/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
a6cf34
/etc/cron.d CONTENT_EX
a6cf34
/etc/cron.daily CONTENT_EX
a6cf34
/etc/cron.hourly CONTENT_EX
a6cf34
/etc/cron.monthly CONTENT_EX
a6cf34
/etc/cron.weekly CONTENT_EX
52ffe3
/etc/crontab$ CONTENT_EX
a6cf34
/var/spool/cron/root CONTENT
52ffe3
52ffe3
# time keeping
a6cf34
/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
a6cf34
/etc/postfix CONTENT_EX
52ffe3
52ffe3
# ssh
a6cf34
/etc/ssh/sshd_config$ CONTENT_EX
a6cf34
/etc/ssh/ssh_config$ CONTENT_EX
52ffe3
52ffe3
# stunnel
a6cf34
/etc/stunnel CONTENT_EX
52ffe3
52ffe3
# printing
a6cf34
/etc/cups CONTENT_EX
a6cf34
/etc/cupshelpers CONTENT_EX
a6cf34
/etc/avahi CONTENT_EX
52ffe3
52ffe3
# web server
a6cf34
/etc/httpd CONTENT_EX
52ffe3
52ffe3
# dns
a6cf34
/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
a6cf34
/etc/xinetd.d CONTENT_EX
52ffe3
52ffe3
# IPsec
a6cf34
/etc/ipsec.conf$ CONTENT_EX
a6cf34
/etc/ipsec.secrets$ CONTENT_EX
a6cf34
/etc/ipsec.d CONTENT_EX
52ffe3
52ffe3
# USB guard
a6cf34
/etc/usbguard CONTENT_EX
52ffe3
52ffe3
# Ignore some files
52ffe3
!/etc/mtab$
52ffe3
!/etc/.*~
6ac4f1
52ffe3
# Now everything else
a6cf34
/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*