Commit graph

16055 commits

Author SHA1 Message Date
Michael Torres
bab2036aa4 Add modbus transaction and unit ids to logs
Add transaction IDs and unit IDs to default modbus over TCP/IP logs.
Update the relevant testing baselines to account for the extra fields.
2022-07-17 21:02:37 +00:00
Michael Torres
7c24b53b4f Enable modbus logging for requests 2022-07-17 21:02:37 +00:00
Arne Welzel
3dae8ab086 smb2: Raise smb2_file_delete for CREATE with FILE_DELETE_ON_CLOSE
When a CREATE request contains the FILE_DELETE_ON_CLOSE option and
the subsequent CREATE response indicates success, we now raise the
smb2_file_delete event to log a delete action in smb_files.log and
also give users a way to handle this scenario.

The provided pcap was generated locally by recording a smbtorture run
of the smb2.delete-on-close-perms test case.

Placed the create_options into the CmdInfo record for potential
exposure in smb_cmd.log (wasn't sure how that would look so left it
for the future).

Fixes #2276.
2022-07-16 17:14:13 +02:00
zeek-bot
1d2c12e980 Update doc submodule [nomail] [skip ci] 2022-07-15 00:41:35 +00:00
Christian Kreibich
6543c21d23 Merge branch 'topic/christian/management-agent-boot-fix'
* topic/christian/management-agent-boot-fix:
  Management framework: bump cluster testsuite
  Management framework: undo the testsuite result mask
  Management framework: additional logging tweaks
  Management framework: additional context in a few log messages
  Management framework: await Supervisor peering before sending agent's hello
  Management framework: remove outdated comment
2022-07-14 15:50:14 -07:00
Tim Wojtulewicz
9c482b1373 Merge remote-tracking branch 'amazingpp/topic/amazingpp/pow-bif'
* amazingpp/topic/amazingpp/pow-bif:
  Add pow function
2022-07-14 11:08:48 -07:00
Tim Wojtulewicz
cae104d135 Merge remote-tracking branch 'origin/topic/timw/2258-skip-dns-tests'
* origin/topic/timw/2258-skip-dns-tests:
  GH-2258: Add skip decorator to DNS unit tests
2022-07-14 08:58:08 -07:00
Tim Wojtulewicz
ab51451fc8 Merge remote-tracking branch 'origin/topic/timw/2261-all-analyzers-type'
* origin/topic/timw/2261-all-analyzers-type:
  GH-2261: Fix type used for analyzer_confirmation/violation events
2022-07-14 08:57:45 -07:00
AmazingPP
a76dc6a389 Add pow function 2022-07-14 22:13:34 +08:00
Christian Kreibich
8a4ed58731 Merge branch 'topic/christian/fix-skipped-sqlite-test'
* topic/christian/fix-skipped-sqlite-test:
  Fix requirement check in a logging framework / sqlite btest
2022-07-13 18:17:49 -07:00
zeek-bot
91a99a7409 Update doc submodule [nomail] [skip ci] 2022-07-14 00:53:28 +00:00
Christian Kreibich
8d10cbfb36 Fix requirement check in a logging framework / sqlite btest 2022-07-13 17:20:03 -07:00
Tim Wojtulewicz
ec450147e6 GH-2261: Fix type used for analyzer_confirmation/violation events 2022-07-13 12:50:15 -07:00
Tim Wojtulewicz
47bcd2cbeb GH-2258: Add skip decorator to DNS unit tests 2022-07-13 12:33:17 -07:00
Christian Kreibich
48486b4156 Merge branch 'topic/christian/gh-2239-stdin-ctrl-c'
* topic/christian/gh-2239-stdin-ctrl-c:
  Stop signal-masking upon running unit tests
  Pause signal-masking during script parsing
  Add btests to verify Zeek's handling of SIGTERM and reading stdin
  Add procps/procps-ng to several CI Docker images
2022-07-13 11:57:52 -07:00
Tim Wojtulewicz
ed2934d345 Merge remote-tracking branch 'origin/topic/bbannier/format-btest_testing_plugins'
* origin/topic/bbannier/format-btest_testing_plugins:
  Use clang-format for all files in `testing/btest/plugins`.
2022-07-13 11:23:45 -07:00
Tim Wojtulewicz
fc60b1cd33 Merge remote-tracking branch 'origin/topic/timw/696-bytestring-to-float'
* origin/topic/timw/696-bytestring-to-float:
  GH-696: Add bytestring_to_float BIF
2022-07-13 11:11:57 -07:00
Tim Wojtulewicz
7e56605d83 GH-696: Add bytestring_to_float BIF 2022-07-13 10:44:24 -07:00
Benjamin Bannier
489534bd74 Use clang-format for all files in testing/btest/plugins.
This is a fixup commit for dc65b6248c.
2022-07-13 17:58:53 +02:00
Johanna Amann
96a14b39fa Merge remote-tracking branch 'origin/topic/neverlord/gh-2192'
* origin/topic/neverlord/gh-2192:
  Avoid race conditions in broker.ssl-mismatch test
2022-07-13 09:34:43 +01:00
Johanna Amann
3d043cfa12 Merge branch 'update' of https://github.com/leres/zeek
* 'update' of https://github.com/leres/zeek:
  Restore accidently deleted line
  Fix tail -F semantics when want_record=F and add tests for the new features
2022-07-13 09:30:42 +01:00
Craig Leres
6b19e8d310 Restore accidently deleted line 2022-07-12 22:33:53 -07:00
Christian Kreibich
6228a00d8f Bump cmake submodule for test-naming policy fix [skip ci] [nomail] 2022-07-12 18:08:58 -07:00
Craig Leres
44ba9138c2 Fix tail -F semantics when want_record=F and add tests for the new features
While writing a test for the new "tail -F semantics" I found that
the $want_record=F case was broken (errno 25). So instead of opening
/dev/null when the input file is missing change READER_RAW to avoid
I/O until it can be opened.

Add two tests, one for when the event handler is called with a
record and one for when it's called with a string.
2022-07-12 17:57:50 -07:00
Christian Kreibich
b68f9bee61 Management framework: bump cluster testsuite 2022-07-12 17:53:35 -07:00
Christian Kreibich
600ae4ba6b Management framework: undo the testsuite result mask 2022-07-12 17:53:35 -07:00
Christian Kreibich
ffebf99bad Management framework: additional logging tweaks
Ensure the framework's log stream exists prior to using it in zeek_init(), and
use a node-is-live message similar to those in agent and controller also in
launched nodes.
2022-07-12 17:53:35 -07:00
zeek-bot
5954d9d36c Update doc submodule [nomail] [skip ci] 2022-07-13 00:48:15 +00:00
Tim Wojtulewicz
6b4c99c64a Merge remote-tracking branch 'origin/topic/timw/more-bro-renaming'
* origin/topic/timw/more-bro-renaming:
  Rename bro_version and BRO_PLUGIN_BRO_VERSION to zeek names
  Update binpac, bifcl, and gen-zam submodules for renaming changes
  Deprecate BRO_PLUGIN_API_VERSION, create zeek::PLUGIN_API_VERSION
  Deprecate HOOK_BRO_OBJ_DTOR and related methods
  Miscellaneous deprecations and renaming
  Rename all of bro lexer methods and such
  Stop installing the bro symlink, it's been long enough
  Deprecate bro_inet_ntop.{c,h}
  Deprecate bro_int_t and bro_uint_t
