]>
git.ipfire.org Git - thirdparty/suricata.git/log
Mats Klepsland [Tue, 14 May 2019 11:54:36 +0000 (13:54 +0200)]
detect-tls-sni: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 11:35:04 +0000 (13:35 +0200)]
detect-tls-ja3-string: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 11:28:22 +0000 (13:28 +0200)]
detect-tls-ja3-hash: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 11:22:46 +0000 (13:22 +0200)]
detect-tls-cert-subject: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 11:19:36 +0000 (13:19 +0200)]
detect-tls-cert-serial: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 11:15:35 +0000 (13:15 +0200)]
detect-tls-cert-issuer: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 09:26:11 +0000 (11:26 +0200)]
detect-tls-cert-fingerprint: move unittests to tests/
Mats Klepsland [Tue, 14 May 2019 07:25:57 +0000 (09:25 +0200)]
detect-tls: tidy up unittests
By doing the following:
- removing unnecessary locks
- moving variable declarations
- removing redundant function 'SigCleanSignatures'
Mats Klepsland [Tue, 14 May 2019 06:49:28 +0000 (08:49 +0200)]
ja3: check if JA3 is disabled on one line
Mats Klepsland [Tue, 14 May 2019 06:44:19 +0000 (08:44 +0200)]
detect-tls: remove NULL settings from keyword registration
Mats Klepsland [Tue, 14 May 2019 06:35:42 +0000 (08:35 +0200)]
detect-tls: declare ssl_state as const in GetData()
Mats Klepsland [Tue, 14 May 2019 06:12:47 +0000 (08:12 +0200)]
detect-tls: check return values of functions on setup
Check the return values of DetectBufferSetActiveList() and
DetectSignatureSetAppProto().
Mats Klepsland [Tue, 14 May 2019 05:54:03 +0000 (07:54 +0200)]
detect-tls: remove confusing underscores from variables
Remove confusing underscore prefix from variables in GetData() for
all tls keywords.
Mats Klepsland [Tue, 14 May 2019 05:42:16 +0000 (07:42 +0200)]
userguide: 'sticky' instead of 'Sticky' for all tls keywords
Jeff Lucovsky [Sat, 11 May 2019 17:59:16 +0000 (10:59 -0700)]
app-layer-ftp: Potential memory leak fixed
Ensure that when handling failures during STOR command
processing, that all memory is freed on the error path.
Mats Klepsland [Tue, 13 Nov 2018 23:38:56 +0000 (00:38 +0100)]
userguide: add documentation for tls.certs keyword
Mats Klepsland [Tue, 13 Nov 2018 23:31:08 +0000 (00:31 +0100)]
detect: add tls.certs keyword
Add keyword to do "raw" matching on each of the certificates in the
TLS certificate sticky buffer.
Example:
alert tls any any -> any any (msg:"tls.certs test"; tls.certs; \
content:"|01 02 03 04|"; sid:1;)
Victor Julien [Thu, 9 May 2019 10:11:29 +0000 (12:11 +0200)]
detect/ssh: fix ssh.protoversion memory leak
Victor Julien [Thu, 9 May 2019 10:06:50 +0000 (12:06 +0200)]
detect/ssh: mark old ssh keywords as deprecated
Victor Julien [Thu, 9 May 2019 10:06:08 +0000 (12:06 +0200)]
detect/parse: add flag to indicate keyword is deprecated
Issue warning when it is still used.
Victor Julien [Wed, 8 May 2019 14:50:04 +0000 (16:50 +0200)]
detect/nfs.version: minor cleanups
Victor Julien [Wed, 8 May 2019 14:49:47 +0000 (16:49 +0200)]
detect/nfs: add nfs.version
Victor Julien [Tue, 7 May 2019 19:07:52 +0000 (21:07 +0200)]
detect/dcerpc: add dcerpc.iface
Keep dce_iface as an alias.
Victor Julien [Tue, 7 May 2019 18:52:35 +0000 (20:52 +0200)]
detect/dcerpc.opnum: minor code cleanups
Victor Julien [Tue, 7 May 2019 18:52:15 +0000 (20:52 +0200)]
detect/dcerpc: add dcerpc.opnum as new name for dce_opnum
Jeff Lucovsky [Sat, 4 May 2019 14:55:50 +0000 (07:55 -0700)]
eve/logging: disable anomaly logging by default
Disable anomaly logging by default. Networks with excessive issues may
experience packet processing degradation.
Philippe Antoine [Mon, 6 May 2019 10:38:17 +0000 (12:38 +0200)]
http: adds event for header repetition
Jason Ish [Sat, 4 May 2019 14:03:52 +0000 (08:03 -0600)]
filestore: remove jansson ifdefs
Jansson is now required.
Jason Ish [Sat, 4 May 2019 14:03:22 +0000 (08:03 -0600)]
eve/file: remove rust and jansson ifdefs.
Both Rust and Jansson are required now.
Jason Ish [Sat, 4 May 2019 13:48:46 +0000 (07:48 -0600)]
filestore: fix leak in contructing json
Use json_array_append_new instead of json_array_append to transfer
ownership of the integer object to jansson so it gets freed.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2961
Victor Julien [Fri, 3 May 2019 12:21:04 +0000 (14:21 +0200)]
detect/engine: make DetectAppLayerMpmRegister decprecated
Victor Julien [Fri, 3 May 2019 12:02:46 +0000 (14:02 +0200)]
detect/dnp3: add dnp3.data with v2 api support
Adds MPM support as well. Add TxDetectFlags support to the parser
to avoid duplicate matches.
magenbluten [Wed, 27 Feb 2019 09:14:17 +0000 (09:14 +0000)]
filestore: fix dropping of unwanted files (Issue #2853)
Victor Julien [Fri, 3 May 2019 10:10:14 +0000 (12:10 +0200)]
files: open files with track id only
Victor Julien [Fri, 3 May 2019 08:36:15 +0000 (10:36 +0200)]
detect/dce_stub_data: add dcerpc.stub_data
Also use v2 API for inspect and mpm registration.
Victor Julien [Fri, 3 May 2019 08:16:38 +0000 (10:16 +0200)]
detect/inspect: add flags to inspect buffer
Victor Julien [Fri, 3 May 2019 08:00:09 +0000 (10:00 +0200)]
detect/content-inspect: turn void arg into Packet
Replace the 'void *data' argument by a 'Packet *p' as this was
the only user left of the data pointer.
Victor Julien [Fri, 3 May 2019 07:47:59 +0000 (09:47 +0200)]
detect/dce_stub_data: minor cleanups
Victor Julien [Fri, 3 May 2019 07:47:23 +0000 (09:47 +0200)]
detect/dcerpc: move endian handling from pointer to flags
Victor Julien [Fri, 3 May 2019 07:18:47 +0000 (09:18 +0200)]
detect/krb5: add krb5.sname and krb5.cname
Victor Julien [Fri, 3 May 2019 07:06:09 +0000 (09:06 +0200)]
detect/nfs: remove HAVE_RUST guards
Victor Julien [Fri, 3 May 2019 05:13:00 +0000 (07:13 +0200)]
valgrind: support hyperscan warning
Issue on Ubuntu 19.04.
==18655== Conditional jump or move depends on uninitialised value(s)
==18655== at 0x5454603: hs_alloc_scratch (in /usr/lib/x86_64-linux-gnu/libhs.so.5.1.0)
==18655== by 0x3D5C9A: SCHSPreparePatterns (util-mpm-hs.c:707)
==18655== by 0x215FEC: DetectMpmPrepareBuiltinMpms (detect-engine-mpm.c:364)
==18655== by 0x20813A: SigGroupBuild (detect-engine-build.c:1932)
==18655== by 0x21287B: SigLoadSignatures (detect-engine-loader.c:366)
==18655== by 0x35A702: LoadSignatures (suricata.c:2419)
==18655== by 0x35B0DD: PostConfLoadedDetectSetup (suricata.c:2574)
==18655== by 0x35C827: main (suricata.c:2986)
https://github.com/intel/hyperscan/issues/148
Victor Julien [Thu, 2 May 2019 18:31:57 +0000 (20:31 +0200)]
afl: fix compilation
Victor Julien [Wed, 1 May 2019 14:36:50 +0000 (16:36 +0200)]
ftp: fix realloc handling to avoid valgrind warning
Bug #2951
Victor Julien [Thu, 2 May 2019 11:02:07 +0000 (13:02 +0200)]
detect/file.magic: add sticky buffer
Add sticky buffer to inspect file magic. Includes mpm support.
Victor Julien [Thu, 2 May 2019 14:30:57 +0000 (16:30 +0200)]
detect/thread: ctx info is allowed to have NULL data
Victor Julien [Thu, 2 May 2019 10:01:20 +0000 (12:01 +0200)]
detect/smb: clean up keywords
Victor Julien [Thu, 2 May 2019 09:45:46 +0000 (11:45 +0200)]
detect/file: add file.data, small cleanups
Victor Julien [Thu, 2 May 2019 09:26:34 +0000 (11:26 +0200)]
detect/ssh: minor --list-keywords improvements
Victor Julien [Thu, 2 May 2019 08:54:39 +0000 (10:54 +0200)]
detect/http.header.raw: minor cleanups
Victor Julien [Thu, 2 May 2019 08:48:15 +0000 (10:48 +0200)]
detect/http.host.raw: minor cleanups
Victor Julien [Thu, 2 May 2019 08:43:46 +0000 (10:43 +0200)]
detect/http.method: minor cleanups
Victor Julien [Thu, 2 May 2019 08:31:19 +0000 (10:31 +0200)]
detect/http.start: modernize name and code
Victor Julien [Wed, 1 May 2019 19:53:44 +0000 (21:53 +0200)]
detect/http: cleanup http stat *
Victor Julien [Wed, 1 May 2019 19:29:29 +0000 (21:29 +0200)]
detect/http.host: rename file for consistency
Victor Julien [Wed, 1 May 2019 19:27:49 +0000 (21:27 +0200)]
detect/http.host: fix --list-keywords output
Victor Julien [Wed, 1 May 2019 10:53:13 +0000 (12:53 +0200)]
detect/http.uri: fix up --list-keywords output
Victor Julien [Wed, 1 May 2019 10:49:57 +0000 (12:49 +0200)]
detect/http: request/response line keyword modernization
Victor Julien [Tue, 30 Apr 2019 19:06:03 +0000 (21:06 +0200)]
detect/http.header_names: use v2 api and new name
Victor Julien [Mon, 29 Apr 2019 17:55:55 +0000 (19:55 +0200)]
changelog: update for 5.0.0-beta1
Victor Julien [Tue, 2 Apr 2019 13:32:33 +0000 (15:32 +0200)]
nfs: fix integer underflow
Fix int underflow that leads to Rust panic in NFS3 readdirplus
parsing.
Reported-by: Sirko Höer -- Code Intelligence for DCSO.
Philippe Antoine [Wed, 27 Mar 2019 21:56:15 +0000 (22:56 +0100)]
ssl : SSLProbingParser overflow fix
Found by fuzzing
Fixes ssl detection evasion by packet splitting
Victor Julien [Mon, 15 Apr 2019 12:52:38 +0000 (14:52 +0200)]
parse/ip: fix potential oob write in ipv4 validation
Found using AFL.
Jason Ish [Tue, 26 Mar 2019 22:46:27 +0000 (16:46 -0600)]
dhcp: verify client id len before parsing data
Verify that the client id length is at least 2 per the DHCP
protocol rfc before parsing the data.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2902
Jason Ish [Tue, 26 Mar 2019 22:24:34 +0000 (16:24 -0600)]
rust/ftp: validate port components in passive reponse
Make sure they are valid 8 bit integers before combining the
two parts into a u16 to prevent an overflow of the u16
return value.
Add unit tests to check parsing of invalid ports.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2904
Jason Ish [Wed, 20 Mar 2019 12:45:49 +0000 (06:45 -0600)]
rules: add mpls packet too small decoder rule
Jason Ish [Fri, 15 Mar 2019 23:13:00 +0000 (17:13 -0600)]
mpls: check buffer length before peeking at next header
Check that we have enough bytes before peaking into the MPLS
packet payload.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2884
Jason Ish [Mon, 18 Mar 2019 06:47:30 +0000 (00:47 -0600)]
ethernet: fix next packet size on DCE packet
Missing parans on the DCE length caused the length update
for the next call to DecodeEthernet to be wrong.
Tests added.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2887
Victor Julien [Fri, 15 Mar 2019 13:01:40 +0000 (14:01 +0100)]
ssh: fix banner overflow issue
Reported-by: Sirko Höer - Code Intelligence
Victor Julien [Mon, 29 Apr 2019 08:47:50 +0000 (10:47 +0200)]
runmodes: for test runmodes, clean up properly
For conf test and engine analysis, clean up memory correctly.
This helps valgrind tests for leaks.
Jeff Lucovsky [Sat, 20 Apr 2019 12:05:30 +0000 (05:05 -0700)]
logging: display base64 decoded string for packet
This changeset changes the packet display to be base64, rather than hex.
Jeff Lucovsky [Tue, 16 Apr 2019 23:27:51 +0000 (16:27 -0700)]
logging: Ensure all anomalous events have an event_type
This change ensures that each anomaly is tagged with an
event type to support querying.
Each anomalous event will include `"event_type": "anomaly"`
in the log record.
Jeff Lucovsky [Mon, 8 Apr 2019 22:37:45 +0000 (15:37 -0700)]
eve/alert: Remove unused results from PrintRawLineHexBuf
This changeset removes the call to `PrintRawLineHexBuf`. The
return values were never used.
Jeff Lucovsky [Tue, 2 Apr 2019 23:14:36 +0000 (16:14 -0700)]
logging: Anomaly logging
This changeset adds anomaly logging to suricata for issue 2282.
Anomaly logging is controlled via the `anomaly` section within eve-log.
There is a single option -- `packethdr` -- for including the packet header
in the anomaly.
Philippe Antoine [Wed, 6 Mar 2019 07:56:47 +0000 (08:56 +0100)]
http: new event for auth unrecognized
activates libhtp auth parsing
Fixes #984
Jeff Lucovsky [Mon, 8 Apr 2019 22:53:47 +0000 (15:53 -0700)]
documentation: Correct rst for ssh-keywords
This changeset corrects an error in the ssh-keywords
where 3 "`" characters were used instead of 2 "`" characters.
Jeff Lucovsky [Mon, 8 Apr 2019 22:52:55 +0000 (15:52 -0700)]
documentation: sticky buffer updates
This changeset updates the userguide for the TLS and JA3
keywords that have been renamed from <id>_<name> to <id.name>
Jeff Lucovsky [Sun, 7 Apr 2019 17:42:25 +0000 (10:42 -0700)]
detect: Modernize TLS keywords
This changeset adds keywords for "tls.<name>" and moves the existing
value of "tls_<name>" to an alias.
Alexander Bluhm [Wed, 10 Apr 2019 13:32:55 +0000 (15:32 +0200)]
init: pledge(2) needs "fattr" during suricata reload.
When killed with SIGHUP, suricata reopens the log files. If filemode
is set in the config, it needs pledge promise "fattr" to allow the
chmod(2) on OpenBSD.
Giuseppe Longo [Tue, 23 Apr 2019 14:27:41 +0000 (16:27 +0200)]
doc: update http.protocol description
Giuseppe Longo [Tue, 9 Apr 2019 19:03:17 +0000 (21:03 +0200)]
detect-http-protocol: use v2 inspect/mpm engines
This updates inspect/mpm engines to v2.
Shivani Bhardwaj [Mon, 1 Apr 2019 18:02:08 +0000 (23:32 +0530)]
doc: Add manpages for suricatasc and suricatactl
Add the missing manpages and the corresponding Sphinx configuration
for the command line tools `suricatasc` and `suricatactl`.
Closes redmine ticket #884.
Victor Julien [Tue, 23 Apr 2019 09:20:59 +0000 (11:20 +0200)]
detect/files: fix file sigs state handling
Make sure all file sig mismatches indicate this in their return
code, not just the ones with filestore enabled. This is needed
to tell the stateful detect engine that it is dealing with a file
sig, so it can make sure these are inspected correctly even if
there are possibly multiple files per tx.
Victor Julien [Tue, 23 Apr 2019 11:06:16 +0000 (13:06 +0200)]
eve/alert: take vlan from packet, not flow
Flow is not guaranteed to exist.
Eric Leblond [Sun, 21 Apr 2019 08:04:27 +0000 (10:04 +0200)]
doc: add info about buffer usage in lua
Eric Leblond [Sun, 21 Apr 2019 07:40:28 +0000 (09:40 +0200)]
detect-filename: avoid multiple inspections of buf
If the filename inspection function is returning nomatch this will
trigger iterative inspections with same content (aka filename) being
inspected. To avoid this we change the return as the buffer inspection
has not to be inspected anymore.
Eric Leblond [Sat, 20 Apr 2019 22:39:16 +0000 (00:39 +0200)]
doc: fix way to build URL
Eric Leblond [Sat, 20 Apr 2019 21:23:10 +0000 (23:23 +0200)]
detect-lua: implement sticky buffer
This patch implement an option named 'buffer' that can be used in the
init function of a lua signature:
function init (args)
local needs = {}
needs["buffer"] = tostring(true)
return needs
end
With this, the lua script will get access to the sticky buffer
content.
Eric Leblond [Sat, 20 Apr 2019 21:20:46 +0000 (23:20 +0200)]
detect-lua: fix DNP3 value
Mark Janssen [Sun, 10 Feb 2019 14:29:42 +0000 (15:29 +0100)]
eve/json: always output vlan field as array
Mark Janssen [Thu, 24 Jan 2019 21:04:51 +0000 (22:04 +0100)]
eve/flow: add in_iface field
Fixes #2057
Mark Janssen [Thu, 24 Jan 2019 20:48:21 +0000 (21:48 +0100)]
eve/flow: add vlan field
Bendik Hagen [Thu, 31 Jan 2019 21:43:58 +0000 (22:43 +0100)]
Flow/Stream: set psuedopacket iface/vlan from flow
This fixes redmine bug #2057 by setting pseudopacket iface and vlan from
flow values, solving the problem of missing vlan/iface when psuedopacket
gets logged/alerted on.
Bendik Hagen [Thu, 31 Jan 2019 21:41:46 +0000 (22:41 +0100)]
Flow: Set flow iface and vlan_idx
Setting flow iface and vlan_idx from packet, making it possible to log
iface and vlan on psuedopackets and in flow-logs.
Bendik Hagen [Thu, 31 Jan 2019 21:32:25 +0000 (22:32 +0100)]
Flow: Adding livedev and vlan_idx on flow
Adding livedev and vlan_idx on flow, making it possible to use it for
logging in_iface on flow-logs and fix in_iface on psuedopackets.
Philippe Antoine [Thu, 4 Apr 2019 18:37:29 +0000 (20:37 +0200)]
http: logs content range
Fixes #2485
Philippe Antoine [Thu, 18 Apr 2019 14:04:50 +0000 (16:04 +0200)]
smtp: rset command resets bdat chunks length
Fixes #1860
Philippe Antoine [Mon, 1 Apr 2019 12:57:15 +0000 (14:57 +0200)]
ssh : code style consistency
Adds SSH_FLAG_VERSION_PARSED to flags before each return
This way, we are sure SSHParseBanner does not get called again
And proto_version does not get leaked
Jeff Lucovsky [Sat, 16 Mar 2019 13:54:01 +0000 (06:54 -0700)]
decode: Improved FTP active mode handling
This changeset addresses 2 issues:
- 2459
- 2527
and improves handling for FTP active mode over IPv4 and IPv6.
Active mode is triggered when the FTP client conveys the port
that should be used for a data connection (PORT, EPRT).
When this occurs, the FTP state is marked as "active".
Jason Ish [Tue, 26 Mar 2019 22:28:17 +0000 (16:28 -0600)]
mpls: fix misaligned read
Instead of casting the packet buffer to a uint32, memcpy it to
avoid misaligned read error, as caught by the undefined behavior
detector (ubsan).
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2903