Commit graph

13262 commits

Author SHA1 Message Date
Jon Siwek
73dcdbcfc5 Fix PktSrc setting next_timestamp even when no packet available
When pcap_next failed to return packet data, such as when a live packet
capture interface has no traffic, the next_timestamp member would still
be set to possibly uninitialized or meaningless data.

Maybe addresses #611.
2011-09-22 14:04:28 -05: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
Jon Siwek
39af63841b Fix broctl cluster log rotation (addresses #619)
Before Log::rotation_control was removed in fe38c22d, it was used to
lookup rotation inverval at the time of installing a rotation timer,
and could fall back on the &default=default_rotation_inverval.  But
now since filter rotation information is instead transferred to a Writer
when it's created, it also needed to be taught to fall back on the
default rotation interval.
2011-09-21 15:21:30 -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
f53d5fe0b9 Added session ID to the SSL logging. 2011-09-20 13:59:22 -04:00
Seth Hall
16eafb771f Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-20 13:56:02 -04:00
Seth Hall
b20edb8542 Updated the mozilla root certs. 2011-09-20 13:55:36 -04:00
Seth Hall
664500226e Updated a notice related baseline and added a necessary @load line. 2011-09-20 12:19:22 -04:00
Jon Siwek
22a89011a5 Update to use cmake submodule 2011-09-20 10:15:09 -05:00
Jon Siwek
5288e7a7c9 Adding "install-aux" target + updating bro-aux submodule.
And INSTALL file updates + format tweaks.
2011-09-19 14:53:39 -05:00
Robin Sommer
b813f0498f Updating submodule(s). 2011-09-19 09:13:00 -07: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
Seth Hall
acbfb6a425 Updates for notice suppression to use the &create_expire attribute
- The table tracking notice suppressions is now done with a table
  attribute instead of "manually" with scheduled events.

- The $suppress_for field can be set within PolicyItem's now too to
  affect the suppression interval through the notice policy.
2011-09-19 10:32:07 -04:00
Robin Sommer
12eaf5c8ad Updating submodule(s). 2011-09-18 16:43:11 -07:00
Robin Sommer
64f2777a7d Updating submodule(s). 2011-09-18 16:26:55 -07:00
Robin Sommer
fb259070c8 Updating submodule(s). 2011-09-18 16:20:00 -07:00
Robin Sommer
bd2e30f521 Merge remote-tracking branch 'origin/topic/dist-cleanup'
* origin/topic/dist-cleanup:
  Updating INSTALL
  Updating README
  Remove $Id$ tags
  Remove policy.old directory, adresses #511
2011-09-18 16:17:42 -07:00
Seth Hall
123a3bd4e3 Small rework with ssl base script to reduce memory usage.
- We are now removing the SSL analyzer after logging the session
  infomrtion.  This seems to help a lot with overly high memroy
  consumption.
2011-09-16 23:47:04 -04:00
Robin Sommer
436bd9d6a2 Updating submodule(s). 2011-09-15 17:18:08 -07:00
Robin Sommer
622f5d6953 Merge remote-tracking branch 'origin/topic/jsiwek/leak-fixes'
* origin/topic/jsiwek/leak-fixes:
  Memory leak fixes.

Closes #616.
2011-09-15 17:15:51 -07:00
Robin Sommer
c3217011cf Merge remote-tracking branch 'origin/topic/jsiwek/ruby'
* origin/topic/jsiwek/ruby:
  Add configure options for ruby/bindings integration.

Closes #604.
2011-09-15 16:49:53 -07: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
Robin Sommer
8d10a76eba Merge remote-tracking branch 'origin/topic/jsiwek/index-opt-record'
* origin/topic/jsiwek/index-opt-record:
  Fix indexing for record types with optional fields

Closes #378.
2011-09-15 16:08:59 -07:00
Robin Sommer
2a2edb3eb4 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove malloc.c (closes #557).
2011-09-15 16:03:12 -07:00
Robin Sommer
9ee8a9f806 Testing/external scripts no longer compute MD5 checksums for SMTP
entities.

Before, whether they did depended on libmagic. To do that,
smpt/entities.bro gets a new option `never_calc_md5`.

Also restructuring the tests a bit so that load a common
testing-setup.bro scripts that can set a global configuration.
2011-09-15 15:42:10 -07:00
Robin Sommer
4bc18bd3f2 External tests no longer include the full content of mismatching files
in the diagnostics output.
2011-09-15 15:17:31 -07:00
Robin Sommer
53f93e7073 Removing load of script that doesn't exist anymore. 2011-09-15 15:06:21 -07:00
Robin Sommer
ad313a8412 Updating test baselines for recent HTTP output changes. 2011-09-15 15:04:14 -07:00
Robin Sommer
5beeca44a9 Updating CHANGES. 2011-09-15 14:59:11 -07:00
Jon Siwek
8697615b81 Memory leak fixes.
Both related to Val lists constructed as arguments to events that were
not freed because the event function was never called (e.g. no handlers).

Addresses #574
2011-09-15 16:08:48 -05: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
d656e2a8c4 Fixing a major memory utilization issue with the x509_verify bif.
- The check for the root_certs variable was recreating the certificate
  store over and over again which would eventually consume lots of memory
  in the x509_stores internal (c++) variable.  The index check uses the
  Val pointer value for comparison now.
2011-09-14 22:51:52 -04:00
Seth Hall
c8e6255666 More options for the header-names.bro script. 2011-09-14 22:44:17 -04:00
Seth Hall
f32b567c85 New script for logging header names and values.
- Closes #519.
2011-09-13 22:33:26 -04:00
Seth Hall
af6c7c8b1a HTTP body size measurement added to http log.
- The value of the content-length headers has now been removed
  but it could be added back locally at an installation by a user.

- Added fields to indicate if some parsing interruption happened
  during the body transfer.

- Closes #581
2011-09-13 21:34:29 -04:00
Seth Hall
0a7685bf29 Not sure what happened here, but the broctl remote was on an old branch. 2011-09-13 10:41:25 -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
ee1884ca93 Another change to possibly fix the SSL memory consumption problem.
- If a protocol violation happens, Bro now logs what it has seen
  up until the protocol violation and deletes the c$ssl record
  so that a long lived connection with a protocol violation does
  continue to hold the memory.
2011-09-13 09:09:55 -04:00
Jon Siwek
dd49f7d477 Add configure options for ruby/bindings integration. 2011-09-12 15:38:23 -05:00
Seth Hall
c87704cc25 Small usability and correctness updates.
- Removed an notice definition from the base SSL scripts.

- Moved a logging stream ID into the export section for known-services
  and bumped priority for creating the stream.

- Adding configuration knobs for the SQL injection attack detection
  script and renaming the HTTP::SQL_Injection_Attack notice to
  HTTP::SQL_Injection_Attack_Against

- Bumped priority when creating Known::CERTS_LOG.
2011-09-12 16:14:28 -04:00
Seth Hall
eda8632d62 Small updates for a warning from the cluster framework. 2011-09-12 15:50:04 -04:00
Robin Sommer
23643eb4da Updating submodule(s). 2011-09-12 12:16:14 -07:00
Robin Sommer
6ffde1abc2 Updating baselines and testing helper script. 2011-09-12 12:12:47 -07: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
Jon Siwek
a267c30fcd Fix crash on exit (addresses #607).
MutableVal's destructor now checks if the global scope still exists
before trying to remove an identifier from it.
2011-09-12 13:16:48 -05: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