]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
7 years agogithub: codeowners syntax fixes 2917/head
Victor Julien [Sat, 30 Sep 2017 14:50:47 +0000 (16:50 +0200)] 
github: codeowners syntax fixes

7 years agogithub: add codeowners file 2912/head
Victor Julien [Sat, 30 Sep 2017 11:13:58 +0000 (13:13 +0200)] 
github: add codeowners file

Initial version.

See https://help.github.com/articles/about-codeowners/

7 years agotemplate: fix decoder setup script 2900/head
Victor Julien [Wed, 6 Sep 2017 12:56:06 +0000 (14:56 +0200)] 
template: fix decoder setup script

7 years agotemplate: fix setup detect script
Victor Julien [Mon, 4 Sep 2017 19:03:56 +0000 (21:03 +0200)] 
template: fix setup detect script

7 years agotemplate: minor updates
Victor Julien [Mon, 4 Sep 2017 12:54:24 +0000 (14:54 +0200)] 
template: minor updates

Merge inspect engine into keyword

7 years agodns: fix last timestamp handling
Derek [Thu, 7 Sep 2017 03:23:25 +0000 (20:23 -0700)] 
dns: fix last timestamp handling

Fixes incorrect variable in ticket #2207

In app-layer-dns-tcp.c in the DNSTCPResponseParse function
a variable is set to last_req when it should be last_resp.
This makes it consistent with UDP DNS response parsing.

7 years agoaf-packet: free bpf program
Eric Leblond [Mon, 18 Sep 2017 18:30:20 +0000 (20:30 +0200)] 
af-packet: free bpf program

This fixes a small memory leak when Suricata is running with a
BPF filter.

7 years agoaf-packet: call thread deinit function
Eric Leblond [Mon, 18 Sep 2017 18:24:29 +0000 (20:24 +0200)] 
af-packet: call thread deinit function

7 years agoprscript: update docker code
Eric Leblond [Sat, 9 Sep 2017 09:13:29 +0000 (11:13 +0200)] 
prscript: update docker code

Update docker code to latest docker python API. This patch
preserves backwrd compatibility with older versions.

7 years agodoc: reflect most recent cpu affinity settings 2890/head
Andreas Herz [Sat, 9 Sep 2017 21:22:06 +0000 (23:22 +0200)] 
doc: reflect most recent cpu affinity settings

Some settings like output-cpu-set never been used and detect got renamed
to worker. This reflects those changes already present in the yaml also
within the documentation.

7 years agoapp-layer-ssl: fix bug with >255 records in one stream 2882/head
Mats Klepsland [Wed, 9 Aug 2017 19:07:03 +0000 (21:07 +0200)] 
app-layer-ssl: fix bug with >255 records in one stream

7 years agorule-parser: bump sids within siggroup test
Andreas Herz [Fri, 11 Aug 2017 21:53:55 +0000 (23:53 +0200)] 
rule-parser: bump sids within siggroup test

7 years agorule-parser: detect duplicate rev keyword
Andreas Herz [Fri, 11 Aug 2017 21:25:44 +0000 (23:25 +0200)] 
rule-parser: detect duplicate rev keyword

7 years agorule-parser: detect duplicate sid keyword
Andreas Herz [Fri, 11 Aug 2017 21:24:22 +0000 (23:24 +0200)] 
rule-parser: detect duplicate sid keyword

7 years agorule-parser: detect duplicate classtype keyword
Andreas Herz [Fri, 11 Aug 2017 21:11:46 +0000 (23:11 +0200)] 
rule-parser: detect duplicate classtype keyword

7 years agoafpacket: free ring mem on error
Victor Julien [Tue, 29 Aug 2017 10:57:53 +0000 (12:57 +0200)] 
afpacket: free ring mem on error

7 years agoBug #2201: af_packet - treat BPF filter error as fatal 2880/head
Alexander Gozman [Sun, 20 Aug 2017 12:22:34 +0000 (15:22 +0300)] 
Bug #2201: af_packet - treat BPF filter error as fatal

There is no need to try to set erroneous BPF filter again and again. Such attempts
lead to constant mmap() calls without corresponding munmap() when 'use-mmap' is enabled.

8 years agoredis: support for rpush in list mode 2868/head
Julian [Fri, 2 Jun 2017 15:34:44 +0000 (17:34 +0200)] 
redis: support for rpush in list mode

