Linux Host Fingerprinting
Remember!!
- Always check user directory permissions:
ls -l /home
Automated enumeration tools
- LinPeas: https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/linPEAS
- LinEnum: https://github.com/rebootuser/LinEnum
- LES (Linux Exploit Suggester): https://github.com/mzet-/linux-exploit-suggester
- Linux Smart Enumeration: https://github.com/diego-treitos/linux-smart-enumeration
- Linux Priv Checker: https://github.com/linted/linuxprivchecker
Commands
| Command | Definition |
|---|---|
hostname | Prints hostname of target |
uname -(as) | System/kernel info |
cat /proc/version | System process info |
ps (auxjf/-A) | Show running processes |
env | Show environment variables |
sudo -l | List available sudo commands |
lsof 2> /dev/null | List open files |
ls (-la) | List files verbosely, including hidden |
cat /etc/passwd (| cut -d ":" -f 1) | Show system users |
history | Show terminal history |
ifconfig | Show network interface info |
netstat -(stpiatul) | Show existing network connections |
find | Search system for string |
cat /etc/issue | OS info |
cat /etc/os-release | OS info |
lsb_release -a | All LSB OS info |
hostnamectl | OS info/control |
cat /etc/debian_version | Short OS info |
lscpu -p -J | CPU info |
lsblk --fs -J | Disk overview |
df | Disk info |
fdisk | Disk info |
mount | Disk info |
dpkg -l | List installed applications |
sudo dnf install -y usbutils; lsusb -v -t | USB devices |
sudo dnf install -y pciutils; lspci -v -k -s | PCI devices |
free | RAM info |
sudo dnf install -y dmidecode; dmidecode -t TYPE | Detailed RAM info |
dmidecode -t bios | BIOS info |
dmidecode -t system | System info |
capsh --print | Lists capabilities of a container; included with libcap2-binpackage |