In this guide I’ll describe using the Myricom libpcap support. I’m going to assume you installed the card properly, installed the Sniffer driver and made sure that all works. Make sure that in your dmesg you see that the card is in sniffer mode:
In this guide I'll describe using the Myricom libpcap support. I'm going to assume you installed the card properly, installed the Sniffer driver and made sure that all works. Make sure that in your dmesg you see that the card is in sniffer mode:
::
@ -13,7 +13,7 @@ In this guide I’ll describe using the Myricom libpcap support. I’m going to
I have installed the Myricom runtime and libraries in /opt/snf
Compile Suricata against Myricom’s libpcap:
Compile Suricata against Myricom's libpcap:
::
@ -23,7 +23,7 @@ Compile Suricata against Myricom’s libpcap:
make
sudo make install
Next, configure the amount of ringbuffers. I’m going to work with 8 here, as my quad core + hyper threading has 8 logical CPU’s. *See below* for additional information about the buffer-size parameter.
Next, configure the amount of ringbuffers. I'm going to work with 8 here, as my quad core + hyper threading has 8 logical CPUs. *See below* for additional information about the buffer-size parameter.
::
@ -35,7 +35,7 @@ Next, configure the amount of ringbuffers. I’m going to work with 8 here, as m
buffer-size: 512kb
checksum-checks: no
The 8 threads setting makes Suricata create 8 reader threads for eth5. The Myricom driver makes sure each of those is attached to it’s own ringbuffer.
The 8 threads setting makes Suricata create 8 reader threads for eth5. The Myricom driver makes sure each of those is attached to its own ringbuffer.
If you want 16 ringbuffers, update the “threads” variable in your yaml to 16 and start Suricata:
If you want 16 ringbuffers, update the "threads" variable in your yaml to 16 and start Suricata:
::
@ -56,7 +56,7 @@ Note that the pcap.buffer-size yaml setting shown above is currently ignored whe
::
“The libpcap interface to Sniffer10G ignores the pcap_set_buffer_size() value. The call to snf_open() uses zero as the dataring_size which informs the Sniffer library to use a default value or the value from the SNF_DATARING_SIZE environment variable."
"The libpcap interface to Sniffer10G ignores the pcap_set_buffer_size() value. The call to snf_open() uses zero as the dataring_size which informs the Sniffer library to use a default value or the value from the SNF_DATARING_SIZE environment variable."
The following pull request opened by Myricom in the libpcap project indicates that a future SNF software release could provide support for setting the SNF_DATARING_SIZE via the pcap.buffer-size yaml setting:
@ -12,7 +12,7 @@ The content keyword is very important in signatures. Between the
quotation marks you can write on what you would like the signature to
match. The most simple format of content is::
content: ”............”;
content: "............";
It is possible to use several contents in a signature.
@ -38,7 +38,7 @@ There are characters you can not use in the content because they are
already important in the signature. For matching on these characters
you should use the heximal notation. These are::
“ |22|
" |22|
; |3B|
: |3A|
| |7C|
@ -46,16 +46,16 @@ you should use the heximal notation. These are::
It is a convention to write the heximal notation in upper case characters.
To write for instance ``http://`` in the content of a signature, you
should write it like this: ``content: “http|3A|//”;`` If you use a
should write it like this: ``content: "http|3A|//";`` If you use a
heximal notation in a signature, make sure you always place it between
pipes. Otherwise the notation will be taken literally as part of the
content.
A few examples::
content:“a|0D|bc”;
content:”|61 0D 62 63|";
content:”a|0D|b|63|”;
content:"a|0D|bc";
content:"|61 0D 62 63|";
content:"a|0D|b|63|";
It is possible to let a signature check the whole payload for a match with the content or to let it check specific parts of the payload. We come to that later.
If you add nothing special to the signature, it will try to find a match in all the bytes of the payload.