Commit graph

135 commits

Author SHA1 Message Date
Arne Welzel
5c56969ca4 zeek-testing-private: Update baseline 2024-06-19 19:47:54 +02:00
Vern Paxson
a0888b7e36 make SSH analyzer robust to half-duplex connections 2024-05-07 11:40:47 -07:00
Vern Paxson
8e25181e1e BTest updates for changes due to use of ZAM BiF replacements 2024-04-25 09:15:13 -07:00
Tim Wojtulewicz
bac6ad62b5 Allow SMB_TCP record to contain multiple protocol identifiers/headers 2024-04-22 15:55:25 -07:00
Arne Welzel
036bcfe919 Merge remote-tracking branch 'origin/topic/awelzel/ftp-clear-fuid-after-logging'
* origin/topic/awelzel/ftp-clear-fuid-after-logging:
  testing: Update zeek-testing-private commit hash
  ftp: Reset fuid after logging
2024-02-22 12:23:21 +01:00
Arne Welzel
bf8f428c8b testing: Update zeek-testing-private commit hash 2024-02-21 12:57:49 +01:00
Robin Sommer
1837e0289a
Bump Spicy to current main.
This requires a few baseline updates, and a tweak to one test
canonifier.
2024-01-29 09:59:46 +01:00
Arne Welzel
4ebd81fb23 Merge remote-tracking branch 'origin/topic/awelzel/3504-ldap-logs-scalars'
* origin/topic/awelzel/3504-ldap-logs-scalars:
  Update external baselines
  ldap: Use scalar values in logs where appropriate
  ldap: Rename LDAP::search_result to LDAP::search_result_entry
2024-01-03 12:35:51 +01:00
Arne Welzel
48a92a58f3 Update external baselines 2024-01-03 11:57:31 +01:00
Tim Wojtulewicz
fd84b793c6 Update external testing baseline hashes 2023-10-27 11:26:09 -07:00
Arne Welzel
a9b65cc6d9 Update baselines 2023-10-24 19:10:11 +02:00
Arne Welzel
72df1a0216 Merge remote-tracking branch 'origin/topic/bbannier/issue-3234'
* origin/topic/bbannier/issue-3234:
  Introduce dedicated `LDAP::Info`
  Remove redundant storing of protocol in LDAP logs
  Use LDAP `RemovalHook` instead of implementing `connection_state_remove`
  Tidy up LDAP code by using local references
  Pluralize container names in LDAP types
  Move LDAP script constants to their own file
  Name `LDAP::Message` and `LDAP::Search` `*Info`
  Make ports for LDAP analyzers fully configurable
  Require have-spicy for tests which log spicy-ldap information
  Fix LDAP analyzer setup for when Spicy analyzers are disabled
  Bump zeek-testing-private
  Integrate spicy-ldap test suite
  Move spicy-ldap into Zeek protocol analyzer tree
  Explicitly use all of spicy-ldap's modules
  Explicitly list `asn1.spicy` as spicy-ldap source
  Remove uses of `zeek` module in spicy-ldap
  Fix typos in spicy-ldap
  Remove project configuration files in spicy-ldap
  Integrate spicy-ldap into build
  Import zeek/spicy-ldap@57b5eff988
2023-10-10 20:07:03 +02:00
Benjamin Bannier
9b02b93889 Make ports for LDAP analyzers fully configurable
This moves the ports the LDAP analyzers should be triggered on from the
EVT file to the Zeek module. This gives users full control over which
ports the analyzers are registered for while previously they could only
register them for additional ports (there is no Zeek script equivalent
of `Manager::UnregisterAnalyzerForPort`).

The analyzers could still be triggered via DPD, but this is intentional.
To fully disable analyzers users can use e.g.,

