How to prevent Windows from sending RST packet when trying to connect to somebody via Pcap.net?

前端 未结 3 779
盖世英雄少女心
盖世英雄少女心 2021-01-05 12:06

I\'m trying to use Pcap.Net to open a tcp connection.

I\'m sending following package:

\"SYN

3条回答
  •  忘掉有多难
    2021-01-05 12:26

    Either by using Boring Old Winsock to make a TCP connection to the server, rather than constructing your own TCP-over-IP-over-Ethernet packets and sending them to a server, or by somehow convincing the Windows Internet protocol stack to ignore the SYN+ACK (and all subsequent packets) you get from the server, so that it doesn't see the SYN+ACK from the server, notice that no process has tried to set up a TCP connection from 192.168.1.3:12456 to 192.168.1.1:80 using the standard in-kernel networking stack (i.e., nobody's tried to set it up using Boring Old Winsock), and send back an RST to tell the server that there's nobody listening at port 12456 on the machine.

    You might be able to do the latter using WinDivert. It does not itself appear to have a .NET wrapper, so you might have to look for one if you're going to use .NET rather than Boring Old Unmanaged C or Boring Old Unmanaged C++.

提交回复
热议问题