Assumes Fedora 27 with dnf-automatic and wget already installed.
Install rkhunter
dnf install -y rkhunter
Update known file properties
rkhunter --propupd
Update to the latest version
rkhunter --update
In /etc/rkhunter.conf set
MAIL-ON-WARNING="root@localhost"
(or your preferred email address)
Part of what rkhunter does is maintain a list of file properties for system files. If the system files change, you'll get a bunch of errors the next time rkhunter runs. Thankfully dnf-automatic makes it easy to run another command any time that it runs.
Edit /etc/dnf/automatic.conf [command] section:
Add: "rkhunter --propupd"
on a new line.
Scan the system, no user interaction and all output goes to log file
rkhunter --cronjob
Add a crontab entry to update and scan the system, I chose 3am every day
crontab -e
* 3 * * * /usr/bin/rkhunter --update && /usr/bin/rkhunter --crontab
Monitor for errors by searching the log file for warnings:
cat /var/log/rkhunter/rkhunter.log | grep "warning"
You shouldn't see any warnings right now. If it does find something, it may be time to nuke it from orbit, with the caveat that you'll get lots of warnings if the system is updated without updating the file definitions with --propupd.
rkhunter is available in all the major distributions software libraries. So installation is easy, just setting rkhunter to re-scan file properties after a system update will be a little different.