```zeek
event zeek_init()
    {
    Analyzer::disable_analyzer(Analyzer::ANALYZER_LDAP_TCP);
    }
```
2023-10-10 18:28:13 +02:00
Benjamin Bannier
20ae1129ea Bump zeek-testing-private 2023-10-10 09:21:57 +02:00
Arne Welzel
4b71b7d05c Merge branch 'topic/awelzel/no-telemetry-log-in-external-baselines'
* topic/awelzel/no-telemetry-log-in-external-baselines:
  testing/external: Exclude telemetry.log from baselines
2023-08-30 11:25:39 +02:00
Arne Welzel
e12e873461 testing/external: Exclude telemetry.log from baselines
The diffs produced by telemetry.log when introducing a weird or
removing/adding protocol specific logs is overwhelming and distracting
without providing value. Exclude telemetry.log similar to how we already
exclude stats.log.

Some more targeted telemetry.log tests exists in the normal testing/btest
suite and that appears more sensible.
2023-08-30 10:49:46 +02:00
Johanna Amann
70c76977cf Merge remote-tracking branch 'origin/topic/johanna/gh-3242'
* origin/topic/johanna/gh-3242:
  Community-id: load main script in notice script, fix notice script
2023-08-23 12:46:21 +01:00
Johanna Amann
4156c4764a Community-id: load main script in notice script, fix notice script
This change makes the community-id script that adds the community id to
notice.log automatically load the main script if this was not already
loaded.

In the past, the script just did not perform any action if the main
script was not loaded.

This change also makes the notice script respect the seed/base64
settings that were set in the main script.

Fixes GH-3242
2023-08-22 15:09:47 +01:00
Arne Welzel
ccfc68fccd Fixup external hashes modified during merge 2023-06-30 11:53:59 +02:00
Arne Welzel
fcc38d3b4f Merge remote-tracking branch 'origin/topic/vern/zam-feature-complete'
* origin/topic/vern/zam-feature-complete: (23 commits)
  documentation updates
  updates to ZAM-specific BTest baseline
  Address PR review feedback on zam-feature-complete
  Updates to BTest baselines due to previous BTest tweaks
  tweaks to BTests for ZAM feature completeness; new ZAM-only btest
  removal of unused functionality and some follow-on simplifications
  feature completeness for ZAM
  -O gen-C++ tweaks to be compatible with ZAM changes
  ZAM support for "when" statements
  ZAM changes intermixed with lambda and "when" support
  WhenStmt/WhenInfo restructuring in support of ZAM "when" statements
  ZAM support for lambdas
  ZAM internals have a notion of "captures" as global-like variables
  AST profiling enhnacements in support of script optimization for lambdas/whens
  refinements to LambdaExpr's to provide flexibility, support for ZVal captures
  support in ScriptFunc class for ZVal-oriented vector of captures
  simplifications to the Frame class now that it no longer has to support old-style captures
  use Ingredients directly for constructing functions
  the "Capture" struct is now a class
  more debugging information when dumping script optimization data structures
  ...
2023-06-30 10:19:44 +02:00
Tim Wojtulewicz
24f184fd8a Update external testing hashes for 6.1 deprecation changes 2023-06-15 19:45:05 -07:00
Tim Wojtulewicz
3ad0bee7a2 Update external testing repo hashes to current master commits 2023-06-15 16:27:17 -07:00
Tim Wojtulewicz
453c0ff7b5 Update external test baselines 2023-06-14 10:07:23 -07:00
Arne Welzel
3f3df93ac1 Merge remote-tracking branch 'origin/topic/timw/2914-truncated-tunnel-plus-things'
* origin/topic/timw/2914-truncated-tunnel-plus-things:
  Address wire/capture length feedback
  packet_analysis/TCP: Do not use untrusted len for DeliverPacket()
  Add regression test using pcap from GH-2683
  Add btest to test Geneve->VXLAN->Truncated inner packet
  IP: Update packet->len with accumulated fragment size
  UDP: Forward any remaining data (also empty) to session-analysis
  IPTunnel: Compute inner wire length based on cap_len differences.
  IP: fix weird name to not be ipv6 specific
  UDP: don't validate checksum if caplen < len
  PIA: Modernize how struct initialization is done
