]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agoapp-layer-ssl: fix flow and inspection bypass for TLSv1.3 3532/head
Mats Klepsland [Mon, 29 Oct 2018 20:26:13 +0000 (21:26 +0100)] 
app-layer-ssl: fix flow and inspection bypass for TLSv1.3

6 years agoapp-layer-ssl: add 0-RTT support for TLSv1.3
Mats Klepsland [Mon, 29 Oct 2018 20:20:33 +0000 (21:20 +0100)] 
app-layer-ssl: add 0-RTT support for TLSv1.3

6 years agoapp-layer-ssl: decode early data extension in ClientHello record
Mats Klepsland [Mon, 29 Oct 2018 19:56:51 +0000 (20:56 +0100)] 
app-layer-ssl: decode early data extension in ClientHello record

Decode early data extension used by 0-RTT that is used to indicate that
application data will be sent right after the ClientHello record.

6 years agoapp-layer-ssl: use extension length when decoding extensions
Mats Klepsland [Mon, 29 Oct 2018 19:48:54 +0000 (20:48 +0100)] 
app-layer-ssl: use extension length when decoding extensions

Pass extension length to functions decoding extensions, instead of
passing the length left in the record. This enables us to also
decode empty extensions.

6 years agoapp-layer-ssl: handle all versions above TLSv1.2 as TLSv1.3
Mats Klepsland [Mon, 29 Oct 2018 19:30:41 +0000 (20:30 +0100)] 
app-layer-ssl: handle all versions above TLSv1.2 as TLSv1.3

This makes it more likely to log custom versions of TLSv1.3 that
doesn't comply with the draft version numbering.

6 years agotls: remove debug printfs
Victor Julien [Mon, 22 Oct 2018 17:25:04 +0000 (19:25 +0200)] 
tls: remove debug printfs

6 years agodetect-tls-ja3-hash: add another unit test 3520/head
Mats Klepsland [Sun, 21 Oct 2018 17:55:13 +0000 (19:55 +0200)] 
detect-tls-ja3-hash: add another unit test

Add unit test that covers the JA3 bug in TLS extensions decoding.

6 years agoapp-layer-ssl: fix JA3 bug in TLS extension decoding
Mats Klepsland [Fri, 19 Oct 2018 21:00:42 +0000 (23:00 +0200)] 
app-layer-ssl: fix JA3 bug in TLS extension decoding

6 years agoapp-layer-ssl: fix JA3 bug in TLS version decoding
Mats Klepsland [Thu, 18 Oct 2018 21:12:50 +0000 (23:12 +0200)] 
app-layer-ssl: fix JA3 bug in TLS version decoding

6 years agocapture: multidev is not experimental
Victor Julien [Mon, 22 Oct 2018 06:59:44 +0000 (08:59 +0200)] 
capture: multidev is not experimental

6 years agoflow/stream: 'wrong thread' as stream event & counter
Victor Julien [Fri, 5 Oct 2018 18:38:10 +0000 (20:38 +0200)] 
flow/stream: 'wrong thread' as stream event & counter

Set event at most once per flow, for the first 'wrong' packet.

Add 'tcp.pkt_on_wrong_thread' counter. This is incremented for each
'wrong' packet. Note that the first packet for a flow determines
what thread is 'correct'.

6 years agosmtp: fix clang -Wunreachable-code warning
Victor Julien [Mon, 24 Feb 2014 09:01:55 +0000 (10:01 +0100)] 
smtp: fix clang -Wunreachable-code warning

app-layer-smtp.c:756:12: error: will never be executed [-Werror,-Wunreachable-code]
    return 0;
           ^
1 error generated.

6 years agoprofiling/csv: update output format
Victor Julien [Sat, 22 Sep 2018 16:14:56 +0000 (18:14 +0200)] 
profiling/csv: update output format

Update output to be:

pcap_cnt,total,receive,decode,flowworker,threading,proto detect,flow,
stream,app-layer,detect,tcp-prune,loggers,<detect stages>,<loggers>

For TCP, the app-layer cost is not part of stream anymore.

