Commit graph

75 commits

Author SHA1 Message Date
Seth Hall
29bace02b2 More small weird refinements to reduce overload attacks. 2011-10-21 14:31:40 -04:00
Seth Hall
0cdcf490d6 Restoring former default weird behavior for unsolicited_SYN_response. 2011-10-21 14:17:54 -04:00
Seth Hall
f0b32b21ee weird.bro rewrite.
- I want to test it for a short while before committing it to
  master just to make sure it is a sane modification.
2011-10-21 14:08:54 -04:00
Seth Hall
3900d88e60 Field name change to notice framwork. $result -> $action
- $result is renamed to $action to reflect changes to the notice framework
  since there is already another result-like field ($suppress_for) and
  there may be more in the future.

- Slipped in a change to add connection information to notice emails too.
2011-10-21 14:01:39 -04:00
Seth Hall
0803df2e14 Changed communication option from listen_encrypted to listen_ssl.
- Robin pointed out that SSL is providing authentication
  as well as encryption so listen_ssl is a more
  proper variable name.
2011-10-07 23:57:08 -04:00
Seth Hall
da9b8cc283 Modification to the Communication framework API.
- Simplified the communication API and made it easier to change
  to encrypted connections by not having separate variables to
  define encrypted and unencrypted ports.

- Now, to enable listening without configuring nodes just
  load the frameworks/communication/listen script.

- If encrypted listening is desired set the following:
	redef Communication::listen_encrypted=T;

- Accompanying test updates.
2011-10-07 13:29:26 -04:00
Seth Hall
1dd3ba7f7d Fixed another "identifier not exported" error. 2011-10-07 03:32:28 -04:00
Seth Hall
9602e6e2f3 Fixed the "identifier is not exported" error. 2011-10-07 02:51:40 -04:00
Robin Sommer
90d2136fd1 Filtering some potentially high-volume DNS weirds. 2011-10-06 18:10:15 -07:00
Robin Sommer
fe77d385e0 Merge remote-tracking branch 'origin/topic/jsiwek/broctl-tweaks'
* origin/topic/jsiwek/broctl-tweaks:
  Consolidating some node-specific functionality from scripts in broctl repo.
2011-10-05 16:54:39 -07:00
Jon Siwek
88e089864b Consolidating some node-specific functionality from scripts in broctl repo. 2011-10-05 16:33:40 -05:00
Seth Hall
26290bb56c More script tuning
- Moved some of the weird events back to the base/ directory.

- Fixed more bugs with SSL certificate handling.
2011-10-04 17:06:45 -04:00
Seth Hall
5a04190ffe More adjustment to reduce Weird volumes.
- New script extracted from weird.bro to implement the
  connection related "weird" data into an optionally
  loaded script.

- Adjusted the default notice tuning to stop ignoring
  the connection related weirds since they aren't loaded
  by default anymore.
2011-10-04 13:58:55 -04:00
Seth Hall
aa9fdf38bb Clean up to cluster framework to make event handling clearer.
- Fixed a bug where notices were being passed to proxies.
  This was a mistake and should greatly reduce load on
  many clusters.

- Cluster event regex variables renamed to:
  - Notice::manager2worker_events
  - Notice::manager2proxy_events
  - Notice::worker2manager_events
  - Notice::worker2proxy_events
  - Notice::proxy2manager_events
  - Notice::proxy2worker_events

- The default Notice::policy set is cleared for all cluster
  nodes except for managers to cause all default notice
  processing to occur on managers.  This should reduce load
  on workers slightly.
2011-10-04 11:57:50 -04:00
Seth Hall
e6a3dbfb5d Fixed a bug in the notice framework.
- The notice alarm shorthand PolicyItem wasn't actually setting the action.
2011-10-03 10:45:37 -04:00
Seth Hall
7ae4a37279 A few small updates for test baselines I updated earlier. 2011-09-29 15:52:25 -04:00
Robin Sommer
a84a422240 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Various unit test cleanup.
2011-09-28 16:54:23 -07:00
Seth Hall
8db949678d Fix a small bug in the metrics framework. 2011-09-27 14:42:55 -04:00
Seth Hall
19f1e34408 Deleting scripts that aren't ready to be included.
- scan.bro and hot.conn.bro will be returning soon.

- The rest are going to return as updated protocol analysis
  scripts and new/updated frameworks later.
2011-09-27 14:40:11 -04:00
Jon Siwek
a71ab223c4 Various unit test cleanup.
Updated README and collected coverage-related tests in a common dir.

There are still coverage failures resulting from either the following
scripts not being @load'd in the default bro mode:

base/frameworks/time-machine/notice.bro
base/protocols/http/partial-content.bro
base/protocols/rpc/main.bro

Or the following result in errors when @load'd:

policy/protocols/conn/scan.bro
policy/hot.conn.bro

