Binding a shell to the target for remote access
In the previous recipe, we analyzed how to exploit a Windows SP2 machine and add a new user account. But the connection was terminated immediately after the execution of exploit. In this recipe, we will move a step ahead and bind a shell to the target so that we can set up a remote connectivity with the target and gain control over it. The process is similar to the one mentioned in the previous recipe. All we have to do is use a different payload that can start a shell for us on the target machine.
Getting ready
We will again start off by launching our msfconsole
and our target is the same as in the Penetration testing on a Windows XP SP2 machine recipe. We will use the same dcom
vulnerability and then use a different payload this time to bind a shell to the target.
How to do it...
To bind a shell to the target, follow these steps:
We will begin by selecting the
dcom
exploit against our target machine. We will set up the various exploit parameters...