6 years agomulti-tenant: document per tenant settings
Victor Julien [Tue, 7 Aug 2018 19:17:59 +0000 (21:17 +0200)] 
multi-tenant: document per tenant settings

6 years agotest mode: parse interface list in test mode
Victor Julien [Tue, 7 Aug 2018 14:13:31 +0000 (16:13 +0200)] 
test mode: parse interface list in test mode

6 years agowindivert: fix whitespace issue
Victor Julien [Tue, 7 Aug 2018 14:13:01 +0000 (16:13 +0200)] 
windivert: fix whitespace issue

6 years agoaf-packet: suppress noisy info message
Victor Julien [Tue, 7 Aug 2018 14:12:29 +0000 (16:12 +0200)] 
af-packet: suppress noisy info message

6 years agodetect/transforms: fix doc urls 3517/head
Victor Julien [Wed, 17 Oct 2018 20:06:23 +0000 (22:06 +0200)] 
detect/transforms: fix doc urls

6 years agopfring: multiple receive threads is not experimental
Victor Julien [Fri, 19 Oct 2018 14:57:59 +0000 (16:57 +0200)] 
pfring: multiple receive threads is not experimental

6 years agoeve: improve error handling for Rust loggers
Victor Julien [Fri, 19 Oct 2018 14:54:38 +0000 (16:54 +0200)] 
eve: improve error handling for Rust loggers

Give useful warning message if Rust is not compiled in.

6 years agopfring: minor cleanups
Victor Julien [Fri, 19 Oct 2018 13:41:35 +0000 (15:41 +0200)] 
pfring: minor cleanups

6 years agostats: decoder/stream events as stats
Victor Julien [Fri, 19 Oct 2018 13:08:48 +0000 (15:08 +0200)] 
stats: decoder/stream events as stats

6 years agodetect/analyzer: add detection for sigs that could use http keywords
Victor Julien [Thu, 18 Oct 2018 19:02:40 +0000 (21:02 +0200)] 
detect/analyzer: add detection for sigs that could use http keywords

6 years agodetect/analyzer: add debug statements
Victor Julien [Thu, 18 Oct 2018 19:01:56 +0000 (21:01 +0200)] 
detect/analyzer: add debug statements

6 years agodetect/analyzer: fix json analyzer being called on incomplete rules
Victor Julien [Thu, 18 Oct 2018 17:06:28 +0000 (19:06 +0200)] 
detect/analyzer: fix json analyzer being called on incomplete rules

6 years agorust/smb: silence noisy debug messages
Victor Julien [Thu, 18 Oct 2018 15:28:48 +0000 (17:28 +0200)] 
rust/smb: silence noisy debug messages

6 years agostream/events: log as stats
Victor Julien [Thu, 18 Oct 2018 12:26:18 +0000 (14:26 +0200)] 
stream/events: log as stats

6 years agodetect/events: cleanup keyword
Victor Julien [Thu, 18 Oct 2018 12:20:35 +0000 (14:20 +0200)] 
detect/events: cleanup keyword

6 years agodoc/flow: updates and cleanups to flow section 3514/head
Victor Julien [Wed, 17 Oct 2018 10:06:23 +0000 (12:06 +0200)] 
doc/flow: updates and cleanups to flow section

6 years agococci/detect: add flags check to SigTableElmt
Victor Julien [Wed, 17 Oct 2018 07:57:30 +0000 (09:57 +0200)] 
cocci/detect: add flags check to SigTableElmt

6 years agorules/transform: add to list-keywords
Victor Julien [Wed, 17 Oct 2018 07:52:29 +0000 (09:52 +0200)] 
rules/transform: add to list-keywords

6 years agodoc/rules: initial transforms documentation
Victor Julien [Wed, 17 Oct 2018 07:45:56 +0000 (09:45 +0200)] 
doc/rules: initial transforms documentation

6 years agodoc/performance: redo runmodes explanation
Victor Julien [Tue, 16 Oct 2018 15:08:01 +0000 (17:08 +0200)] 
doc/performance: redo runmodes explanation

6 years agodoc/install: update Rust info in generic install overview
Victor Julien [Tue, 16 Oct 2018 15:06:49 +0000 (17:06 +0200)] 
doc/install: update Rust info in generic install overview

