473,597 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RAW network programming under Windows

RAW network programming under Windows it's not always possible because
of the security limitations that microsoft introduced in the latest
Windows versions and that affects WinSocket API.
On UNIX systems I'm able to freely send raw packets (for example I'm
able to compile IP packets with a src address defined by me) through
raw socket API, but if I do the same on a Windows system socket module
raises an error.

Now I'm searching for something different from raw socket api, an
extension module able to send arbitrary RAW packets through the
network.
I noticed that WinPcap (http://www.winpcap.org/) has a function to do
that (pcap_sendpacke t()) so I started to search a Python wrapping for
WinPcap.
I found:
pcapy: http://oss.coresecurity.com/projects/pcapy.html
pypcap: http://www.monkey.org/~dugsong/pypcap/
....but none of them include a wrap for pcap_sendpacket () function.

Does someone know if exist a *complete* Python wrapping of WinPcap
library?

Nov 5 '06 #1
3 3203

billie wrote:
RAW network programming under Windows it's not always possible because
of the security limitations that microsoft introduced in the latest
Windows versions and that affects WinSocket API.
On UNIX systems I'm able to freely send raw packets (for example I'm
able to compile IP packets with a src address defined by me) through
raw socket API, but if I do the same on a Windows system socket module
raises an error.
You can try to install "Windows Services for Unix 3.5" (aka SFU 3.5).
It transforms your Windows into a certified UNIX (not just a Unix
clone). SFU 3.5 has a full BSD socket API (derived from OpenBSD), not
just Winsock. As the POSIX subsystem in SFU 3.5 is not layered on top
of the Win32 subsystem, but talks directly to the NT kernel,
restrictions in Winsock should not affect the BSD sockets in SFU 3.5.
This behaviour is different from e.g. Cygwin, where the "Unix APIs" are
layered on top of the Win32 subsystem.

In any case, I hope you are aware that spoofing IP packets gives you
bad karma.

Nov 5 '06 #2

sturlamolden wrote:
billie wrote:
RAW network programming under Windows it's not always possible because
of the security limitations that microsoft introduced in the latest
Windows versions and that affects WinSocket API.
On UNIX systems I'm able to freely send raw packets (for example I'm
able to compile IP packets with a src address defined by me) through
raw socket API, but if I do the same on a Windows system socket module
raises an error.

You can try to install "Windows Services for Unix 3.5" (aka SFU 3.5).
It transforms your Windows into a certified UNIX (not just a Unix
clone). SFU 3.5 has a full BSD socket API (derived from OpenBSD), not
just Winsock. As the POSIX subsystem in SFU 3.5 is not layered on top
of the Win32 subsystem, but talks directly to the NT kernel,
restrictions in Winsock should not affect the BSD sockets in SFU 3.5.
This behaviour is different from e.g. Cygwin, where the "Unix APIs" are
layered on top of the Win32 subsystem.

In any case, I hope you are aware that spoofing IP packets gives you
bad karma.
Hey, there are a few uses for spoofing source addresses.
Anyway, I didn't know that SHU replaced ( or added to) the stack.
I'll have to give SFU a try.
Thanks.

Nov 6 '06 #3
sturlamolden wrote:
You can try to install "Windows Services for Unix 3.5" (aka SFU 3.5).
It transforms your Windows into a certified UNIX (not just a Unix
clone). SFU 3.5 has a full BSD socket API (derived from OpenBSD), not
just Winsock. As the POSIX subsystem in SFU 3.5 is not layered on top
of the Win32 subsystem, but talks directly to the NT kernel,
restrictions in Winsock should not affect the BSD sockets in SFU 3.5.
This behaviour is different from e.g. Cygwin, where the "Unix APIs" are
layered on top of the Win32 subsystem.
It isn't exactly what I'm searching for but thanks anyway.
In any case, I hope you are aware that spoofing IP packets gives you
bad karma.
No problem about it. I'm just a lover of low-level network programming.
=)

Nov 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
50558
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") sPwd = inputbox("Enter password") WshNetwork.MapNetworkDrive "J:", "\\server1\data", false, "xyz_net\John", sPwd Msgbox "Drives has been map successful"
3
14857
by: Jay | last post by:
Hi, I implemeneted an FTP client and server long time back using Java. I found sockets porgramming in java quite useful and easy to handle. I now wanted to implement a similar program using C++. My questions are 1. How good a language is C++ for network programming? 2. what are good onine resources to learn C++ network programming? 3. How similar it is to Java socket programming? Thanks in advance.
15
416
by: Bonj | last post by:
Hi I'd like a way of communicating over a network that doesn't rely on vendor-specific libraries, preferably that will work on both windows and linux (the ideal solution would be one that compiles on windows and linux, but the absolute ideal one would be one that also enables windows to communicate *with* linux in realtime, but that's a pipe dream as yet...) Nothing too fancy, the amounts of data won't be great. Just open a connection on...
4
1706
by: Wayne M J | last post by:
I have "Professional .Net Network Programming" and "Network Programming for MS Windows 2nd Ed", but I find both of these to be lacking in what I am looking for. Has there been any books printed on serious network programming for C# that deals with the IP Helper routines?
6
639
by: Eric | last post by:
Does anyone know of any GOOD network programming book(s) that are C# based, as well as any online tutorials and forums on network programming? Thanks
6
2712
by: DanielJohnson | last post by:
I have done some regular C programming and still learning. I was wondering if you could guide me through good resources for thread programming and socket programming in C. I have done something in python but now I want to do it in C. Every help is appreciated.
9
2365
by: Mex | last post by:
Hi, I'm looking for a good book for beginners about Network Programming. Besides Stevens' book, I would like something specific for C++ language. Any suggestions? Thanks in advantage, Massimo
1
20593
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call to WSACancelBlockingCall"
1
3863
by: =?Utf-8?B?SmJhcmJlcg==?= | last post by:
All users in my XP Professional PC were able to print to a network printer until now. Now, the only account that can print to the network printer is the admin account. I have an HP PSC 2200 series PC. The PC is shared in a PC running windows 98. I have printing and file sharing enable in the windows 98 PC. I have also installed Norton 360, but I do not think this is the problem as I uninstalled Norton 360 and limited user accounts were...
0
7894
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8262
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6706
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3937
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.