Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Coding an Ip spoofer


ghost's Avatar
0 0

Does anyone know how to code an ip spoofer? Peferably in java,c#,c or c++?


techb's Avatar
Member
0 0

For this you will need to either use proxies, or craft your own packets to send.

There are plenty of ways to craft your own packets. Java Python

Hping can also aid in spoofing.


j4m32's Avatar
Member
0 0

Sorry to say it, but the OP could have googled for half of the answer to this… but anyway…

As far as I am aware, a proxy doesn't exactly serve the same function as "IP Spoofing" but rather does make it a little harder to find the end clients' IP address.

Assuming you are talking about IPv4, and know a little bit about IPv4 structure for a datagram. (If not see Wikipedia for a diagram or look for the structure definition which I think is in the header file for winsock.h (Windows) or sys/socket.h (UNIX/Linux) in C/C++)

In Java there is no "native way" of modifying packet headers as the virtual machine is abstract of the implementation for the platform underneath.

However your answer lies in using raw sockets to change the "Source IP" and maybe even the MAC field(s) of the IP Header. You'll probably end up writing this in C / C++, which you could also write as a library which you could interface with Java (I am lead to believe).

Link that maybe useful: http://www.citi.umich.edu/u/provos/security/ipspoof.1

Hope this helps!

Jim,


fuser's Avatar
Member
0 -1

I don't think Java would be a good language for this kind of applications, and since I'm a java nut (get it?) it's a bit of a bummer.

I once asked this kind of question at a different forum, although the application I had in mind was just to generate and ping the IP's generated by the application, and they informed me that since Java was designed to be hardware-independent , it's going to be hard to write an application that will work directly with your ethernet card, so unless you have a hardware library installed as well.

But since techb has already provided you with the answer, you might as well take a look at the code and see how it's done. I'd recommend you have some knowledge in network programming in Java, though.