Commit graph

658 commits

Author SHA1 Message Date
Jon Siwek
ec6560a6ed Make communication log baseline test more reliable. 2012-01-13 16:06:44 -06:00
Bernhard Amann
5bef49d625 Merge remote-tracking branch 'origin/master' into topic/bernhard/input
Conflicts:
	src/parse.y
2012-01-05 01:11:13 -08:00
Seth Hall
f8ec98625d Merge remote-tracking branch 'origin/topic/robin/pp-alarms'
* origin/topic/robin/pp-alarms:
  The silliest, tiniest little whitespace fixes.
  Update missing in last commit to this branch.
  Adding test for alarm mail.
  Tuning the pretty-printed alarms output.
2012-01-04 13:41:28 -05:00
Jon Siwek
eeceb14c1a Merge branch 'master' into fastpath 2011-12-20 11:45:50 -06:00
Bernhard Amann
59967d40ac Merge remote-tracking branch 'origin/master' into topic/bernhard/input
Conflicts:
	src/LogMgr.cc
	src/LogMgr.h
2011-12-19 12:36:53 -08:00
Jon Siwek
578cd06176 Increase timeout interval of communication-related btests.
This may help clear up some transient test failures on the NMI testbed.
2011-12-19 13:12:02 -06:00
Robin Sommer
3220bbce55 Merge remote branch 'origin/topic/jsiwek/log-escaping'
* origin/topic/jsiwek/log-escaping:
  Add missing ascii writer options to log header.
  Escape the ASCII log's set separator (addresses #712)
  Rewrite ODesc character escaping functionality. (addresses #681)

Closes #712.
2011-12-19 06:37:54 -08:00
Bernhard Amann
dcc7fe3c38 start reworking interface of software framework. working apart from detect-webapps.bro, which direcly manipulates a no longer available interface... 2011-12-09 16:47:58 -08:00
Bernhard Amann
311cd1b116 after talking to seth - change host_a field in record back to host. 2011-12-08 14:25:46 -08:00
Bernhard Amann
7e3ebc1817 forgotten policy files. 2011-12-07 15:03:36 -08:00
Bernhard Amann
9f32f68a13 make test more robust. 2011-12-06 10:50:36 -08:00
Bernhard Amann
4a690484ec make port annotation work and ascii input reader way more rebust with better error messages. 2011-12-06 10:42:37 -08:00
Bernhard Amann
949ec6897a Merge remote-tracking branch 'origin/master' into topic/bernhard/localnet 2011-12-03 20:15:05 -08:00
Robin Sommer
f59c766858 Portability fix for new patch. 2011-12-02 17:00:08 -08:00
Robin Sommer
1e45910b25 Merge remote-tracking branch 'origin/topic/jsiwek/bro-log-suffix'
* origin/topic/jsiwek/bro-log-suffix:
  Teach LogWriterAscii to use BRO_LOG_SUFFIX env. var. (addresses #704)

Closes #704.
2011-12-02 16:52:18 -08:00
Jon Siwek
edc0a451f8 Teach LogWriterAscii to use BRO_LOG_SUFFIX env. var. (addresses #704) 2011-12-01 16:18:56 -06:00
Jon Siwek
0c8b5a712d Add a remote_log_peer event which contains an event_peer record param.
Addresses #493.
2011-12-01 14:07:08 -06:00
Robin Sommer
ebd15cf12e Fixing ASCII logger to escape the unset-field place-holder if written
out literally.
2011-11-29 17:01:47 -08:00
Bernhard Amann
a68e6b9fa4 allow sets to be read from files, convenience function for reading a file once,
bug in destructor that could lead to a segfault.
2011-11-29 15:05:09 -08:00
Bernhard Amann
4975584e01 change Log enum to Input enum. 2011-11-28 13:45:00 -08:00
Bernhard Amann
3c40f00a53 make filters pointers (for inheritance) 2011-11-22 16:09:13 -08:00
Bernhard Amann
3035eb2b21 fix a little bug that prevented several simultaneous filters from working. 2011-11-21 19:30:16 -08:00
Bernhard Amann
53af0544cc re-enable table events 2011-11-21 19:03:35 -08:00
Bernhard Amann
77a517f2b5 camel-casing for types 2011-11-21 15:45:27 -08:00
Bernhard Amann
92b3723b09 add very basic predicate test. 2011-11-21 15:36:03 -08:00
Bernhard Amann
18591b53d4 rename filter to tablefilter in preparation of event filters... 2011-11-21 15:20:52 -08:00
Bernhard Amann
f0e5303330 make want_record field for tablefilter work... 2011-11-21 15:09:00 -08:00
Bernhard Amann
029871e48c first test. 2011-11-20 13:42:02 -08:00
Robin Sommer
dacc019f1f Adding test for alarm mail.
Can't test all the functionality, so skipping DNS lookup and the
actual mailing via sendmail.
2011-11-15 08:51:48 -08:00
Seth Hall
320739e183 Updated/fixed MSIE version parsing in the software framework. 2011-10-25 09:30:06 -04:00
Jon Siwek
24f3eb7fc2 Fix test failure due to some platforms joining stderr/stdout differently. 2011-10-17 13:53:10 -05:00
Jon Siwek
556b88e322 Tweaking notice suppression disable and notice policy order tests.
They should be less sensitive to script-layer changes now.
2011-10-14 10:47:32 -05: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
Jon Siwek
1cc675e30f Make CompHash computation/recovery for functions deterministic
Functions are now assigned a unique integer on construction which
CompositeHash can base hashes on.  Recovery then just involves
looking up the function pointer associated with that unique number.
2011-10-06 14:29:03 -05:00
Jon Siwek
88e089864b Consolidating some node-specific functionality from scripts in broctl repo. 2011-10-05 16:33:40 -05:00
Robin Sommer
d289db34db Communication fix and extension.
- Removing unnecessary log flushing. Closes #498.

- Adding new BiF disconnect() that shuts a connection to a peer down.

- terminate_connection() now first flushes any still buffered log
  messages.
2011-09-24 21:23:25 -07: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
Seth Hall
d18fdef2d4 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-21 02:26:19 -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
c2e432c5fa Merge remote-tracking branch 'origin/topic/jsiwek/path-func-record-demote'
* origin/topic/jsiwek/path-func-record-demote:
  Fix filter path_func to allow record argument as a subset of stream's columns.

Conflicts:
	src/LogMgr.cc

Closes #600.
2011-09-15 16:45:41 -07: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
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
Robin Sommer
83783c5ca7 Bugfix for log writer.
It didn't escape binary stuff in some situations.

Closes #585.
2011-09-11 21:33:09 -07: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
7ff2a3e115 Fix filter path_func to allow record argument as a subset of stream's columns.
This required adding the ability for RecordVal::CoerceTo functions to
optionally allow orphaning fields.  The default is to not allow it, but
now before writing to a log, the value of the stream's columns is coerced
down, if necessary, before passing it on to the filter's path_func.

Addresses #600.
2011-09-09 14:57:22 -05: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
d2bf33ee19 Merge branch 'master' into topic/jsiwek/filter-rotation 2011-09-07 12:30:47 -05:00
Robin Sommer
0d202962bc Merge remote branch 'origin/topic/jsiwek/ascii-log-rotate-fix'
* origin/topic/jsiwek/ascii-log-rotate-fix:
  Change ASCII writer to delay creation of log after rotation until next write.

Closes #570.
2011-09-04 09:00:28 -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