[Networking] Port Scanning using nmap

<aside> 💡 IP address - Anything that connects to some network gets an IP address for identification, its changable.

</aside>

<aside> 💡 Protocol - For computers to communicate, certain rules must be followed i.e protocols.

HTTP for serving webpages DNS for resolving hostnames to IP addresses Post Office Protocol version 3 (POP3) for delivering email Simple Mail Transfer Protocol (SMTP) for sending email Telnet for remote login SSH for secure remote login

</aside>

<aside> 💡 Server - Provides services to other computers over a network like webpages, email delivering, video calls.

</aside>

<aside> 💡 Port Number - Multiple programs in a computer requires communication with the network, to use it simultaneously there are ports. If IP address is a company then port number is the office number in the company, for routers/switches to easily route the packets.

</aside>

<aside> 💡 Certain ports are already decided,

HTTP:80 HTTPS:443 DNS:53 POP3:110 SMTP:25 Telnet:23 SSH:22

</aside>

<aside> 💡 In the TCP and UDP protocol, TCP requires 3 way handshake to confirm packets so it takes time and UDP skips that so its fast and insecure.

</aside>

<aside> 💡 Nmap scans a network for hosts and services.

nmap -sS <ip address> for doing a scan on open ports and not making a complete connection (not fully TCP 3 way handshake)

nmap -sT <ip address> for doing a scan with full TCP 3 way handshake and establishes connection with each port scanned.

-sS is like knocking on a door and leaving and -sT is like knocking and introducing yourself

nmap -sV <ip address> for version info of the ports OR nmap -A <ip address> for OS, version, script, traceroute scanning. everything.

nmap -sC <ip address> for scanning for scripts

</aside>

Questions âž–

Really easy and simple, no brain twister type questions.