Bro policy script is the basic analyzer used by Bro to determine what network events are alarm worthy.
A policy can also specify what actions to take and how to report activities, as well as determine what activities to scrutinize.
Bro uses policies to determine what activities to classify as hot, or questionable in intent.
These hot network sessions can then be flagged, watched, or responded to via other policies or applications determined to be necessary, such as calling rst to reset a connection on the local side, or to add an IP address block to a main router's ACL (Access Control List).
The policy files use the Bro scripting language, which is discussed in great detail in The Bro Reference Manual.
Policy file are loaded using an @load command. The semantics of @load are "load in this script if it hasn't already been loaded", so there is no harm in loading something in multiple policy scripts.
The following policy scripts are included with Bro. The first set are all on by default, and the second group can be added by adding them to your site/local.site.bro policy file.
Bro Analyzers are described in detail in the Reference Manual. These policy files are loaded by default:
sitedefines local and neighbor networks from static config alarmopen logging file for alarm events tcpinitialize BPF filter for SYN/FIN/RST TCP packets loginrlogin/telnet analyzer (or to ensure they are disabled) weirdinitialize generic mechanism for detecting unusual events connaccess and record connection events hotdefines certain forms of sensitive access fragprocess TCP fragments print-resourceson exit, print resource usage information, useful for tuning signaturesthe signature policy engine scangeneric scan detection mechanism trwadditional, more sensitive scan detection httpgeneral http analyzer, low level of detail http-requestdetailed analysis of http requests http-replydetailed analysis of http replys ftpFTP analysis portmapperrecord and analyze RPC portmapper requests smtprecord and analyze email traffic tftpidentify and log TFTP sessions wormflag HTTP-based worm sources such as Code Red softwaretrack software versions; required for some signature matching blasterlooks for blaster worm synfloodlooks for synflood attacks steppingused to detect when someone logs into your site from an external net, and then soon logs into another site reduce-memorysets shorter timeouts for saving state, thus saving memory. If your Bro is using < 50% of you RAM, try not loading this
These are not loaded by default:
Policy Description Why off by default dropInclude if site has ability to drop hostile remotes Turn on if needed icmpicmp analysis CPU intensive and low payoff dnsDNS analysis CPU intensive and low payoff identident program analyzer historical, no longer interesting gnutellalooks for hosts running Gnutella Turn this on if you want to know about this sslssl analyzer still experimental ssh-steppingDetects stepping stones where both incoming and outgoing connections are ssh Possibly too CPU intensive (needs more testing) analyPerforms statistical analysis only used in off-line alalysis backdoorLooks for backdoors only effective when also capturing bulk traffic passwordsLooks for clear text passwords may want to turn on if your site does not allow clear text passwords file-flushCauses all log files to be flushed every N seconds may want to turn on if you are doing "real time" analysis
To modify which analyzers are loaded, edit or create a file in BROHOME/site.
If you write your own new custom analyzer, it goes in this directory too. To disable an analyzer,
add "@unload policy.bro" to the beginning of the file BROHOME/brohost.bro, before
the line "@load brolite.bro". To add additional analyzers, add them @load them
in BROHOME/site/local.site.bro.