Course Overview

/

Portscan without tools

Portscanning without tools

There are also occasions where it may be necessary to use the inbuilt features of a computer to conduct a port scan without the use of any tools.

Linux

In a standard terminal, the syntax to conduct a portscan in linux is:

Nc -zv <IP address> <Port>

For i in {21,22,80,3306,3389}; do nc -zv <IP address> $i; done

Windows

In powershell, the syntax to conduct a portscan in windows is:

<lowerport>..<higherport> | % {echo ((New-Object Net.Sockets.TcpClient).Connect(“<IP>”,$_)) “open port - $_”} 2>$null