1.Environment-enumeration
Basic System Information
whoami
id
hostname
ip a
sudo -l
OS and Kernel
cat /etc/os-release
echo $PATH
env
uname -a
lscpu
cat /etc/shells
Defenses
(Commands may require root or sudo)
iptables -L
apparmor_status
sestatus
ufw status
fail2ban-client status
snort -V
Drives and Shares
lsblk
lpstat
cat /etc/fstab
route -n
netstat -rn
cat /etc/resolv.conf
arp -a
Users and Groups
cat /etc/passwd
cat /etc/passwd | cut -f1 -d:
grep "*sh$" /etc/passwd
cat /etc/group
getent group sudo
ls /home
File System and Hidden Files/Directories
df -h
cat /etc/fstab | grep -v "#" | column -t
find / -type f -name ".*" -exec ls -l {} \; 2>/dev/null | grep htb-student
find / -type d -name ".*" -ls 2>/dev/null
ls -l /tmp /var/tmp /dev/shm
Last updated