Commit graph

17 commits

Author SHA1 Message Date
Seth Hall
02b94f7141 Removed the notice_tag injection from the conn log.
It had some conceptual problems because notices aren't
always logged and in some cases are fairly infrequently
logged which resulted in a lot of notice tags being
attached to connections where the notice didn't show
up in a log file.  Also, the rule of thumb here is that
frameworks should never load protocols.  It's just bad
practice and probably indicates incorrect design somewhere.

The link between the conn log and the notice log should
now be made with the connections unique ID which is logged
in both logs and is more reliable.
2011-07-06 10:23:30 -04:00
Robin Sommer
9709b1d522 Merge remote branch 'origin/topic/robin/reporting'
* origin/topic/robin/reporting:
  Syslog BiF now goes through the reporter as well.
  Avoiding infinite loops when an error message handlers triggers errors itself.
  Renaming the Logger to Reporter.
  Overhauling the internal reporting of messages to the user.

Updating a bunch of tests/baselines as well.

Conflicts:
	aux/broccoli
	policy.old/alarm.bro
	policy/all.bro
	policy/bro.init
	policy/frameworks/notice/weird.bro
	policy/notice.bro
	src/SSL-binpac.cc
	src/bro.bif
	src/main.cc
2011-07-01 13:59:21 -07:00
Seth Hall
9efb27b6c6 Notice framework updates.
- Fixed problem where notices were logged even if they
  didn't have the ACTION_FILE action applied.
- New PolicyItem element, $halt.  It's used for halting
  the policy processing if a predicate returns T.
  This replaces the ACTION_STOP action.
- Initial hacky email extension mechanism.
- Removed the IDMEF line.  When that added back later
  it will likely be done more modularly.
2011-06-27 13:16:04 -04:00
Seth Hall
04aa03e4ab New default notice actions for emailing network admins.
- When ACTION_EMAIL_ADMIN_ORIG or ACTION_EMAIL_ADMIN_RESP
  is applied to a notice,
  the email addresses associated with the address
  are collected from the new local_admins table
  and the email is sent to all discovered email addresses.
- The site.bro script is now in the Site module.
- Some other small cleanup.
2011-06-25 01:17:09 -04:00
Seth Hall
09e242f98f weird.bro moved into notice framework.
- That might not be the right place to put it though.
2011-06-24 16:40:05 -04:00
Seth Hall
124ae1bc41 Renamed the stream for the notice log. 2011-06-24 16:14:59 -04:00
Seth Hall
c5f683ee47 Notices actions are now accumulative.
- New log file for auditing the notice policy to
  see at a specific point in time what the fully
  ordered (by priority) notice policy was.
- New notice action "ACTION_STOP" to stop processing
  the notice policy.  This is essentially how the old
  IGNORE action can be done with the accumulative
  notices actions.  It just needs to be set as the
  $result at an at an appropriately high priority.
- No longer using the "match" statement as it didn't
  provide the flexibility to implement accumulative
  notice actions.  The functionality is now implemented
  completely in script-land.
- Beginning removal of action-filters script.
  Still need to come up with a way to implement
  some of the functionality of that script.
- Small documentation updates.
2011-06-24 13:35:48 -04:00
Seth Hall
291920b013 Some minor updates and comment tweaking. 2011-06-17 21:53:07 -04:00
Seth Hall
bc7b7eb235 More rework to the notice framework to simplify it.
- The action-filters don't work now because of a
  meta-programming limitation so the notice policy
  tuning is more manual by fully defining a PolicyItem.
- There are two default action cheats defined.  ignore_types
  and email_types are sets which will ignore or email
  notices of those types.
2011-06-15 15:41:40 -04:00
Seth Hall
ad66c9c4d9 Script cleanup.
- Defaults for all built-in asset tracking changed to LOCAL_HOSTS
- Added a tuning script for changing asset tracking
  to ALL_HOSTS in all of the core scripts that do
  asset tracking.
- Default Notice::policy files notices instead of alarming on them.
- Moved KnownHosts::Info back to export section because
  the log_known_hosts event can't be defined in the
  export section without it.
- Moved the Malware Hash Registry detection out of
  the core HTTP protocol scripts and added it to the
  all.bro script.
2011-06-15 11:27:39 -04:00
Seth Hall
8c71e68c05 Fixed a bug where notices and the conn log.
- Notices that weren't logged were still tagging
  the conn log which was confusing.  Only logged
  notices are now tagged in the conn log.
2011-06-09 12:50:00 -04:00
Seth Hall
2a01f1686e New policy directory: policy/tuning
- The all.bro script loads tuning/defaults which is
  commonly applied tuning.
- Other less common tuning can be placed in the tuning/
  directory directly.
2011-06-09 12:28:32 -04:00
Seth Hall
d3d9fedd2c Reshuffling notice declarations to make them exported.
- Notices were not available outside of their namespaces.
2011-06-09 11:59:06 -04:00
Seth Hall
0778d5e8d5 Updates to the notice framework. 2011-06-08 00:17:54 -04:00
Seth Hall
8bffd350a4 Updating to use the new directory loading technique. 2011-06-03 07:47:49 -04:00
Seth Hall
08b8873e8b Updates to the notice framework based on comments from Robin.
- New extension mechanism.
  - Notices requiring realtime actions can be accomodated with
    the notice_functions set which are called synchronously
    prior to logging or any further handling.
  - Notice::notice event handlers will be called afterward
    and follow normal (old) notice handling process.  Logging
    is done by handling this event.
- Lots of new docs.
- Renaming Action enums to reduce confusion with Type enums.
- Notice tags are attached to the Conn::Info record as a set[string].
2011-06-02 16:18:23 -04:00
Seth Hall
a432e3ce25 Reorganizing the notice framework. 2011-06-01 11:13:34 -04:00