TCP Connect Scanning
What you'll learn: How TCP Connect scanning reliably discovers open ports by completing the full three-way handshake—and why this leaves a clear trail.
The Full Conversation Approach
TCP Connect scanning is the most straightforward method of port scanning: your system actually completes the entire TCP three-way handshake with the target. Think of it like knocking on someone's door, introducing yourself fully, shaking hands, then immediately leaving. It's polite but memorable.
Here's what happens:
- SYN: You send a synchronization packet to the target port
- SYN-ACK: If the port is open, the target responds with synchronization-acknowledgment
- ACK: Your system sends an acknowledgment back, completing the connection
- The connection is then immediately closed
This differs from techniques we'll explore later where the handshake is not completed.
Why Use It?
Reliability: Because you're using your operating system's standard connect() system call, this method works through most firewalls and doesn't require special privileges (no root/admin needed). If the connection succeeds, the port is definitively open.
The Trade-Off: Maximum Visibility
The downside? Every connection generates logs. System administrators will see complete connection attempts in their logs, making your reconnaissance highly visible. It's like signing the visitor book every time you check if a door is unlocked.
Since you're establishing full TCP sessions, intrusion detection systems (IDS) easily spot the pattern, especially when you scan multiple ports sequentially.
Key Takeaway: TCP Connect scanning is the most reliable port scanning method because it completes the full three-way handshake using standard system calls, but this reliability comes at the cost of generating extensive, easily-detectable logs on the target system.