🔬Linux Privilege Escalation
Lab 1
Direct access to the target machine via
studentunprivileged userFind specific Linux Privilege escalation vulnerabilities manually
Some files permissions are not set properly, use them to elevate privileges.
Local Enumeration

Misconfigured Permissions Files
Look for world writable files
Find a file that could help to elevate privileges

❗
/etc/shadowis writable by everyone!

Privilege Escalation
/etc/shadowstores the passwords in an encrypted format, so therootpassword need to be replaced with a hashed password

Switch to the
rootuser
Lab 2
Direct access to the target machine via
studentunprivileged userFind misconfigured
sudoprivileges
Local Enumeration

Misconfigured SUDO Privileges
Find
setuidprograms

📌 Useful tool - FallOfSudo
Identify what commands the
studentuser can run

❗
/usr/bin/manbinary can be run withSUDOprivileges, without providing arootuser password
This can happen on Linux systems for specific binaries that other users have to run with
SUDOprivileges. It looks harmless, but it can allow users to spawn bash privileged sessions, since the specific binary can be utilized to execute specific commands. Those commands are executed with the binaryrootprivileges.
Privilege Escalation
In the
manscrolling page, using the!abashcan be spawned

Retrieve the flag with the
rootuser
Last updated
Was this helpful?

