November 15th, 2010 07:05 PM
incorrect packet responses
Hey Guys, Long time no chat. :P
I have been investigating some weird packet responses from some servers when visiting their site and I am kind of confused as to what could be the cause of it. When I initiate the TCP connection, I get a SYN/ACK response that has an out of order sequence number. I am curious to what could have caused this and was wondering if any of you gurus had any ideas on the whole shenanigan. My initial guess was some hacked up TCP stack, but the servers are running standard operating systems (*nix/windows) from what I can tell. I started to think it might have been some oddly configured firewall but I can not find a good justification for that being the case. Any thoughts would be appreciated as I am trying to make sense of the whole thing. PLEASE KIND AND MERCIFUL AO SAGES! LEND ME YOUR WISDOM!
Thanks in advance!
November 15th, 2010 11:09 PM
If I remember rightly, the sequence id does not just increment by one every time. It is closely related to the acknowledgment id throughout the session, and is randomly generated on each side when the 3 way handshake occurs.
So I guess the question is, how do you know the sequence id from the Syn-Ack phase is out of order? Based on what I know and what that wikipedia article indicates, it is randomly generated.
1. SYN: The active open is performed by the client sending a SYN to the server. It sets the segment's sequence number to a random value A.
2. SYN-ACK: In response, the server replies with a SYN-ACK. The acknowledgment number is set to one more than the received sequence number (A + 1), and the sequence number that the server chooses for the packet is another random number, B.
3. ACK: Finally, the client sends an ACK back to the server. The sequence number is set to the received acknowledgement value i.e. A + 1, and the acknowledgement number is set to one more than the received sequence number i.e. B + 1.
November 17th, 2010 08:20 AM
I logged the ISN sent from my browser and looked at the response from the server. Wireshark even indicated that the sequence number was out of order.
November 19th, 2010 08:05 PM
The packet sequence is generated (S + 1) however on a laggy network the packets may not come in the order they were generated and sent, hence the informational message about out of order sequence. If anything you're seeing a very active network with congestion.
Mercy has been bestowed upon you.
Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden
November 22nd, 2010 09:22 AM
Thanks for the reply TH13! I considered that congestion might be the problem, but wouldn't that only be of consequence after the TCP connection has been established? I am finding fault with the sequence number during the three-way handshake process which is why I am getting uppity >.< Hope you can clarify!
By morganlefay in forum General Computer Discussions
Last Post: September 12th, 2010, 12:25 PM
By don in forum The Security Tutorials Forum
Last Post: January 8th, 2003, 01:40 PM
By smirc in forum AntiOnline's General Chit Chat
Last Post: May 13th, 2002, 03:24 AM
By Noble Hamlet in forum AntiOnline's General Chit Chat
Last Post: March 17th, 2002, 08:38 AM
By antihaxor in forum Non-Security Archives
Last Post: January 24th, 2002, 04:42 PM