mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
KRB: do not set keytab by default.
Only enable decryption if a user purposefully sets a keytab.
This commit is contained in:
parent
8bb76cd3c1
commit
327acf6555
5 changed files with 26 additions and 1 deletions
|
@ -4245,7 +4245,8 @@ export {
|
|||
|
||||
module KRB;
|
||||
export {
|
||||
const keytab = "/etc/krb5.keytab" &redef;
|
||||
## Kerberos keytab file name. Used to decrypt tickets encountered on the wire.
|
||||
const keytab = "" &redef;
|
||||
## KDC Options. See :rfc:`4120`
|
||||
type KRB::KDC_Options: record {
|
||||
## The ticket to be issued should have its forwardable flag set.
|
||||
|
|
|
@ -13,6 +13,9 @@ KRB_Analyzer::KRB_Analyzer(Connection* conn)
|
|||
interp = new binpac::KRB::KRB_Conn(this);
|
||||
|
||||
#ifdef USE_KRB5
|
||||
if ( BifConst::KRB::keytab->Len() == 0 )
|
||||
return; // no keytab set
|
||||
|
||||
const char* keytab_filename = BifConst::KRB::keytab->CheckString();
|
||||
if ( access(keytab_filename, R_OK) != 0 )
|
||||
{
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
F
|
|
@ -0,0 +1,20 @@
|
|||
# This test verifies that without a keytab file no entries are
|
||||
# created and no errors happen.
|
||||
#
|
||||
# @TEST-REQUIRES: grep -q "#define USE_KRB5" $BUILD/bro-config.h
|
||||
#
|
||||
# @TEST-COPY-FILE: ${TRACES}/krb/smb2_krb.keytab
|
||||
# @TEST-EXEC: bro -C -r $TRACES/krb/smb2_krb.pcap %INPUT
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
# @TEST-EXEC: btest-diff .stderr
|
||||
|
||||
global monitor_ports: set[port] = { 445/tcp, 139/tcp } &redef;
|
||||
|
||||
event bro_init() &priority=5{
|
||||
Analyzer::register_for_ports(Analyzer::ANALYZER_SMB, monitor_ports);
|
||||
}
|
||||
|
||||
event krb_ap_request(c: connection, ticket: KRB::Ticket, opts: KRB::AP_Options){
|
||||
print ticket?$authenticationinfo;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue