Dailydave mailing list archives

RE: Today's Windows Trivia Event


From: "James Jones" <jjones () ieee org>
Date: Wed, 30 Mar 2005 14:41:18 -0500

Regedit -- HKLM\System\CurrentControlSet\Services\Tcpip\Parameters

Set DWORDs:

TcpMaxConnectRetransmissions to 0
TcpMaxDataRetransmissions to 1

-James

Yes, it's time once again for the DailyDave Windows trivia event! The
winner, as always, receives the praise of his peers, a shell on
www.immunitysec.com[1], and a drink at the next conference I see you
at.

Background:

As you no doubt are aware, in Unix you have available the "BSD socket
library."  This allows you to do such things as call "socket()" and
"connect()" to make a TCP/IP network connection to a remote system.
Should the remote network endpoint be in the "closed" state, you will
see the following sort of data on the wire.

 From Machine                          To Machine
SYN
                                                 RST, ACK

At the end of this transaction, connect() will immediately return.

On Windows (XP, SP2, for example), you will instead see this
transaction repeated several times, with a significant delay between
each attempt.
After a couple seconds of this nonsense, Windows will then return.
This makes your basic TCP connect scanner rather slow, to say the
least.

Conundrum:
setsockopt(sock,SO_DONOTSUCK);

How (from Python if possible) can one make Windows behave like a
traditional Unix? First person to publicly post the answer, wins.
Quoting ws2_32.c is not required! :>


_______________________________________________
Dailydave mailing list
Dailydave () lists immunitysec com
https://lists.immunitysec.com/mailman/listinfo/dailydave


Current thread: