1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

loosen the requirements for a split-handshake syn detection to allow the likes of SYN|PSH. See this thread: http://seclists.org/nmap-dev/2010/q2/739

This commit is contained in:
fyodor
2010-06-11 06:17:52 +00:00
parent 0585746788
commit 6ac6e2fad5

View File

@@ -4102,10 +4102,6 @@ static bool get_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
/* Yeah! An open port */ /* Yeah! An open port */
newstate = PORT_OPEN; newstate = PORT_OPEN;
current_reason = ER_SYNACK; current_reason = ER_SYNACK;
} else if (USI->scantype == SYN_SCAN && tcp->th_flags == TH_SYN) {
/* A SYN from a TCP Split Handshake - open port */
newstate = PORT_OPEN;
current_reason = ER_SYN;
} else if (tcp->th_flags & TH_RST) { } else if (tcp->th_flags & TH_RST) {
current_reason = ER_RESETPEER; current_reason = ER_RESETPEER;
if (USI->scantype == WINDOW_SCAN ) { if (USI->scantype == WINDOW_SCAN ) {
@@ -4113,6 +4109,10 @@ static bool get_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
} else if (USI->scantype == ACK_SCAN) { } else if (USI->scantype == ACK_SCAN) {
newstate = PORT_UNFILTERED; newstate = PORT_UNFILTERED;
} else newstate = PORT_CLOSED; } else newstate = PORT_CLOSED;
} else if (USI->scantype == SYN_SCAN && (tcp->th_flags & TH_SYN)) {
/* A SYN from a TCP Split Handshake - http://nmap.org/misc/split-handshake.pdf - open port */
newstate = PORT_OPEN;
current_reason = ER_SYN;
} else { } else {
if (o.debugging) if (o.debugging)
error("Received scan response with unexpected TCP flags: %d", tcp->th_flags); error("Received scan response with unexpected TCP flags: %d", tcp->th_flags);