11. More Linux Privesc
Eleventh section in Complete Beginner learning path.
Last updated
Eleventh section in Complete Beginner learning path.
Last updated
A variety of examples of potential Linux privilege escalation techniques.
If MySQL service is running as root and the "root" user for the service does not have a password assigned, can be used to run system commands as root via MySQL. Once this is downloaded to the target, follow the instructions in the comments of the exploit code to run it & achieve root.
If /etc/shadow
is world-readable, you can cat this out and send the password hashes to John the Ripper to attempt to crack them & access root/super users.
If /etc/shadow
is world-writable, we can generate a new password hash using:
Then we simply edit /etc/shadow
and replace the root users password hash with our new one.
If /etc/passwd
is writable we can create a new root user by copying the current root user's row and changing the username to something like "root2" and replacing the "x" password. To generate a usable password we can use:
History files can be viewed using cat ~/.*history | less
, you may be able to see failed commands with password contents here.
can be used to find shell escapes for various programs that run on Linux machines.