Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to workaround the "Limitations on Raw Sockets" under Windows 7?

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?

like image 220
hsluoyz Avatar asked Oct 17 '25 10:10

hsluoyz


1 Answers

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

like image 198
Jeremiah Avatar answered Oct 19 '25 02:10

Jeremiah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!