dd if=/dev/kmem of=/root/kmem
dd if=/dev/mem of=/root/mem
sudo insmod ./lime.ko "path=./Linmen.mem format=raw"
./linpmem -o memory.aff4
./linpmem memory.aff4 -e PhysicalMemory -o memory.raw
fdisk -l
dd if=/dev/sda1 of=/[outputlocation]
python ./fastIR_collector_linux.py
./linenum.sh
./linenum.sh -t
date
uname –a
hostname
cat /proc/version
lsmod
cat /etc/passwd
cat /etc/shadow
cat /etc/sudoers
cat /etc/sudoers.d/*
cut -d: -f1 /etc/passwd
getent passwd | cut -d: -f1
compgen -u
whoami
who
last
lastb
cat /var/log/auth.log
cat /etc/bash.bashrc
cat ~/.bash_profile
cat ~/.bashrc
cat /etc/profile
ls /etc/profile.d/
cat /etc/profile.d/*
ls /etc/cron.*
ls /etc/cron.*/*
cat /etc/cron.*/*
cat /etc/crontab
cat /etc/ssh/sshd_config
Note: This specifies where the SSH daemon will look for keys. Generally this will be as below.
ls /home/*/.ssh/*
cat /home/*/.ssh/id_rsa.pub
cat /home/*/.ssh/authorized_keys
cat /etc/sudoers
ls /etc/*.d
cat /etc/*.d/*
netstat
netstat -apetul
netstat -plan
netstat -plant
ss
ss -l
ss -ta
ss -tp
ls /etc/iptables
cat /etc/iptables/*.v4
cat /etc/iptables/*.v6
iptables -L
ifconfig -a
ls -la ~/.mozilla/plugins
ls -la /usr/lib/mozilla/plugins
ls -la /usr/lib64/mozilla/plugins
ls -la ~/.config/google-chrome/Default/Extensions/
ls -la /lib/modules/*/kernel/*
ps -s
ps -l
ps -o
ps -t
ps -m
ps -a
top
grep -H -i -r "password" /
ps -auxwf
lsof
du
cat /etc/pam.d/sudo
cat /etc/pam.conf
ls /etc/pam.d/
fdisk -l
strace -f -e trace=network -s 10000 <PROCESS WITH ARGUMENTS>;
strace -f -e trace=network -s 10000 -p <PID>;
Note: Below material with thanks to Craig Rowland - Sandfly Security
ls -al /proc/[PID]
Note:
- CWD = Current Working Directory of Malware
- EXE = Binary location and whether it has been deleted
- Most Common Timestamp = When process was created
cp /proc/[PID]/exe /[destination]/[binaryname]
cp /proc/[PID]/ /[destination]/[PID]/
sha1sum /[destination]/[binaryname]
md5sum /[destination]/[binaryname]
cat /proc/[PID]/cmdline
cat /proc/[PID]/comm
Note:
- Significant differences in the above 2 outputs and the specified binary name under /proc/[PID]/exe can be indicative of malicious software attempting to remain undetected.
strings /proc/[PID]/environ
cat /proc/[PID]/environ
ls -al /proc/[PID]/fd
cat /proc/[PID]/maps
cat /proc/[PID]/stack
cat /proc/[PID]/status
ls -alr /proc/*/exe 2> /dev/null | grep deleted
ls -alr /proc/*/cwd
ls -alr /proc/*/cwd 2> /dev/null | grep tmp
ls -alr /proc/*/cwd 2> /dev/null | grep dev
ls -alr /proc/*/cwd 2> /dev/null | grep var
ls -alr /proc/*/cwd 2> /dev/null | grep home
Hidden Directories and Files
find / -type d -name ".*"
lsattr / -R 2> /dev/null | grep "\----i"
find / -type f \( -perm -04000 -o -perm -02000 \) -exec ls -lg {} \;
find / \( -nouser -o -nogroup \) -exec ls -lg {} \;
file * -p
find / -type f -exec file -p '{}' \; | grep ELF
Hidden Executables on file system
find / -name ".*" -exec file -p '{}' \; | grep ELF
find / -mtime -1
/etc/rc.local
/etc/initd
/etc/rc*.d
/etc/modules
/etc/cron*
/var/spool/cron/*
/usr/lib/cron/
/usr/lib/cron/tabs
ls -al /var/log/*
ls -al /var/log/*tmp
utmpdump /var/log/btmp
utmpdump /var/run/utmp
utmpdump /var/log/wtmp
ls /usr/bin/
ls /usr/local/bin/