added security reporting tool from Jonas Lejon
This commit is contained in:
parent
ba25e66a06
commit
2bb36b6d81
1 changed files with 47 additions and 0 deletions
47
global/overlay/usr/local/sbin/secreport.sh
Executable file
47
global/overlay/usr/local/sbin/secreport.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "### $HOSTNAME"
|
||||
|
||||
echo "### SUID binaries"
|
||||
find / -perm -4000 -ls
|
||||
|
||||
echo "### World writable files"
|
||||
find / -perm -o=w
|
||||
|
||||
echo "### lines in authorized_keys"
|
||||
for h in `awk -F: '{print $NF}' /etc/passwd`; do
|
||||
echo "-- $h"
|
||||
if [ -f $h/.ssh/authorized_keys ]; then
|
||||
cat $h/.ssh/authorized_keys
|
||||
fi
|
||||
done
|
||||
|
||||
echo "### cronjobs"
|
||||
for u in `awk -F: '{print $1}' /etc/passwd`; do
|
||||
echo "-- $u"
|
||||
crontab -u $u -l
|
||||
done
|
||||
|
||||
echo "### Nyligen ändrade filer i systemet"
|
||||
find / -type f -mtime 1 -ls
|
||||
|
||||
echo "### Installerade paket och versioner"
|
||||
dpkg -l
|
||||
|
||||
echo "### Portar som lyssnar lsof alt netstat"
|
||||
lsof -i|grep LISTEN alt netstat -lkp
|
||||
|
||||
echo "### Entropy"
|
||||
cat /proc/sys/kernel/random/entropy_avail
|
||||
|
||||
echo "### fstab"
|
||||
fstab
|
||||
|
||||
echo "### arp-tabell"
|
||||
arp -na
|
||||
|
||||
echo "### processlista"
|
||||
ps -auxww
|
||||
|
||||
echo "### lsmod"
|
||||
lsmod
|
Loading…
Add table
Reference in a new issue