1

I'm working on a linux privilege escalation. This is the situation: I'm able to write to /bin, and I only have sudo access to run a script. This script just prints information with an echo.

I copied /bin/bash to /bin/echo, hoping that running that sudo script would get me an elevated shell but that didin't work. After replacing /bin/echo, running "echo test" just prints "test". Doing /bin/echo whoever spawns a bash shell.

I checked that my PATH variable is correct (it includes /bin first), and I don't have an "echo" binary in any other path. Running "which echo" returns only "/bin/echo". I tried this in an Ubuntu server, and thought that maybe Apparmor had something to do, but I also tried it on a Debian without Apparmor and didin't work either.

1 Answer 1

0

The script is executing the shell builtin instead of /bin/bash.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.