I've been working with Bro for about a week focused on IDS/IPS functionality.
I'm starting small and took this snip of code from someone else asking how to get email alerts and put it in my local.bro
hook Notice::policy(n: Notice::Info) &priority=0
{
add n$actions[Notice::ACTION_EMAIL];
}
I went through some documentation here:
https://www.bro.org/sphinx-git/scripts/base/frameworks/notice/main.bro.html
specifically the section labeled “Notice::Type” with ~40 different types listed starting with Notice::Tally.
This seems to be what is now emailed, although there are very few email notices being generated, and only from a few of the categories. Weird::Activitiy and Scan::Port_Scan
I also saw code like this somewhere
redef Notice::emailed_types += {
# FTP::Bruteforcing,
FTP::Site_Exec_Success,
HTTP::SQL_Injection_Attacker,
HTTP::SQL_Injection_Victim,
# SMTP::Blocklist_Error_Message,
# SMTP::Blocklist_Blocked_Host,
# SMTP::Suspicious_Origination,
SSH::Password_Guessing,
SSH::Login_By_Password_Guesser,
TeamCymruMalwareHashRegistry::Match,
Intel::Notice,
Intel::DOMAIN,
Intel::CERT_HASH,
Intel::FILE_HASH,
};
which seems to correlate to this documentation
https://www.bro.org/sphinx/bro-noticeindex.html
So I also threw that code into my local.bro
It doesn't seem to do anything. Is there a way I can check? Is it redundant with the hook code above to send an email for any notice?