Using connect as Netcat

Metasploit offers a great command named connect to provide features similar to the Netcat utility. Suppose a system shell is waiting for us to connect on some 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, as shown in the following screenshot:

We can see that we initialized a connect with the listener from within the Metasploit framework, which might come in handy in taking reverse connections at the target where the initial access hasn't been gained through Metasploit.

Get Mastering Metasploit - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.