]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agolog/file: use default-log-dir for suricata.log 3777/head
Victor Julien [Fri, 5 Apr 2019 11:53:59 +0000 (13:53 +0200)] 
log/file: use default-log-dir for suricata.log

Default to just suricata.log instead of the full path, so that
in user mode we can log in the user mode location.

6 years agouser mode: use CWD as logdir
Victor Julien [Fri, 5 Apr 2019 10:23:05 +0000 (12:23 +0200)] 
user mode: use CWD as logdir

Introduce util func for handling user mode settings.

6 years agologopenfile: remove duplicate ifdefs
Victor Julien [Fri, 5 Apr 2019 09:33:52 +0000 (11:33 +0200)] 
logopenfile: remove duplicate ifdefs

6 years agorunmodes: improve error messaging
Victor Julien [Fri, 5 Apr 2019 09:31:45 +0000 (11:31 +0200)] 
runmodes: improve error messaging

6 years agostartup: log system mode with version
Victor Julien [Fri, 5 Apr 2019 09:28:56 +0000 (11:28 +0200)] 
startup: log system mode with version

6 years agoinstance: set system vs user mode
Victor Julien [Fri, 5 Apr 2019 09:20:24 +0000 (11:20 +0200)] 
instance: set system vs user mode

6 years agorust/mingw: enable in appveyor 3772/head
Victor Julien [Thu, 4 Apr 2019 10:03:26 +0000 (12:03 +0200)] 
rust/mingw: enable in appveyor

6 years agorust/mingw: build fixes
Victor Julien [Wed, 27 Mar 2019 18:59:21 +0000 (19:59 +0100)] 
rust/mingw: build fixes

Fix path passed to cargo by using 'cygpath' if available.

6 years agolist-keywords: don't load yaml
Victor Julien [Wed, 3 Apr 2019 18:49:52 +0000 (20:49 +0200)] 
list-keywords: don't load yaml

Avoids a useless warning if the file is not found.

6 years agorule-analyzer: Ensure content counts are accurate
Jeff Lucovsky [Mon, 18 Mar 2019 00:04:02 +0000 (20:04 -0400)] 
rule-analyzer: Ensure content counts are accurate

Fix for issue 2605.  Make sure that content is counted,
even if none of the specific content types are matched.

6 years agosource-nflog: fix memleaks
Giuseppe Longo [Sun, 31 Mar 2019 12:00:00 +0000 (14:00 +0200)] 
source-nflog: fix memleaks

This fixes two memleaks found with ASAN.

Direct leak of 96 byte(s) in 1 object(s) allocated from:
   #0 0x7f59cf4a4d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
   #1 0xd7f92f in ReceiveNFLOGThreadInit /home/glongo/suricata/src/source-nflog.c:221
   #2 0xe9c8eb in TmThreadsSlotPktAcqLoop /home/glongo/suricata/src/tm-threads.c:293
   #3 0x7f59cd7aa4a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)

Indirect leak of 70000 byte(s) in 1 object(s) allocated from:
   #0 0x7f59cf4a4d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
   #1 0xd814ea in ReceiveNFLOGThreadInit /home/glongo/suricata/src/source-nflog.c:324
   #2 0xe9c8eb in TmThreadsSlotPktAcqLoop /home/glongo/suricata/src/tm-threads.c:293
   #3 0x7f59cd7aa4a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)

SUMMARY: AddressSanitizer: 70096 byte(s) leaked in 2 allocation(s).

6 years agolog: add NULL ptr guard on fclose when reopening.
Emmanuel Roullit [Thu, 28 Mar 2019 08:19:17 +0000 (09:19 +0100)] 
log: add NULL ptr guard on fclose when reopening.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@cognitix.de>
6 years agonfs: small cleanups
Victor Julien [Tue, 2 Apr 2019 13:21:43 +0000 (15:21 +0200)] 
nfs: small cleanups

6 years agodetect/ftp: small ftpdata_command cleanups
Victor Julien [Wed, 3 Apr 2019 18:24:59 +0000 (20:24 +0200)] 
detect/ftp: small ftpdata_command cleanups

6 years agodetect/uricontent: suggest http.uri as alternative
Victor Julien [Wed, 3 Apr 2019 18:18:35 +0000 (20:18 +0200)] 
detect/uricontent: suggest http.uri as alternative

