Sending my own TCP packet / the RST problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi.

I am trying to send some TCP packets where I am building the packet
myself with IP header, TCP header and TCP payload.

I am currently sending the packet with a SOCK_RAW and using the
IP_HDRINCL option. Sending the SYN works fine, but when I recieve the
SYN/ACK, the TCP stack in windows replies with a RST which of cause
destroys the connection. I know that this happends because the TCP
stack does not know that I have sent the SYN and then it thinks
something is wrong when seeing the SYN/ACK.

The question is: How do you do this stuff on Windows then? I dont
strictly need to build the IP header myself, but I need to build the
TCP header. Can I make this work by using winsock in any way and if
not, how do you typically do something like this on Windows?

Thanks for your time reading (and hopefully replying on) this message.

--

Rune Simonsen

.



Relevant Pages

  • Re: Wrong TCP/IP checksum on server side?
    ... One point to know is that Etherreal running on the host that sends a packet ... My TCP packets get dropped on the server ... > TCP checksum on server side is wrong? ... > modified anything in the TCP header and TCP data. ...
    (microsoft.public.development.device.drivers)
  • Re: Getting a Machines Uptime Remotely
    ... The UPTIME is from the Timestamp of a TCP packet. ... Windows will provide TCP timestamp information, ...
    (Pen-Test)
  • attempting to troubleshoot for customer
    ... see that port numbers and other TCP parameters of this packet are ... and destination port, two 2-byte values that start every TCP header, are ... TCP header, but IP header and TCP payload ...
    (comp.arch.embedded)
  • Re: Sending my own TCP packet / the RST problem
    ... > I am trying to send some TCP packets where I am building the packet ... TCP header and TCP payload. ... How do you do this stuff on Windows then? ...
    (microsoft.public.win32.programmer.networks)
  • Re: Wrong TCP/IP checksum on server side?
    ... Do i need to adjust the TCp checksum, if i only modify the IP header. ... >> modified anything in the TCP header and TCP data. ...
    (microsoft.public.development.device.drivers)