Dailydave mailing list archives

Today's Windows Trivia Event


From: Dave Aitel <dave () immunitysec com>
Date: Wed, 30 Mar 2005 11:08:55 -0500

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! :>

Wrong Answers:
1. Using a raw socket to emulate a TCP stack.
2. Setting your timeout to be quite small so it always returns quickly.
3. Just use Linux

Thanks,
Dave Aitel
VP of small annoying things
Immunity, Inc.

[1]. Literally. I picked one up at Coney Island last summer, and it's on the server case and you can have it if you go pick it up.
_______________________________________________
Dailydave mailing list
Dailydave () lists immunitysec com
https://lists.immunitysec.com/mailman/listinfo/dailydave


Current thread: