Enumeration
The first step toward escalating your privileges on Windows or Linux is again Enumeration.
Hostname
Returns the hostname of the machine, it can provide information about the target system's role within the network
hostnameuname -a
Provides details about the kernel, which is useful in searching for a kernel exploit
uname -a/proc/version
Provides information on the kernel version and whether a compiler is installed or not GCC for instance
it helps you find a kernel exploit and also helps in narrowing down your exploit research by providing details about the existing complier
cat /proc/version/etc/issue
Usually contains information about the operating system
cat /etc/issueps Command
Provides details on running processes, showing
PID - the process ID
TTY - the terminal type used by the user.
Time: Amount of CPU time used by the process. CMD: shows details of the associated command or the executable
env
Provides details on the environment variables available, the PATH variables might have associated compilers and scripting languages available on the machine which help you pick an appropriate exploit
sudo -l
Shows the list of commands the user is allowed to run as a root user.
ls
helps you find the files with might have some important data like an htaccess or htpasswd file which is hidden
id
provide the information on the user's privilege level and the groups that the user is in.
/etc/passwd
The easiest way to find other users on the machine, which might help in lateral movement.
history
Provides information on previous commands and rarely some credintials
ifconfig
When pivoting, the ifconfig command provides information on the available network interfaces of the system.
netstat
helps gather information on existing communications,
find
Last updated