6 years agodoc/eve: add community id
Victor Julien [Tue, 16 Oct 2018 13:33:53 +0000 (15:33 +0200)] 
doc/eve: add community id

6 years agodetect-ssh-software: fix url for keyword 3512/head
Mats Klepsland [Tue, 16 Oct 2018 20:05:52 +0000 (22:05 +0200)] 
detect-ssh-software: fix url for keyword

6 years agodetect-ssh-software-version: add description and url to keyword
Mats Klepsland [Tue, 16 Oct 2018 20:04:01 +0000 (22:04 +0200)] 
detect-ssh-software-version: add description and url to keyword

6 years agodetect-ssh-proto-version: add description and url to keyword
Mats Klepsland [Tue, 16 Oct 2018 20:00:07 +0000 (22:00 +0200)] 
detect-ssh-proto-version: add description and url to keyword

6 years agodetect-ssh-proto: fix url for keyword
Mats Klepsland [Tue, 16 Oct 2018 19:53:45 +0000 (21:53 +0200)] 
detect-ssh-proto: fix url for keyword

6 years agodoc: add documentation for SSH keywords
Mats Klepsland [Tue, 16 Oct 2018 19:48:32 +0000 (21:48 +0200)] 
doc: add documentation for SSH keywords

6 years agochangelog: update for 4.1rc2 suricata-4.1.0-rc2
Victor Julien [Mon, 15 Oct 2018 15:18:20 +0000 (17:18 +0200)] 
changelog: update for 4.1rc2

6 years agorust/ike2: free destate on tx free 3511/head
Victor Julien [Mon, 15 Oct 2018 18:53:14 +0000 (20:53 +0200)] 
rust/ike2: free destate on tx free

Bug #2604

6 years agorust: fix (again) out of tree builds
Jason Ish [Mon, 15 Oct 2018 13:47:56 +0000 (07:47 -0600)] 
rust: fix (again) out of tree builds

As the generated Cargo.toml is shipped as part of a release
tarball, build from the source directory but set the cargo
CARGO_TARGET_DIR to the build directory.

6 years agodoc: remove deprecated force-md5 flag from userguide
Pascal Delalande [Fri, 12 Oct 2018 19:32:13 +0000 (21:32 +0200)] 
doc: remove deprecated force-md5 flag from userguide

6 years agoAdded new classifications to classification.conf
Travis Green [Tue, 9 Oct 2018 17:16:59 +0000 (11:16 -0600)] 
Added new classifications to classification.conf

Added classifications from rule-writing community feedback.

6 years agorust/smb: suppress noisy messages
Victor Julien [Mon, 15 Oct 2018 08:38:00 +0000 (10:38 +0200)] 
rust/smb: suppress noisy messages

6 years agoeve/json: introduce community flow id 3507/head
Victor Julien [Thu, 7 Dec 2017 10:29:06 +0000 (11:29 +0100)] 
eve/json: introduce community flow id

Add support for community flow id, meant to give a records a
predictable flow id that can be used to match records to
output of other tools.

Takes a 'seed' that needs to be same across sensors and tools
to make the id less predictable.

6 years agoeve/json: handle common options in central function
Victor Julien [Tue, 9 Oct 2018 12:08:56 +0000 (14:08 +0200)] 
eve/json: handle common options in central function

6 years agoeve/json: move common settings into it's own struct
Victor Julien [Tue, 9 Oct 2018 11:34:17 +0000 (13:34 +0200)] 
eve/json: move common settings into it's own struct

6 years agonfs: use common json output structures
Victor Julien [Tue, 9 Oct 2018 15:19:54 +0000 (17:19 +0200)] 
nfs: use common json output structures

6 years agosmb: use common json output structures
Victor Julien [Tue, 9 Oct 2018 14:39:21 +0000 (16:39 +0200)] 
smb: use common json output structures

6 years agoeve/json: add common helper funcs
Victor Julien [Tue, 9 Oct 2018 14:39:05 +0000 (16:39 +0200)] 
eve/json: add common helper funcs

Add simple helper funcs for option-less loggers

