PRIMARY CATEGORY → LINUX PENTESTING
Components ⟡
Enviroment Enumeration
OS
cat /etc/os-release
cat /etc/issue
hostnamectl
lsb_release -aEnvironment Parameters
echo "$PATH"
declare -p -- PATH
envKernel Version
uname -aAvailable Shells
Look for TMUX and SCREEN ( Vulnerable Versions or Existing Sessions )
Vulnerable Bash version → ShellShock
cat /etc/shellsNetwork
Network Interfaces
Look for any other existing and accesible subnets
ip a s
ifconfig
ls /sys/class/netRouting Table
ip route list
route
netstat -rnDNS | Name Resolution
cat /etc/hosts
cat /etc/resolv.confARP Table
Look for other existing hosts
arp -aFS, Drives and Shares
Mounted FS
df -hTvUnmounted FS
grep -v '#' /etc/fstab | column -tDrives and Shares
Look for additional Drives or unmounted File Systems
lsblk -fm
lpstat # Printers
mount
cat /etc/fstabUsers and Groups
Existing Users
Look for existing hashes on /etc/passwd
Read permissions on /etc/shadow
cat /etc/passwd
getent passwdExisting Groups
cat /etc/groups- List members of any existing group
getent group <GROUP> # getent group sudoUers’s Home Directory
Look for accesible user directories
Sensitive Files → Shell History files and SSH Keys within them
ls /homeUsers’s Last Login
lastlogLogged in Users
w
whoFiles and Directories
Hidden Resources
find / -name '.*' -type f -ls 2> /dev/null # Files
find / -name '.*' -type d -ls 2> /dev/null # DirectoriesWritable Resources
find / -type f -writable -ls 2> /dev/null # Files
find / -type d -writable -ls 2> /dev/null # DirectoriesTemporary Files
find /tmp /var/tmp /dev/shm -type f -ls 2> /dev/nullConfiguration Files
find / -regextype posix-extended -iregex '.*\.conf(ig)?' -ls 2> /dev/nullScripts
find / \( -path '*/src/*' -o -path '*/snap/*' -o -path '*/share/*' \) -prune -o -regextype posix-extended -iregex '.*\.(sh|bash|zsh)$' -lsHistory
Command History
historyShells’ History Files
cat /home/<USER>/.bash_history # .zsh_history and so onfind / -regextype posix-extended -iregex '.*_hist(ory)?$' -type f -ls 2> /dev/nullCron Jobs
ls -la /etc/cron.dailyRunning Processes
ps -faux
ps auxfind /proc -name cmdline -exec cat {} + 2>/dev/null | tr '' '\n'Installed Packages
apt list --installed | sed 's@/@ @g' | awk '{ print $1, $3 }' | lessSudo Version
sudo --version | head -n1Binaries
System Binaries
find /bin /usr/bin /usr/sbin -type f -ls 2> /dev/nullSUID Binaries
find / -type f -perm -4000 -ls 2>/dev/nullTrace System Calls
strace <COMMAND>