diff --git a/global/overlay/usr/local/sbin/secreport.sh b/global/overlay/usr/local/sbin/secreport.sh index 1adc40ae..9fd2a105 100755 --- a/global/overlay/usr/local/sbin/secreport.sh +++ b/global/overlay/usr/local/sbin/secreport.sh @@ -6,10 +6,10 @@ echo "### SUID binaries" find / -perm -4000 -ls echo "### World writable files" -find / -perm -o=w +find / -type f -a -perm -o=w echo "### lines in authorized_keys" -for h in `awk -F: '{print $NF}' /etc/passwd`; do +for h in `awk -F: '{print $6}' /etc/passwd`; do echo "-- $h" if [ -f $h/.ssh/authorized_keys ]; then cat $h/.ssh/authorized_keys @@ -22,6 +22,9 @@ for u in `awk -F: '{print $1}' /etc/passwd`; do crontab -u $u -l done +echo "### cronjobs in /etc" +find /etc/cron.* + echo "### Nyligen ändrade filer i systemet" find / -type f -mtime 1 -ls @@ -29,19 +32,20 @@ echo "### Installerade paket och versioner" dpkg -l echo "### Portar som lyssnar lsof alt netstat" -lsof -i|grep LISTEN alt netstat -lkp +netstat -lp echo "### Entropy" cat /proc/sys/kernel/random/entropy_avail echo "### fstab" -fstab +cat /etc/fstab echo "### arp-tabell" arp -na echo "### processlista" -ps -auxww +ps -eo euser,ruser,suser,fuser,f,comm,label + echo "### lsmod" lsmod