I have an attack scenario, first I send a malicious pdf to my victim, then I have a reverse tcp shell (Meterpreter session) on his computer then I want to exploit a samba server (which is already exploitable) on my victim network which is not accessible from outside, on this part can I use metasploit to exploit that server from inside of my first victim computer? (all of these computers are in my lab and under control of myself)

2 Answers 2


Certainly. If you are using a Metasploit module for the exploit you simply need to add a route. Background your Meterpreter session and type route -h it will help you, but basically you just need to add route 1. The 1 at the end being the session ID number for which you want to route traffic (the exploit module) over and to whichever network you want. In this case I'm specifying the range.


quickly state that I don't have an answer in regards to metasploit, but I think your scenario has similarities to this attack shown here: https://vimeo.com/11213607

basically from your first shell, create another reverse ssh tunnel which redirect a port on the samba server back to your attacking machine. ?

  • Please dont post questions as answers. If you are not sure about your answer you can do some research or post as a comment
    – Purefan
    Commented May 30, 2016 at 15:40
  • yup tried that Purefan and got a messages that I could not do that because of some reputation scheme!!, not sure what that message was about. Sorry if this tilted your day, I'll watch out next time. please just vote to delete my post. Commented May 30, 2016 at 15:47
  • @AllanNielsen the Url which you posted is useful, thanks
    – Iman
    Commented May 30, 2016 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .