Saturday, September 3, 2011

ARP spoofing using libtins

This is an example program I created to test libtins, a library I've been developing with some colleagues. This library allows the user to forge packets, from link layer to transport or even application layer, in C++ by creating their own PDU stack and sending them without worrying about raw sockets, endianness, nor low level socket handling.

To use this program, compile it and link it with libtins. Using GNU C++ compiler, this could be done this way:
g++ -o arpspoofing arpspoofing.cpp -ltins

And then execute it using the gateway and victim's IP addresses as arguments, for example:
./arpspoofing 192.168.0.1 192.168.0.100
This code snippet is included as an example in libtins source code, inside the examples folder. You can have a look at it online here.

No comments:

Post a Comment