AttackVector.tech

What is Port Scanning?

Port Scanning identifies open network ports to discover services. Learn about techniques like TCP SYN scan and how to detect and prevent it.

Explain Like I'm 5

Imagine your house has many doors and windows, each leading to different rooms. Port scanning is like a friendly neighbor walking around to see which doors and windows are open, just to understand the layout of your home. They aren't trying to break in; they're just figuring out which rooms are accessible.

Why would someone do this? If you know which doors are open, you know where you might be able to enter. In computers, this helps people see which services are running and might be vulnerable. Knowing which doors (or ports) are open helps keep your digital house safe.

Port scanning is important because it helps security experts find weak spots before bad guys do. By knowing what's open, they can secure systems and protect important information.

Technical Definition

Definition

Port scanning is a technique used to identify open ports and services on a networked device. It helps in mapping the network and finding potential vulnerabilities that could be exploited.

How It Works

  1. 1TCP SYN Scan (-sS): Sends a SYN packet to start a connection. If a SYN-ACK is received, the port is open.
  2. 2TCP Connect Scan: Completes the three-way handshake. Less stealthy but useful if SYN scan isn't possible.
  3. 3UDP Scan: Sends a UDP packet. No response suggests an open port; ICMP unreachable messages indicate closed ports.
  4. 4Service Version Detection (-sV): Identifies the service version running on an open port.
  5. 5OS Fingerprinting (-O): Determines the operating system based on network response patterns.

Key Characteristics

  • Stealth Scanning: Minimizes detection by intrusion detection systems (IDS) using techniques like TCP SYN scan.
  • Aggressive Scanning: Quickly scans all ports but is more likely to be detected.
  • Common Ports: Often targeted ports include 22 (SSH), 80 (HTTP), 443 (HTTPS), and 3306 (MySQL).

Comparison

FeaturePort ScanningVulnerability Scanning
PurposeFind open ports and servicesIdentify specific vulnerabilities
Toolsnmap, masscanNessus, OpenVAS
IntrusivenessLow to ModerateModerate to High

Real-World Example

A notable example is the use of port scanning in the 2016 Mirai botnet attack (CVE-2016-10401), which scanned for open ports on IoT devices to compromise them.

Detection & Prevention

  • IDS/IPS: Use intrusion detection and prevention systems to monitor for unusual scanning activity.
  • Firewall Rules: Limit access to critical ports and services.
  • Regular Audits: Conduct regular network scans to identify open ports and services.

Common Misconceptions

  • Port Scanning is Always Malicious: Not true; it is a legitimate tool for network defense.
  • All Ports Should Be Closed: False; some ports need to be open for services to function properly.
  • Port Scanning is Illegal: It's legal when performed with permission on authorized networks.

Keywords

what is Port ScanningPort Scanning explainedPort Scanning detectionTCP SYN scannmap port scanningnetwork security scanningport scanning techniques

Ready to scan your site?

AttackVector uses AI agents to find vulnerabilities before attackers do. Start a free scan now.

Start Free Scan