]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Wed, 18 Mar 2020 19:50:47 +0000 (20:50 +0100)]
config: common definitions
Victor Julien [Wed, 18 Mar 2020 20:01:54 +0000 (21:01 +0100)]
rules: add config action
Jason Ish [Fri, 10 Jul 2020 21:43:33 +0000 (15:43 -0600)]
dnp3/eve: update for regenerated dnp3 object logging code
Migration from Jansson to JsonBuilder.
Jason Ish [Fri, 10 Jul 2020 21:43:19 +0000 (15:43 -0600)]
dnp3/eve: regenerator object logging code
Jason Ish [Fri, 10 Jul 2020 21:42:41 +0000 (15:42 -0600)]
scripts/dnp3-gen: update to generate JsonBuilder code
Jason Ish [Fri, 10 Jul 2020 19:46:41 +0000 (13:46 -0600)]
jsonbuilder: set_float, append_float methods
New methods for setting and appending float values.
Jason Ish [Fri, 10 Jul 2020 19:22:09 +0000 (13:22 -0600)]
dnp3/eve: convert to jsonbuilder (non generated code)
First step of converting DNP3 to JsonBuilder by first converting
the non-generated code.
Jason Ish [Fri, 10 Jul 2020 19:19:35 +0000 (13:19 -0600)]
script/dnp3-gen: update generator to reflect in tree changes
Some changes were made to the generated files instead of the
generator script. Update the script to generate what is
in the current state of the in-tree generated files.
Shivani Bhardwaj [Thu, 9 Jul 2020 09:01:01 +0000 (14:31 +0530)]
src: use FatalError whenever possible
Replaces all patterns of SCLogError() followed by exit() with
FatalError(). Cocci script to do this:
@@
constant C;
constant char[] msg;
@@
- SCLogError(C,
+ FatalError(SC_ERR_FATAL,
msg);
- exit(EXIT_FAILURE);
Closes redmine ticket 3188.
Jeff Lucovsky [Sun, 3 May 2020 14:36:17 +0000 (10:36 -0400)]
doc: Add byte_math documentation
Jeff Lucovsky [Mon, 27 Jan 2020 00:39:15 +0000 (19:39 -0500)]
general: Correct typos
Jeff Lucovsky [Sun, 3 May 2020 13:00:04 +0000 (09:00 -0400)]
detect: byte_math support
Jeff Lucovsky [Sun, 3 May 2020 12:55:37 +0000 (08:55 -0400)]
detect: Use byte-math to byte var handling func
Jeff Lucovsky [Mon, 27 Jan 2020 00:27:22 +0000 (19:27 -0500)]
detect: Add byte_math detector
Jeff Lucovsky [Sun, 3 May 2020 12:55:04 +0000 (08:55 -0400)]
detect: Add utility module for byte var handling
Victor Julien [Fri, 10 Jul 2020 13:31:24 +0000 (15:31 +0200)]
eve/alert: minor cleanups
Victor Julien [Fri, 10 Jul 2020 13:26:53 +0000 (15:26 +0200)]
eve/alert: move files logging into util func
Victor Julien [Fri, 10 Jul 2020 13:21:59 +0000 (15:21 +0200)]
eve/alert: move app-layer logic into a util func
Shivani Bhardwaj [Wed, 1 Jul 2020 11:59:01 +0000 (17:29 +0530)]
hyperscan: better error message if not compiled
Philippe Antoine [Fri, 10 Jul 2020 07:40:49 +0000 (09:40 +0200)]
ssh: fix incomplete return for ssh kex
In the case where we already parsed some records
Philippe Antoine [Fri, 10 Jul 2020 08:50:36 +0000 (10:50 +0200)]
dcerpc: detect right parsing of empty op version
Philippe Antoine [Fri, 10 Jul 2020 08:38:14 +0000 (10:38 +0200)]
rfb: set app proto for signature keyword rfb.secresult
Jeff Lucovsky [Wed, 25 Sep 2019 20:49:48 +0000 (16:49 -0400)]
suricata.yaml.in: update stream-depth description
Jeff Lucovsky [Wed, 25 Sep 2019 20:47:49 +0000 (16:47 -0400)]
doc: update stream-depth description
Jeff Lucovsky [Wed, 25 Sep 2019 20:44:33 +0000 (16:44 -0400)]
doc: update file-store stream depth description
Jeff Lucovsky [Mon, 23 Sep 2019 23:44:00 +0000 (19:44 -0400)]
filestore: Use proper string in error case
When make-open-files has an invalid value, the incorrect value was being
displayed improperly
Jeff Lucovsky [Mon, 23 Sep 2019 23:43:14 +0000 (19:43 -0400)]
filestore: Validate stream-depth when non-zero
Make sure that configured non-zero values for stream-depth are
greater than stream_config.depth
Jeff Lucovsky [Fri, 10 Jul 2020 12:42:37 +0000 (08:42 -0400)]
output/json: Correct clang warning
This commit corrects the warning for mismatched type.
Jeff Lucovsky [Fri, 10 Jul 2020 12:23:56 +0000 (08:23 -0400)]
output/alert: Correct FORWARD_NULL Coverity issue.
This commit corrects the FORWARD_NULL issue in AlertJson by
null-checking p->flow
Jeff Lucovsky [Fri, 10 Jul 2020 12:22:43 +0000 (08:22 -0400)]
output/ftp: Correct Coverity DEADCODE issue
This commit corrects the deadcode (CID
1465224 ) issue in
EveFTPLogCommand.
Jeff Lucovsky [Fri, 10 Jul 2020 12:19:51 +0000 (08:19 -0400)]
filestore: Correct Coverity RESOURCE_LEAK issue
This commit corrects the RESOURCE_LEAK issue (CID
1465222 ) of the `FILE`
pointer.
Jeff Lucovsky [Fri, 10 Jul 2020 12:16:06 +0000 (08:16 -0400)]
detect: Correct Coverity REVERSE_INULL issue
This commit corrects the "Null pointer dereferences" issue (CID
1465221 ).
Shivani Bhardwaj [Wed, 8 Jul 2020 19:31:49 +0000 (01:01 +0530)]
qa: add atoi to list of banned functions
Shivani Bhardwaj [Wed, 1 Jul 2020 18:14:50 +0000 (23:44 +0530)]
pfring: fix StringParse* warnings
Closes redmine ticket 3808.
Shivani Bhardwaj [Sun, 22 Dec 2019 06:04:43 +0000 (11:34 +0530)]
ttl: Make IPV4 TTL uint_8t
Shivani Bhardwaj [Sun, 22 Dec 2019 05:51:17 +0000 (11:21 +0530)]
src: remove multiple uses of atoi
atoi() and related functions lack a mechanism for reporting errors for
invalid values. Replace them with calls to the appropriate
ByteExtractString* functions.
Partially closes redmine ticket 3053.
Emmanuel Thompson [Wed, 3 Jun 2020 18:37:30 +0000 (14:37 -0400)]
detect/asn1: Simplify errors and checks
Emmanuel Thompson [Thu, 30 Apr 2020 13:53:10 +0000 (09:53 -0400)]
detect/asn1: Update ASN1 struct lifetime
- 'static is only realistic when allocating and leaking it over the
FFI boundary
Emmanuel Thompson [Wed, 29 Apr 2020 17:10:06 +0000 (13:10 -0400)]
detect/asn1: Log out errors
- Failure to parse asn1-max-frames
- Failure on asn1 detection checks
Emmanuel Thompson [Wed, 20 May 2020 14:58:34 +0000 (10:58 -0400)]
detect/asn1: Update relative_offset keyword
- To be consistent with recent C version changes
- Add checks for over/underflows
Emmanuel Thompson [Mon, 27 Apr 2020 17:18:37 +0000 (13:18 -0400)]
detect/asn1: Remove asn1 C parser
- In favor of rust parser
Emmanuel Thompson [Tue, 28 Apr 2020 15:12:04 +0000 (11:12 -0400)]
detect/asn1: Update asn1 C files to use rust code
Mark rust extern "C" functions as pub in asn1 module to expose via cbindgen
Update detect-asn1.c/h to use rust functions
Emmanuel Thompson [Mon, 27 Apr 2020 20:27:22 +0000 (16:27 -0400)]
rust/asn1: Introduce ASN1 rust module
This module uses the `der-parser` crate to parse ASN1 objects in order to replace src/util-decode-asn1.c
It also handles the parsing of the asn1 keyword rules and detection checks performed in src/detect-asn1.c
Emmanuel Thompson [Mon, 27 Apr 2020 17:09:20 +0000 (13:09 -0400)]
rust: Update der, kerberos and snmp parser dependencies
- The update to der-parser allows us to use the latest API changes
Jeff Lucovsky [Sun, 31 May 2020 12:20:28 +0000 (08:20 -0400)]
util/proto: Convert validation routine to bool
This commit changes the signature of the protocol validation code to
bool and simplifies the validation steps.
Jeff Lucovsky [Sun, 31 May 2020 12:19:31 +0000 (08:19 -0400)]
output/json: Improve protocol output handling
Improve protocol label handling by eliminating an unneeded copy.
Additionally, unknown protocol values are no longer zero-padded.
Jeff Lucovsky [Sun, 31 May 2020 12:18:02 +0000 (08:18 -0400)]
output/flow: Improve protocol output handling
This commit improves handling of the protocol label by removing an
unnecessary copy.
Additionally, unknown protocol values are no longer zero-padded.
Jeff Lucovsky [Mon, 1 Jun 2020 14:23:12 +0000 (10:23 -0400)]
log/syslog: Improve protocol output handling
Move protocol handling outside of the packet alert loop.
Jeff Lucovsky [Mon, 1 Jun 2020 14:00:04 +0000 (10:00 -0400)]
log: Use updated SCProtoNameValid signature
Jeff Lucovsky [Sun, 31 May 2020 12:07:33 +0000 (08:07 -0400)]
output/lua: Remove unused proto code
This commit removes unused protocol string handling logic.
Jason Ish [Tue, 7 Jul 2020 06:04:13 +0000 (00:04 -0600)]
applayer template (rust): convert to JsonBuilder
Jason Ish [Tue, 7 Jul 2020 06:03:55 +0000 (00:03 -0600)]
applayer template (C): convert to JsonBuilder
Shivani Bhardwaj [Wed, 8 Jul 2020 07:11:43 +0000 (12:41 +0530)]
modbus: align comments properly
Shivani Bhardwaj [Wed, 8 Jul 2020 07:10:46 +0000 (12:40 +0530)]
modbus: make subfunction uint16_t
Shivani Bhardwaj [Fri, 26 Jun 2020 06:51:09 +0000 (12:21 +0530)]
enip: remove unnecessarry definition
Shivani Bhardwaj [Tue, 23 Jun 2020 07:54:24 +0000 (13:24 +0530)]
src: remove multiple uses of atoi
atoi() and related functions lack a mechanism for reporting errors for
invalid values. Replace them with calls to the appropriate
ByteExtractString* functions.
Closes redmine ticket 3053.
Victor Julien [Tue, 7 Jul 2020 19:27:08 +0000 (21:27 +0200)]
fuzz/sigpcap: make sure hassh is enabled
Vadym Malakhatko [Tue, 30 Jun 2020 11:42:26 +0000 (14:42 +0300)]
userguide: add documentation for Hassh usage
1. Rules keywords
2. Json keywords
3. Usage in lua
4. Enabling in configuration file
Vadym Malakhatko [Tue, 30 Jun 2020 11:14:52 +0000 (14:14 +0300)]
lua: add functions to get hassh parameters
Vadym Malakhatko [Tue, 7 Jul 2020 14:05:36 +0000 (17:05 +0300)]
eve: add Hassh fields to SSH JSON logger and add ssh log condition
Vadym Malakhatko [Tue, 30 Jun 2020 10:20:52 +0000 (13:20 +0300)]
detect: add (mpm) hassh keywords
Match on Hassh using ssh.hassh, ssh.hassh.server, ssh.hassh.string, ssh.hassh.server.string keywords, e.g:
alert ssh any any -> any any (msg:"match SSH hash"; ssh.hassh; content:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; sid:
1000010 ;)
alert ssh any any -> any any (msg:"match SSH hash-server"; ssh.hassh.server; content:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; sid:
1000020 ;)
alert ssh any any -> any any (msg:"match SSH hash-string"; ssh.hassh.string; content:"none,zlib@openssh.com,zlib"; sid:
1000030 ;)
alert ssh any any -> any any (msg:"match SSH hash-server-string"; ssh.hassh.server.string; content:"umac-64-etm@openssh.com,umac-128-etm@openssh.com,"; sid:
1000040 ;)
Vadym Malakhatko [Tue, 30 Jun 2020 09:59:34 +0000 (12:59 +0300)]
rust/ssh: add hassh generation
Add generation of hassh fingerprints based on fields in the kexinit record
Jeff Lucovsky [Mon, 18 May 2020 14:04:55 +0000 (10:04 -0400)]
detect/bsize: Use U16 bit macros
This commit changes the flag bit values to be expressed using the
BIT_U16 macro instead with hex values.
Jeff Lucovsky [Mon, 18 May 2020 13:59:40 +0000 (09:59 -0400)]
detect/bsize: Use SCLogDebug instead of printf
This commit updates debug "printf" message to use SCLogDebug
Jeff Lucovsky [Sun, 17 May 2020 13:51:40 +0000 (09:51 -0400)]
detect: Increase flag size for byte_jump
Jeff Lucovsky [Sat, 16 May 2020 18:53:01 +0000 (14:53 -0400)]
general: Fix typo in detect-bytejump.c
Jeff Lucovsky [Sat, 16 May 2020 18:52:25 +0000 (14:52 -0400)]
detect/bytejump: Add "from_end" support
This commit adds support for the byte jump "from_end" keyword and
unittests.
Jeff Lucovsky [Fri, 3 Jul 2020 16:32:57 +0000 (12:32 -0400)]
output/ikev2: Convert to JsonBuilder
Convert the IKEV2 Json logging to use JsonBuilder.
Philippe Antoine [Tue, 23 Jun 2020 07:08:22 +0000 (09:08 +0200)]
dnp3: adds unit test against previous bug
Philippe Antoine [Sun, 21 Jun 2020 20:22:47 +0000 (22:22 +0200)]
dnp3: fix buffer over read in responses parsing
Philippe Antoine [Fri, 19 Jun 2020 09:53:16 +0000 (11:53 +0200)]
dnp3: probing parser fixes direction based on dnp3 header
Philippe Antoine [Fri, 19 Jun 2020 09:43:04 +0000 (11:43 +0200)]
fuzz: disable DNP3 checksums while fuzzing
Philippe Antoine [Fri, 19 Jun 2020 09:34:44 +0000 (11:34 +0200)]
fuzz: improves fuzz target applayerparserparse
Does not proceed final chunk if we got an error previously
Flips the direction for last chunk as usual
Victor Julien [Sat, 4 Jul 2020 12:52:39 +0000 (14:52 +0200)]
flow: use stream state to string util func
Victor Julien [Fri, 3 Jul 2020 12:35:07 +0000 (14:35 +0200)]
stream: add state to string funcs
Victor Julien [Thu, 2 Jul 2020 19:18:11 +0000 (21:18 +0200)]
app-layer: set EOF flag in case of unsupported GAP
If GAP is not supported set EOF flags in the parser.
Victor Julien [Mon, 27 Jan 2020 09:34:00 +0000 (10:34 +0100)]
flow: improve 'under stress' behavior
When under stress, the packet threads ultimately fall back
to walking the hash table until they find a flow they can
safely evict and reuse. This could lead to all threads
fighting over the FlowBucket locks.
Fix by adding a limit to the number of hash rows that are
checked for a new flow. If the limit is reached, simply fail
to get a flow.
Victor Julien [Tue, 28 Jan 2020 09:33:23 +0000 (10:33 +0100)]
flow: fix TCP closed default initialization
TCP closed state was initialized to 0 by default.
Clean up 'closed' value setting for other protocols and the common
default.
Victor Julien [Thu, 23 Jan 2020 18:20:55 +0000 (19:20 +0100)]
flow: remove unused function declaration
Victor Julien [Sun, 3 May 2020 09:10:28 +0000 (11:10 +0200)]
flow: remove unused sctp enum member
This caused some arrays to be larger than needed.
Victor Julien [Mon, 11 May 2020 15:33:02 +0000 (17:33 +0200)]
flow: cleanup validation check
Victor Julien [Fri, 15 May 2020 07:57:42 +0000 (09:57 +0200)]
smb: fix 'dangling' files in lossy sessions
In case of lossy connections the SMB state would properly clean up
transactions, including file transactions. However for files the
state was never set to 'truncated', leading to files to stay 'active'.
This would lead these files staying in the SMB's state. In long running
sessions with lots of files this would lead to performance and memory
use issues.
This patch cleans truncates the file that was being transmitted when
a file transaction is being closed.
Victor Julien [Sun, 17 May 2020 12:24:07 +0000 (14:24 +0200)]
smb: check post-gap timeouts once a second at most
Victor Julien [Sun, 17 May 2020 12:48:52 +0000 (14:48 +0200)]
smb: update ts only if it changed
Jeff Lucovsky [Thu, 2 Jul 2020 14:01:12 +0000 (10:01 -0400)]
output/tftp: Convert to JsonBuilder
This commit converts the TFTP logging mechanisms to JsonBuilder.
Philippe Antoine [Sat, 2 May 2020 13:55:23 +0000 (15:55 +0200)]
signature: fix linked list for bidirectional signatures
Bidirectional signatures are really two signatures with one id
This needs to be handled with care when changing a linked list
Philippe Antoine [Fri, 19 Jun 2020 07:34:46 +0000 (09:34 +0200)]
detect: fail properly on invalid transform pcrexform
Antti Tönkyrä [Fri, 26 Jun 2020 10:37:45 +0000 (10:37 +0000)]
detect/flowbits: fix stack overflow in analyzer
Fix stack overflow in DetectFlowbitsAnalyze.
Use dynamically allocated array instead of stack and free
it after it is no longer needed.
Jason Ish [Wed, 1 Jul 2020 15:55:53 +0000 (09:55 -0600)]
netflow/eve: convert to JsonBuilder
Jeff Lucovsky [Wed, 17 Jun 2020 14:15:41 +0000 (10:15 -0400)]
doc: Correct typos
Jeff Lucovsky [Wed, 17 Jun 2020 14:15:06 +0000 (10:15 -0400)]
doc: Update byte_extract doc
Jeff Lucovsky [Fri, 12 Jun 2020 12:37:51 +0000 (08:37 -0400)]
doc: Fix spelling error
Jeff Lucovsky [Fri, 12 Jun 2020 12:37:23 +0000 (08:37 -0400)]
general: Fix spelling error
Jeff Lucovsky [Thu, 11 Jun 2020 13:08:42 +0000 (09:08 -0400)]
detect/content: Validate content byte array
This commit checks whether the content byte array is compatible with the
transforms, if any, for the rule.
Jeff Lucovsky [Thu, 11 Jun 2020 13:07:43 +0000 (09:07 -0400)]
detect: Add transform validation api
This commit extends the API with a function that validates arguments
against the transforms for the SM list (if any).
Jeff Lucovsky [Thu, 11 Jun 2020 13:05:08 +0000 (09:05 -0400)]
detect/transform: Add validation function
This commit adds a function to pre-validate buffers. If a content
buffer contains whitespace, the validation fails.
Jeff Lucovsky [Thu, 11 Jun 2020 12:31:55 +0000 (08:31 -0400)]
detect/transform: Add transform "validate" function
This commit adds an (optional) entry for a validation function. The
validation function, if present, will be used during rule processing.
Its role is to determine if the arguments are compatible with the
transform. E.g., a content string of "this string has whitespace" is not
compatible with the `strip_whitespace` transform.
Jason Ish [Mon, 29 Jun 2020 17:11:36 +0000 (11:11 -0600)]
dhcp/eve: remove erroneous jsonbuilder close
The JsonBuilder was being closed to early.
Jason Ish [Mon, 29 Jun 2020 17:10:40 +0000 (11:10 -0600)]
jsonbuilder: add debug_validate to state
If debug validation is enabled, panic on invalid state errors.
For example, calling close on an already closed jsonbuilder
object.
Jason Ish [Mon, 29 Jun 2020 17:09:16 +0000 (11:09 -0600)]
rust: macro debug_validate_fail to fail with message
Add a new debug_validate macro that unconditionally panics
with a message. Useful in Rust pattern matching.