6 years agodetect/dns: add dns.query for dns_query keyword
Victor Julien [Wed, 3 Apr 2019 18:12:30 +0000 (20:12 +0200)] 
detect/dns: add dns.query for dns_query keyword

Improve error checking.

Part of #2283.

6 years agonfs: implement midstream reverse flow support 3765/head
Victor Julien [Mon, 1 Apr 2019 20:21:06 +0000 (22:21 +0200)] 
nfs: implement midstream reverse flow support

Register special midstream version of protocol detection that
can indicate the flow is the wrong direction based on the record
properties.

6 years agoapp-layer/probing-parser: implement reverse flow
Victor Julien [Mon, 1 Apr 2019 20:20:53 +0000 (22:20 +0200)] 
app-layer/probing-parser: implement reverse flow

Implement midstream support for the pure probing parsers. These
need to look up the appropriate parsers based on the reverse
tuple.

6 years agoflow: add macro to get sp/dp
Victor Julien [Tue, 2 Apr 2019 12:53:25 +0000 (14:53 +0200)] 
flow: add macro to get sp/dp

Account for possibility of a reversed flow.

6 years agorust/mingw: fix C glue code generator 3762/head
Victor Julien [Fri, 29 Mar 2019 14:10:00 +0000 (15:10 +0100)] 
rust/mingw: fix C glue code generator

6 years agorust/mingw: fix missing IPPROTO_* declarations
Victor Julien [Thu, 28 Mar 2019 10:51:43 +0000 (11:51 +0100)] 
rust/mingw: fix missing IPPROTO_* declarations

The libc crate doesn't provide these on MinGW, so define them in
our 'core' instead. We only use IPPROTO_TCP and IPPROTO_UDP.

Bug #2733

6 years agoalert/unified2: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 13:44:36 +0000 (14:44 +0100)] 
alert/unified2: remove useless packed attributes

6 years agodecode: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 13:44:15 +0000 (14:44 +0100)] 
decode: remove useless packed attributes

6 years agodetect/iponly: only run iponly address parsers for iponly rules
Victor Julien [Fri, 29 Mar 2019 09:21:28 +0000 (10:21 +0100)] 
detect/iponly: only run iponly address parsers for iponly rules

6 years agodetect/iponly: improve negation handling in parsing
Victor Julien [Fri, 29 Mar 2019 09:20:34 +0000 (10:20 +0100)] 
detect/iponly: improve negation handling in parsing

6 years agodetect/address: clean up 'any' logic
Victor Julien [Fri, 29 Mar 2019 09:19:00 +0000 (10:19 +0100)] 
detect/address: clean up 'any' logic

6 years agodetect/parse: set the type of signature early
Victor Julien [Thu, 28 Mar 2019 11:07:15 +0000 (12:07 +0100)] 
detect/parse: set the type of signature early

This way we can know much sooner if the rule is ip-only
or not.

6 years agodetect/parse: reduce scope of main parse func
Victor Julien [Thu, 28 Mar 2019 09:50:05 +0000 (10:50 +0100)] 
detect/parse: reduce scope of main parse func

6 years agodetect/content: test cleanup
Victor Julien [Thu, 28 Mar 2019 12:38:47 +0000 (13:38 +0100)] 
detect/content: test cleanup

6 years agosmb3: support direction check in midstream 3749/head
Victor Julien [Tue, 26 Mar 2019 10:09:02 +0000 (11:09 +0100)] 
smb3: support direction check in midstream

As the records contain no indicator, fall back to checking the
flows port number.

6 years agoproto-detect: improve midstream support
Victor Julien [Thu, 21 Mar 2019 12:57:50 +0000 (13:57 +0100)] 
proto-detect: improve midstream support

When Suricata picks up a flow it assumes the first packet is
toserver. In a perfect world without packet loss and where all
sessions neatly start after Suricata itself started, this would be
true. However, in reality we have to account for packet loss and
Suricata starting to get packets for flows already active be for
Suricata is (re)started.

The protocol records on the wire would often be able to tell us more
though. For example in SMB1 and SMB2 records there is a flag that
indicates whether the record is a request or a response. This patch
is enabling the procotol detection engine to utilize this information
to 'reverse' the flow.

