Using connect instead of Netcat
Metasploit offers an excellent command named connect
to provide features that are similar to the Netcat utility. Suppose a system shell is waiting for us to connect on a port at the target system, and we don't want to switch from our Metasploit console.
We can use the connect
command to connect with the target by issuing the connect 192.168.10.23 8080
command, where 192.168.10.23
is the IP address and 8080
is the port to connect to, as shown in the following screenshot:
We can see that we initialized a connection with the listener from within the Metasploit framework, which might come in handy when taking reverse connections at the target where the initial access hasn't been achieved through Metasploit.
Additionally, in a large-scale penetration test, we don't want to interact with the session straightaway after exploitation. Instead, we want...