Enumeration port
nmap
nmap - TPC scan
to extract ports number from nmap responsecat port.txt | awk '{print $1}' | cut -d "/" -f 1 | tr '\n' ','
nmap - UDP scan one port
1000 ports 65535 portsnmap with proxychains
--p-
- check all ports - --open
- show only open ports - -vv
- use verbos to see progress - 2>/dev/null
- hide proxychains errors powershell 1
1..80 | % {echo ((new-object Net.Sockets.TcpClient).Connect("10.10.107.142",$_)) "Port $_ is open!"} 2>$null
1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect("172.16.190.12",$_)) "Port $_ is open!"} 2>$null
powershell 2
foreach ($port in 1..1024) {If (($a=Test-NetConnection 10.10.107.142 -Port $port -WarningAction SilentlyContinue).tcpTestSucceeded -eq $true){ "TCP port $port is open!"}}
powershell 3
- https://github.com/BornToBeRoot/PowerShell_IPv4PortScanner
wget https://raw.githubusercontent.com/BornToBeRoot/PowerShell_IPv4PortScanner/main/Scripts/IPv4PortScan.ps1 -O /opt/windows/IPv4PortScan.ps1
mkdir -p /home/kali/workspace/www
cd /home/kali/workspace/www
cp /opt/windows/IPv4PortScan.ps1 .
certutil -urlcache -f http://192.168.45.226/IPv4PortScan.ps1 IPv4PortScan.ps1
wget http://192.168.45.226/IPv4PortScan.ps1 -O IPv4PortScan.ps1
.\IPv4PortScan.ps1 -ComputerName 172.16.126.14 -StartPort 1 -EndPort 1000 | ft
.\IPv4PortScan.ps1 -ComputerName 172.16.126.14 -StartPort 1000 -EndPort 10000 | ft
.\IPv4PortScan.ps1 -ComputerName 172.16.126.14 -StartPort 10000 -EndPort 65535 | ft
netcat
netcat - linux
netcat - windows
hping3
hping3
unicornscan
unicornscan
sudo apt remove -y unicornscan
sudo apt autoclean
sudo apt autoremove
sudo apt install -y unicornscan
masscan
masscan - UDP scan
rustscan
rustscan