2023-05-25 20:19:20 +02:00
Tim Wojtulewicz
18a30a7a53 IP: fix weird name to not be ipv6 specific 2023-05-24 16:29:29 +02:00
Arne Welzel
31d5c15573 Merge remote-tracking branch 'origin/topic/awelzel/community-id-logging-connection-state-remove'
* origin/topic/awelzel/community-id-logging-connection-state-remove:
  Bump external test suites
  policy/community-id: Do not use new_connection()
2023-05-11 00:01:58 +02:00
Arne Welzel
19a2ba6986 Bump external test suites 2023-05-10 19:24:01 +02:00
Arne Welzel
ffb73e4de9 Merge remote-tracking branch 'origin/topic/awelzel/add-community-id'
* origin/topic/awelzel/add-community-id:
  testing/external: Bump hashes for community_id addition
  NEWS: Add entry for Community ID
  policy: Import zeek-community-id scripts into protocols/conn frameworks/notice
  Add community_id_v1() based on corelight/zeek-community-id
2023-04-24 10:12:56 +02:00
Arne Welzel
0bbd7cab1b testing/external: Bump hashes for community_id addition 2023-04-24 09:43:22 +02:00
Tim Wojtulewicz
67802e711a Report packet statistics via the telemetry framework 2023-04-06 13:41:09 -07:00
Arne Welzel
cf2da5160b dns: Remove AD and CD flags from log
There was a misunderstanding whether to include them by default in
the dns.log, so remove them again.

There had also been a discussion and quirk that AD of a request would
always be overwritten by reply in the dns.log unless the reply is
missing. For now, let users extend dns.log themselves for what best
fits their requirements, rather than adding these flags by default.

Add a btest to print AD and CD flags for smoke testing still.
2023-03-16 10:09:27 +01:00
Christian Kreibich
e25d9bdee9 Merge branch 'topic/christian/gh-2761-default-localnets'
* topic/christian/gh-2761-default-localnets:
  Update NEWS to cover new Site::local_nets behavior.
  Bump external testsuites to reflect updated baselines
  Add btests for new Site::local_nets behavior
  Update plugins.hooks baseline to reflect added config framework activity
  Update scripts.policy.misc.dump-events baseline
  Update btest baselines to reflect the use of local address ranges.
  Tighten local-nets filtering in the logging framework's path-func-column-demote test
  Fix scripts.policy.frameworks.intel.removal test given address locality info
  Treat private address space as site-local by default
  Provide a mechanism to suppress logging of internal config framework activity
2023-03-15 20:05:40 -07:00
Christian Kreibich
fa15d1b258 Bump external testsuites to reflect updated baselines 2023-03-15 17:32:56 -07:00
Johanna Amann
dcbc809189 Merge remote-tracking branch 'origin/topic/johanna/certificate-req'
* origin/topic/johanna/certificate-req:
  SSL/TLS CertificateRequest message: Address review feedback
  SSL/TLS: Parse CertificateRequest message
2023-03-15 10:03:25 +01:00
Arne Welzel
33090d7a27 Merge branch 'dnssec-flag-parse' of github.com:micrictor/zeek-codespace
* 'dnssec-flag-parse' of github.com:micrictor/zeek-codespace:
  Update external testing commit hash for DNS flag changes
  Parse DNSSEC AD and CD bits

Updated dump-events baseline which seemed unrelated.
2023-03-14 10:35:50 +01:00
Tim Wojtulewicz
9cb6de7447 Add weird for unknown HTTP/0.9 request method 2023-03-10 15:45:11 -07:00
Tim Wojtulewicz
0003495a9b Special case HTTP 0.9 early on
Mostly, treat HTTP0.9 completely separate. Because we're doing raw
delivery of a body directly, fake enough (connection_close=1, and finish
headers manually) so that the MIME infrastructure thinks it is seeing a
body.

This deals better with the body due to accounting for the first line. Also
it avoids the content line analyzer to strip CRLF/LF and the analyzer
then adding CRLF unconditionally by fully bypassing the content line
analyzer.