If these are all scripts-in-progress, can we move them all to live
outside the main scripts/ directory until they're ready?
2011-09-27 12:41:30 -05:00
Seth Hall
38792875b3 Add shorthand variable for modifying suppression intervals.
- Notice::type_suppression_intervals: table[Notice::Type] of interval
  can be used to modify the suppression intervals for entire types of
  notices.
2011-09-25 02:30:55 -04:00
Seth Hall
43ea0ba182 Some script level fixes.
- Fixed a type name conflict in the Known namespace.

- Fixed a DPD framework bug that was causing Reporter messages.
2011-09-25 02:09:50 -04:00
Seth Hall
5911520563 Cleanup and fixes to notice framework.
- Fixed the notice_policy log.

- Predicate functions are now logged.

- Predicate functions are now optional.  If not given, it's assumed that
  the result should always apply.
2011-09-25 01:10:07 -04:00
Robin Sommer
c9b9bab473 Merge remote-tracking branch 'origin/topic/seth/notice-suppression'
* origin/topic/seth/notice-suppression:
  Updated a notice related baseline and added a necessary @load line.
  Notice suppression clean up and notice/cluster integrtion fixes.
  Updates for notice suppression to use the &create_expire attribute
  Small, mostly cosmetic updates and fixing a test.
  Fix crash on exit (addresses #607).
  Duplicate notice suppression.

Closes #623.
2011-09-22 19:20:34 -07:00
Robin Sommer
fc491c087b Merge branch 'master', remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix PktSrc setting next_timestamp even when no packet available
  Fix lack of NUL-termination in to_upper/to_lower BIF's return val.
  Fixing unit tests and some minor bugs.
  Fix broctl cluster log rotation (addresses #619)

* master:
2011-09-22 19:04:54 -07:00
Jon Siwek
928baf4b66 Fix lack of NUL-termination in to_upper/to_lower BIF's return val. 2011-09-22 13:56:16 -05:00
Jon Siwek
d2118200ea Fixing unit tests and some minor bugs. 2011-09-22 12:42:16 -05:00
Seth Hall
d18fdef2d4 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-21 02:26:19 -04:00
Seth Hall
664500226e Updated a notice related baseline and added a necessary @load line. 2011-09-20 12:19:22 -04:00
Seth Hall
412cdb16a0 Notice suppression clean up and notice/cluster integrtion fixes.
- Worker raised notices are printed a single time by the manager now.

- Cluster/notices integration cleaned up.

- New tests for cluster/notice integration.

- Notice suppression fixes and tests.
2011-09-19 12:05:13 -04:00
Robin Sommer
62581ede31 Merge remote-tracking branch 'origin/topic/jsiwek/filter-rotation'
* origin/topic/jsiwek/filter-rotation:
  Remove Log::rotation_control (addresses #572).
  Add an optional Log::RotationControl to Log::Filter records.

Closes #572.
2011-09-15 16:28:13 -07:00
Seth Hall
8006f26db2 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-15 00:27:57 -04:00
Seth Hall
fa375d3164 Removing a small "TODO" now that a bug has been fixed. 2011-09-13 09:10:19 -04:00
Seth Hall
eda8632d62 Small updates for a warning from the cluster framework. 2011-09-12 15:50:04 -04:00
Seth Hall
e0af4f6e8d Small, mostly cosmetic updates and fixing a test.
- The test needed to append the second notice the event queue so that
  the notice would be suppressed correctly.

- Setting $suppress_for manually in apply_policy since it doesn't pick
  up the &default when directly creating the record inside the NOTICE call.
2011-09-12 15:08:25 -04:00
Seth Hall
2d85ab9818 Duplicate notice suppression.
- Duplicate notices are discovered with the new Notice::Info
  field $identifier.  It's a string that is left up to the
  notice implementor to define which would indicate a
  fundamentally duplicate notice.  The field is optional and
  if it's not included it's not possible for notice
  suppression to take place.

- Duplicate notices are suppressed by default for the interval
  defined by the Notice::default_suppression_interval variable
  (1 hour by default).

- A new notice action was defined ACTION_NO_SUPPRESS to prevent
  suppression for a specific notice instance.  A convenience set
  named not_suppressed_types was also created to not suppress
  entire notice types.

- A new field was added to the PolicyItem type to modify the length
  of time a notice should be suppressed if the predicate matches.
  The field is named $suppress_for.  This name makes the code more
  readable like this: $suppress_for = 1day

- New events were created to give visibility into the notice
  framework's suppression activity.
  - event Notice::begin_suppression(n: Notice::Info)
  - event Notice::suppressed(n: Notice::Info)
  - event Notice::end_suppression(n: Notice::Info)

- The suppression.bro script doesn't have a baseline because
  it is causing a segfault in Bro.  This one test is the
  reason that this is being integrated into a branch instead
  of master.
2011-09-11 08:44:48 -04:00
Jon Siwek
fe38c22d2b Remove Log::rotation_control (addresses #572).
Log rotation is now controlled directly through Filter records.

Also addressed a TODO in the default_path_func regarding the
LogMgr::AddFilter function generating internal filter path
suggestions/fallbacks.  Now, if the user doesn't explicitly set a filter
path, the filter's path will be the result of the first call to
default_path_func (happens during the first write to the log).  And in
that case the path suggestion argument to the path_func is an empty
string.
2011-09-08 15:00:31 -05:00
Jon Siwek
d8c716ae17 Merge branch 'master' into topic/jsiwek/filter-rotation 2011-09-08 13:01:00 -05:00
Jon Siwek
d2bf33ee19 Merge branch 'master' into topic/jsiwek/filter-rotation 2011-09-07 12:30:47 -05:00
Jon Siwek
80e154ba3c Various changes to documentation framework.
- Reorganize top-level 'doc' Makefile target so submodules can easily
  add their own doc-generating routines to it.  e.g. the Bro project
  makes a placeholder 'doc' target, then adds 'restdoc', 'sphinxdoc';
  later Broccoli can add it's own target as a dependency for generating
  API docs.

- Fixed generated docs for BIFs not being organized under a base/
  subdirectory like the original source files.

- Fixed documentation style for function parameters not applying to
  functions declared as record fields.

- Misc. script documentation tweaks to address warnings given by Sphinx.
2011-09-07 10:02:15 -05:00
Robin Sommer
630c256a72 Merge remote branch 'origin/topic/gilbert/ascii-header'
* origin/topic/gilbert/ascii-header:
  Updated tests; removed net type from type conversion code.
  Updated header format (see #558)
  Header modification to LogWriterAscii to make it easier for scripts to understand bro log files.

Notes:

    - I've refactored the code a bit, also adapting the style a bit.
      Also edited the header format slightly.

    - I'm skipping the testing/btest/profiles directory, which seems
      unrelated.

    - I'm also skipping the baseline updates as they weren't
      up-to-date anymore. Will update them in a subsequent commit.
2011-09-04 12:12:08 -07:00
Seth Hall
11c437faa3 Logging framework update and mass Log::ID renaming.
- Log path's are generated in the scripting land
  now.  The default Log stream ID to path string
  mapping works like this:
    - Notice::LOG -> "notice"
    - Notice::POLICY_LOG -> "notice_policy"
    - TestModule::LOG -> "test_module"

- Logging streams updated across all of the shipped
  scripts to be more user friendly.  Instead of
  the logging stream ID HTTP::HTTP, we now have
  HTTP::LOG, etc.

- The priorities on some bro_init handlers have
  been adjusted to make the process of applying
  filters or disabling streams easier for users.
2011-09-03 01:10:17 -04:00
Seth Hall
1726aee4e9 Merge remote-tracking branch 'origin/topic/jsiwek/reporter-fatal-bif'
* origin/topic/jsiwek/reporter-fatal-bif:
  Add a Reporter::fatal BIF.
2011-09-01 10:52:39 -04:00
Seth Hall
0a6eb743fa Merge remote-tracking branch 'origin/topic/jsiwek/scp-log-pp'
* origin/topic/jsiwek/scp-log-pp:
  Add a log postprocessing function that can SCP rotated logs to remote hosts.
2011-08-31 09:24:14 -04:00
Seth Hall
203f00060c Merge remote-tracking branch 'origin/topic/jsiwek/mail-alarms'
* origin/topic/jsiwek/mail-alarms:
  Finish capability of emailing bulk alarm logs at a configurable interval.
2011-08-31 09:16:55 -04:00
Jon Siwek
c8b2698754 Add a log postprocessing function that can SCP rotated logs to remote hosts. 2011-08-29 12:28:38 -05:00
Jon Siwek
263ef2bfc9 Add an optional Log::RotationControl to Log::Filter records.
This allows for the RotationControl to be automatically added to the
Log::rotation_control table for the filter's (writer, path) when it is
added to a stream via Log::add_filter.  Log::remove_filter now also
removes any RotationControl's associated with the filter from the
Log::rotation_control table.
2011-08-26 14:36:56 -05:00
Seth Hall
fc5f22cb5d Merge remote-tracking branch 'origin/topic/jsiwek/reorg-followup' 2011-08-25 16:44:31 -04:00
Jon Siwek
31e70e447d Add a Reporter::fatal BIF.
This can be used from a Bro script to cause Bro to exit with non-zero
status and a message to stderr.  Uses of the exit() BIF in scripts
for terminating Bro because of an error were replaced with this one,
which addresses #564.
2011-08-25 13:13:39 -05:00
Jon Siwek
8c9c6f3f00 Finish capability of emailing bulk alarm logs at a configurable interval.
Also added a BiF for getting the current Bro version string.
2011-08-25 09:41:05 -05:00