<div dir="ltr"><div dir="ltr">Both TCP and IP include checksums to validate packets have not been corrupted <a href="https://locklessinc.com/articles/tcp_checksum/">https://locklessinc.com/articles/tcp_checksum/</a> <a href="https://en.wikipedia.org/wiki/IPv4_header_checksum">https://en.wikipedia.org/wiki/IPv4_header_checksum</a>. For your question "Can I send messages back to my own NIC" I would say it probably depends on the NIC but I wouldn't rely on it working for most NICs.</div><div dir="ltr"><br></div><div>Overall I think this would be significantly easier for you if you didn't use winpcap at all, why not just change the IP and MAC of your adapter directly and receive the packets straight to the HTTP server <a href="https://docs.microsoft.com/en-us/powershell/module/netadapter/set-netadapter?view=win10-ps">https://docs.microsoft.com/en-us/powershell/module/netadapter/set-netadapter?view=win10-ps</a>? Even if you wanted to do other things it's significantly easier to combine adapter mac spoofing & Windows IP sockets than it is to do everything manually at layer 2 from winpcap. If you insist on using winpcap I'd first make sure you test sending a customized TCP packet between 2 PCs before trying to do it all local as it will be easier to troubleshoot where things are getting dropped.<br></div><div><br></div><div>Daniel Smith</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 22, 2018 at 5:24 PM Reznicencu Sergiu <<a href="mailto:sergiureznicencu@gmail.com">sergiureznicencu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi. I am trying to divert all traffic from a pc to my own. But when doing so I will modify the receiving packets to look as if the request was specially made for my computer on which I run a http server. To do this I receive spoofed packets, I change mac and ip to my own and resend them back  with pcap_sendpacket(). But the computer just refuses to accept the first SYN packet. I made a side by side comparison between an authentic request to my webserver and a fake one. I couldn’t see much of a difference. Is there any problem with theory? Can I send messages back to my own NIC? Thanks in advance.</p>
_______________________________________________<br>
Winpcap-users mailing list<br>
<a href="mailto:Winpcap-users@winpcap.org" target="_blank">Winpcap-users@winpcap.org</a><br>
<a href="https://www.winpcap.org/mailman/listinfo/winpcap-users" rel="noreferrer" target="_blank">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>
</blockquote></div>