]>
git.ipfire.org Git - thirdparty/suricata.git/log
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.
Jason Ish [Fri, 27 Sep 2019 21:33:45 +0000 (15:33 -0600)]
configure: detect lua integer size
Lua 5.1 and 5.3 use a different integer size. Run a test program
to set the integer size used in the Rust FFI layer to Rust.
Jason Ish [Fri, 27 Sep 2019 22:28:54 +0000 (16:28 -0600)]
magic/test: remove NULL as format string
Remove passing NULL as a format string parameter
in test. Convert to FAIL_IF_NULL.
Jason Ish [Fri, 27 Sep 2019 22:06:06 +0000 (16:06 -0600)]
configure: remove unused LUA_PC_NAME.
This variable is no longer used. Instead multiple
lua pkg-config names are checked.
jason taylor [Mon, 30 Sep 2019 18:44:50 +0000 (14:44 -0400)]
config: update lzma size notes to match others
Signed-off-by: jason taylor <jtfas90@gmail.com>
Victor Julien [Thu, 3 Oct 2019 14:01:15 +0000 (16:01 +0200)]
doc: reformat linux ips guide
Eric Leblond [Sun, 29 Sep 2019 08:46:17 +0000 (10:46 +0200)]
doc: add nftables IPS configuration
Eric Leblond [Sun, 29 Sep 2019 08:17:04 +0000 (10:17 +0200)]
doc: information about scaling AF_PACKET IPS mode
Eric Leblond [Sat, 28 Sep 2019 20:06:50 +0000 (22:06 +0200)]
doc: add info about AF_PACKET IPS
Based on https://home.regit.org/2012/09/new-af_packet-ips-mode-in-suricata/
Also fix some typo in Netfilter setup.
Jason Ish [Tue, 1 Oct 2019 15:30:21 +0000 (09:30 -0600)]
doc: mark independent json loggers as deprecated
This is the loggers such as alert-json-log, dns-json-log, etc.
They are not even referenced in the default configuration file,
and are easily replaced with multiple eve instances.
Jason Ish [Tue, 1 Oct 2019 15:13:22 +0000 (09:13 -0600)]
drop.log: log deprecation warning if used
Jason Ish [Tue, 1 Oct 2019 15:10:23 +0000 (09:10 -0600)]
suricata.yaml: mark drop.log as deprecated
Jason Ish [Tue, 1 Oct 2019 15:09:10 +0000 (09:09 -0600)]
doc/drop.log: mark as deprecated and scheduled to be removed
Also make sure options are in sync with those in
suricata.yaml.
Jason Ish [Mon, 30 Sep 2019 17:35:24 +0000 (11:35 -0600)]
suricata.yaml: mark unified2 as deprecated
Jason Ish [Mon, 30 Sep 2019 17:35:05 +0000 (11:35 -0600)]
doc/unified2: add deprecation/removal notice
Jason Ish [Mon, 30 Sep 2019 17:31:17 +0000 (11:31 -0600)]
unified2: log deprecation warning when used
Jason Ish [Mon, 30 Sep 2019 17:22:43 +0000 (11:22 -0600)]
config: remove all but a stub of file-store v1.
Remove most of the file-store v1 configuration section and mark
it as deprecated. Provide a link where to find the available
options.
Jason Ish [Mon, 30 Sep 2019 17:16:59 +0000 (11:16 -0600)]
filestore(v1): deprecation log warning when enabled
Notify the user with a warning log that this feature is
deprecated and will be remove in v6 of Suricata.
Jason Ish [Mon, 30 Sep 2019 17:16:11 +0000 (11:16 -0600)]
doc/filestore(v1) - make deprecation text a note
Highlights that is is deprecated in the HTML output.
Jason Ish [Mon, 30 Sep 2019 17:13:53 +0000 (11:13 -0600)]
doc/filestore(v1) - document force-filestore field
Jeff Lucovsky [Thu, 3 Oct 2019 03:49:36 +0000 (20:49 -0700)]
doc/anomaly Remove event_no
Jeff Lucovsky [Thu, 3 Oct 2019 03:49:15 +0000 (20:49 -0700)]
log/anomaly: Remove event_no from alert
Victor Julien [Thu, 3 Oct 2019 13:37:37 +0000 (15:37 +0200)]
stream: remove fix stream.depth references
Peter Manev [Thu, 3 Oct 2019 09:15:27 +0000 (11:15 +0200)]
doc: Update tuning considerations doc
Peter Manev [Thu, 3 Oct 2019 09:14:58 +0000 (11:14 +0200)]
doc: Update high performance config doc
Victor Julien [Sat, 28 Sep 2019 08:55:34 +0000 (10:55 +0200)]
enip: fix compile warnings in gcc-8
In file included from suricata-common.h:471,
from app-layer-enip-common.c:27:
app-layer-enip-common.c: In function ‘DecodeCIPRequestPathPDU’:
util-debug.h:222:31: warning: ‘req_path_class8’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int _sc_log_ret = snprintf(_sc_log_msg, SC_LOG_MAX_LOG_MSG_LEN, __VA_ARGS__); \
^~~~~~~~
app-layer-enip-common.c:589:13: note: ‘req_path_class8’ was declared here
uint8_t req_path_class8;
^~~~~~~~~~~~~~~
app-layer-enip-common.c:607:9: warning: ‘segment’ may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (segment)
^~~~~~
app-layer-enip-common.c: In function ‘DecodeCIPResponsePDU’:
app-layer-enip-common.c:773:13: warning: ‘service’ may be used uninitialized in this function [-Wmaybe-uninitialized]
service &= 0x7f; //strip off top bit to get service code. Responses have first bit as 1
^~
app-layer-enip-common.c: In function ‘DecodeCIPRequestPDU’:
app-layer-enip-common.c:503:25: warning: ‘path_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
offset += path_size * sizeof(uint16_t); //move offset past pathsize
~~~~~~~~~~^~~~~~~~~~~~~~~~~~
app-layer-enip-common.c:506:5: warning: ‘service’ may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (service)
^~~~~~
Bug #3139.
Victor Julien [Sat, 28 Sep 2019 08:12:49 +0000 (10:12 +0200)]
eve/stats: update warning for new default behavior
Victor Julien [Sat, 28 Sep 2019 08:10:13 +0000 (10:10 +0200)]
doc/stats: minor clarrifications on 5.0 defaults
Victor Julien [Sat, 28 Sep 2019 08:05:02 +0000 (10:05 +0200)]
counters: improve handling missing global config
Improve warnings when eve.stats can't work because of the global config
missing or disabled.
Issue warning if global config is missing but stats are still enabled due
to the legacy stats.log.
Issue clearer warning when stats are disabled and unix socket dump-counters
command is issued.
Warnings include links to docs.
Bug #2465.
Victor Julien [Sat, 28 Sep 2019 06:16:45 +0000 (08:16 +0200)]
stats: add global way to check if API is enabled
Eric Leblond [Thu, 26 Sep 2019 09:16:07 +0000 (11:16 +0200)]
ebpf: make sure 'make dist' include eBPF files
Victor Julien [Wed, 25 Sep 2019 20:37:43 +0000 (22:37 +0200)]
posix: replace bzero with memset
bzero(3): The bzero() function is deprecated (marked as LEGACY in
POSIX.1-2001); use memset(3) in new programs. POSIX.1-2008 removes
the specification of bzero().
Use memset instead.
Victor Julien [Wed, 25 Sep 2019 20:23:51 +0000 (22:23 +0200)]
posix: remove deprecated index/rindex calls
Replace index by strchr and rindex by strrchr.
index(3) states "POSIX.1-2008 removes the specifications of index() and
rindex(), recommending strchr(3) and strrchr(3) instead."
Add index/rindex to banned function check so they don't get reintroduced.
Bug #1443.
Victor Julien [Wed, 25 Sep 2019 08:28:15 +0000 (10:28 +0200)]
detect/port: more cleanups
Remove unused funcs. Minor style updates.
Victor Julien [Tue, 24 Sep 2019 09:30:38 +0000 (11:30 +0200)]
detect/port: remove function only used in tests
Victor Julien [Tue, 24 Sep 2019 05:06:41 +0000 (07:06 +0200)]
detect/port: unittest cleanups
Victor Julien [Mon, 23 Sep 2019 13:59:19 +0000 (15:59 +0200)]
changelog: update for 5.0.0-rc1 release
Victor Julien [Sun, 22 Sep 2019 05:54:57 +0000 (07:54 +0200)]
der/asn1: reduce max depth limit to 32
OpenSSL uses 30, so this seems a reasonable limit.
Set a smaller limit than before to reduce the resources spent on
specially crafted input designed to be maximally expensive.
Victor Julien [Fri, 20 Sep 2019 15:12:17 +0000 (17:12 +0200)]
der/asn1: don't pass on more data than is specified
Set and Sequence parsers would pass on max available data instead
of the size of their object.
Malformed data could trigger massive recursion this way, leading
to spending much more resources than necessary.
Found using AFL.
Bug #3185.
Victor Julien [Wed, 18 Sep 2019 11:26:23 +0000 (13:26 +0200)]
decode/ipv4: fix ts opt flags decoding
Field is at data+1 offset, not +3. Also makes sure we always stay
within checked data bounds.
Reported-by: Sirko Höer -- Code Intelligence for DCSO.
Bug #3176.
Victor Julien [Wed, 18 Sep 2019 10:21:04 +0000 (12:21 +0200)]
decode/ipv4: unittest to show parsing issue
Victor Julien [Fri, 6 Sep 2019 13:07:56 +0000 (15:07 +0200)]
ssl: fix bounds checking in version decoding
Reported-by: Sirko Höer -- Code Intelligence for DCSO.
Bug #3169.
Jason Ish [Tue, 17 Sep 2019 10:08:15 +0000 (12:08 +0200)]
defrag: check minimum size of reassembled packet
Before re-assembling, check that the first fragment is large
enough to contain the IPv4 or IPv6 header to prevent
an out of bounds read (IPv4) or write (IPv6).
Reported-by: Sirko Höer -- Code Intelligence for DCSO.
Bug #3171.
Victor Julien [Fri, 6 Sep 2019 13:02:05 +0000 (15:02 +0200)]
ssl: minor cleanups
Victor Julien [Mon, 23 Sep 2019 12:30:10 +0000 (14:30 +0200)]
doc/userguide: add quickstart to dist
Mats Klepsland [Sun, 22 Sep 2019 16:28:32 +0000 (18:28 +0200)]
tls-log: restructure code for writing to buffer
Restructure code to make it clearer that either 'basic', 'extended'
or 'custom' is being printed, by creating one function for each of
the possibilities.
Mats Klepsland [Sun, 22 Sep 2019 16:02:17 +0000 (18:02 +0200)]
tls-log: quick code cleanup
Mats Klepsland [Sun, 22 Sep 2019 15:34:40 +0000 (17:34 +0200)]
tls-log: remove a wrongful comment
The app-layer parser for TLS has been TX aware for quite some time.
Remove a comment that is stating that it is not.
Mats Klepsland [Thu, 19 Sep 2019 21:10:48 +0000 (23:10 +0200)]
tls-log: fix so buffer is reset on custom logging
Move MemBufferReset() so it also works when using custom tls
logging. This avoids duplicate tls log entries.
Bug #3177
Philippe Antoine [Thu, 19 Sep 2019 14:24:31 +0000 (16:24 +0200)]
http: sets compression bomb limit
Philippe Antoine [Thu, 19 Sep 2019 14:54:44 +0000 (16:54 +0200)]
http: disable lzma decompression from configuration
Philippe Antoine [Fri, 13 Sep 2019 15:24:26 +0000 (17:24 +0200)]
lzma: replaces liblzma with own sdk for swf decompression
so as to avoid memory exhaustion
Yujie Zhao [Tue, 17 Sep 2019 12:47:18 +0000 (12:47 +0000)]
Avoid to shutdown NSS if it is not initialized
Jason Ish [Wed, 18 Sep 2019 21:41:53 +0000 (15:41 -0600)]
main: enable coredumps after privileges are dropped
On Linux, by default, coredumps are disabled after
privileges are dropped. This re-enables coredumps
after privileges are dropped.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/1271
Credit to Elazar Broad for the pull request:
https://github.com/OISF/suricata/pull/3362
Jeff Lucovsky [Wed, 28 Aug 2019 22:55:00 +0000 (18:55 -0400)]
rust/ftp: add parser for active mode port handling
Jeff Lucovsky [Wed, 28 Aug 2019 22:54:14 +0000 (18:54 -0400)]
ftp: Use rust parsers to parse dynamic ports
Philippe Antoine [Mon, 4 Mar 2019 12:25:46 +0000 (13:25 +0100)]
HTTP new parser warning for Ambiguous C-L
Shivani Bhardwaj [Thu, 19 Sep 2019 08:06:16 +0000 (13:36 +0530)]
detect: Make keyword description consistent
Closes redmine ticket #3137.
Victor Julien [Tue, 17 Sep 2019 13:01:45 +0000 (15:01 +0200)]
smtp: fix file_data inspection
Continue tracking data if API is used with detect. Detection engine
then manages the tracking.
Bug #2395.
Victor Julien [Tue, 17 Sep 2019 08:42:55 +0000 (10:42 +0200)]
sip: disable output by default
Jason Ish [Mon, 16 Sep 2019 23:11:37 +0000 (17:11 -0600)]
sip: rustfmt
As this is new Rust code, format with rustfmt using default
styling.
Jason Ish [Mon, 16 Sep 2019 22:56:02 +0000 (16:56 -0600)]
sip: disable by default in 5.0
Jason Ish [Mon, 16 Sep 2019 22:50:15 +0000 (16:50 -0600)]
sip rust fixup: remove unused import in tests
Jason Ish [Mon, 16 Sep 2019 22:48:47 +0000 (16:48 -0600)]
sip fixup: _Bool -> bool
Giuseppe Longo [Wed, 10 Jul 2019 20:05:30 +0000 (22:05 +0200)]
doc: add SIP keywords
Giuseppe Longo [Sun, 3 Mar 2019 20:52:25 +0000 (21:52 +0100)]
detect/sip.response_line: add sticky buffer
Matches on response line field in SIP.
Giuseppe Longo [Sun, 3 Mar 2019 20:37:30 +0000 (21:37 +0100)]
detect/sip.request_line: add sticky buffer
Matches on request line field in SIP.
Giuseppe Longo [Sat, 2 Mar 2019 20:45:07 +0000 (21:45 +0100)]
detect/sip.stat_msg: add sticky buffer
Matches on status msg field in SIP.
Giuseppe Longo [Sat, 2 Mar 2019 20:23:19 +0000 (21:23 +0100)]
detect/sip.stat_code: add sticky buffer
Matches on status code field in SIP.
Giuseppe Longo [Fri, 1 Mar 2019 20:27:23 +0000 (21:27 +0100)]
detect/sip.protocol: add sticky buffer
Matches on protocol field in SIP.
Giuseppe Longo [Thu, 28 Feb 2019 06:29:25 +0000 (07:29 +0100)]
detect/sip.uri: add sticky buffer
Matches on uri field in SIP.
Giuseppe Longo [Tue, 19 Feb 2019 20:11:31 +0000 (21:11 +0100)]
detect/sip.method: add sticky buffer
Matches on uri field in SIP.
Giuseppe Longo [Sun, 24 Feb 2019 18:16:09 +0000 (19:16 +0100)]
output/json-alert: add sip metadata
Put SIP information to alert event.
Giuseppe Longo [Sun, 17 Feb 2019 17:06:17 +0000 (18:06 +0100)]
rust/sip: add SIP logger
Giuseppe Longo [Sat, 9 Feb 2019 08:02:11 +0000 (09:02 +0100)]
rust/sip: add parser for SIP protocol
Victor Julien [Tue, 17 Sep 2019 08:41:59 +0000 (10:41 +0200)]
detect/dns.opcode: improve error reporting
Jason Ish [Mon, 16 Sep 2019 20:46:15 +0000 (14:46 -0600)]
doc: document dns.opcode keyword
Jason Ish [Mon, 16 Sep 2019 20:39:42 +0000 (14:39 -0600)]
doc: Replace dns_query with dns.query.
Jason Ish [Mon, 16 Sep 2019 05:43:14 +0000 (23:43 -0600)]
dns/detect: dns.opcode keyword
Add a rule keyword, dns.opcode to match on the opcode flag
found in the DNS request and response headers.
Only exact matches are allowed with negation.
Examples:
- dns.opcode:4;
- dns.opcode:!1;
Victor Julien [Mon, 16 Sep 2019 10:44:42 +0000 (12:44 +0200)]
htp: simplify depth check
Giuseppe Longo [Mon, 28 Jan 2019 20:39:07 +0000 (21:39 +0100)]
doc: update file-extraction section
Giuseppe Longo [Mon, 28 Jan 2019 15:15:22 +0000 (16:15 +0100)]
app-layer-htp: use stream depth with filestore
This permits to use stream-depth value set for file-store.
Currently if a file is being stored and hits a limit,
such as request or response body, it will be truncated
although file-store.stream-depth is enabled but the file should be
closed and not truncated.
Two unit tests have been added to verify that:
- a file is stored correctly
- chunk's length computation doesn’t cause an underflow
Giuseppe Longo [Thu, 24 Jan 2019 22:22:11 +0000 (23:22 +0100)]
app-layer-parser: flag a tx to use stream depth
This adds a new API that permit to set the stream-depth
file for file-storing when a rule with filestore keyword is matched.
Shivani Bhardwaj [Mon, 1 Jul 2019 10:58:04 +0000 (16:28 +0530)]
detect: Add missing keyword URLs and description
Add missing keyword URLs and their description. Fix the ones that
were incorrect.
Partially closes redmine ticket #2974.
Jack Mott [Mon, 19 Aug 2019 19:36:30 +0000 (13:36 -0600)]
classification: add command-and-control classtype
Added new classtype 'command-and-control' to be used with more
general TROJAN/MALWARE categories to designate traffic between
infected machine and c2 server.
Travis Green [Thu, 12 Sep 2019 16:27:53 +0000 (09:27 -0700)]
doc: fix whitespace
Travis Green [Thu, 12 Sep 2019 16:24:51 +0000 (09:24 -0700)]
doc: add to sigmatch_table
Travis Green [Fri, 9 Aug 2019 21:56:52 +0000 (15:56 -0600)]
detect: syntax regex logic update
Updated regex logic to include more spaces. Fixed spelling.
Jason Ish [Thu, 12 Sep 2019 22:44:57 +0000 (16:44 -0600)]
config/anomaly: use enabled key word; cleanups
The anomaly section was commented out, but the types sub object
was not, which then attached the types keyword to the previous
object.
Instead keep "anomaly" enabled in the yaml (not commented out)
and use the "enabled: no" to have it disabled by default.
Additonally reformat the comments to be better viewed in 80
columns.