Priv Escalation

cp SUID

Initial linpeas output proved to be interesting since I was able to identify multiple vulnerabilites. One exploiting $PATH and another using the command cp since it has SUID set.

This article here explained it really well but basically we create our own root user and we add his profile to the passwd file and we overwrite it with cp.

Steps

Copy the contents of the /etc/passwd file to a file of our own.

Generate our new user

Put it in our file using the following format

Copy it and over write the /etc/passwd file.

Switch users

Last updated