Skip to content

Instantly share code, notes, and snippets.

@Gisleburt
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gisleburt/58ad0681117ac12dc1e7 to your computer and use it in GitHub Desktop.
Save Gisleburt/58ad0681117ac12dc1e7 to your computer and use it in GitHub Desktop.
Just a few basic security checks to speed up an audit I'm running through.
#!/bin/bash
cat /etc/*release
grep 'PermitRootLogin\|PasswordAuthentication' /etc/ssh/sshd_config
sudo /etc/init.d/denyhosts status
sudo /etc/init.d/fail2ban status
sudo grep '/home' /etc/passwd | cut -d : -f 1 | awk '{ sudo system("sudo passwd -S " $0) }' | grep -C 9999 ' P \| set\,' --color
echo "select Host, User, Password from mysql.user; select ''; show variables like 'version';" | mysql -uroot -p
/usr/sbin/apachectl -v
php -v
php -i | grep suhosin
sudo /sbin/iptables -L
# sudo /usr/sbin/usermod -L -e 1970-01-01 {user}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment