2

I have a shell in a remote machine. I want to route my traffic in a dynamic way, so that can access say https://www.google.com via the IP address of the previously mentioned compromised machine.

I know you can route traffic to the internal network and access machines that otherwise have no connection to the outside. However, I want to know how one can use a compromised host as a proxy bounce of sorts.

Below is a rough sketch of how I want my traffic to go. ip* represents the visible public IP address.

Attacker machine[ip1] -> Victim machine[ip2] -> Outside network[ip2]
1

I suppose you are looking for something called "pivoting". At least if you want to utilize the compromized host to further look into the attached network. There are quite a lot of ways to do it. One of them would be metasploit for example and you can read about it here.

Other options include using SSH to forward your requests (see SSH-Portforwarding) but that only applies if SSH is present and only in a limited number of cases this is really useful. If you really do want to connect to a number of remote hosts through that machine I suggest either use metasploits routing or utilize a proxy server that you put on the server via your already existing shell.

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.