473,396 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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_sendpacket()) 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 3192

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
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 =...
3
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++....
15
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...
4
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...
6
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
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...
9
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
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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,...

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.