]>
git.ipfire.org Git - thirdparty/suricata.git/log
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.
Mats Klepsland [Fri, 13 Sep 2019 21:49:11 +0000 (23:49 +0200)]
output-lua: register app-layer parser logger for SSH
Bug #3162
Mats Klepsland [Fri, 13 Sep 2019 21:46:36 +0000 (23:46 +0200)]
output-lua: register app-layer parser logger for TLS
Bug #3162
Jason Ish [Thu, 12 Sep 2019 20:53:07 +0000 (14:53 -0600)]
htp/lzma: set limit from configuration
Also use a default defined in Suricata, not libhtp.
Victor Julien [Tue, 10 Sep 2019 11:06:28 +0000 (13:06 +0200)]
htp: set lzma memlimit from config
Victor Julien [Thu, 12 Sep 2019 15:31:39 +0000 (17:31 +0200)]
doc/dotprefix: fix example rules
Jeff Lucovsky [Sun, 14 Jul 2019 18:28:14 +0000 (14:28 -0400)]
detect/transform: add dotprefix keyword to doc
Jeff Lucovsky [Sun, 14 Jul 2019 18:16:23 +0000 (14:16 -0400)]
detect/transform: add dotprefix keyword
Victor Julien [Thu, 12 Sep 2019 14:42:31 +0000 (16:42 +0200)]
doc/eve.anomaly: fix indent and general formatting
Jeff Lucovsky [Sat, 31 Aug 2019 18:23:11 +0000 (14:23 -0400)]
logging/anomaly: Add warning code for anomaly log
Jeff Lucovsky [Tue, 13 Aug 2019 00:01:34 +0000 (20:01 -0400)]
doc: Simplified anomaly configuration settings
Jeff Lucovsky [Sun, 7 Jul 2019 23:31:23 +0000 (19:31 -0400)]
logging/anomaly: Support configuration filter types
Eric Leblond [Tue, 10 Sep 2019 09:42:43 +0000 (11:42 +0200)]
doc: change eBPF directory path
Victor Julien [Tue, 10 Sep 2019 11:18:20 +0000 (13:18 +0200)]
rust/conf: don't print failed conf lookups at info level
Victor Julien [Tue, 10 Sep 2019 11:17:40 +0000 (13:17 +0200)]
rdp: disable eve.rdp by default
Jason Ish [Mon, 9 Sep 2019 19:30:07 +0000 (13:30 -0600)]
rdp: disable rdp by default for 5.0
Jason Ish [Mon, 9 Sep 2019 17:32:28 +0000 (11:32 -0600)]
rdp: address comments in pull request
Pull request:
https://github.com/OISF/suricata/pull/4174
- fix commit: range -> set
- OUTPUT_BUFFER_SIZE -> JSON_OUTPUT_BUFFER_SIZE
- output: check for initdata first
Zach Kelly [Thu, 5 Sep 2019 17:46:14 +0000 (13:46 -0400)]
protocol parser: rdp
Initial implementation of feature 2314:
1. Add protocol parser for RDP
2. Add transactions for RDP negotiation
3. Add eve logging of transactions
Shivani Bhardwaj [Fri, 30 Aug 2019 16:16:44 +0000 (21:46 +0530)]
counters: Add new default for decoder events
Set the new default for decoder events to `decoder.event` instead of the
previously used `decoder`. Remove the corresponding warning for 5.0.
Andreas Herz [Sat, 31 Aug 2019 22:39:04 +0000 (00:39 +0200)]
doc: add quickstart guide
Victor Julien [Mon, 9 Sep 2019 13:36:39 +0000 (15:36 +0200)]
ips: fix wrong thread for bridge ips modes
Victor Julien [Mon, 9 Sep 2019 17:26:36 +0000 (19:26 +0200)]
doc/stream: briefly explain bypass
Phil Young [Mon, 5 Aug 2019 19:37:10 +0000 (15:37 -0400)]
stream: fix bypass callback for stream.depth
Fix bug with bypass callback when called with stream depth threshold.
bug report: https://redmine.openinfosecfoundation.org/issues/2986
Shivani Bhardwaj [Sat, 13 Apr 2019 18:39:06 +0000 (00:09 +0530)]
ctl/filestore: Add check for filestore directory
Up until now, suricatactl would delete any directory that is provided as
an argument on command line. This patch adds a basic test for the
directories `tmp`, `00` and `ff` in order to justify that the provided
directory is actually a filestore directory.
Additionally, some code has been broken up and made more readable and
pythonic.
Closes redmine ticket #2843
Jason Ish [Fri, 6 Sep 2019 15:39:29 +0000 (09:39 -0600)]
ftp: removing uninitialized variable warning
output-json-ftp.c: In function ‘JsonFTPLogger’:
output-json-ftp.c:129:9: warning: ‘js_respcode_list’ may be used uninitialized in this function [-Wmaybe-uninitialized]
129 | json_object_set_new(cjs, "completion_code", js_respcode_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output-json-ftp.c:74:13: note: ‘js_respcode_list’ was declared here
74 | json_t *js_respcode_list;
| ^~~~~~~~~~~~~~~~
output-json-ftp.c:128:9: warning: ‘js_resplist’ may be used uninitialized in this function [-Wmaybe-uninitialized]
128 | json_object_set_new(cjs, "reply", js_resplist);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output-json-ftp.c:73:13: note: ‘js_resplist’ was declared here
73 | json_t *js_resplist;
| ^~~~~~~~~~~
Jason Ish [Fri, 6 Sep 2019 15:32:04 +0000 (09:32 -0600)]
userguide: remove section on using Oinkmaster
Users should be using Suricata-Update now.
Jason Ish [Fri, 6 Sep 2019 15:28:05 +0000 (09:28 -0600)]
rules: remove configuration for legacy rule handling
Removes the autoconf, and suricata.yaml sections for using
the legacy style of rule management.
Jason Ish [Mon, 2 Sep 2019 17:02:47 +0000 (11:02 -0600)]
rules: no longer install rules to /etc/suricata/rules
Stop falling back to the old method of installing rules into
/etc/suricata/rules if Suricata-Update is not available.
The goal here is to move away from the behaviour of installing
rules to /etc/suricata/rules as part of the default install
process. The engine provided rules are already installed to
/usr/share/suricata/rules, which can then be used as input
to rule management tools such as Suricata-Update.
This does not change the behaviour for Suricata release users
with the bundled Suricata-Update.
Also removes Oinkmaster and PulledPork suggestion for rule
management.
Jason Ish [Thu, 5 Sep 2019 15:35:40 +0000 (09:35 -0600)]
rules: install dhcp-events.rules; order alphabetically
Add dhcp-events.rules to Makefile.am so it gets installed.
Also order the rule files alphabetically for easier review.
Victor Julien [Mon, 2 Sep 2019 08:25:30 +0000 (10:25 +0200)]
pd: don't reverse flow if TCP session not midstream
Jason Ish [Tue, 2 Apr 2019 19:18:53 +0000 (13:18 -0600)]
dns: handle mid stream pickup on response packet
Related Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2146
Travis Green [Thu, 5 Sep 2019 18:33:55 +0000 (11:33 -0700)]
doc: add endswith keyword docs
Travis Green [Thu, 18 Jul 2019 21:25:51 +0000 (15:25 -0600)]
doc: update of ssh-kewords documentation
Modifies ssh-keywords.rst to fix syntax error in example rule as well as
update descriptions to indicate older keywords have been deprecated.
Jason Ish [Tue, 20 Aug 2019 15:20:53 +0000 (09:20 -0600)]
doc: use describe instead of option for old Sphinx
Older versions of Sphinx will generate duplicate IDs when you have
options like:
.. option:: some-option
.. option:: some-other-option
The version of Sphinx provided on CentOS 7 has this issue, newer
versions of Sphinx do not. As CentOS 7 is still a popular
distribution, change ".. option" to ".. describe" which has the
same visual output, but does not generate links.
Jason Ish [Tue, 27 Aug 2019 20:29:00 +0000 (14:29 -0600)]
rust: update to Rust 2018 with cargo fix
Migrate to Rust 2018 edition.
Credit to Danny Browning for first demontrating this:
https://github.com/OISF/suricata/pull/3604/commits
Jeff Lucovsky [Sat, 31 Aug 2019 20:16:39 +0000 (16:16 -0400)]
detect/analyzer: Add missing http_accept_enc handling
Shivani Bhardwaj [Wed, 4 Sep 2019 12:40:53 +0000 (18:10 +0530)]
rust: Get rid of unneeded macros, fix warnings
Victor Julien [Thu, 5 Sep 2019 13:00:04 +0000 (15:00 +0200)]
detect/dataset: fix 'state' path handling
Victor Julien [Thu, 5 Sep 2019 08:59:33 +0000 (10:59 +0200)]
datasets/doc: minor fixes and clarifications
Victor Julien [Thu, 5 Sep 2019 08:54:28 +0000 (10:54 +0200)]
datarep: remove notice messages
Victor Julien [Thu, 5 Sep 2019 08:47:32 +0000 (10:47 +0200)]
datasets: remove notice messages and improve errors
Victor Julien [Thu, 25 Apr 2019 14:32:29 +0000 (16:32 +0200)]
doc/dataset: initial documentation
Victor Julien [Sun, 14 Jul 2019 06:58:18 +0000 (08:58 +0200)]
suricatasc: add dataset-add command
Victor Julien [Sun, 14 Jul 2019 05:09:12 +0000 (07:09 +0200)]
datasets: unix socket dataset-add command