Spike is a protocol fuzzer creation kit. It provides an API for creating your own fuzzers for network protocols, using the C++ language. SPike provides a series of basic commands for generating fuzzed messages to be sent to a network service.
Scriptiong SPIKE
For TCP-based server applications, we use scrpit .spk with the generic_send_tcp interpreter (preinstalled on Kali Linux). The basic syntax is :
SKIPVAR: Skip one or more variables s_string_variable
SKIPSTR: Skip a number of automatically generated strings
So, to start a classic fuzzing from the beginning, you can use the following command:
Main SPIKE commands
SPIKE scripts use primitives to define the messages to be sent. Here are the most useful ones, grouped by category:
Character strings
1 2 3
s_string("Hello"); // Adds the "Hello" string s_string_repeat("A", 200); // Repeats "A" 200 times s_string_variable("payload"); // Inserts a fuzzed string
s_block_start("bloc1"); // Beginning of a named block*. s_block_end("bloc1"); // End of block s_blocksize_string("bloc1", 2); // Size in 2 ASCII characters s_binary_block_size_byte("bloc1"); // Size in 1 byte