Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log policies to support Zeek log filtering. #86

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

kkvarfordt
Copy link
Contributor

🗣 Description

Add global log policy attributes to the logging streams. This enables Zeek log filtering on the contents of the log files as well as which log files are generated.

https://docs.zeek.org/en/master/frameworks/logging.html#filtering-log-records

💭 Motivation and context

Motivated by ICSNPP issue cisagov/ICSNPP#14

@kkvarfordt
Copy link
Contributor Author

Example Zeek script with associated hook for removing the generation the opcua-binary-status-code-detail.log file.

File: log-killer.zeek

hook ICSNPP_OPCUA_Binary::log_policy_status_code_detail(rec: OPCUA_Binary::StatusCodeDetail,  id: Log::ID, filter: Log::Filter) { break; }

Example Command:

zeek -Cr ../tests/traces/open62541_client-server_mainloop.pcap icsnpp/opcua-binary ../log-killer.zeek

@mmguero mmguero merged commit 7f3bbc3 into cisagov:main Feb 14, 2024
@kkvarfordt kkvarfordt deleted the log-policy branch February 15, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants