# rpm -qa | xargs rpm -V
# netstat -an
# netstat -nalp
# nestat -plant
# ss -a -e -i
# tcpdump src port 6697
# ps -auxwf
# ls -alR /proc/*/exe 2> /dev/null | grep -i deleted
# strings /proc/<PID>/comm
# strings /proc/<PID>/cmdline
# ls -la /proc/<PID>/exe
# strings /proc/<PID>/environ
# ls -alR /proc/*/cwd
# ls -alR /proc/*/cwd 2> /dev/nulll | grep tmp
# ls -alR /proc/*/cwd 2> /dev/nulll | grep dev
List all hidden directories
# find / -type d -name ".*"
# ls -al /var/log/*
# utmpdump /var/log/wtmp
# utmpdump /var/run/utmp
# utmpdump /var/log/btmp
# last
# lastb
# grep [[:cntrl:]] /var/log/*.log
# crontab -l
# atq
# systemctl list-timers --all
# grep ":0:" /etc/passwd
# cat /etc/sudoers
# cat /etc/group
# find / -name authorized_keys
# find / -name *history
# ls -laR / 2> /dev/null | grep *history | grep null
Find all hidden directories
# find / -type d -name ".*"
# find / -mtime -1
# find / \( -nouser -o -nogroup \) -exec ls -lg {} \;
# lsattr / -R 2> /dev/null | grep "\----i"
# find / -type f \( -perm -04000 -o -perm -02000 \) -exec ls -lg {} \;
# find / -type f -exec file -p '{}' \; | grep ELF
# find /tmp -type f -exec file -p '{}' \; | grep ELF
Thanks to Sandrfly security - https://www.sandflysecurity.com/wp-content/uploads/2018/11/Linux.Compromise.Detection.Command.Cheatsheet.pdf