There are three ways in which this is supported in this patch:

1. patterns for detection are registered per direction. If the proto
   was not recognized in the traffic direction, and midstream is
   enabled, the pattern set for the opposing direction is also
   evaluated. If that matches, the flow is considered to be in the
   wrong direction and is reversed.

2. probing parsers now have a way to feed back their understanding
   of the flow direction. They are now passed the direction as
   Suricata sees the traffic when calling the probing parsers. The
   parser can then see if its own observation matches that, and
   pass back it's own view to the caller.

3. a new pattern + probing parser set up: probing parsers can now
   be registered with a pattern, so that when the pattern matches
   the probing parser is called as well. The probing parser can
   then provide the protocol detection engine with the direction
   of the traffic.

The process of reversing takes a multi step approach as well:

a. reverse the current packets direction
b. reverse most of the flows direction sensitive flags
c. tag the flow as 'reversed'. This is because the 5 tuple is
   *not* reversed, since it is immutable after the flows creation.

Most of the currently registered parsers benefit already:

- HTTP/SMTP/FTP/TLS patterns are registered per direction already
  so they will benefit from the pattern midstream logic in (1)
  above.

- the Rust based SMB parser uses a mix of pattern + probing parser
  as described in (3) above.

- the NFS detection is purely done by probing parser and is updated
  to consider the direction in that parser.

Other protocols, such as DNS, are still to do.

Ticket: #2572

