Skip to content

0. System Information

OS info

Let's starting gaining some knowledge of the OS running

(cat /proc/version || uname -a ) 2>/dev/null
lsb_release -a 2>/dev/null # old, not by default on many systems
cat /etc/os-release 2>/dev/null # universal on modern systems
cat /etc/issue
cat /etc/*-release
cat /etc/lsb-release
cat /etc/redhat-release

Kernel version

cat /proc/version
uname -a
uname -mrs
rpm -q kernel
dmesg | grep Linux
ls /boot | grep vmlinuz

Path

If you have written permissions on any folder inside the PATH variable you may be able to hijacking some libraries or binaries:

echo $PATH

Env info

Interesting information, passwords or API keys in the environment variables?

(env || set) 2>/dev/null

Kernel exploits

Check the kernel version and if there is some exploit that can be used to escalate privileges

cat /proc/version
uname -a
searchsploit "Linux Kernel"