# Process packets despite bad checksums.
redef ignore_checksums = T;
This will change significantly with Bro 2.2 when we have the file analysis framework.
event connection_established(c: connection)
{
if (...)
{
c$extract_orig = T;
c$extract_resp = T;
}
}
# Enable extraction for supported protocols.
redef IRC::extract_file_types = /application\/.*/;
redef FTP::extract_file_types = /application\/.*/;
redef HTTP::extract_file_types = /application\/.*/;
redef SMTP::extract_file_types = /application\/.*/;
# Change prefix of filename on disk.
redef IRC::extraction_prefix = "file-irc";
redef FTP::extraction_prefix = "file-ftp";
redef HTTP::extraction_prefix = "file-http";
redef SMTP::extraction_prefix = "file-smtp";
# Tweak SMTP excerpt length.
redef SMTP::default_entity_excerpt_len = 1024;
redef FTP::default_capture_password = T;
redef HTTP::default_capture_password = T;
# Specify a MIME type pattern.
redef HTTP::generate_md5 = /.*/;
redef SMTP::generate_md5 = /.*/;
redef HTTP::mime_types_extensions: table[string] of pattern = {
["application/x-dosexec"] = /\.([eE][xX][eE]|[dD][lL][lL])/,
};
@load policy/http/detect-MHR
redef Software::vulnerable_versions += {
["Flash"] = [$major=10,$minor=2,$minor2=153,$addl="1"],
["Java"] = [$major=1,$minor=6,$minor2=0,$addl="22"],
};
# Look at protocols/http/detect-webapps.sig for extending.
@load protocols/http/detect-webapps
@load protocols/http/header-names
redef HTTP::log_server_header_names = T;
# Log cookies to http.log.
redef record HTTP::Info += { cookie: string &log &optional; };
event http_header(c: connection, is_orig: bool, name: string, value: string)
{
if ( is_orig && name == "COOKIE" )
c$http$cookie = value;
}
redef SSH::password_guesses_limit = 20; # default: 30
redef SSH::guessing_timeout = 10 mins; # default: 30 mins
redef SSL::notify_when_cert_expiring_in = 1 day; # default: 30 days
# Map the issuer to the DER-encoded certificate.
redef SSL::root_certs += { ["OU=SnakeTrust,C=US"] = "\x30\x82..." };
# By default only for locally served certificates.
@load policy/protocols/ssl/extract-certs-pem
# Record only remote certificates (ALL_HOSTS also possible).
redef SSL::extract_certs_pem = REMOTE_HOSTS;
redef record Conn::Info += {
orig_cc: string &optional &log;
resp_cc: string &optional &log;
};
event connection_state_remove(c: connection)
{
local orig_loc = lookup_location(c$id$orig_h);
if ( orig_loc?$country_code )
c$conn$orig_cc = orig_loc$country_code;
local resp_loc = lookup_location(c$id$resp_h);
if ( resp_loc?$country_code )
c$conn$resp_cc = resp_loc$country_code;
}