brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: rkhunter --check --sk scans a Linux server for rootkit signs in one go

Security
~/tips/tip-security-rkhunter-check

sudo rkhunter --check --sk

Runs a rootkit and suspicious-file scan without stopping to ask for a keypress.

Rootkit Hunter checks a Linux system for known rootkits, odd file properties and suspicious settings. By default it stops after every section and waits for Enter, which gets old fast.

sudo rkhunter --check --sk

--sk (--skip-keypress) turns those pauses off. The full log goes to /var/log/rkhunter.log, and the previous run’s log is kept as .old. For a shorter screen, --rwo shows only warnings.

Two other options matter. --update fetches newer data files, and needs wget or lynx on the system. --propupd stores the current properties of system files as the known-good state, so the next check can see what changed.

For a nightly run there is --cronjob, which implies --check, --nocolors and --skip-keypress. The exit code is non-zero on any warning, so a wrapper script can alert you.

Caveat, and the man page is blunt about it: if a file has changed and you run --propupd, rkhunter will assume the file is genuine. So only run --propupd right after an install or after updates you did yourself, on a system you trust. Running it to silence warnings you do not understand defeats the point. Read the warning in the log first; after a normal package update, a changed binary is expected.

Further reading: rkhunter manual, On this site: debsums -c lists changed package files

Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid

More Security tips tcpdump -nn -r capture.pcap port 53 mkcert -install Strict-Transport-Security: max-age=0 Referrer-Policy: strict-origin-when-cross-origin wp super-admin list All Security tips (79) All topics

Link