Host and Port Scanning

After we have found out that our target is alive, we want to get a more accurate picture of the system. The information we need includes:

  • Open ports and its services

  • Service versions

  • Information that the services provided

  • Operating system

chevron-rightStates of a Port Scanhashtag

chevron-rightScanning Top 10 TCP Portshashtag
sudo nmap 10.129.2.28 --top-ports=10 
chevron-rightTrace nmap port scanhashtag
z3tssu@htb[/htb]$ sudo nmap 10.129.2.28 -p 21 --packet-trace -Pn -n --disable-arp-ping

# --packet-trace = shows all packets sent and received
# -n = Disables DNS resolution
# --disable-arp-ping = Disables ARP Ping
chevron-rightTCP Connect Scan on Port 443 (-sT)hashtag

This command connects and scans TCP port 443 using a TCP connect scan (-sT), including packet tracing and additional output details.

sudo nmap 10.129.2.28 -p 443 --packet-trace --disable-arp-ping -Pn -n --reason -sT
chevron-rightUDP Port Scan (-sU)hashtag

This command performs a UDP port scan. The -F flag is used to check the 100 most common ports.

Note: The -F option checks the top 100 ports.

chevron-rightService Version Scan (-sV) on Port 445hashtag

This command conducts a version scan on TCP port 445 with packet tracing and additional output details.

Last updated