Вопрос

I am developing a TCP protocol fuzzing software under Windows 7. I wanna to send self constructed TCP packet using Raw Sockets. But it seems that Microsoft forbid this for some security reasons. (http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548(v=vs.85).aspx)

I know WinPcap can also send custom packets. But I don't want to build a packet from the Ethernet level. The parameters for Ethernet and IPv4 are so complex and drive me crazy. I only cares about the TCP above parts. Are there any solutions to workaround this? All I can think out is to change my Win7 to Windows 2008 R2, but it's a big project to do. I hope there are better ways?

Это было полезно?

Решение

After Windows XP Service Pack 1, the ability to send raw sockets has been disabled, however you can still read them.

You can modify the source code example provided by Microsoft in the WDK to enable raw sends again. For more information, check the link.

PCAUSA - How To Access To NIC Drivers From A Win32 Application

Alternatively, you may use WinPcap to inject packets into the network.

WinPcap

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top