A comprehensive guide to auditing your FreeBSD server's security
freebsd-version -ku
pkg info
pkg audit -F
cat /etc/passwd
awk -F: '($2 == "") {print $1}' /etc/master.passwd
visudo
find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
find / -xdev \( -perm -4000 -o -perm -2000 \) -type f -print
mount
sockstat -4 -l
pfctl -s rules
cat /etc/ssh/sshd_config
service -e
ls /var/cron/tabs /etc/crontab /etc/cron.d
find / -type f \( -perm -4000 -o -perm -2000 \) -print
cat /etc/syslog.conf
cat /etc/security/audit_control
last
sysctl security
kldstat
cat /usr/local/etc/apache24/httpd.conf or cat /usr/local/etc/nginx/nginx.conf
cat /var/db/mysql/my.cnf or cat /usr/local/etc/postgresql/postgresql.conf
This audit checklist provides a starting point for assessing your FreeBSD server's security. Depending on your specific environment and requirements, you may need to perform additional checks or use specialized tools for a more comprehensive audit.