This computer science problem involves algorithmic thinking and programming concepts. The solution below explains the approach, logic, and implementation step by step.
ScanSolve AI Answer
Here's a summary of the essential port numbers and types of port scans: Essential Port Numbers to Memorize Port 20/21: Service: FTP (File Transfer Protocol) Description: File upload/download (unencrypted) Risk: HIGH Port 22: Service: SSH (Secure Shell) Description: Encrypted remote terminal access Risk: MED Port 23: Service: Telnet Description: Unencrypted remote access, sends passwords in plaintext Risk: CRIT Port 25: Service: SMTP (Simple Mail Transfer Protocol) Description: Outbound email Risk: MED Port 53: Service: DNS (Domain Name System) Description: Name-to-IP resolution Risk: MED Port 80: Service: HTTP (Web traffic) Description: Completely unencrypted Risk: HIGH Port 110: Service: POP3 (Email receiving) Description: Often transmits credentials in plaintext Risk: HIGH Port 443: Service: HTTPS (Encrypted web traffic) Description: TLS/SSL secured Risk: LOW Port 3306: Service: MySQL Description: MySQL database, should NEVER be internet-facing Risk: CRIT Port 3389: Service: RDP (Remote Desktop Protocol) Description: Windows remote access Risk: CRIT Types of Port Scans Flag: -sT Scan Type: Connect Scan Stealth: LOW How it works: Completes the full TCP handshake. Most reliable but easily detected in server logs. Flag: -sS Scan Type: SYN / Half-Open Stealth: HIGH How it works: Sends SYN, receives SYN/ACK but never completes with ACK. Fewer logs. Most common scan. Flag: -sF Scan Type: FIN Scan Stealth: HIGH How it works: Sends FIN packet. Open ports ignore it; closed ports reply RST. Bypasses some firewalls. Flag: -sN Scan Type: NULL Scan Stealth: HIGH How it works: Sends a packet with NO flags set. Very stealthy against older or non-standard systems. Flag: -sX Scan Type: XMAS Scan Stealth: HIGH How it works: Sets FIN+PSH+URG flags simultaneously - 'lights up like a Christmas tree'. Very stealthy. Flag: -sA Scan Type: ACK Scan Stealth: MED How it works: Maps firewall rules - does NOT identify open ports, but reveals filtered vs. unfiltered. Flag: -sI Scan Type: Idle / Zombie Stealth: MAX How it works: Uses a third-party zombie machine's IP to probe target. Hides attacker identity completely. What's next?

