How to properly send tcp/ip reset packet (RST)? Raw packet creation problem...

Hello,

I am trying to integrate a feature in my application which allows you to kill active tcp connections with a tcp reset packet.  I am using ethereal to monitor packet generation and have been able to craft a packet with the appropriate source ip source port destination ip destination port and the Reset field is 04 which is correct for tcp reset packet but when I try to kill a telnet connection from my machine to my router no luck, connection persists.  Solar winds includes a nice utility that works fine and kill the telnet connection.  I sniffed the solar winds utility and it appears it grabs the tcp session table from the router and then sends the tcp reset packet to the router (with spoofed source ip of my machine of course).   I know how to generate the raw packet with packetx and vb6 which works fine, question is what specific fields are REQUIRED to be correct for a reset to work?  I think my problem lies in the ack number window number or sequence number...Any hardcore techies want to try this one??
LVL 1
bluedragon99Asked:
Who is Participating?
 
Rich RumbleSecurity SamuraiCommented:
Sequence number is probably the problem, you have to be within a certain window with TCP in order for it to be accepted by the stack. This is the issue has recently gained much attention the last few days (eerie you bring thins up). The issue has existed for some time, someone finally started to get anxious and get the community to get involved to patch this up. I've been contacting all our internet carriers and getting the md5's configured all week.
http://www.uniras.gov.uk/vuls/2004/236929/index.htm
http://cisco.com/en/US/products/products_security_advisory09186a008021bc62.shtml

http://ciac.llnl.gov/ciac/bulletins/j-008.shtml (about the sequence numbers)

TCP RFC (standard) http://www.faqs.org/rfcs/rfc793.html
Section 3 is where you'll find the valuable info... specifically 3.3
3.3.  Sequence Numbers

  A fundamental notion in the design is that every octet of data sent
  over a TCP connection has a sequence number.  Since every octet is
  sequenced, each of them can be acknowledged.  The acknowledgment
  mechanism employed is cumulative so that an acknowledgment of sequence
  number X indicates that all octets up to but not including X have been
  received.  This mechanism allows for straight-forward duplicate
  detection in the presence of retransmission.  Numbering of octets
  within a segment is that the first data octet immediately following
  the header is the lowest numbered, and the following octets are
  numbered consecutively.
GL!
-rich
0
 
bluedragon99Author Commented:
Yup I just got a cert notice about it a few days ago..although I have been working on this for quite some time it was strange...
0
 
mgbyrne2004Commented:
*** advertising removed by Netminder, Site Admin ***
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.