6 years agoeve/flow: minor cleanups
Victor Julien [Tue, 9 Oct 2018 09:03:35 +0000 (11:03 +0200)] 
eve/flow: minor cleanups

6 years agohash/sha1: optimize by avoiding mem alloc
Victor Julien [Tue, 9 Oct 2018 07:25:20 +0000 (09:25 +0200)] 
hash/sha1: optimize by avoiding mem alloc

Don't allocate an output buffer for each call. These buffers
would have the exact same size every time.

6 years agotravis: update rust to 1.29.1, add auto & disabled tests
Victor Julien [Mon, 8 Oct 2018 18:56:54 +0000 (20:56 +0200)] 
travis: update rust to 1.29.1, add auto & disabled tests

6 years agorust: enable by default 3500/head
Victor Julien [Sun, 7 Oct 2018 07:14:06 +0000 (09:14 +0200)] 
rust: enable by default

Remove 'experimental' label for Rust, and enable it by default if
rustc and cargo (and libjansson) are available.

Add rustc and cargo versions to the build-info.

6 years agoconfigure: fix and cleanup nss and nspr detection
Victor Julien [Mon, 8 Oct 2018 11:07:38 +0000 (13:07 +0200)] 
configure: fix and cleanup nss and nspr detection

6 years agosmb/dcerpc: remove now unused ssn2maxsize_map 3498/head
Victor Julien [Sat, 6 Oct 2018 13:45:40 +0000 (15:45 +0200)] 
smb/dcerpc: remove now unused ssn2maxsize_map

6 years agosmb/dcerpc: clean up and unify DCERPC probe logic
Victor Julien [Sat, 6 Oct 2018 13:42:18 +0000 (15:42 +0200)] 
smb/dcerpc: clean up and unify DCERPC probe logic

6 years agosmb2/dcerpc: probe if response data is dcerpc
Victor Julien [Wed, 3 Oct 2018 17:55:46 +0000 (19:55 +0200)] 
smb2/dcerpc: probe if response data is dcerpc

If we missed the tree connect we can't know for sure if we're
reading from a (DCERPC) PIPE or not. In this case probe the data
to see if it looks like DCERPC.

If the detection succeeds, use a special 'suricata::dcerpc' service
in the TX.

Simplify handling of DCERPC records that cross records

Update logging for the response only TXs.

6 years agosmb2: skip rest of READ response if status is not success
Victor Julien [Mon, 13 Aug 2018 14:53:43 +0000 (16:53 +0200)] 
smb2: skip rest of READ response if status is not success

6 years agouserguide: update hyperscan documentation 3496/head
jason taylor [Wed, 3 Oct 2018 19:32:20 +0000 (15:32 -0400)] 
userguide: update hyperscan documentation

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agorust/applayer: use correct return type for Parser
Victor Julien [Wed, 3 Oct 2018 19:13:31 +0000 (21:13 +0200)] 
rust/applayer: use correct return type for Parser

The mismatch between the types would randomly lead to the return code
of the Rust parser to be not correctly handled over the C/Rust
boundary. This would lead to the API considering a parser to be in
error state when it was not.

6 years agoafpacket: fix formatting of errors
Victor Julien [Wed, 3 Oct 2018 20:50:02 +0000 (22:50 +0200)] 
afpacket: fix formatting of errors

6 years agodns: shrink per flow state by improving layout 3493/head
Victor Julien [Sun, 30 Sep 2018 07:37:24 +0000 (09:37 +0200)] 
dns: shrink per flow state by improving layout

6 years agodetect/ttl: major clean up of ttl code
Victor Julien [Sat, 29 Sep 2018 07:44:06 +0000 (09:44 +0200)] 
detect/ttl: major clean up of ttl code

Redo unittests using FAIL/PASS macros
Switch parsing to pcre_copy_substring.
Misc cleanups.

6 years agospelling: fixing minor spelling mistakes
Victor Julien [Sat, 29 Sep 2018 07:42:14 +0000 (09:42 +0200)] 
spelling: fixing minor spelling mistakes

6 years agoyaml: fix typo
Victor Julien [Fri, 28 Sep 2018 19:51:08 +0000 (21:51 +0200)] 
yaml: fix typo

6 years agoconfigure: Fixed "no" output for XDP, libnss, libnspr
Hilko Bengen [Tue, 25 Sep 2018 12:16:50 +0000 (14:16 +0200)] 
configure: Fixed "no" output for XDP, libnss, libnspr

6 years agosuricata: file existence check (bug #2615)
Danny Browning [Tue, 18 Sep 2018 16:05:03 +0000 (10:05 -0600)] 
suricata: file existence check (bug #2615)

Files and directories passed via command line option -r should be checked for
existence during command line parsing and not start additional suricata
functionality.

6 years agoconfig: added ja3 to tls custom logging example 3492/head
jason taylor [Fri, 28 Sep 2018 20:40:01 +0000 (16:40 -0400)] 
config: added ja3 to tls custom logging example

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotlslog: don't log as "resumed" without ServerHello 3488/head
Mats Klepsland [Fri, 21 Sep 2018 06:03:26 +0000 (08:03 +0200)] 
tlslog: don't log as "resumed" without ServerHello

Don't log a session as "resumed" if a ServerHello record has not been
seen. This makes sure that incomplete TLS sessions where the ClientHello
contains a session ticket, is not logged as a session resumption.

6 years agooutput-json-tls: don't log as "resumed" without ServerHello
Mats Klepsland [Fri, 21 Sep 2018 05:57:34 +0000 (07:57 +0200)] 
output-json-tls: don't log as "resumed" without ServerHello

Don't log a session as "resumed" if a ServerHello record has not been
seen. This makes sure that incomplete TLS sessions where the ClientHello
contains a session ticket, is not logged as a session resumption.

6 years agoapp-layer-ssl: remove unnecessary length check
Mats Klepsland [Fri, 21 Sep 2018 05:25:19 +0000 (07:25 +0200)] 
app-layer-ssl: remove unnecessary length check

We already check that empty extensions are not decoded, so this length
check is not needed.

6 years agosetup-app-layer: support tests in tests/ 3487/head
Victor Julien [Wed, 19 Sep 2018 19:25:16 +0000 (21:25 +0200)] 
setup-app-layer: support tests in tests/

6 years agosetup-app-layer.py: integrate detect buffer setup
Jason Ish [Wed, 19 Sep 2018 05:51:37 +0000 (23:51 -0600)] 
setup-app-layer.py: integrate detect buffer setup

Add --detect to setup a detect buffer.

Obsoletes setup-app-layer-detect.sh.

6 years agorust: app-layer detect template for rust parsers
Jason Ish [Wed, 19 Sep 2018 17:15:47 +0000 (11:15 -0600)] 
rust: app-layer detect template for rust parsers

6 years agosetup-app-layer.py: attempt to cd into correct directory
Jason Ish [Wed, 19 Sep 2018 05:01:08 +0000 (23:01 -0600)] 
setup-app-layer.py: attempt to cd into correct directory

- If in src, cd to ..
- Error out early if the current directory does not look like a
  Suricata source directory.

6 years agorust app layer template: functions to get buffers
Jason Ish [Wed, 19 Sep 2018 04:35:20 +0000 (22:35 -0600)] 
rust app layer template: functions to get buffers

Example functions for getting the request and response buffers.
Useful for running detection on the decoded buffers.

6 years agorust template parser: sample pcap
Jason Ish [Tue, 18 Sep 2018 15:59:19 +0000 (09:59 -0600)] 
rust template parser: sample pcap

6 years agorust: app-layer template parser and logger
Jason Ish [Fri, 31 Aug 2018 05:20:21 +0000 (23:20 -0600)] 
rust: app-layer template parser and logger

The protocol is a simple request/reply based protocol that can
be hand driven with netcat.

Request  -> 12:Hello World!
Response -> 3:Byte

Its of the format <length>:<message> where length is the length
of the message, not including the length or the delimiter.

6 years agorustfmt.toml: set to 80 char line width
Jason Ish [Tue, 18 Sep 2018 02:35:14 +0000 (20:35 -0600)] 
rustfmt.toml: set to 80 char line width

The rustfmt default is 100, set to 80 to be more inline with
the Suricata C code.

6 years agorust: expose AppLayerParserStateIssetFlag to Rust.
Jason Ish [Thu, 30 Aug 2018 19:14:54 +0000 (13:14 -0600)] 
rust: expose AppLayerParserStateIssetFlag to Rust.

6 years agorust/gen-c-headers: don't attempt to split empty lines
Jason Ish [Thu, 30 Aug 2018 18:55:33 +0000 (12:55 -0600)] 
rust/gen-c-headers: don't attempt to split empty lines

6 years agotemplates: C stub output for Rust logger
Jason Ish [Thu, 30 Aug 2018 15:34:18 +0000 (09:34 -0600)] 
templates: C stub output for Rust logger

6 years agotemplates: C stub template for Rust parser
Jason Ish [Tue, 28 Aug 2018 13:12:45 +0000 (07:12 -0600)] 
templates: C stub template for Rust parser

6 years agodetect/template2: setup script
Victor Julien [Wed, 19 Sep 2018 16:49:15 +0000 (18:49 +0200)] 
detect/template2: setup script

6 years agodetect/template2: template with prefilter (copy of ttl)
Victor Julien [Wed, 19 Sep 2018 16:48:53 +0000 (18:48 +0200)] 
detect/template2: template with prefilter (copy of ttl)

6 years agodecode/template: minor updates
Victor Julien [Wed, 19 Sep 2018 15:07:01 +0000 (17:07 +0200)] 
decode/template: minor updates

6 years agosetup-app-layer-detect: update for tests/ dir
Victor Julien [Wed, 19 Sep 2018 14:34:44 +0000 (16:34 +0200)] 
setup-app-layer-detect: update for tests/ dir

6 years agosetup-simple-detect: update for new tests location
Victor Julien [Wed, 19 Sep 2018 14:17:02 +0000 (16:17 +0200)] 
setup-simple-detect: update for new tests location

6 years agoscripts/setup: remove 'ed' based setup scripts
Jason Ish [Thu, 30 Aug 2018 14:19:35 +0000 (08:19 -0600)] 
scripts/setup: remove 'ed' based setup scripts

Removes:
- setup-app-layer.sh
- setup-app-layer-logger.sh

These have been replaced by setup-app-layer.py.

6 years agosetup-app-layer: rewrite script in Python
Jason Ish [Wed, 29 Aug 2018 17:49:57 +0000 (11:49 -0600)] 
setup-app-layer: rewrite script in Python

The idea being that it is easier to read and maintain than
wrapping ed commands.

This script also merges the parser and logger setup into a single
script, but still allows just the parser, or just the logger
to be generated with flags, --logger and --parser.

6 years agoapp-layer/template: code cleanups
Victor Julien [Tue, 18 Sep 2018 12:50:59 +0000 (14:50 +0200)] 
app-layer/template: code cleanups

6 years agodetect/template: clean up packet keyword
Victor Julien [Tue, 18 Sep 2018 08:11:08 +0000 (10:11 +0200)] 
detect/template: clean up packet keyword

6 years agodetect/template: move test to own file in src/tests/
Victor Julien [Mon, 17 Sep 2018 15:26:52 +0000 (17:26 +0200)] 
detect/template: move test to own file in src/tests/

6 years agodetect/template: switch to v2 API, add MPM
Victor Julien [Mon, 17 Sep 2018 15:15:13 +0000 (17:15 +0200)] 
detect/template: switch to v2 API, add MPM

6 years agodetect/template: clean up unittest
Victor Julien [Mon, 17 Sep 2018 14:44:55 +0000 (16:44 +0200)] 
detect/template: clean up unittest

6 years agodetect/analyzer: disable automatic json output 3486/head
Jacob Masen-Smith [Fri, 11 May 2018 19:27:31 +0000 (12:27 -0700)] 
detect/analyzer: disable automatic json output

EngineAnalysisRules2 was in a strange location where it did not respect
the --engine-analysis flag. It has been moved to the same call location
as EngineAnalysisRules.

6 years agodetect/analyzer: add notes (and warnings)
Victor Julien [Tue, 11 Sep 2018 13:19:29 +0000 (15:19 +0200)] 
detect/analyzer: add notes (and warnings)