Curious if any of you have an answer to this Metasploit question. It's an issue of a Metasploit session within another Metasploit session.
In this lab I'm doing, I need to compromise a machine (10.10.50.8) and then use it to pivot to another machine (10.10.51.21). I spark up Metasploit (instance #1) and get a Meterpreter session going on 10.10.50.8. I use plink to setup a reverse ssh connection on port 21 to a ssh server on my Kali box. That gives me a new bash shell where I can now do things like nmap 127.0.0.1 from my Kali VM to probe 10.10.51.21's FTP port. All good so far.
Now that I have the reverse ssh connection, I can access 10.10.51.21 via localhost. I spark up a new instance of Metasploit (instance #2) and attack 10.10.51.21 using exploit/freebsd/ftp/proftp_telnet_iac. I launch the attack and get a message about a port conflict followed by an exploit failed message. So I had to background Metasploit session #2 so I could determine the port conflict. I go back to Metasploit session #1 and sure enough port 4444 was being used when I compromised 10.10.50.8. With that I went back into my Meterpreter session to get back to Metasploit session #2 (to compromise the 10.10.51.21) and couldn't figure out how to get back to it. Running sessions -l only shows the Meterpreter session used to compromise 10.10.50.8.
Anyone know how?
And yeah this is a little bit of Inception going on here. :)