Pentest Tools

Published on March 1st, 2016 📆 | 5854 Views ⚑


Libcrafter — High Level Network Packet Sniffing

C++  High Level Network Packet Sniffing and Crafting Library

Libcrafter is a high level library for C++ designed to create and decode network packets. It is able to craft or decode packets of most common networks protocols, send them on the wire, capture them and match requests and replies. It enables the creation of networking tools in a few lines with a interface very similar to Scapy. A packet is described as layers that you stack one upon the other. Fields of each layer have useful default values that you can overload.

[adsense size='1']

The library is designed to be used in multithreaded programs where you can combine several tasks simultaneously. For example, you can easily design something that sniffs, mangles, and sends at the same time you are doing an ARP-Spoofing attack. It also contains a very naive implementation of the TCP/IP stack (fragmentation is no handled yet) at user level that enables working with TCP streams. This facilitates the creation of tools for data injection on arbitrary connections, IP spoofing and TCP/IP session hijacking.



Before configuring and compiling libcrafter you need lipcap installed in your system. On debian based distros, you should execute:

# apt-get install libpcap0.8 libpcap0.8-dev

To compile libcrafter from the git repository you should have autoconf and libtool installed in your system :

$ sudo apt-get install autoconf libtool

Clone the repository and compile the library :

$ git clone
 $ cd libcrafter/libcrafter
 $ ./
 $ make
 $ sudo make install
 $ sudo ldconfig


Supported protocols are

Ethernet, SLL (Linux cooked-mode capture), ARP, DHCP, DHCP options, IP, IP options, IPv6, ICMP, ICMPv6, ICMP extensions, ICMPv6 extensions, TCP, TCP options, UDP and DNS

[adsense size='4']

Source && Download

Leave a Reply

Your email address will not be published.