Host Recon
Help
# List available commands
compgen -c | sort | less
compgen -a | sort | less
# Help for a specified command
man <command>
<command> --help
Networking
General networking information, such as interfaces, IP addresses, and DNS:
ip addr show
ip a
ifconfig -a # deprecated
# Show interfaces
ip link show
System
pspy
can be used on the target to enumerate real-time system information!
# General system information
neofetch
hostnamectl
uname -a
# Name of the host
hostname
# Kernel version & distro info
uname -r
cat /etc/os-release
# Terminal history file
cat ~/.bash_history
cat ~/.zsh_history
history
# Environment variables
printenv
env
# Named pipes
ls -l /proc/sys/fs/pipe-max-size
lsof
# sudo version
sudo --version
Users & Groups
# Current user
whoami
# List current user's privileges
sudo -l
# List current user's information
id
getent passwd $(whoami)
# List local users
cut -d: -f1 /etc/passwd
getent passwd
# List active (logged-on) users (works only on Windows Servers)
who
# Elevated permissions
sudo -l
Files
# List all (including) hidden files
ls -la
# Include subdirectories
ls -laR
# Search for a specific file
find / -type f -name "local.txt" 2>/dev/null
locate local.txt
# Case-insensitive search
find / -type f -iname "local.txt" 2>/dev/null
Scheduled Jobs
# Print jobs
crontab -l
cat /etc/crontab
cat /var/log/syslog | grep "CRON"
Last updated
Was this helpful?