Commit graph

3679 commits

Author SHA1 Message Date
FlyingWithJerome
d5a6896171 add svcb test case 2021-10-12 17:43:32 -04:00
FlyingWithJerome
ca4b181d35 add a dns https test case 2021-10-12 17:43:32 -04:00
FlyingWithJerome
0849332eb9 fix a few syntax errors 2021-10-12 17:43:32 -04:00
Christian Kreibich
a8ab977b0e Expand table/set tests to cover new index types 2021-10-01 14:03:08 -07:00
Christian Kreibich
b7603faf3d Whitespace tweak in a btest, no other change 2021-10-01 14:03:08 -07:00
Tim Wojtulewicz
e5b163290d Merge remote-tracking branch 'origin/topic/vern/remove-uu'
* origin/topic/vern/remove-uu:
  fix up for linking w/ doc update
  documentation update
  script simplification that removes an unnecessary &is_assigned
  removing -uu functionality and associated script analysis now no longer needed
2021-09-24 10:31:56 -07:00
Robin Sommer
dd5d6e1756 Merge branch 'topic/foxds/dcerpc_auth' of ssh://github.com/fox-ds/zeek
* 'topic/foxds/dcerpc_auth' of ssh://github.com/fox-ds/zeek:
  Fix protocol forwarding in dce_rpc-auth
  Fix protocol forwarding in dce_rpc-auth
2021-09-23 17:50:00 +02:00
FOX-DS
fef4531f78 Fix protocol forwarding in dce_rpc-auth 2021-09-23 08:50:11 -04:00
Robin Sommer
47c35190a4 Sanity-check the method passed into ActiveHTTP.
Reported by Pierre Gaulon.
2021-09-23 12:21:23 +02:00
Tim Wojtulewicz
0a0ed65306 Merge remote-tracking branch 'origin/topic/robin/gh-54-sanitize'
* origin/topic/robin/gh-54-sanitize:
  Sanitize log files names before they go into system().
2021-09-22 12:17:05 -07:00
Vern Paxson
509428a9dc removing -uu functionality and associated script analysis now no longer needed 2021-09-22 11:17:28 -07:00
Christian Kreibich
cfcf1f83cc Add btests for new functionality
- Expand language.set to cover sets of sets
- Expand language.table to cover tables indexed with tables
- Add language.table-nested-set-ordering to capture the reproducer from GHI-1753
2021-09-20 17:51:43 -07:00
Robin Sommer
31d3fb0f6c Merge https://github.com/gpotter2/zeek.
Changes during merge:
  - Add dedicated test (w/ trace "client_timestamp_enabled.pcapng" from Cloudshark)
  - Change types from signed to unsigned.
  - Add cast for bit-shifting operand.
  - clang-format run
2021-09-20 11:41:29 +02:00
gpotter2
d4db9bf6d0 Add TSval and TSecr to TCPSyn 2021-09-17 11:35:16 +02:00
Arne Welzel
b7690bb367 ignore_checksums_nets: Add test for multiple subnets
This test fails with Zeek 4.1 and Zeek 4.0.3.
2021-09-14 21:17:01 +02:00
Tim Wojtulewicz
8414d13030 Merge remote-tracking branch 'origin/topic/vern/vector-hole-loops'
* origin/topic/vern/vector-hole-loops:
  fix for looping over vectors with holes per https://github.com/zeek/zeek/issues/1763
  btest for https://github.com/zeek/zeek/issues/1763
2021-09-08 12:04:56 -07:00
Tim Wojtulewicz
b7e264f8ef Merge remote-tracking branch 'origin/topic/seth/tsv-logs-utf8-by-default'
* origin/topic/seth/tsv-logs-utf8-by-default:
  Fix mis-usage of string::append that leads to an overflow
  Use json_escape_utf8 for all utf8 data in ODesc
  Switch the TSV Zeek logs to be UTF8 by default.
