1 #!/bin/sh 2 3 # you have to MANUALLY adapt these and match them with the 4 # Compare* calls in MoSShE 5 6 7 8 mkdir -p CompareFiles 9 10 # CheckFileChanges passwd /etc/passwd 11 cp /etc/passwd CompareFiles/ 12 13 # CheckFileChanges shadow /etc/shadow 14 cp /etc/shadow CompareFiles/ 15 16 # CheckFileChanges resolv.conf /etc/resolv.conf 17 cp /etc/resolv.conf CompareFiles/ 18 19 # CheckFileChanges hosts /etc/hosts 20 cp /etc/hosts CompareFiles/ 21 22 # CheckFileChanges sshauth /root/.ssh/authorized_keys 23 cp /root/.ssh/authorized_keys CompareFiles/authorized_keys 24 25 26 27 # CheckConfigChanges routing.txt "netstat -nr" 28 netstat -nr > CompareFiles/routing.txt 29 30 # CheckConfigChanges listeners.txt "netstat -tulpen" 31 netstat -tulpen > CompareFiles/listeners.txt 32 33 34 35 # clean up - make things safe 36 chmod 600 CompareFiles/* 37 chmod 0700 CompareFiles 38 chown root:root CompareFiles