OPSECTLAS you are here: Linux
Linux

System Enumeration

reference 26 commands 1 tool

  1. Recon
  2. Enumerate
  3. Foothold
  4. PrivEsc
  5. Lateral
  6. Post-Ex

reached from Foothold (Linux)

toolsjohn
First 10 Commands on Any Linux Shell
id && whoami
sudo -l                             # Critical · check immediately
uname -a                            # Kernel version → CVE search
cat /etc/os-release                 # Distro info
cat /etc/passwd                     # Users with shells
netstat -tlnp 2>/dev/null || ss -tlnp  # Internal services
ps aux                              # Running processes
ls -la /home/                       # Other users' home dirs
env                                 # Environment variables · may contain creds
cat /etc/crontab                    # Scheduled jobs
Deep System Enumeration

Users with shells

grep -v 'nologin\|false' /etc/passwd

Password hashes

cat /etc/shadow 2>/dev/null
unshadow /etc/passwd /etc/shadow > combined.txt
john --wordlist=/usr/share/wordlists/rockyou.txt combined.txt

Interesting SUID binaries

find / -perm -4000 -type f 2>/dev/null | sort
find / -perm -u=s -type f 2>/dev/null | sort

World-writable files and directories

find / -writable -type f 2>/dev/null | grep -v proc
find / -writable -type d 2>/dev/null | grep -v proc

Recently modified files

find / -mtime -5 -type f 2>/dev/null | grep -v proc | grep -v sys

Readable files in /etc

ls -la /etc/ | grep -v root

Internal services

ss -tlnp
netstat -tlnp 2>/dev/null
cat /etc/services

Mounted drives

df -h
cat /etc/fstab
mount | grep -v "proc\|sys\|dev\|run\|tmpfs"
connected