This adds a new redis mode rpush. Also more consistent config keywords orientated at the redis command: lpush and publish.
Keeping list and channel config keywords for backwards compatibility

8 years agoapp-layer-tls: don't decode client certificates
Mats Klepsland [Wed, 2 Aug 2017 12:49:43 +0000 (14:49 +0200)] 
app-layer-tls: don't decode client certificates

Decoding client certificate overwrites the validity dates from the
server certificate, so we therefore don't decode it, since we don't
do anything with it (right now) anyway.

Fixes Bug #2050

8 years agoRust/Lua: cast value to arch-dependant type (fix build on x86, #2197)
Pierre Chifflier [Wed, 2 Aug 2017 08:00:07 +0000 (10:00 +0200)] 
Rust/Lua: cast value to arch-dependant type (fix build on x86, #2197)

8 years agonapatech: Implementation of packet counters 2862/head
Phil Young [Mon, 17 Jul 2017 14:59:00 +0000 (10:59 -0400)] 
napatech: Implementation of packet counters

added util-napatech module which contains implementation threads
for processing statistics.  And modified source-napatech and
runmode-napatech to instantiate the threads.

napatech: Implementation of packet counters

napatech: implementation of statistics counters

napatech: Implementation of packet counters.

napatech: added util-napatech module

napatech: added utils-napatech module.

added include declaration and napatech specific structure when HAVE_NAPATECH
is defined.

Added util-napatech module to project.

8 years agonapatech: configuration changes.
Phil Young [Mon, 17 Jul 2017 14:11:26 +0000 (10:11 -0400)] 
napatech: configuration changes.

Added comments describing parameter usage.
Changed example to use range formatting of streams.

8 years agonapatech: Added section describing packet counters.
Phil Young [Mon, 17 Jul 2017 14:08:02 +0000 (10:08 -0400)] 
napatech: Added section describing packet counters.

8 years agonapatech: Added description of hba usage.
Phil Young [Mon, 17 Jul 2017 14:03:44 +0000 (10:03 -0400)] 
napatech: Added description of hba usage.

8 years agodetect-msg: cleanup error message
Victor Julien [Tue, 1 Aug 2017 08:13:10 +0000 (10:13 +0200)] 
detect-msg: cleanup error message

8 years agorule-parser: ignore duplicated msg keyword
Andreas Herz [Sat, 29 Jul 2017 22:14:50 +0000 (00:14 +0200)] 
rule-parser: ignore duplicated msg keyword

8 years agoupdated fedora libevent package names 2861/head
jason taylor [Mon, 31 Jul 2017 15:41:19 +0000 (11:41 -0400)] 
updated fedora libevent package names

Signed-off-by: jason taylor <jtfas90@gmail.com>
8 years agochangelog: update for 4.0.0 suricata-4.0.0
Victor Julien [Thu, 27 Jul 2017 07:02:12 +0000 (09:02 +0200)] 
changelog: update for 4.0.0

8 years agodoc: add rust and update version in install
Victor Julien [Wed, 26 Jul 2017 14:08:05 +0000 (16:08 +0200)] 
doc: add rust and update version in install

8 years agodcerpc: improve stub buffer handling 2857/head
Victor Julien [Mon, 24 Jul 2017 08:11:20 +0000 (10:11 +0200)] 
dcerpc: improve stub buffer handling

Stub data buffer could grow without limit depending on traffic.

This patch improves the handling. It honors the 'last frag' setting
and implements a hard limit of 1MB per buffer.

Bug #2186

8 years agodcerpc: cleanup, remove unused field
Victor Julien [Fri, 21 Jul 2017 11:18:21 +0000 (13:18 +0200)] 
dcerpc: cleanup, remove unused field

8 years agoafl: add dcerpc entry points
Victor Julien [Fri, 21 Jul 2017 10:38:49 +0000 (12:38 +0200)] 
afl: add dcerpc entry points

Add for requests and mix of request/responses.

Implement storing the files to disk and rereading them.

8 years agostream/bypass: more liberal policy if no detection
Victor Julien [Mon, 24 Jul 2017 16:48:23 +0000 (18:48 +0200)] 
stream/bypass: more liberal policy if no detection

The reason the stream engine can't easily decide to bypass streams
is that there can be non-stream dependent rules that wouldn't match
if bypassing is done too aggressively.

However, if there is no detection engine, there is no reason to hold
back. In this case we can bypass as soon as the stream engine is done
with a session.

8 years agoaf-packet: optimize BPF
Eric Leblond [Fri, 30 Jun 2017 13:00:40 +0000 (15:00 +0200)] 
af-packet: optimize BPF

This patch turn on code optimization on BPF filter building by
libpcap. This allow to reduce the size of the BPF bytecode and
thus increase the size of BPF filter supported by Suricata.

Reported-by: Martijn van Oosterhout
8 years agoapp-layer-ssh: trigger bypass when done
Eric Leblond [Thu, 20 Jul 2017 08:19:01 +0000 (10:19 +0200)] 
app-layer-ssh: trigger bypass when done

Trigger bypass when application layer will not inspect anymore.

8 years agoautogen: cleanup rust strict warning 2854/head
Jason Ish [Mon, 24 Jul 2017 16:40:53 +0000 (10:40 -0600)] 
autogen: cleanup rust strict warning

8 years agoSample systemd unit file for Suricata.
Jason Ish [Thu, 20 Jul 2017 20:53:09 +0000 (14:53 -0600)] 
Sample systemd unit file for Suricata.

Create a sample systemd unit file based on the build time
configuration.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2138

8 years agoSample logrotate configuration file.
Jason Ish [Mon, 24 Jul 2017 15:14:17 +0000 (09:14 -0600)] 
Sample logrotate configuration file.

Create a sample logrotate configuration file with filenames
set for the configuration.

8 years agodetect: more gracefully handle mpm prepare failure 2850/head
Victor Julien [Wed, 19 Jul 2017 10:45:39 +0000 (12:45 +0200)] 
detect: more gracefully handle mpm prepare failure

Exit with error instead of using the detection engine in a broken state.

Bug #2187

8 years agodetect: reject dsize rules that can't match
Victor Julien [Wed, 19 Jul 2017 10:16:48 +0000 (12:16 +0200)] 
detect: reject dsize rules that can't match

Rules can contain conflicting statements and lead to a unmatchable rule.

2 examples are rejected by this patch:

1. dsize < content
2. dsize < content@offset

Bug #2187

8 years agoUpdate public-data-sets.rst with stratosphere project
Sebastian Garcia [Fri, 14 Jul 2017 14:30:48 +0000 (16:30 +0200)] 
Update public-data-sets.rst with stratosphere project

Add the datasets of the Stratosphere project to the list.

8 years agomingw: don't try to build unix socket
Victor Julien [Sat, 15 Jul 2017 08:00:57 +0000 (10:00 +0200)] 
mingw: don't try to build unix socket

8 years agowindows: use wpcap instead of pcap
Victor Julien [Sat, 15 Jul 2017 07:48:40 +0000 (09:48 +0200)] 
windows: use wpcap instead of pcap

Windows pcap libraries such as winpcap all use a library name of
wpcap instead of just pcap. Support this in configure.

8 years agowin32: minor compile warning fixes
Victor Julien [Mon, 17 Jul 2017 08:09:01 +0000 (10:09 +0200)] 
win32: minor compile warning fixes

8 years agomingw: fix random function
Victor Julien [Fri, 14 Jul 2017 19:12:50 +0000 (21:12 +0200)] 
mingw: fix random function

8 years agococci: add test to check for uint use
Victor Julien [Fri, 14 Jul 2017 19:06:37 +0000 (21:06 +0200)] 
cocci: add test to check for uint use

uint is non-standard and not supported by MinGW. So ban it's use.

spatch file by Eric Leblond.

8 years agocleanup: remove all uint use
Victor Julien [Fri, 14 Jul 2017 19:03:04 +0000 (21:03 +0200)] 
cleanup: remove all uint use

8 years agococci: ban memmem
Victor Julien [Fri, 14 Jul 2017 19:30:36 +0000 (21:30 +0200)] 
cocci: ban memmem

8 years agodnp3: use BasicSearch instead of memmem
Jason Ish [Fri, 14 Jul 2017 19:31:10 +0000 (13:31 -0600)] 
dnp3: use BasicSearch instead of memmem

Mingw doesn't support memmem.

8 years agorust: require jansson for rust build
Jason Ish [Fri, 14 Jul 2017 15:09:33 +0000 (09:09 -0600)] 
rust: require jansson for rust build

8 years agotravis: enable strict rust; use rust 1.15.0
Jason Ish [Fri, 14 Jul 2017 14:28:44 +0000 (08:28 -0600)] 
travis: enable strict rust; use rust 1.15.0

Adds --enable-rust-strict to fail on warnings. Also update
the minimum Rust version from 1.7.0 to 1.15.0.

8 years agorust: --enable-rust-strict to turn warnings into errors
Jason Ish [Fri, 14 Jul 2017 14:26:30 +0000 (08:26 -0600)] 
rust: --enable-rust-strict to turn warnings into errors

8 years agodoc: add pid-file section to suricata.yaml doc
Jason Ish [Mon, 17 Jul 2017 21:07:27 +0000 (15:07 -0600)] 
doc: add pid-file section to suricata.yaml doc

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2104

8 years agosuricata.yaml: better comment on pid-file option
Jason Ish [Mon, 17 Jul 2017 20:58:57 +0000 (14:58 -0600)] 
suricata.yaml: better comment on pid-file option

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2104

8 years agodoc: add more details to log rotation doc
Jason Ish [Mon, 17 Jul 2017 20:55:20 +0000 (14:55 -0600)] 
doc: add more details to log rotation doc

8 years agodoc: move log rotation to output section
Jason Ish [Mon, 17 Jul 2017 17:42:18 +0000 (11:42 -0600)] 
doc: move log rotation to output section

8 years agorust/dns/tcp - probe even if payload is short 2838/head
Jason Ish [Thu, 13 Jul 2017 16:28:48 +0000 (10:28 -0600)] 
rust/dns/tcp - probe even if payload is short

As the DNS probe just uses the query portion of a response, don't
require there to be as many bytes as specified in the TCP DNS
header. This can occur in large responses where probe is called
without all the data.

Fixes the cases where the app proto is recorded as failed.

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/2169

8 years agogcc7: format-truncation fix for lua
Victor Julien [Fri, 14 Jul 2017 09:05:51 +0000 (11:05 +0200)] 
gcc7: format-truncation fix for lua

8 years agochangelog: update for 4.0.0-rc2 release suricata-4.0.0-rc2
Victor Julien [Wed, 12 Jul 2017 14:45:41 +0000 (16:45 +0200)] 
changelog: update for 4.0.0-rc2 release

8 years agoder/asn1: limit recursion
Victor Julien [Mon, 10 Jul 2017 08:15:54 +0000 (10:15 +0200)] 
der/asn1: limit recursion

Limit the number of recursive calls in the DER/ASN.1 decoder to avoid
stack overflows.

Found using AFL.

8 years agorust/nfs: implement events 2835/head
Victor Julien [Wed, 12 Jul 2017 08:56:56 +0000 (10:56 +0200)] 
rust/nfs: implement events

Remove lots of panic statements in favor of setting non-fatal events.

Bug #2175.

8 years agoradix: fix risky malloc call 2834/head
Victor Julien [Thu, 13 Jul 2017 08:04:47 +0000 (10:04 +0200)] 
radix: fix risky malloc call

GCC7 said:
  CC       util-radix-tree.o
In file included from util-debug-filters.h:29:0,
                 from util-debug.h:34,
                 from suricata-common.h:421,
                 from util-radix-tree.c:26:
util-radix-tree.c: In function ‘SCRadixAddKey’:
util-mem.h:177:12: error: argument 1 range [1844674407156206796818446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
     ptrmem = malloc((a)); \
     ~~~~~~~^~~~~~~~~~~~~
util-radix-tree.c:749:42: note: in expansion of macro ‘SCMalloc’
             if ( (inter_node->netmasks = SCMalloc((node->netmask_cnt - i) *
                                          ^~~~~~~~
In file included from suricata-common.h:69:0,
                 from util-radix-tree.c:26:
/usr/include/stdlib.h:443:14: note: in a call to allocation function ‘malloc’ declared here
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
              ^~~~~~

scan-build said:
util-radix-tree.c:749:42: warning: Call to 'malloc' has an allocation size of 0 bytes
            if ( (inter_node->netmasks = SCMalloc((node->netmask_cnt - i) *
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util-mem.h:177:14: note: expanded from macro 'SCMalloc'
    ptrmem = malloc((a)); \
             ^~~~~~~~~~~
1 warning generated.

8 years agogcc7: fix format-truncation warnings in runmodes
Victor Julien [Thu, 13 Jul 2017 07:57:40 +0000 (09:57 +0200)] 
gcc7: fix format-truncation warnings in runmodes

Example:

util-runmodes.c: In function ‘RunModeSetIPSAutoFp’:
util-runmodes.c:496:40: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
         snprintf(qname, sizeof(qname), "pickup%d", thread+1);
                                        ^~~~~~~~~~
util-runmodes.c:496:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size16
         snprintf(qname, sizeof(qname), "pickup%d", thread+1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Solved by reducing 'thread' to a uint16_t and limiting the max
thread count to 1024.

8 years agogcc7: fix format truncation warning
Victor Julien [Thu, 13 Jul 2017 07:06:39 +0000 (09:06 +0200)] 
gcc7: fix format truncation warning

detect-rpc.c: In function ‘DetectRpcParse’:
detect-rpc.c:225:50: error: ‘%s’ directive argument is null [-Werror=format-truncation=]
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                                                  ^
util-debug.h:239:77: note: in definition of macro ‘SCLogErr’
             int _sc_log_ret = snprintf(_sc_log_msg, SC_LOG_MAX_LOG_MSG_LEN, __VA_ARGS__);   \
                                                                             ^~~~~~~~~~~
detect-rpc.c:225:17: note: in expansion of macro ‘SCLogError’
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                 ^~~~~~~~~~

8 years agopcap-log: fix path construct check
Victor Julien [Thu, 13 Jul 2017 06:51:30 +0000 (08:51 +0200)] 
pcap-log: fix path construct check

8 years agogcc7: fixes for format string warnings 2833/head
Victor Julien [Wed, 12 Jul 2017 16:44:33 +0000 (18:44 +0200)] 
gcc7: fixes for format string warnings

GCC 7.1.1 on Fedora gave several warnings with -Wimplicit-fallthrough
and -Wformat-truncation

This patch addresses the warnings.

8 years agorust/nfs: improve proto detect 2831/head
Victor Julien [Mon, 10 Jul 2017 09:51:43 +0000 (11:51 +0200)] 
rust/nfs: improve proto detect

8 years agorust/nfs: remove debug rec_size check
Victor Julien [Mon, 10 Jul 2017 08:26:38 +0000 (10:26 +0200)] 
rust/nfs: remove debug rec_size check

Records larger than 40k are perfectly valid.

Bug #2162.

8 years agoproto detect: improve 'failed' handling
Victor Julien [Tue, 11 Jul 2017 09:06:51 +0000 (11:06 +0200)] 
proto detect: improve 'failed' handling

Don't try to call parser for 'failed'. Also don't set one direction
warning if TS is failed and our direction is unknown/complete so failed
as well.

8 years agossl: minor code reformatting
Victor Julien [Tue, 11 Jul 2017 09:06:21 +0000 (11:06 +0200)] 
ssl: minor code reformatting

8 years agoapp-layer: increment flow counter if one sided
Eric Leblond [Sun, 14 May 2017 18:40:51 +0000 (20:40 +0200)] 
app-layer: increment flow counter if one sided

In the case of protocol like SMTP, we detect application layer on
only one side.  Consequence was a missed increment in the flow
counter.

8 years agostream: don't reset state on syn/ack resend
Victor Julien [Mon, 10 Jul 2017 12:33:09 +0000 (14:33 +0200)] 
stream: don't reset state on syn/ack resend

Bug #1958.

The reset was originally created for issue #523, but that works
well without the reset as well.

8 years agodecode: add config option to disable teredo 2827/head
Victor Julien [Fri, 7 Jul 2017 14:32:50 +0000 (16:32 +0200)] 
decode: add config option to disable teredo

Ticket #744.

8 years agostats: print alert count at shutdown 2826/head
Victor Julien [Fri, 7 Jul 2017 11:34:21 +0000 (13:34 +0200)] 
stats: print alert count at shutdown

Bug #1855.

8 years agodetect: fix mix of pass and noalert
Victor Julien [Fri, 7 Jul 2017 10:18:28 +0000 (12:18 +0200)] 
detect: fix mix of pass and noalert

Noalert rules did not apply pass logic to the flow.

Bug #1888.

8 years agolua/alert: expose transaction if available
Victor Julien [Fri, 7 Jul 2017 09:14:04 +0000 (11:14 +0200)] 
lua/alert: expose transaction if available

Bug #1748.

8 years agopcre: fix \xHH issue for http_host
Victor Julien [Fri, 7 Jul 2017 08:57:47 +0000 (10:57 +0200)] 
pcre: fix \xHH issue for http_host

The http_host keyword checks if the regex contains uppercase characters.
This check was rejecting valid syntax in the following format:

    content:"|2E|suricata"; http_host; pcre:"/\x2Esuricata$/W";

This patch addresses this case.

Bug #1957.

8 years agoisdataat: fix mem leak
Victor Julien [Fri, 7 Jul 2017 08:50:01 +0000 (10:50 +0200)] 
isdataat: fix mem leak

8 years agodoc: small typo under '4.3.1.5' section
Abbed [Sat, 1 Jul 2017 22:40:00 +0000 (01:40 +0300)] 
doc: small typo under '4.3.1.5' section

8 years agoUpdate Changelog for 4.0.0-rc1 release suricata-4.0.0-rc1
Victor Julien [Wed, 28 Jun 2017 10:43:44 +0000 (12:43 +0200)] 
Update Changelog for 4.0.0-rc1 release

8 years agodoc: document http-body logging 2819/head
Eric Leblond [Wed, 28 Jun 2017 11:56:43 +0000 (13:56 +0200)] 
doc: document http-body logging

8 years agooutput-json-alert: fix error handling
Eric Leblond [Mon, 26 Jun 2017 16:19:39 +0000 (18:19 +0200)] 
output-json-alert: fix error handling

MemBuffer was not freed in case of allocation error.

8 years agooutput-json-alert: log http body
Eric Leblond [Mon, 26 Jun 2017 16:17:47 +0000 (18:17 +0200)] 
output-json-alert: log http body

Add support for HTTP body logging as printable or as base64.

8 years agooutput-json-http: add functions to log http body
Giuseppe Longo [Thu, 14 Apr 2016 12:26:58 +0000 (14:26 +0200)] 
output-json-http: add functions to log http body

This patch adds two functions that permits to log the http body
in printable or base64 format.

8 years agoAdd NULL-terminator to app-layer template (fix #1930) 2815/head
Pierre Chifflier [Sun, 23 Oct 2016 15:20:25 +0000 (17:20 +0200)] 
Add NULL-terminator to app-layer template (fix #1930)

8 years agolog: destroy file mutex 2814/head
Victor Julien [Wed, 28 Jun 2017 07:23:42 +0000 (09:23 +0200)] 
log: destroy file mutex

8 years agolog: wrap rotation and write in lock
Jason Ish [Mon, 26 Jun 2017 17:04:46 +0000 (11:04 -0600)] 
log: wrap rotation and write in lock

The application log is subject to rotation, so the check for
rotation, the actual rotation and write needs to be done under
lock to ensure the file pointer is in a consisten state
at the time of write().

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/2155

8 years agorust/dns: handle multiple txt strings
Jason Ish [Tue, 27 Jun 2017 22:47:23 +0000 (16:47 -0600)] 
rust/dns: handle multiple txt strings

Fix handling of TXT records when there are multiple strings
in a single TXT record. For now, conform to the C implementation
where an answer record is created for each string in a single
txt record.

Also removes the data_len field from the answer entry. In Rust,
the length is available from actual data, which after decoding
may actually be different than the encoded data length, so just
use the length from the actual data.

8 years agorust: enable/disable yaml settings
Victor Julien [Tue, 27 Jun 2017 19:51:00 +0000 (21:51 +0200)] 
rust: enable/disable yaml settings

Based on compile time settings, enable/disable app-layers
and loggers.

8 years agoAdd NTP event rules (commented) to the default config
Pierre Chifflier [Tue, 20 Jun 2017 14:11:58 +0000 (16:11 +0200)] 
Add NTP event rules (commented) to the default config

8 years agoAdd event rules for NTP events
Pierre Chifflier [Tue, 20 Jun 2017 11:57:46 +0000 (13:57 +0200)] 
Add event rules for NTP events

8 years agoNTP: change parse function to return the number of parsed messages
Pierre Chifflier [Mon, 19 Jun 2017 11:40:42 +0000 (13:40 +0200)] 
NTP: change parse function to return the number of parsed messages

8 years agoAdd NTP parser (rust-experimental)
Pierre Chifflier [Mon, 19 Jun 2017 11:19:23 +0000 (13:19 +0200)] 
Add NTP parser (rust-experimental)

8 years agoRust gen-c-headers: keep 'const' attribute
Pierre Chifflier [Mon, 19 Jun 2017 11:20:07 +0000 (13:20 +0200)] 
Rust gen-c-headers: keep 'const' attribute

8 years agoAutotools: add switch to build experimental Rust parsers
Pierre Chifflier [Mon, 19 Jun 2017 11:17:20 +0000 (13:17 +0200)] 
Autotools: add switch to build experimental Rust parsers

8 years agopcap: fix linktype raw issues 2812/head
Victor Julien [Tue, 27 Jun 2017 13:07:40 +0000 (15:07 +0200)] 
pcap: fix linktype raw issues

On OpenBSD 6.0 and 6.1 the following pcap gets a datalink type of
101 instead of our defined DLT_RAW.

    File type:           Wireshark/tcpdump/... - pcap
    File encapsulation:  Raw IP
    File timestamp precision:  microseconds (6)
    Packet size limit:   file hdr: 262144 bytes
    Number of packets:   23
    File size:           11 kB
    Data size:           11 kB
    Capture duration:    7,424945 seconds
    First packet time:   2017-05-25 21:59:31,957953
    Last packet time:    2017-05-25 21:59:39,382898
    Data byte rate:      1536 bytes/s
    Data bit rate:       12 kbps
    Average packet size: 496,00 bytes
    Average packet rate: 3 packets/s
    SHA1:                120cff9878b93ac74b68fb9216027bef3b3c018f
    RIPEMD160:           35fa287bf30d8be8b8654abfe26e8d3883262e8e
    MD5:                 13fe4bc50fe09bdd38f07739bd1ff0f0
    Strict time order:   True
    Number of interfaces in file: 1
    Interface #0 info:
                         Encapsulation = Raw IP (7/101 - rawip)
                         Capture length = 262144
                         Time precision = microseconds (6)
                         Time ticks per second = 1000000
                         Number of stat entries = 0
                         Number of packets = 23

On Linux it is 12.

On the tcpdump/libpcap site the DLT_RAW is defined as 101:
http://www.tcpdump.org/linktypes.html

Strangely, on OpenBSD the DLT_RAW macro is defined as 14 as expected.
So for some reason, libpcap on OpenBSD uses 101 which seems to match
the tcpdump/libpcap documentation.

So this patch adds support for datalink 101 as RAW.

8 years agodetect: fix crash when stream inspect runs on UDP 2811/head
Victor Julien [Tue, 27 Jun 2017 07:59:48 +0000 (09:59 +0200)] 
detect: fix crash when stream inspect runs on UDP

Certain rules can apply to both TCP and UDP. For example 'alert dns'
rules are inspected against both TCP and UDP. This lead to the
stream inspect engine being called on a UDP packet.

This patch fixes the issue by exiting early from the stream inspect
engine if a) proto is not TCP or b) ssn is not available

Bug #2158.

8 years agoeve/alert: redo option parsing 2805/head
Victor Julien [Mon, 26 Jun 2017 11:53:22 +0000 (13:53 +0200)] 
eve/alert: redo option parsing

Clean up option parsing. Allow options to be disabled as well as
enabled.

E.g.
    metadata: true
    flow: false

The metadata setting will enable all. Then flow is disabled.

8 years agodoc: info about new config for alert events in EVE
Eric Leblond [Thu, 22 Jun 2017 07:20:05 +0000 (09:20 +0200)] 
doc: info about new config for alert events in EVE

8 years agooutput-json-alert: rename applayer to metadata
Eric Leblond [Mon, 26 Jun 2017 08:41:11 +0000 (10:41 +0200)] 
output-json-alert: rename applayer to metadata