]>
git.ipfire.org Git - thirdparty/suricata.git/log
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
jason taylor [Wed, 3 Apr 2019 17:26:24 +0000 (13:26 -0400)]
ci: updated travis and appveyor for nss/nspr
* added nss and nspr requirements for appveyor build
* added nss and nspr requirements for travis builds
* added travis build without nss and nspr
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Wed, 3 Apr 2019 17:21:14 +0000 (13:21 -0400)]
configure: fix nss check logic
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Wed, 3 Apr 2019 16:55:26 +0000 (12:55 -0400)]
configure: fix nspr check logic
Signed-off-by: jason taylor <jtfas90@gmail.com>
Victor Julien [Wed, 17 Apr 2019 11:11:10 +0000 (13:11 +0200)]
eve/smb: minor cleanup now Rust is mandatory
Victor Julien [Wed, 17 Apr 2019 07:04:17 +0000 (09:04 +0200)]
rust/smb: rename files and code from RustSMB to SMB
Victor Julien [Wed, 17 Apr 2019 06:45:36 +0000 (08:45 +0200)]
detect/dcerpc: cleanup now Rust is mandatory
Victor Julien [Tue, 16 Apr 2019 19:44:41 +0000 (21:44 +0200)]
detect/app-layer-event: cleanup test
Victor Julien [Tue, 16 Apr 2019 19:11:00 +0000 (21:11 +0200)]
smb: remove C implementation
Now that Rust is mandatory it is obsolete.
Ticket: #2849
Victor Julien [Sat, 13 Apr 2019 13:34:49 +0000 (15:34 +0200)]
openbsd: fix rust linking
Jason Ish [Thu, 4 Apr 2019 05:48:48 +0000 (23:48 -0600)]
dns: remove as much C DNS code as possible
As some of the C code is still used it can't all be removed.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2850
Jason Ish [Wed, 3 Apr 2019 23:08:00 +0000 (17:08 -0600)]
userguide: remove dns-log
Jason Ish [Wed, 3 Apr 2019 23:05:38 +0000 (17:05 -0600)]
dns-log: remove, not supported now that Rust is required
The non-json line based DNS log is not supported with Rust only
builds and has been scheduled for removal in Suricata 5.0.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2297
Jason Ish [Fri, 22 Mar 2019 14:28:15 +0000 (08:28 -0600)]
doc: remove autoconf replacement var for Rust
Set to yes as Rust is always enabled now.
Jason Ish [Fri, 22 Mar 2019 14:26:52 +0000 (08:26 -0600)]
config: enable all things requiring Rust
Instead of only enabling them if Rust is enabled, as Rust is
always enabled now.
Jason Ish [Fri, 22 Mar 2019 13:45:47 +0000 (07:45 -0600)]
travis-ci: enable Rust for all builds
Jason Ish [Fri, 22 Mar 2019 13:05:35 +0000 (07:05 -0600)]
autoconf: make Rust required in configure
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2507
Jason Ish [Thu, 21 Mar 2019 14:37:28 +0000 (08:37 -0600)]
travis-ci: test that configure fails without jansson
Update the no-jansson test to fail out if configure
passes.
The script needed to be converted into a single list item
for the early exit to work on Travis.
Jason Ish [Thu, 21 Mar 2019 13:40:35 +0000 (07:40 -0600)]
autoconf: jansson is now required
Jansson is required by the Suricata Rust support which
will also be mandatory.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/1970
Phil Young [Thu, 28 Mar 2019 20:01:54 +0000 (16:01 -0400)]
napatech: auto-config documentation update
Added documentation describing how to configure suricata to automaticly
configure sreams and host buffers without using NTPL. I.e. from
suricata.yaml.
Phil Young [Thu, 28 Mar 2019 20:00:58 +0000 (16:00 -0400)]
napatech: simplify integration with Napatech cards
- There is now an option to automatically create streams on the
correct NUMA node when using cpu affinity.
- When not using cpu affinity the user can specify streams to be
created in the suricata.yaml file. It is no longer required to
use NTPL to create streams before running suricata.
- The legacy usage model of running NTPL to create streams is still
available. This can be used for legacy configurations and complex
configurations that cannot be satisfied by the auto-config option.
Victor Julien [Tue, 9 Apr 2019 10:22:21 +0000 (12:22 +0200)]
byte: suppress errors in byte extraction utils
Victor Julien [Tue, 9 Apr 2019 10:11:15 +0000 (12:11 +0200)]
detect/bytejump: suppress runtime error messages
Victor Julien [Tue, 9 Apr 2019 08:12:19 +0000 (10:12 +0200)]
detect/byteextract: suppress runtime error messages
jason taylor [Wed, 3 Apr 2019 00:05:03 +0000 (20:05 -0400)]
pfring: update PfringThreadVars_ for gcc 4.x
Signed-off-by: jason taylor <jtfas90@gmail.com>
Emmanuel Roullit [Fri, 1 Mar 2019 14:21:46 +0000 (15:21 +0100)]
init: use pledge(2) after suricata initialization.
pledge(2) can be used on OpenBSD to restrict suricata possible
operation on the system once initialization is completed.
The process promises to only make use of:
- "stdio" to allow read(2) on IPS rules and write(2) on log file
- "rpath wpath cpath" to allow log rotation
- "unix" to operate the control unix socket and log unix sockets
- "dns" to retrieve DNS from recvfrom(2)/sento(2) in IPFW mode
- "bpf" as suricata uses libpcap, which uses the BIOCGSTATS operation
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@cognitix.de>
Emmanuel Roullit [Fri, 5 Apr 2019 08:46:06 +0000 (10:46 +0200)]
log: output file mode in octal on chmod warning
The mode input in chmod is an octal integer. However when the warning is logged,
the file mode is printed in decimal which is confusing.
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@cognitix.de>
Jeff Lucovsky [Tue, 26 Mar 2019 21:30:09 +0000 (14:30 -0700)]
decode: Change return type of IPv4 and TCP options decode
The return value from the options decoder in TCP and IPv4 is ignored.
This commit changes the return type of the function to `void` and
modifies existing return points to return without a value.
When an error occurs, the packet state is being set to indicate whether
it's valid or not and the existing return value is never used.
Jeff Lucovsky [Tue, 26 Mar 2019 21:32:52 +0000 (14:32 -0700)]
parse: Improve unknown protocol parse message
The message associated with unknown protocols during parsing is incomplete.
This commit improves the message readability.
Jeff Lucovsky [Sun, 7 Apr 2019 15:36:51 +0000 (08:36 -0700)]
doc: ssh.{proto,software} documentation update
Jeff Lucovsky [Sun, 7 Apr 2019 15:56:22 +0000 (08:56 -0700)]
sticky: Convert ssh_software to new format
Jeff Lucovsky [Sun, 7 Apr 2019 15:35:44 +0000 (08:35 -0700)]
sticky: Convert ssh_proto to new format
This changest converts the 'ssh_proto' sticky buffer
into the v2 framework.
Jeff Lucovsky [Sun, 31 Mar 2019 12:36:58 +0000 (05:36 -0700)]
detect/http: Use v2 inspect and mpm engines
This changeset updates the http stub detect logic to use the v2 inspect
and npm engines.
Victor Julien [Fri, 5 Apr 2019 14:47:06 +0000 (16:47 +0200)]
stream: suppress noisy debug info messages
Victor Julien [Fri, 5 Apr 2019 14:46:49 +0000 (16:46 +0200)]
pcap: suppress info messages
Victor Julien [Fri, 5 Apr 2019 13:50:39 +0000 (15:50 +0200)]
detect/disable-detect: suppress info message
The message would be displayed even when level was higher than
info.
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.
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.
Victor Julien [Fri, 5 Apr 2019 09:33:52 +0000 (11:33 +0200)]
logopenfile: remove duplicate ifdefs
Victor Julien [Fri, 5 Apr 2019 09:31:45 +0000 (11:31 +0200)]
runmodes: improve error messaging
Victor Julien [Fri, 5 Apr 2019 09:28:56 +0000 (11:28 +0200)]
startup: log system mode with version
Victor Julien [Fri, 5 Apr 2019 09:20:24 +0000 (11:20 +0200)]
instance: set system vs user mode
Victor Julien [Thu, 4 Apr 2019 10:03:26 +0000 (12:03 +0200)]
rust/mingw: enable in appveyor
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.
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.
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.
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).
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>
Victor Julien [Tue, 2 Apr 2019 13:21:43 +0000 (15:21 +0200)]
nfs: small cleanups
Victor Julien [Wed, 3 Apr 2019 18:24:59 +0000 (20:24 +0200)]
detect/ftp: small ftpdata_command cleanups
Victor Julien [Wed, 3 Apr 2019 18:18:35 +0000 (20:18 +0200)]
detect/uricontent: suggest http.uri as alternative
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.
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.
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.
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.
Victor Julien [Fri, 29 Mar 2019 14:10:00 +0000 (15:10 +0100)]
rust/mingw: fix C glue code generator
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
Victor Julien [Fri, 29 Mar 2019 13:44:36 +0000 (14:44 +0100)]
alert/unified2: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 13:44:15 +0000 (14:44 +0100)]
decode: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 09:21:28 +0000 (10:21 +0100)]
detect/iponly: only run iponly address parsers for iponly rules
Victor Julien [Fri, 29 Mar 2019 09:20:34 +0000 (10:20 +0100)]
detect/iponly: improve negation handling in parsing
Victor Julien [Fri, 29 Mar 2019 09:19:00 +0000 (10:19 +0100)]
detect/address: clean up 'any' logic
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.
Victor Julien [Thu, 28 Mar 2019 09:50:05 +0000 (10:50 +0100)]
detect/parse: reduce scope of main parse func