Questions tagged [libcrafter]

Libcrafter is a high level library for C++ designed to make easier the creation and decoding of network packets.

Libcrafter is a high level library for C++ designed to make easier the creation and decoding of network packets. It is able to craft or decode packets of most common network 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 an 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.

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 makes easier the creation of tools for data injection on arbitrary connections, IP spoofing and TCP/IP session hijacking.

Documentation

6 questions
2
votes
0 answers

c++ segmentation fault in libcrafter

I am using the library Crafter in my c++ program. When calling the function Crafter::GetMAC("192.168.1.10", "eth0"); I receive a Segmentation Fault, I looked into this method, which calls some other methods. The call stack is as follows: -…
wasp256
  • 5,943
  • 12
  • 72
  • 119
1
vote
0 answers

arp cache poisoning not persistent

I am trying to craft an ARP reply and send it (broadcast) to make every hosts on the network believe that a single host has a fake MAC address. For instance, the target host to "isolate" is at 192.168.3.6 and has MAC 00:11:22:33:44:55. And my…
selfm
  • 101
  • 1
  • 9
0
votes
0 answers

What causes the following error message, "friend declaration of 'ConnectHandler' does not match any declaration in namespace 'Crafter'"?

I was working on a project that links to libcrafter (Version 0.2), today. When I build this project with g++ (5.4), there were no problems. I'm working on switching to clang-8, so I set CC and CXX to clang, clang++ respectively, ran a cmake, and…
batbrat
  • 5,155
  • 3
  • 32
  • 38
0
votes
1 answer

string <-> byte[] conversions

I'm implementing a system that uses libcrafter and crypto++ to transmit specific frames on the network. But the problem I'm stuck with isn't at this level at all. It's about conversion between types used in these libraries. 1) At the emission…
3isenHeim
  • 243
  • 5
  • 22
0
votes
2 answers

SecByteBlock to string conversion errors

I have to send a randomly generated number (rng) within a packet, and, thus, have to convert a SecByteBlock. I use libcrafter to put rng array into a RawLayer packet. I followed this answer; but it gets me an invalid conversion error. Here's the…
3isenHeim
  • 243
  • 5
  • 22
0
votes
2 answers

Namespace Conflict libcrafter/Pcap++

I'm trying to make an homemade system for exchanging packets, especially on layer 2 without anything above, on CentOS... I use libcrafter to build packets pcap++ to sniff packets (crypto++ to ensure a minimal security - off topic for this…
3isenHeim
  • 243
  • 5
  • 22