Concretely, the vlan-mpls test case contains a HTTP response with LF only,
but the previous implementation would use CRLF, accounting for two many bytes.
Same for the http.no-version test which would previously report a body
length of 280 and now is at 323 (which agrees with wireshark).

Further, the mime_type detection for the http-09 test case works because
it's now seeing the full body.

Drawback: We don't extract headers when a server actually replies with
a HTTP/1.1 message, but grrr, something needs to give I guess.
2023-03-10 09:52:34 -07:00
Johanna Amann
b56b856da9 SSL/TLS: Parse CertificateRequest message
This commit introduces parsing of the CertificateRequest message in the
TLS handshake. It introduces a new event ssl_certificate_request, as
well as a new function parse_distinguished_name, which can be used to
parse part of the ssl_certificate_request event parameters.

This commit also introduces a new policy script, which appends
information about the CAs a TLS server requests in the
CertificateRequest message, if it sends it.
2023-03-09 09:12:29 +01:00
Tim Wojtulewicz
2735109ad7 Update external testing commit hashes for telemetry changes 2023-03-02 13:41:09 -07:00
Tim Wojtulewicz
f6d3ed2395 Default known stores to false to avoid Broker stores 2023-03-02 12:48:53 -07:00
Arne Welzel
bfc2374c8f Bump external test suites, filter some telemetry.log entries 2023-02-27 15:42:18 +01:00
Arne Welzel
a693924099 Merge remote-tracking branch 'origin/topic/awelzel/2572-event-handler-stats'
* origin/topic/awelzel/2572-event-handler-stats:
  Bump external baselines
  external/testing-setup: Less telemetry.log volume
  EventHandler: Use telemetry framework for EventHandler.call_count
2023-02-22 12:59:41 +01:00
Arne Welzel
bf693aaaa5 Bump external baselines 2023-02-22 12:27:35 +01:00
Arne Welzel
f56785740c ftp: Limit user, password, arg and reply_msg column sizes in log
The user and password fields are replicated to each of the ftp.log
entries. Using a very large username (100s of KBs) allows to bloat
the log without actually sending much traffic. Further, limit the
arg and reply_msg columns to large, but not unbounded values.
2023-02-21 12:28:07 -07:00
Arne Welzel
b6df7773a9 Merge remote-tracking branch 'origin/topic/awelzel/arm64-container-follow-ups-2'
* origin/topic/awelzel/arm64-container-follow-ups-2:
  Bump private testsuite for char handling fixes
  Base64: report byte as positive integer
  netbios_decode: use unsigned char for result
  analyzer/http: Do not assume char is signed
  cirrus: Run tests in a Debian 11 container, too
2023-02-02 18:35:02 +01:00
Arne Welzel
bbe0a86d4a Bump private testsuite for char handling fixes 2023-02-02 16:24:41 +01:00
Robin Sommer
04a1ead978
Provide infrastructure to migrate legacy analyzers to Spicy.
As initial examples, this branch ports the Syslog and Finger analyzers
over. We leave the old analyzers in place for now and activate them
iff we compile without any Spicy.

Needs `zeek-spicy-infra` branches in `spicy/`, `spicy-plugin/`,
`CMake/`, and `zeek/zeek-testing-private`.

Note that the analyzer events remain associated with the Spicy plugin
for now: that's where they will show up with `-NN`, and also inside
the Zeekygen documentation.

We switch CMake over to linking the runtime library into the plugin,
vs. at the top-level through object libraries.
2023-02-01 11:33:48 +01:00
Tim Wojtulewicz
f842a86e80 Update external testing repo commit hashes for Teredo changes 2023-01-26 09:23:22 -07:00
Tim Wojtulewicz
e0553d451f Revert "Update external test repo commits"
This reverts commit 8e405ef2f0.
2023-01-25 08:36:41 -07:00
Tim Wojtulewicz
8e405ef2f0 Update external test repo commits 2023-01-25 08:36:16 -07:00