Checklist
Key Commands and Their Purpose:
whoami: Displays the current user.
id: Shows user ID, group IDs, and group memberships.
hostname: Reveals the server’s name, which may indicate its role.
ifconfig / ip a: Lists network interfaces and subnets for potential lateral movement.
sudo -l: Checks if the user can run commands as root without a password.
cat /etc/os-release: Identifies the OS distribution and version.
uname -a: Shows the Kernel version to check for known exploits.
echo $PATH: Displays the PATH variable, which could be misconfigured for privilege escalation.
env: Lists environment variables, potentially revealing sensitive data like passwords.
cat /etc/passwd: Lists all users, their UIDs, GIDs, and shells.
cat /etc/group: Shows groups and their members to identify high-privilege groups.
cat /etc/shells: Lists available shells, which may have vulnerabilities.
lsblk: Enumerates block devices (e.g., unmounted drives that may contain sensitive data).
df -h: Displays mounted filesystems and their usage.
cat /etc/fstab: Checks for credentials or misconfigured mounts.
route / netstat -rn: Shows the routing table for network connections.
arp -a: Lists devices the server communicates with.
find / -type f -name ".*": Finds hidden files that may contain sensitive data.
find / -type d -name ".*": Finds hidden directories.
ls -l /tmp /var/tmp /dev/shm: Checks temporary directories for exploitable files.
Key Areas to Investigate:
OS and Kernel: Look for outdated versions with known exploits (e.g., check Exploit-DB).
Running Services: Identify services running as root (e.g., Nagios, Samba) for misconfigurations or vulnerabilities.
Users and Groups: Check for users in high-privilege groups like sudo or adm.
File Permissions: Look for writable files/directories owned by root or misconfigured PATH.
Sensitive Files: Search for config files (.conf, .config), SSH keys, or .bash_history containing credentials.
Defenses: Identify protections like AppArmor, SELinux, or iptables that may block exploits.
Network: Map subnets and connected devices for lateral movement.
Last updated