Which Nmap scan does not completely open a TCP connection

0 votes
I’m trying to understand the different scan types in Nmap. Which scan method identifies open ports without completing a full TCP connection? Is this approach stealthy enough to avoid detection by intrusion detection systems (IDS)?
Jan 6 in Cyber Security & Ethical Hacking by Nidhi
• 5,440 points
84 views

1 answer to this question.

0 votes

In Nmap, the SYN scan (-sS) is designed to identify open ports without completing the full TCP handshake. This method is often referred to as a half-open scan because it sends a SYN packet to the target port and waits for a response:

  • Open Port: If the port is open, the target responds with a SYN-ACK packet. Nmap then sends an RST (reset) packet to terminate the connection before the handshake is completed.

  • Closed Port: If the port is closed, the target responds with an RST packet, indicating the port is closed.

This approach allows Nmap to detect open ports without establishing a full TCP connection, making it faster and less intrusive.

Stealthiness and Detection

The SYN scan is considered relatively stealthy because it doesn't complete the TCP handshake, potentially evading detection by intrusion detection systems (IDS) and firewalls.

However, its effectiveness can vary based on the target system's configuration and the sophistication of the IDS. Some IDS may detect and log SYN scan attempts, especially if they are configured to monitor for such activities.

Alternative Scan Types

  • TCP Connect Scan (-sT): This scan completes the full TCP handshake, making it more detectable but useful when SYN scan is not feasible due to user privileges.

  • FIN Scan (-sF): Sends a FIN packet to the target port. Open ports typically ignore the FIN packet, while closed ports respond with an RST packet. This scan can sometimes bypass firewalls and packet filters but is less reliable.

  • Xmas Scan (-sX): Sets the FIN, URG, and PSH flags, lighting up the packet like a Christmas tree. Similar to the FIN scan, it can bypass some firewalls but is less commonly used.

Each scan type has its advantages and limitations, and the choice depends on the specific network environment and the level of stealth required.

answered Jan 7 by CaLLmeDaDDY
• 13,760 points

Related Questions In Cyber Security & Ethical Hacking

0 votes
0 answers
0 votes
1 answer

Not able to run nmap scan on router.

Might not be the actual router address. ...READ MORE

answered Jan 31, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,220 points
1,922 views
0 votes
0 answers

How do I write a simple PERL script to scan for open ports on a target machine?

I’m learning about network security and I ...READ MORE

Oct 17, 2024 in Cyber Security & Ethical Hacking by Anupam
• 9,050 points
174 views
+1 vote
1 answer

How do you decrypt a ROT13 encryption on the terminal itself?

Yes, it's possible to decrypt a ROT13 ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 13,760 points
181 views
+1 vote
1 answer

How does the LIMIT clause in SQL queries lead to injection attacks?

The LIMIT clause in SQL can indeed ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 13,760 points
344 views
+1 vote
1 answer

Is it safe to use string concatenation for dynamic SQL queries in Python with psycopg2?

The use of string concatenation while building ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 13,760 points
188 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Why is Nmap not showing open ports?

When Nmap fails to detect open ports ...READ MORE

answered Jan 7 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 13,760 points
57 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP