Rapid7 Vulnerability & Exploit Database

TCP Port Scanner

Back to Search

TCP Port Scanner



Enumerate open TCP services by performing a full TCP connect on each port. This does not need administrative privileges on the source machine, which may be useful if pivoting.


  • hdm <x@hdm.io>
  • kris katterjohn <katterjohn@gmail.com>


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > show actions
msf auxiliary(tcp) > set ACTION < action-name >
msf auxiliary(tcp) > show options
    ...show and set options...
msf auxiliary(tcp) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security