]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Mon, 7 Oct 2019 08:40:29 +0000 (10:40 +0200)]
doc: add upgrade page
Victor Julien [Sun, 13 Oct 2019 08:26:30 +0000 (10:26 +0200)]
changelog: update for 5.0.0
Victor Julien [Sun, 13 Oct 2019 08:28:58 +0000 (10:28 +0200)]
changelog: update 5.0rc1 section with missing entries
Jason Ish [Sat, 12 Oct 2019 14:37:38 +0000 (08:37 -0600)]
automake: use tar-ustar for longer filenames
According to the automake manual it should be considered
portable these days.
https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html
Required for the dist generation with Rust vendoring.
Jason Ish [Sat, 12 Oct 2019 16:02:19 +0000 (10:02 -0600)]
doc: document eve/dns v2 as the default
Adds eve/dns v2 format documentation. Update legacy format
to require the version field.
Jason Ish [Sat, 12 Oct 2019 15:59:46 +0000 (09:59 -0600)]
suricata.yaml/dns: small cleanups, not that default is v2
Note that the eve dns log format is version 2 by default.
Make the value of commented out values their default.
Update the comment on the types to better reflect what it does.
Jeff Lucovsky [Sat, 12 Oct 2019 14:35:53 +0000 (10:35 -0400)]
mem: Use correct len with strlcpy
Fabrice Fontaine [Fri, 11 Oct 2019 08:55:51 +0000 (10:55 +0200)]
configure.ac: fix static build with pcap
pcap can depends on nl-3 so use pkg-config to find these dependencies
otherwise all AC_CHECK_LIB calls will fail when building statically
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Jason Ish [Fri, 11 Oct 2019 17:11:27 +0000 (11:11 -0600)]
Makefile: prefix suricata-update error with @
So only the echo output is displayed. Not the lines themselves.
Jason Ish [Fri, 11 Oct 2019 17:11:05 +0000 (11:11 -0600)]
suricata-update: don't install if requirements not met
Don't try to run suricata-update if its not installed.
The 'make install-rules' target would try to run suricata-update
when it was detected that it was bundled, but didn't consider
if suricata-update was actually installed.
Victor Julien [Fri, 11 Oct 2019 12:25:10 +0000 (14:25 +0200)]
stream: fix progress for min_inspect_depth
Make sure progress don't exceed raw_progress.
Victor Julien [Fri, 11 Oct 2019 10:47:29 +0000 (12:47 +0200)]
smtp: implement min_inspect_depth logic
Implement min_inspect_depth for SMTP so that file_data and
regular stream matches don't go out of sync on the stream start.
Added toserver bytes tracking.
Bug #3190.
Victor Julien [Fri, 11 Oct 2019 10:47:10 +0000 (12:47 +0200)]
debug: make it easier to trace flush logic
Victor Julien [Fri, 11 Oct 2019 10:32:09 +0000 (12:32 +0200)]
configure: don't print ERROR if we don't exit
Victor Julien [Fri, 11 Oct 2019 10:24:23 +0000 (12:24 +0200)]
eve/dhcp: remove leftover template comments
Victor Julien [Fri, 11 Oct 2019 10:23:05 +0000 (12:23 +0200)]
eve/alert: clean up proto metadata
Use a switch statement to select the protocol specific function.
Victor Julien [Fri, 11 Oct 2019 10:17:27 +0000 (12:17 +0200)]
dns: rename rust files and funcs
Victor Julien [Fri, 11 Oct 2019 10:10:23 +0000 (12:10 +0200)]
jansson: remove explicit <jansson.h> includes
Header is included from suricata-common.h
Victor Julien [Fri, 11 Oct 2019 10:06:59 +0000 (12:06 +0200)]
jansson: remove HAVE_LIBJANSSON guards
Victor Julien [Fri, 11 Oct 2019 09:21:41 +0000 (11:21 +0200)]
rust: remove build system HAVE_RUST guards
Victor Julien [Fri, 11 Oct 2019 09:19:14 +0000 (11:19 +0200)]
rust: remove all HAVE_RUST guards
Philippe Antoine [Tue, 1 Oct 2019 12:19:35 +0000 (14:19 +0200)]
http: updates suricata.yaml comments
As well as the userguide documentation about suricata.yaml
Jason Ish [Thu, 10 Oct 2019 22:32:21 +0000 (16:32 -0600)]
configure: fix python major version check on python 2.6
Python 2.6 doesn't use a named tuple for the version info,
instead use the index of the major version which works
on Python 2.6 upwards.
Jason Ish [Wed, 9 Oct 2019 15:18:31 +0000 (09:18 -0600)]
rust: run tests with same features as build
Cargo check wasn't being passed --features so could have a different
configuration than the build.
Jason Ish [Wed, 9 Oct 2019 07:05:24 +0000 (01:05 -0600)]
rustup: handle rustup for sudo and su
If rustup is in use, and a user uses sudo or su for the make
install, the install may fail with a "no default toolchain"
error.
To prevent this, detect at configure if rustup is being used,
then set RUSTUP_HOME for all calls to cargo.
Jason Ish [Sun, 22 Sep 2019 22:11:55 +0000 (16:11 -0600)]
python: fixes for installing from path with spaces
Related to Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2668
Jason Ish [Fri, 20 Sep 2019 21:58:53 +0000 (15:58 -0600)]
rust: fix build when source directory has spaces in it
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2668
Jason Ish [Wed, 9 Oct 2019 05:50:34 +0000 (23:50 -0600)]
configure: no, followed by reason for python tools
This:
Install suricatactl: no, requires distutils
instead of this:
Install suricatasc: requires distutils
Jason Ish [Wed, 9 Oct 2019 05:33:24 +0000 (23:33 -0600)]
configure: generic instructions for missing python modules
Instead of telling the user what packages to install for missing
Python modules, give generic instructions about what module
needs to be installed.
It is getting tricky to get these package names correct
across distributions.
Jason Ish [Tue, 8 Oct 2019 21:34:26 +0000 (15:34 -0600)]
suricata-update: build before install
Run the Python build independent of install. Prevents files
in the tree becoming owned by root.
Jason Ish [Wed, 9 Oct 2019 04:56:35 +0000 (22:56 -0600)]
configure: detect python major version
For informational purposes only when notifying what Python
modules are required during ./configure.
Jason Ish [Tue, 8 Oct 2019 15:43:12 +0000 (09:43 -0600)]
configure: don't detect python version
Don't detect the Python version, it is not needed anyways,
all we need is the Python path.
Also, python2 --version prints to stderr, while python3
prints to stdout, leading to some odd output during
./configure (but fixable).
Jason Ish [Thu, 3 Oct 2019 15:29:14 +0000 (09:29 -0600)]
doc: cleanup enging logging
Attempt cleanup the engine logging a bit.
Also a include a verbatim excerpt of the default configuration
here for reference purposes.
Jason Ish [Wed, 2 Oct 2019 22:49:50 +0000 (16:49 -0600)]
doc: -v verbose option documentation update
Update -v documentation to reflect the new behaviour discussed
in bug #1851 where -v changes the log level to fixed levels
instead of an offset of the default log level configured
in suricata.yaml.
Jason Ish [Wed, 2 Oct 2019 22:45:31 +0000 (16:45 -0600)]
help: better description for -v
-v: be more verbose (use multiple times to increase verbosity)
Jason Ish [Wed, 2 Oct 2019 22:38:50 +0000 (16:38 -0600)]
logging: used fixed levels of verbosity for -v, -vv...
Change the meaning of the verbosity flag to change the log
level to fixed levels instead of being relative to whats
configured.
-v => INFO
-vv => PERF
-vvv => CONIFG
-vvvv => DEBUG
But do now allow -v to decrease the verbosity.
Bug #1851
Jason Ish [Wed, 2 Oct 2019 22:23:05 +0000 (16:23 -0600)]
logging: respect individual log levels
The log level of individual loggers (console, file, syslog) was
being capped by the default log level. For example, if the
default log level was notice, setting the file level to info
would still result in notice level logging.
Bug #3210
Konstantin Klinger [Fri, 4 Oct 2019 13:46:15 +0000 (15:46 +0200)]
app-layer: remove obsolete msn protocol detection
Victor Julien [Thu, 10 Oct 2019 05:39:12 +0000 (07:39 +0200)]
datasets: make clear the feature is experimental
Victor Julien [Wed, 9 Oct 2019 15:37:08 +0000 (17:37 +0200)]
eve/anomaly: enable by default
Default config will only enable 'app-layer' type within the anomaly
logger.
Victor Julien [Wed, 9 Oct 2019 15:35:02 +0000 (17:35 +0200)]
htp: require 0.5.31
Victor Julien [Wed, 9 Oct 2019 15:12:00 +0000 (17:12 +0200)]
yaml: minor improvements
Victor Julien [Wed, 9 Oct 2019 15:01:50 +0000 (17:01 +0200)]
yaml: clean up 'autofp-scheduler' option
Jeff Lucovsky [Sat, 5 Oct 2019 13:57:18 +0000 (09:57 -0400)]
log/anomaly: remove leading underscore from static var
Jeff Lucovsky [Sat, 28 Sep 2019 13:02:18 +0000 (09:02 -0400)]
doc/eve.alert: Expand metadata description
Jeff Lucovsky [Sat, 28 Sep 2019 13:00:24 +0000 (09:00 -0400)]
logging/alert: Warn if metadata not selected
Warn when HTTP body logging has been selected but applayer/metadata
logging is not configured.
Jeff Lucovsky [Sat, 28 Sep 2019 12:59:04 +0000 (08:59 -0400)]
logging/anomaly: Clarify anomaly logging
Clarify the description of the anomaly logging types.
Jeff Lucovsky [Sat, 28 Sep 2019 12:57:29 +0000 (08:57 -0400)]
logging/alert: Expand alert logging description
Clarify the configuration requirements for alerts and http-body logging.
Jeff Lucovsky [Wed, 9 Oct 2019 00:14:23 +0000 (20:14 -0400)]
ftp: Handle malformed RETR/STOR
Ensure that RETR (STOR) have a filename -- otherwise, treat the command
string as malformed.
Added unittests for each command and verified that SEGV's occur without
parser change and no longer occur with the parser change.
Fabrice Fontaine [Sun, 6 Oct 2019 07:53:23 +0000 (09:53 +0200)]
configure.ac: fix --disable-geoip
$enableval should be used to know if the user has passed --enable-geoip
or --disable-geoip
Fixes:
- http://autobuild.buildroot.org/results/
a7a34f760ae5fe0922fdb720b8234dbcd85ed222
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Jason Ish [Tue, 1 Oct 2019 16:00:29 +0000 (10:00 -0600)]
config: install classification.config (and ref) to $datadir
Install classification.config and reference.config to $datadir,
where they can be updated on every upgrade.
This required moving them into a sub-directory for autotools
to do its thing.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3209
Victor Julien [Tue, 8 Oct 2019 19:48:24 +0000 (21:48 +0200)]
Revert "runmode: consider test mode a user mode"
This reverts commit
6dca50a322b08bbd6391f091787671305649671a .
The test mode should actually test in system mode by default as
that is what tools like Suricata-Update need before issuing a
reload command.
Victor Julien [Mon, 7 Oct 2019 14:02:16 +0000 (16:02 +0200)]
detect/ja3: print error for one rule only
Use 'silent error' logic for any other rules using ja3 as well.
Victor Julien [Mon, 7 Oct 2019 13:50:09 +0000 (15:50 +0200)]
detect/parse: allow signature parsing to fail silently
A sigmatches 'Setup' function may indicate it intends to fail
silently after the first error. It will return -2 instead of -1
in this case.
This is tracked in the DetectEngineCtx object, so errors will
be shown again at rule reloads.
Victor Julien [Mon, 7 Oct 2019 11:09:02 +0000 (13:09 +0200)]
detect/parser: minor cleanup
Victor Julien [Sun, 6 Oct 2019 10:01:32 +0000 (12:01 +0200)]
tls/ja3: allow 'auto' setting for ja3
Victor Julien [Thu, 3 Oct 2019 11:30:53 +0000 (13:30 +0200)]
tls/ja3: try to enable ja3 if rule keywords need it
Victor Julien [Thu, 3 Oct 2019 11:26:43 +0000 (13:26 +0200)]
tls/ja3: add way to check active config
Victor Julien [Thu, 3 Oct 2019 10:51:08 +0000 (12:51 +0200)]
tls/ja3: don't disable; allowing runtime enabling
Victor Julien [Thu, 3 Oct 2019 10:48:00 +0000 (12:48 +0200)]
tls/ja3: allow dynamic enabling of ja3
Victor Julien [Thu, 3 Oct 2019 08:39:06 +0000 (10:39 +0200)]
detect/reference: implement strict parsing option
Victor Julien [Thu, 3 Oct 2019 08:36:03 +0000 (10:36 +0200)]
detect/classtype: implement strict parsing option
Victor Julien [Thu, 3 Oct 2019 08:32:42 +0000 (10:32 +0200)]
detect/parse: add --strict-rule-keywords option
Add --strict-rule-keywords commandline option to enable strict rule
parsing.
It can be used without options or with a comma separated list:
--strict-rule-keywords
--strict-rule-keywords=all
--strict-rule-keywords=classtype,reference
Parsing implementations can use SigMatchStrictEnabled to check
if strict parsing is enabled for them and act accordingly.
Victor Julien [Thu, 3 Oct 2019 08:17:20 +0000 (10:17 +0200)]
detect: use named enum for keyword types
Victor Julien [Wed, 2 Oct 2019 19:47:29 +0000 (21:47 +0200)]
detect/reference: allow undefined references
References are currently not used in Suricata, so erroring out on
rules using a undefined reference is too harsh.
Just issue a warning once per unique missing reference.
Victor Julien [Wed, 2 Oct 2019 19:29:32 +0000 (21:29 +0200)]
reference: change scope of add func to global
Victor Julien [Wed, 2 Oct 2019 13:01:29 +0000 (15:01 +0200)]
reference: use global defines for size limits
Victor Julien [Wed, 2 Oct 2019 12:52:36 +0000 (14:52 +0200)]
detect/reference: code cleanups
Victor Julien [Wed, 2 Oct 2019 08:30:48 +0000 (10:30 +0200)]
detect/classtype: check size of rule input
Victor Julien [Tue, 1 Oct 2019 18:19:20 +0000 (20:19 +0200)]
classtype: handle missing classification.config
Still initialize the classtype hash table so that the classtypes
rules use can be added to it.
The file missing now reports a warning instead of error, as we
will continue to work.
Victor Julien [Wed, 2 Oct 2019 08:30:28 +0000 (10:30 +0200)]
classtype: use global defines for size limits
Victor Julien [Tue, 1 Oct 2019 13:20:55 +0000 (15:20 +0200)]
detect/classtype: show file and line for unknown classtype
Victor Julien [Tue, 1 Oct 2019 12:05:08 +0000 (14:05 +0200)]
detect/priority: use global define for default prio
Victor Julien [Tue, 1 Oct 2019 11:22:01 +0000 (13:22 +0200)]
detect/classtype: allow undefined classtypes
Effect of classification on Suricata's working is minimal. Impact
of adding undefined classtypes is large: rules will fail to load
completely. This also leads multiple lines of log output per rule,
which in a large ruleset can lead to excessive output.
This patch changes the classtype keyword behavior. Instead of erroring
and invalidating a rule, we will merely warn.
The undefined classtype is then defined with a default priority,
so other rules using the classtype will not also warn. This way
there will be just a single warning per missing classtype.
Victor Julien [Tue, 1 Oct 2019 10:50:13 +0000 (12:50 +0200)]
classtype: increase id size
Switch from u8 to u16 to allow for more classtypes.
Rename Signature::class to Signature::class_id to make it clear
it is an id.
Victor Julien [Tue, 1 Oct 2019 10:07:05 +0000 (12:07 +0200)]
classtype: small memory reduction
Reduce memory use by making sure SCClassConfClasstype
has a more optimal memory layout.
Victor Julien [Tue, 1 Oct 2019 10:02:47 +0000 (12:02 +0200)]
classtype: put UNITTESTS guards where appropriate
Victor Julien [Tue, 1 Oct 2019 09:59:58 +0000 (11:59 +0200)]
classtype: reduce scope of functions
Victor Julien [Tue, 1 Oct 2019 09:33:25 +0000 (11:33 +0200)]
detect/classtype: change duplicate classtype behavior
Detect duplicate instances and use the one with the highest
priority.
Use new priority flag to make the logic around explicit priority
sets easier to follow.
Minor code cleanups. Also clean up unittests.
Victor Julien [Tue, 1 Oct 2019 08:55:37 +0000 (10:55 +0200)]
detect/priority: change duplicate priority behavior
Introduce Signature init_flag to indicate priority has been set.
This will be needed in a follow-up classtype update.
Detect duplicate priority instances in a keyword, and use the
highest priority in the rule. Do issue a warning in this case.
Victor Julien [Tue, 1 Oct 2019 08:37:51 +0000 (10:37 +0200)]
detect: use BIT_U32 macros for INIT flags
Victor Julien [Tue, 1 Oct 2019 08:32:22 +0000 (10:32 +0200)]
detect/priority: minor cleanups
Victor Julien [Tue, 1 Oct 2019 08:25:11 +0000 (10:25 +0200)]
detect/classtype: clean up error handling
Victor Julien [Tue, 1 Oct 2019 08:23:17 +0000 (10:23 +0200)]
detect/classtype: warn on duplicate classtype
Issue warning instead of erroring and invalidating the rule.
It's not a very serious issue, so don't error out.
Victor Julien [Tue, 1 Oct 2019 08:19:53 +0000 (10:19 +0200)]
detect/classtype: fix parsing error checking
Jason Ish [Tue, 8 Oct 2019 16:23:08 +0000 (10:23 -0600)]
detect/test: update test for file prune changes
As the file prune is now moved to the flow worker, the file
prune is run later, meaning the first file has not yet
been pruned from the file container list.
Adjust test to look for a second file, and check the
flags on that file.
For commit addressing bug 2490.
Jason Ish [Mon, 7 Oct 2019 22:20:02 +0000 (16:20 -0600)]
file extraction: always prune files after detect
If a keyword like filemd5 was being used without a filestore,
or a file output enabled, it would be pruned before detection
had a chance to match.
Consolidate file pruning to the end of the flow worker so files
are available for detection even when a file output is not
enabled.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2490
Victor Julien [Tue, 8 Oct 2019 12:19:42 +0000 (14:19 +0200)]
afl/decode: fix stats related memleak reports
Shivani Bhardwaj [Mon, 7 Oct 2019 18:32:40 +0000 (00:02 +0530)]
afp: nicer error message in case of fanout failure
Use clearer message in case fanout is not supported or cluster_id is
already in use.
Closes redmine ticket #1940.
Shivani Bhardwaj [Mon, 7 Oct 2019 18:30:07 +0000 (00:00 +0530)]
suricata: Check if default log dir is writable
At the startup, if the default log dir provided either by command line
options or suricat.yaml is not writable, the error comes quite later.
This patch makes suricata exit if there is such an error in the
beginning itself.
Closes redmine ticket #2386.
Shivani Bhardwaj [Mon, 7 Oct 2019 18:27:43 +0000 (23:57 +0530)]
Makefile: Make libhtp available at install-rules stage
So far when "make install-rules" stage was executed, libhtp path was not
recognized as ldconfig does not run by this stage.
Set "LD_LIBRARY_PATH" since we already know the path where libhtp would
be.
Closes redmine ticket #2669.
Victor Julien [Sat, 5 Oct 2019 08:52:30 +0000 (10:52 +0200)]
doc/datasets: update example config to map
Victor Julien [Fri, 4 Oct 2019 13:55:52 +0000 (15:55 +0200)]
runmode: consider test mode a user mode
Victor Julien [Fri, 4 Oct 2019 13:48:23 +0000 (15:48 +0200)]
datasets: fix error handling
Victor Julien [Fri, 4 Oct 2019 08:03:33 +0000 (10:03 +0200)]
datasets: improve and doc return codes
Jason Ish [Thu, 3 Oct 2019 21:54:51 +0000 (15:54 -0600)]
dataset: fix return value check on isnotset
The dataset api returns -1 for not found.
Victor Julien [Thu, 3 Oct 2019 15:12:00 +0000 (17:12 +0200)]
thash: fix prealloc config setting
Victor Julien [Thu, 3 Oct 2019 15:08:36 +0000 (17:08 +0200)]
datasets: fix hash table config
Example:
datasets:
ua-seen:
type: string
state: ua-seen.lst
hash:
hash-size: 100000
prealloc: 1000
memcap: 256mb
Victor Julien [Thu, 3 Oct 2019 14:40:45 +0000 (16:40 +0200)]
datasets: change config to map
Example:
datasets:
ua-seen:
type: string
state: ua-seen.lst
dns-sha256-seen:
type: sha256
state: dns-sha256-seen.lst
Victor Julien [Fri, 4 Oct 2019 05:36:56 +0000 (07:36 +0200)]
lua: fix lua int size detection
Failed to work with non-bundled htp and with some stricter
compile flags.