2022-07-12 14:18:05 -07:00
Tim Wojtulewicz
a9328b5c44 Rename bro_version and BRO_PLUGIN_BRO_VERSION to zeek names 2022-07-12 13:58:42 -07:00
Tim Wojtulewicz
25c63ed7ab Update binpac, bifcl, and gen-zam submodules for renaming changes 2022-07-12 13:58:42 -07:00
Tim Wojtulewicz
99bc16073a Deprecate BRO_PLUGIN_API_VERSION, create zeek::PLUGIN_API_VERSION 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
1496b99a34 Deprecate HOOK_BRO_OBJ_DTOR and related methods 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
4d4c6280e9 Miscellaneous deprecations and renaming 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
d875ad1a96 Rename all of bro lexer methods and such 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
8829292c0c Stop installing the bro symlink, it's been long enough 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
18ae40277a Deprecate bro_inet_ntop.{c,h} 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
f624c18383 Deprecate bro_int_t and bro_uint_t 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
d066013793 Merge remote-tracking branch 'origin/topic/timw/btest-cleanup'
* origin/topic/timw/btest-cleanup:
  Run clang-format on all of our plugin test c++ files
2022-07-12 12:00:19 -07:00
Tim Wojtulewicz
dc65b6248c Run clang-format on all of our plugin test c++ files 2022-07-12 11:59:55 -07:00
Benjamin Bannier
a7e632557a Publish container images to ECR in addition to docker.io. 2022-07-12 10:21:52 +02:00
Christian Kreibich
b59bfe5558 Merge branch 'topic/christian/gh-2259-fix-dir-test'
* topic/christian/gh-2259-fix-dir-test:
  Fix race condition in scripts.base.utils.dir test
  Remove needless "touch" in scripts.base.utils.dir test
2022-07-11 17:29:42 -07:00
Christian Kreibich
3d87400f1d Fix race condition in scripts.base.utils.dir test
The sequence of

- adding a new file
- deleting an existing one
- waiting for Zeek to notice the addition
- re-adding the pre-existing file

was prone to a race: it could happen that Zeek's directory observation would see
the new file in one round, and by the time the next round happens the removal
and re-addition had already happened, thus missing the change and failing the
test.

This avoids the race by placing the removal of the existing file before the
addition of the new one, ensuring that when Zeek notices the addition (and
pushes the test to the next round), it has also seen the removal, so the
re-addition cannot get lost.
2022-07-11 16:26:45 -07:00
Christian Kreibich
e2a7b890ed Remove needless "touch" in scripts.base.utils.dir test
This touch happened after teardown of Zeek, so didn't add to the test.
2022-07-11 16:05:37 -07:00
Christian Kreibich
e947e1d1c2 Management framework: additional context in a few log messages
This adds request IDs in a few places that didn't mention them, and makes
requests to the Supervisor that act on all current nodes explicit.
2022-07-11 13:00:35 -07:00
Christian Kreibich
f6597ffabf Management framework: await Supervisor peering before sending agent's hello
Failing to do so could open a race condition in which a quickly connecting
controller could send instructions whose resulting Supervisor interactions got
lost.
2022-07-11 13:00:35 -07:00
Christian Kreibich
a505a7814f Management framework: remove outdated comment
The agent has a request_expired timeout handler at this point.
2022-07-11 13:00:35 -07:00
Tim Wojtulewicz
f3313df743 Merge remote-tracking branch 'origin/topic/bbannier/issue-2238'
* origin/topic/bbannier/issue-2238:
  Fix default build with `--disable-cpp-tests`.
2022-07-11 09:47:00 -07:00
Tim Wojtulewicz
c4ccc37789 Merge remote-tracking branch 'origin/topic/vern/lambda-profiling-fix'
* origin/topic/vern/lambda-profiling-fix:
  fix for script profiling of lambda functions
2022-07-11 09:45:25 -07:00
Tim Wojtulewicz
1226aa538a Merge remote-tracking branch 'origin/topic/vern/zam-vector-cond-fix'
* origin/topic/vern/zam-vector-cond-fix:
  Fix for ZAM optimization of '?' conditional with vector-valued result
2022-07-11 09:44:05 -07:00