6 years agosource-pcap-file: Pcap File Init Failure Handling (#1694) 3747/head
Danny Browning [Mon, 18 Feb 2019 16:57:21 +0000 (09:57 -0700)] 
source-pcap-file: Pcap File Init Failure Handling (#1694)

Better handle case where pcap file receive thread fails to initialize. Allow
initialize to complete, but terminate the thread quickly. Delay exiting
unix socket runmode as late as possible.

6 years agoapp-layer/pd: minor code cleanup
Victor Julien [Fri, 22 Mar 2019 19:34:06 +0000 (20:34 +0100)] 
app-layer/pd: minor code cleanup

6 years agoapp-layer/pd: set offset and depth in mpm
Victor Julien [Fri, 22 Mar 2019 19:19:31 +0000 (20:19 +0100)] 
app-layer/pd: set offset and depth in mpm

6 years agompm/hs: track maxdepth
Victor Julien [Fri, 22 Mar 2019 19:18:44 +0000 (20:18 +0100)] 
mpm/hs: track maxdepth

6 years agoBug 2857: NFQ ASAN 'heap-use-after-free' error. 3746/head
Alexander Gozman [Sun, 3 Mar 2019 10:25:46 +0000 (13:25 +0300)] 
Bug 2857: NFQ ASAN 'heap-use-after-free' error.

Global NFQ contexts were not freed properly causing
'use-after-free' error. Moving contexts cleanup to a
separate NFQContextsCleanup() and calling it from
GlobalsDestroy(), like it's done for AFPacket, solves
the problem.

6 years agodoc: add http.location and http.server
Jeff Lucovsky [Wed, 27 Feb 2019 23:58:44 +0000 (18:58 -0500)] 
doc: add http.location and http.server

6 years agodetect: implement http {location,server} sticky buffer
Jeff Lucovsky [Wed, 27 Feb 2019 23:53:10 +0000 (18:53 -0500)] 
detect: implement http {location,server} sticky buffer

This implements inspection of the Server and Location buffer as a
content sticky buffer.

6 years agopcap-log: Don't leak memory in LZ4 error paths
Max Fillinger [Mon, 11 Mar 2019 09:51:00 +0000 (10:51 +0100)] 
pcap-log: Don't leak memory in LZ4 error paths

6 years agodoc: add ssh protocol in eve log section
Pascal Delalande [Wed, 20 Mar 2019 20:20:29 +0000 (21:20 +0100)] 
doc: add ssh protocol in eve log section

6 years agoAvoid use-after-free during pid file cleanup.
Alexander Bluhm [Mon, 18 Mar 2019 13:06:39 +0000 (14:06 +0100)] 
Avoid use-after-free during pid file cleanup.

In case the pid file is given in the config file, the file name is
stored in volatile memory.  Removal of the pid file happens after
cleanup of config memory.  Create a copy of the name which will be
freed after the pid file has been removed.

6 years agoconfigure.ac: update lzma check and misc doc
jason taylor [Mon, 11 Mar 2019 16:47:57 +0000 (12:47 -0400)] 
configure.ac: update lzma check and misc doc

* the lzma check during configure wasn't properly displaying the
additional information on how to install if --enable-lzma was passed
but lzma devel files were not present

* updated additional information blocks to include distribution
package names

* minor formatting updates to add quotes around variables

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoreputation: remove dead code
Giuseppe Longo [Thu, 7 Mar 2019 16:05:01 +0000 (17:05 +0100)] 
reputation: remove dead code

This removes some code commented long time ago.

6 years agoreputation: declare max value as constant
Giuseppe Longo [Thu, 7 Mar 2019 15:41:50 +0000 (16:41 +0100)] 
reputation: declare max value as constant

6 years agosmb1: fix NT create andx records filename parsing
Victor Julien [Fri, 22 Mar 2019 10:57:52 +0000 (11:57 +0100)] 
smb1: fix NT create andx records filename parsing

Use file name parsing routines that take unicode into account
and consider padding bytes as well.

6 years agosmb: fix NT create filename parsing
Wesley van der Ree [Thu, 21 Mar 2019 13:48:18 +0000 (14:48 +0100)] 
smb: fix NT create filename parsing

parse_smb_create_andx_request_record skipped 1 byte too much before
the filename.

Fixes: #2894
6 years agostream: minor test cleanups 3739/head
Victor Julien [Thu, 21 Mar 2019 13:22:04 +0000 (14:22 +0100)] 
stream: minor test cleanups

6 years agompm: track maxdepth
Victor Julien [Tue, 19 Mar 2019 10:41:41 +0000 (11:41 +0100)] 
mpm: track maxdepth

Track max depth setting per MpmCtx.

To make sure the data structure doesn't increase in size change global
bool to use a flags field.

6 years agodetect/flow: optimize flow check
Victor Julien [Sun, 17 Mar 2019 18:29:45 +0000 (19:29 +0100)] 
detect/flow: optimize flow check

Flow direction doesn't need explicit checking as the rule groups (sgh)
are already per direction. So if a rule sets only flow:to_server or
flow:to_client, we can avoid adding a sigmatch to the signature.

6 years agodetect/tag: minor code cleanup
Victor Julien [Sat, 16 Mar 2019 07:11:42 +0000 (08:11 +0100)] 
detect/tag: minor code cleanup

6 years agodetect/mark: use postmatch instead of tag list
Victor Julien [Sat, 16 Mar 2019 07:07:14 +0000 (08:07 +0100)] 
detect/mark: use postmatch instead of tag list

Keep the tag list for just tags. Post match list is better so the
keyword also works with pass and noalert rules.

6 years agodetect/mark: minor code cleanups
Victor Julien [Sat, 16 Mar 2019 07:05:17 +0000 (08:05 +0100)] 
detect/mark: minor code cleanups

6 years agodetect: packet match micro optimization
Victor Julien [Sat, 16 Mar 2019 06:34:40 +0000 (07:34 +0100)] 
detect: packet match micro optimization

6 years agodetect/filestore: use postmatch callback
Victor Julien [Fri, 15 Mar 2019 20:41:49 +0000 (21:41 +0100)] 
detect/filestore: use postmatch callback

6 years agodetect/replace: implement post-match
Victor Julien [Fri, 15 Mar 2019 19:05:32 +0000 (20:05 +0100)] 
detect/replace: implement post-match

Implement replace executor as a post match callback so that it
is only considered if there actually is a replace keyword in use.

6 years agoeve/flow/netflow: log correct tulpe on reversed flows
Victor Julien [Fri, 3 Aug 2018 12:14:05 +0000 (14:14 +0200)] 
eve/flow/netflow: log correct tulpe on reversed flows

6 years agostream: use flow/packet swap logic for SYN/ACK midstream
Victor Julien [Fri, 3 Aug 2018 10:12:43 +0000 (12:12 +0200)] 
stream: use flow/packet swap logic for SYN/ACK midstream

6 years agoflow: on timeout, consider reverse flows for pseudo packets
Victor Julien [Wed, 20 Mar 2019 15:38:56 +0000 (16:38 +0100)] 
flow: on timeout, consider reverse flows for pseudo packets

6 years agoflow: introduce flow swap support
Victor Julien [Fri, 3 Aug 2018 09:10:26 +0000 (11:10 +0200)] 
flow: introduce flow swap support

6 years agocommon: introduce flags and var swapping macros
Victor Julien [Fri, 27 Jul 2018 12:16:41 +0000 (14:16 +0200)] 
common: introduce flags and var swapping macros

6 years agopacket: add 'swap' function to reverse direction
Victor Julien [Fri, 27 Jul 2018 10:24:20 +0000 (12:24 +0200)] 
packet: add 'swap' function to reverse direction

6 years agodetect/flow: don't require flow for direction options
Victor Julien [Mon, 30 Jul 2018 19:01:05 +0000 (21:01 +0200)] 
detect/flow: don't require flow for direction options

Flow isn't directly used for direction checks, so don't require
a flow to be present.

6 years agodetect/parse: improve direction setting on sigs
Victor Julien [Tue, 31 Jul 2018 07:14:26 +0000 (09:14 +0200)] 
detect/parse: improve direction setting on sigs

Only set both directions if no direction has been explicitly set before.

6 years agodetect/bytetest: debug cleanup
Victor Julien [Tue, 12 Mar 2019 18:55:34 +0000 (19:55 +0100)] 
detect/bytetest: debug cleanup

6 years agoapp-layer/pd: free memory
Victor Julien [Thu, 21 Mar 2019 11:06:07 +0000 (12:06 +0100)] 
app-layer/pd: free memory

6 years agodetect: remove BUG_ON from packet path 3735/head
Victor Julien [Mon, 18 Mar 2019 09:35:45 +0000 (10:35 +0100)] 
detect: remove BUG_ON from packet path

6 years agodetect: fix match array reset
Victor Julien [Mon, 18 Mar 2019 09:34:03 +0000 (10:34 +0100)] 
detect: fix match array reset

Fix match array reset depending on prefilter matches for the
current run. If there were none, the match array of the previous
packet was used. This could lead to inspection of rules from the
wrong rule group.

6 years agoapp-layer/profile: fix udp protocol detection profiling
Victor Julien [Sat, 16 Mar 2019 17:04:16 +0000 (18:04 +0100)] 
app-layer/profile: fix udp protocol detection profiling

6 years agoapp-layer/udp: micro optimization
Victor Julien [Sat, 16 Mar 2019 14:01:37 +0000 (15:01 +0100)] 
app-layer/udp: micro optimization

6 years agoFix memory leak with TOS handling
Jeff Lucovsky [Sat, 9 Mar 2019 15:28:27 +0000 (07:28 -0800)] 
Fix memory leak with TOS handling

Use `pcre_copy_substring` to avoid memory allocations when parsing
TOS values.

6 years agopfring: update bpf error handling to be consistent
jason taylor [Thu, 14 Mar 2019 00:41:00 +0000 (20:41 -0400)] 
pfring: update bpf error handling to be consistent

* updated bpf error handling to be consistent with af-packet
* minor internal doc updates

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoreputation: move unit tests
Giuseppe Longo [Thu, 7 Mar 2019 15:38:47 +0000 (16:38 +0100)] 
reputation: move unit tests

UTs are moved inside "test/" directory,
and reworked to improve readability and reduce lines of code.

6 years agodetect-iprep: fix memory leaks
Giuseppe Longo [Sat, 9 Mar 2019 21:36:03 +0000 (22:36 +0100)] 
detect-iprep: fix memory leaks

Loading rules with iprep keyword cause
memory leaks due to missing frees.

Direct leak of 8 byte(s) in 4 object(s) allocated from:
    #0 0x7f81c862bd28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
    #1 0x7f81c6afea69 in pcre_get_substring (/lib/x86_64-linux-gnu/libpcre.so.3+0x27a69)
    #2 0x43206f7420676e68  (<unknown module>)

SUMMARY: AddressSanitizer: 8 byte(s) leaked in 4 allocation(s).

6 years agoflow-bypass: set thread name to FB
Eric Leblond [Wed, 6 Mar 2019 13:41:47 +0000 (14:41 +0100)] 
flow-bypass: set thread name to FB

6 years agosuricata.yaml: fix name of encryption-handling var
Eric Leblond [Thu, 12 Jul 2018 19:28:20 +0000 (21:28 +0200)] 
suricata.yaml: fix name of encryption-handling var

6 years agoautoconf/python: check for distutils 3714/head
Jason Ish [Sat, 9 Mar 2019 15:00:59 +0000 (09:00 -0600)] 
autoconf/python: check for distutils

Require distutils to install the Python tools. Update the logic
to only install suricatactl (and suricatasc) if Python and
distutils are found. Suricata-Update will only be installed if
bundled, and python-distutils and python-yaml are found.

6 years agoautoconf: prefer python 3 over python 2
Jason Ish [Mon, 11 Feb 2019 17:27:38 +0000 (11:27 -0600)] 
autoconf: prefer python 3 over python 2

When looking for Python, prefer "python3" over "python2" and
"python".

Also add information about the Python path and version to the
./configure summary.

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

6 years agoaf-packet: don't use anonymous unions 3706/head
Victor Julien [Sat, 2 Mar 2019 13:25:38 +0000 (14:25 +0100)] 
af-packet: don't use anonymous unions

6 years agoaf-packet: fix v3 code using v2 union member
Victor Julien [Sat, 2 Mar 2019 13:26:07 +0000 (14:26 +0100)] 
af-packet: fix v3 code using v2 union member

6 years agodoc/userguide: add 3rd-party-integration to dist
Victor Julien [Tue, 5 Mar 2019 11:43:40 +0000 (12:43 +0100)] 
doc/userguide: add 3rd-party-integration to dist

6 years agorust/ikev2: fix events not being raised in first message
Pierre Chifflier [Mon, 4 Mar 2019 17:47:07 +0000 (18:47 +0100)] 
rust/ikev2: fix events not being raised in first message

The `set_event` function requires that the transaction is already
inserted, or the event set is silently lost.
When parsing first IKEv2 message, first insert transaction, prepare
values, and borrow back inserted transaction to update it.

6 years agorules: fix event names for ikev2 (weak authentication and DH parameters)
Pierre Chifflier [Mon, 4 Mar 2019 17:45:38 +0000 (18:45 +0100)] 
rules: fix event names for ikev2 (weak authentication and DH parameters)

6 years agotravis: call make check in qa/coccinelle
Jason Ish [Mon, 25 Feb 2019 19:52:12 +0000 (13:52 -0600)] 
travis: call make check in qa/coccinelle

Was being skipped due to the way the tests are called on
travis to prevent Travis from failing on too much output.

6 years agotravis/macos: use xcode 8.3 build image
Jason Ish [Mon, 25 Feb 2019 19:44:19 +0000 (13:44 -0600)] 
travis/macos: use xcode 8.3 build image

Travis retired the xcode 8.1 image and has already been
routing this build to the xcode 8.3 image.

6 years agotravis-ci/macos: install PyYAML and jq for verify
Jason Ish [Mon, 25 Feb 2019 19:43:17 +0000 (13:43 -0600)] 
travis-ci/macos: install PyYAML and jq for verify

6 years agotravis: cache rust toolchain
Jason Ish [Mon, 25 Feb 2019 18:47:17 +0000 (12:47 -0600)] 
travis: cache rust toolchain

6 years agotravis-ci: run suricata-verify on each build
Jason Ish [Mon, 25 Feb 2019 18:24:41 +0000 (12:24 -0600)] 
travis-ci: run suricata-verify on each build

6 years agodoc/userguide: new 3rd party section, add bluecoat
Victor Julien [Mon, 25 Feb 2019 13:59:37 +0000 (14:59 +0100)] 
doc/userguide: new 3rd party section, add bluecoat

Add Symantec SSLV (bluecoat) doc to new 3rd party section for
documenting integrating Suricata with 3rd party tools.

6 years agodoc: add byte_* documentation to the userguide 3703/head
Bryant Smith [Sat, 2 Mar 2019 17:07:25 +0000 (10:07 -0700)] 
doc: add byte_* documentation to the userguide

Added byte_test, byte_jump and byte_extract description and example rules

6 years agostream/ips: set proper payload len for inspection
Victor Julien [Wed, 27 Feb 2019 06:16:18 +0000 (07:16 +0100)] 
stream/ips: set proper payload len for inspection

On mem(cap) presure we fall back to the packet payload. The previous
patch failed to properly set the payload length.

6 years agofile-log: remove and add warning 3680/head
Victor Julien [Sun, 24 Feb 2019 18:56:29 +0000 (19:56 +0100)] 
file-log: remove and add warning

Feature was deprecated and scheduled for removal.

Ticket #2376

6 years agodoc: improvement of xbits documentation page
Eric Leblond [Sun, 24 Feb 2019 08:30:38 +0000 (09:30 +0100)] 
doc: improvement of xbits documentation page

6 years agodoc: xbits:noalert is not a valid syntax
Eric Leblond [Tue, 19 Feb 2019 08:53:02 +0000 (09:53 +0100)] 
doc: xbits:noalert is not a valid syntax

6 years agodetect-hostbits: error on some invalid config
Eric Leblond [Mon, 18 Feb 2019 22:06:10 +0000 (23:06 +0100)] 
detect-hostbits: error on some invalid config

6 years agodetect-xbits: error on some invalid config
Eric Leblond [Mon, 18 Feb 2019 21:59:01 +0000 (22:59 +0100)] 
detect-xbits: error on some invalid config

6 years agodetect-flowbits: error on some invalid syntax
Eric Leblond [Mon, 18 Feb 2019 21:31:26 +0000 (22:31 +0100)] 
detect-flowbits: error on some invalid syntax

The regular expression was accepting something like
"flowbits:!isset,isma;" without complaining even if it is not
correct and don't have the expected result.

6 years agosuricata: fix list keywords URL in release mode
Eric Leblond [Mon, 18 Feb 2019 13:27:18 +0000 (14:27 +0100)] 
suricata: fix list keywords URL in release mode

The tags are suricata-X.X.X so we need to update the chain to get
URLs right.

6 years agounix-socket: Fix the message for unregister-tenant-handler
Shivani Bhardwaj [Wed, 20 Feb 2019 10:26:34 +0000 (15:56 +0530)] 
unix-socket: Fix the message for unregister-tenant-handler

6 years agodoc/unix-socket: Add missing commands and detail
Shivani Bhardwaj [Wed, 20 Feb 2019 10:17:01 +0000 (15:47 +0530)] 
doc/unix-socket: Add missing commands and detail

Add missing commands and their corresponding details in unix-socket
userguide.

Closes redmine ticket #2800

6 years agosuricatactl: Clean up parser, improve help
Shivani Bhardwaj [Wed, 20 Feb 2019 18:10:14 +0000 (23:40 +0530)] 
suricatactl: Clean up parser, improve help

So far the suricatactl parser was unclear about the options to use and
did not well display the required and optional param difference. Fix
that to make it legible for any user.

Before
```
└─ $ ▶ ./bin/suricatactl filestore -h
usage: suricatactl filestore [-h] {prune} ...

positional arguments:
  {prune}

optional arguments:
  -h, --help  show this help message and exit

└─ $ ▶ ./bin/suricatactl filestore prune -h
usage: suricatactl filestore prune [-h] [-d DIRECTORY] [--age AGE] [-n] [-v]
                                   [-q]

optional arguments:
  -h, --help            show this help message and exit
  -d DIRECTORY, --directory DIRECTORY
                        filestore directory
  --age AGE             prune files older than age
  -n, --dry-run         only print what would happen
  -v, --verbose         increase verbosity
  -q, --quiet           be quiet, log warnings and errors only
```

After
```
└─ $ ▶ ./bin/suricatactl filestore -h
usage: suricatactl filestore [-h] {prune} ...

positional arguments:
  {prune}     sub-command help
    prune     Remove files in specified directory older than specified age

optional arguments:
  -h, --help  show this help message and exit

└─ $ ▶ ./bin/suricatactl filestore prune -h
usage: suricatactl filestore prune [-h] -d DIRECTORY [--age AGE] [-n] [-v]
                                   [-q]

optional arguments:
  -h, --help            show this help message and exit
  -n, --dry-run         only print what would happen
  -v, --verbose         increase verbosity
  -q, --quiet           be quiet, log warnings and errors only

required arguments:
  -d DIRECTORY, --directory DIRECTORY
                        filestore directory
  --age AGE             prune files older than age, units: s, m, h, d
```