mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #464 from Security-Onion-Solutions/feature/zeek-communityid
Zeek - enable Community ID policy
This commit is contained in:
@@ -125,5 +125,8 @@ redef LogAscii::json_timestamps = JSON::TS_ISO8601;
|
|||||||
# BPF Configuration
|
# BPF Configuration
|
||||||
@load securityonion/bpfconf
|
@load securityonion/bpfconf
|
||||||
|
|
||||||
|
# Community ID
|
||||||
|
@load securityonion/communityid
|
||||||
|
|
||||||
# Extracted files
|
# Extracted files
|
||||||
@load securityonion/file-extraction
|
@load securityonion/file-extraction
|
||||||
25
salt/zeek/policy/securityonion/communityid.zeek
Normal file
25
salt/zeek/policy/securityonion/communityid.zeek
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Bro package & plugin for adding community hash IDs to conn.log.
|
||||||
|
# This is loaded when a user activates the plugin.
|
||||||
|
#
|
||||||
|
module CommunityID;
|
||||||
|
|
||||||
|
export {
|
||||||
|
# An unsigned 16-bit number to seed our hashing
|
||||||
|
const seed: count = 0 &redef;
|
||||||
|
|
||||||
|
# Whether to add a base64 pass over the hash digest.
|
||||||
|
# Enabled by default, since it shortens the output.
|
||||||
|
const do_base64: bool = T &redef;
|
||||||
|
|
||||||
|
# Verbose debugging log output to the console.
|
||||||
|
const verbose: bool = F &redef;
|
||||||
|
|
||||||
|
# Add the ID string field to the connection log record.
|
||||||
|
redef record Conn::Info += {
|
||||||
|
community_id: string &optional &log;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
event connection_state_remove(c: connection) {
|
||||||
|
c$conn$community_id = hash_conn(c);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user