2021-09-08 12:04:13 -07:00
Vern Paxson
acaaa0d36a fix race condition in btest output ordering 2021-09-08 10:23:39 -07:00
Vern Paxson
74fbfa3aae whoops, forgot to canonicalize filenames in new btest 2021-09-08 10:23:39 -07:00
Vern Paxson
9d896d114b extend btest to include a coercion overflow 2021-09-08 10:23:39 -07:00
Vern Paxson
7f3ab84e5c fixed a typo in a comment 2021-09-08 10:23:39 -07:00
Vern Paxson
9757d37332 test case for vector coercions, including holes 2021-09-08 10:23:39 -07:00
Vern Paxson
9b2eb2c373 Baseline variants for "-a zam" 2021-09-08 10:23:38 -07:00
Vern Paxson
9722b4216f new "-a ZAM" testing baseline alternative 2021-09-08 10:23:38 -07:00
Vern Paxson
f89ed411cf updates for usage issues: support for -uu, maybe/definitely distinctions 2021-09-08 10:23:38 -07:00
Vern Paxson
87fce26a0b btest for https://github.com/zeek/zeek/issues/1763 2021-09-07 10:21:50 -07:00
Tim Wojtulewicz
404fed6923 Use json_escape_utf8 for all utf8 data in ODesc 2021-09-07 09:16:53 -07:00
Seth Hall
a4ceb98bf8 Switch the TSV Zeek logs to be UTF8 by default.
There is a paired zeek-testing branch for some updates there.
2021-09-07 09:16:53 -07:00
Tim Wojtulewicz
0746ef7ecc Merge remote-tracking branch 'origin/topic/vlad/analyzer_coverage'
* origin/topic/vlad/analyzer_coverage:
  Add btests for DNS WKS and BINDS
  Add btest for DNS WKS RR.
  Add btest for DNS NSEC3PARAM RR.
2021-09-03 18:12:28 +00:00
Tim Wojtulewicz
0369ca01bc Disable the scripts.base.frameworks.logging.sqlite.simultaneous-writes test under TSan
Due to a bug (or intentional code) in SQLite, we disabled enabling the shared cache
in sqlite3 if running under ThreadSanitizer (see cf1fefbe0b0a6163b389cc92b5a6878c7fc95f1f).
Unfortunately, this has the side-effect of breaking the simultaneous-writes test because
the shared cache is disabled. This is hopefully a temporary fix until SQLite fixes the
issue on their side.
2021-09-03 10:38:15 -07:00
Tim Wojtulewicz
569552b320 GH-1589: Avoid extracting IP-like strings from SMTP headers 2021-09-03 17:35:10 +00:00
Christian Kreibich
b999448e3d Minor updates to the external-testsuite scripts
Delete the unused Baseline folder, remove a Bro-era name from gitignore,
change create-new-repo to work with a second argument that is actually
a URL, and tweak whitespace. Expand description in README and update the
explanation of OPENSSL_ENABLE_MD5_VERIFY in subdir-btest.cfg.
2021-09-01 17:29:40 -07:00
Vlad Grigorescu
f9c36f5c37 Add btests for DNS WKS and BINDS 2021-09-01 12:00:50 -05:00
Vlad Grigorescu
6e5e2c8cb3 Merge branch 'master' into topic/vlad/analyzer_coverage 2021-08-31 15:58:42 -05:00
Christian Kreibich
2bcaa33563 Merge branch 'topic/christian/gh-1731-broker-peers-bug'
* topic/christian/gh-1731-broker-peers-bug:
  Fix addr/string type confusion in Broker::peers()
2021-08-19 15:13:37 -07:00
Tim Wojtulewicz
f442893c98 Return fully-escaped string if utf8 conversion fails
This adds a new function for validating UTF-8 sequences by converting to
UTF-32. This allows us to also check for various blocks of codepointsi
that we consider invalid while checking for valid sequences in general.
2021-08-19 08:56:27 -07:00
Christian Kreibich
fa38d81a7b Fix addr/string type confusion in Broker::peers()
Broker::NetworkInfo$address is of type string. The Broker::peers() BiF treated
it as an address, which caused ZVal's type validation to flag a
mismatch and abort.

Includes a small tweak to the broker.unpeer test that makes it invoke
Broker::peers(), which breaks in absence of the fix.
2021-08-18 15:16:58 -07:00
Benjamin Bannier
28e8abbf19 Fix option length computation in Geneve analyzer.
We previously computed the length of the Geneve options field
incorrectly which lead to us passing data at an incorrect offset to
inner analyzers. With this patch we now interpret the length field
correctly, according the the spec
https://datatracker.ietf.org/doc/html/rfc8926#section-3.4.

Closes #1726.
2021-08-18 09:19:49 +02:00
Johanna Amann
8192ad581d Do not lookup ignore_checksums_nets for every packet
This could lead to a noticeable (single-percent) performance
improvement.

Most of the functionality for this is in the packet analyzers that now
cache ignore_chesksums_nets.

Based on a patch by Arne Welzel (Corelight).
2021-08-06 10:32:53 +01:00
jerome Grandvalet
8cabecec40 Fix HTTP evasion
- Happen when there is no CRLF at the end of HTTP
    - Fix by adding CRLF when packet is complete (in relation to content-length in header)
2021-07-23 09:28:29 +02:00
Johanna Amann
13cfa4c938 Fix handling of timers when cloning TableVals
When cloning TableVals, a new timer was created for the wrong object
(the existing TableVal, not the clone). This lead to the already
existing timer being no longer accessible. Which, in turn, leads to an
abandoned timer reading into no longer allocated data when the original
TableVal is deleted.

Fixes GH-1687
2021-07-21 12:52:22 +01:00
Robin Sommer
a7343ee019 Fix registration of protocol analyzers from inside plugins.
With the recent packet manager work, it broke to register a protocol
analyzer for a specific port from inside a plugin's initialization code.
That's because that registration now depends on the packet manager being
set up, which isn't case at that time a plugin's `InitPostInit()` runs.
This fix contains two parts:

    - Initialize the packet manager before the analyzer manager, so that
      the latter's `InitPostScript()` can rely on the former being
      ready.

    - Change the analyzer manager to (only) record port registrations
      happening before it's fully initialized. Its `InitPostScript()`
      then performs the actual registrations, knowing it can use the
      packet manager now.

This comes with a `cmake/` to add a missing include directory.
2021-07-18 10:00:49 +02:00
Tim Wojtulewicz
3c7a2b1450 Merge remote-tracking branch 'origin/topic/vlad/dns_rr_fixes'
* origin/topic/vlad/dns_rr_fixes:
  Add a TODO to return a correct status for ParseRR_WKS
  Remove unnecessary if
  Generate dns_WKS_reply event
  dns_HINFO_reply event was never being generated.
2021-07-15 11:33:44 -07:00
Tim Wojtulewicz
e75a40edb3 Update scripts/site/local-compat test for 4.2 cycle 2021-07-15 17:36:13 +00:00
Tim Wojtulewicz
62aa2fe7ba Merge remote-tracking branch 'origin/topic/robin/vector-string-tests'
* origin/topic/robin/vector-string-tests:
  Remove tests for deprecated operators.
  Add tests for operations on vectors of string.
2021-07-15 09:50:36 -07:00
Vlad Grigorescu
15b294098c dns_HINFO_reply event was never being generated.
On top of that, I modified the event to pass the relevant fields from the DNS message.
2021-07-15 09:56:38 -05:00
Vlad Grigorescu
a2a8870931 Add btest for DNS WKS RR. 2021-07-14 21:43:36 -05:00
Vlad Grigorescu
01660553d6 Add btest for DNS NSEC3PARAM RR. 2021-07-14 20:22:06 -05:00
Robin Sommer
8d19c43429 Remove tests for deprecated operators. 2021-07-14 11:23:13 +02:00
Robin Sommer
7f2769bd17 Add tests for operations on vectors of string. 2021-07-14 11:21:42 +02:00