Enumeration
Basic enumeration commands (Linux)
hostname
uname -a
Files to view with the
cat
command
a) /proc/version
b) /etc/issue
c) /etc/passwd and /etc/shadow
Readable /etc/shadow file
Writable /etc/passwd and /etc/shadow
env
id
Suppose a user is in the adm group. This user will be able to read the log files present in the /var/log
or other related folder:
Practical example: https://jarrettgxz-sec.gitbook.io/penetration-testing-ethical-hacking/write-ups/tryhackme/silver-platter
history
sudo -l
The target system may be configured to allow users to run some (or all) commands with root privileges. The
sudo -l
command can be used to list all commands your user can run usingsudo
find
a) Files with SUID bit:
b) Files with SGID bit:
c) Files with certain permission
0777
: readable, writable and executable by all users003
: writable and executable byothers
. Ignoring permissions forowner
andgroup
/001
: atleast executable permissions for others
Find world-writable folders
Find world-executable folders
Automated tools
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
Last updated