2

If someone is having a Remote Code Execution, that means, one can run the commands on the server, then why does he need to get the Reverse Shell?

Even though I can run system commands, then why do I go for Reverse Shell?

I am finding the primary reason behind it.

4

Remote code execution means you have successfully executed some specific code on the server. It does not mean you can execute anything else on the server, yet. The solution is to have the executed code make a connection back to you and allow you to send more commands for it to run. That's what a reverse shell is for. Without a reverse shell, you'd potentially have to re-exploit the server with a new payload over and over for each additional command you want executed. That would be a royal pain.

1
3

In addition to @forest's answer, the initial remote code execution method is often blind, with no access to command output. Bootstrapping up into a remote shell means gaining access to command outputs, which are necessary for further exploration of the target.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.