Is there a way to do the below and spawn the second command as root?
sudo whatever && /bin/sh
I tried it with the below but it still puts me as the original user.
sudo who && /bin/sh
I want to know if you can spawn a shell via running a second command once sudo was invoked ONCE. This is important, as I can't run a command like sudo x && sudo y
for the testing I'm trying to create regarding (what I believe) is vulnerable coding in an app that (in the backend) executes a program as sudo
. I just need to try and tag a command on the front of it to see if I can immediately just spawn a root shell.