Commit graph

1565 commits

Author SHA1 Message Date
Gregor Maier
d3e4d5b631 Fix missing format string that caused some segfaults.
Binpac exceptions caught in Analyzer.cc are passed to Reporter::Weird
and from there to Reporter::WeirdHelper. WeirdHelper has var args, to
support passing them on to DoLog, but there were no forced format
strings. Since the binpac exception can contain network data which can
contain %-characters, that caused segfaults.
2011-08-23 22:37:27 -07:00
Gregor Maier
28b417381c Print time interval with 6 decimal places, same as we do for time vals. 2011-08-23 20:33:17 -07:00
Gregor Maier
bdf4b1cbcb Hotfix: Excessive memory usage of SSL analyzer on connections with gaps.
The SSL analyzer used excessive amounts of memory after a gap. We fix
this by tracking whether there was gap and not delivering any more data
if there was.
2011-08-23 20:03:12 -07:00
Seth Hall
c750f0c327 Fixing bug in "interesting hostnames" detection. 2011-08-22 16:38:24 -04:00
Seth Hall
be4c9cbef9 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-08-21 00:32:15 -04:00
Seth Hall
a7f6e4c582 Adding metrics framework intermediate updates.
- Since each host in a cluster has it's own view of the metrics
  the only time the manager would get a chance for a global view
  is the break_interval.  This update improves that time.  If a
  worker crosses 10% of the full threshold, it will send it's
  value to the manager which can then ask the rest of the cluster
  for a global view.  The manager then adds all of the values for
  each workers metric indexes together and will do the notice
  if it crosses the threshold so that it isn't dependent on
  waiting for the break interval to hit.  This functionality
  works completely independently of the break_interval too.  Logging
  will happen as normal.

- Small update for SSH bruteforcer detection to match additions in
  the metrics framework API.

- The hope is that this update is mostly invisible from anyone's
  perspective.  The only affect it should have on users is to better
  the detection of metric values crossing thresholds on cluster
  deployments.
2011-08-21 00:32:00 -04:00
Robin Sommer
03d41818e0 Fix for the CompHash fix. 2011-08-19 19:01:14 -07:00
Gregor Maier
89d5e01d38 Tune when c$conn is set.
After discussion with Seth we now set c$conn in
connection_state_remove() with priority 5, and log it with priority -5.
If users want to extend c$conn before connection_state_remove, they can
just create c$conn and add custom fields.

Addresses: #554
2011-08-19 14:42:48 -07:00
Robin Sommer
5dc96146f3 Updating submodule(s). 2011-08-18 14:32:21 -07:00
Robin Sommer
2636ec4679 Fixing key size calculation in composite hash code. 2011-08-18 14:12:32 -07:00
Robin Sommer
b7d421dbc4 Updating CHANGES. 2011-08-18 10:41:15 -07:00
Robin Sommer
99c23ebfb9 Updating submodule(s). 2011-08-18 10:05:07 -07:00
Robin Sommer
27ccc77463 Merge remote-tracking branch 'origin/topic/jsiwek/remove-net-type'
* origin/topic/jsiwek/remove-net-type:
  Remove the 'net' type from Bro (addresses #535).

Closes #535.
2011-08-18 10:02:16 -07:00
Robin Sommer
ecaa05073e Merge remote-tracking branch 'origin/topic/jsiwek/h3-byte-size'
* origin/topic/jsiwek/h3-byte-size:
  Fix H3 assumption of an 8-bit byte/char.

Closes #530.
2011-08-18 09:54:59 -07:00
Robin Sommer
171e5660c2 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Allow reading from interface without additional script arguments.
2011-08-18 09:50:45 -07:00
Jon Siwek
bc1c3ea28a Allow reading from interface without additional script arguments.
Reading from an interface like `bro -i en0` no longer expects to
start reading stdin for a script to load.  Explicitly passing in
'-' as an additional command line argument still allows reading a
script from stdin.

Closes #561
2011-08-17 20:38:20 -05:00
Jon Siwek
1730496d12 Remove the 'net' type from Bro (addresses #535).
Incremented the serialization data format version in the process.
2011-08-17 19:03:34 -05:00
Robin Sommer
2e8a70a662 Merge branch 'fastpath'
* fastpath:
  Fix ConnSize_Analyzer with ConnCompressor.
  Fix reporter using part of the actual message as a format string
2011-08-17 16:27:01 -07:00
Robin Sommer
cb81ce88b2 Merge branch 'master' into fastpath.
Conflicts:
	src/ConnCompressor.cc
2011-08-17 16:22:01 -07:00
Jon Siwek
d412aa9d63 Fix H3 assumption of an 8-bit byte/char.
The hash function was internally casting the void* data argument into an
unsigned char* and then using values from that to index another internal
array that's dimensioned based on the assumption of 256 values possible
for an unsigned char (8-bit chars/bytes).  This is probably a correct
assumption most of the time, but should be safer to use the limits as
defined in standard headers to get it right for the particular
system/compiler.

There was an unused uint8* casted variable in HashKey::HashBytes that
seemed like it might have been meant to be passed to H3's hash function
as an unfinished attempt to solve the 8-bit byte assumption problem, but
that doesn't seem as good as taking care of that internally in H3 so
users of the API are only concerned with byte sizes as reported by
`sizeof`.  Removing the unused variable addresses #530.

Also a minor tweak to an hmac_md5 call that was casting away const from
one argument (which doesn't match the prototype).
2011-08-17 15:03:18 -05:00
Seth Hall
82f94881c0 Improvements to metrics. SSH bruteforcing detection now done with metrics framework. 2011-08-16 11:47:49 -04:00
Jon Siwek
e37430ef66 Merge branch 'master' into topic/jsiwek/reorg-followup 2011-08-16 09:52:05 -05:00
Seth Hall
8286fdeea1 Updates for SQL injection attack detection to match the metrics framework updates. 2011-08-16 08:28:08 -04:00
Robin Sommer
79601ca0c3 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-08-15 21:11:55 -07:00
Robin Sommer
63eac6c174 Reclassifying more DNS manager errors.
Closes #461.
2011-08-15 21:10:30 -07:00
Robin Sommer
f9cd97d78d Fixing ref'counting problem. 2011-08-15 20:56:59 -07:00
Gilbert Clark gc355804@ohio.edu
bb0deea52f Merge remote-tracking branch 'origin/master' into topic/gilbert/rand-pool 2011-08-15 15:55:10 -07:00
Gilbert Clark gc355804@ohio.edu
7bea71a2c2 Updated uid pools to use integer values instead of strings. 2011-08-15 15:47:39 -07:00
Jon Siwek
33fce8a71d Misc. doc/script/test cleanup.
- fixing some Metrics::add_data() call signatures
- slight refactors to cluster framework @if and adding a NONE NodeType for
  so local_node_type() will return that instead of just emitting an error
  when cluster mode isn't enabled
- `make restdoc` target now uses bro's bare-mode
- bro scripts generated from bifs now really only live in the build/src/base/
  directory and changed the DocSourcesList.cmake to dynamically figure out
  what bifs exist by looking in src/ instead of build/src/
- add some missing @load dependencies
2011-08-15 17:29:41 -05:00
Jon Siwek
41dd0b98e9 Merge branch 'master' into topic/jsiwek/reorg-followup
Conflicts:
	scripts/base/frameworks/cluster/setup-connections.bro
	scripts/base/frameworks/metrics/main.bro
	scripts/base/frameworks/notice/actions/email_admin.bro
	scripts/base/frameworks/notice/weird.bro
	scripts/base/protocols/mime/file-hash.bro
	scripts/base/protocols/mime/file-ident.bro
	scripts/policy/frameworks/communication/listen-clear.bro
	scripts/policy/frameworks/communication/listen-ssl.bro
	scripts/policy/frameworks/control/controller.bro
	scripts/policy/frameworks/metrics/http-example.bro
	scripts/policy/frameworks/metrics/ssl-example.bro
	scripts/policy/protocols/conn/scan.bro
	src/CMakeLists.txt
2011-08-15 15:34:25 -05:00
Seth Hall
3919a35b9b Metrics framework update. Mostly to make metrics work on clusters.
- Metrics now work on cluster deployments with no caveats.  It should be
  completely transparent.  Intermediate updates to speed some detection
  will come later.
2011-08-15 15:57:48 -04:00
Gilbert Clark gc355804@ohio.edu
d46525dcca Merge branch 'master' into topic/gilbert/rand-pool 2011-08-14 22:21:59 -07:00
Gilbert Clark gc355804@ohio.edu
066ca80ab4 Updating tests. 2011-08-14 22:16:46 -07:00
Gilbert Clark gc355804@ohio.edu
ad35902bdb Merge branch 'master' into topic/gilbert/rand-pool 2011-08-14 21:56:05 -07:00
Gilbert Clark gc355804@ohio.edu
b723ecd0e0 Header modification to LogWriterAscii to make it easier for scripts to
understand bro log files.
2011-08-13 21:10:51 -07:00
Robin Sommer
2af9d9bc20 Updating submodule(s). 2011-08-13 12:15:13 -07:00
Robin Sommer
2ca791f110 Updating submodule(s). 2011-08-13 12:09:32 -07:00
Robin Sommer
1ca9def9e6 Merge remote-tracking branch 'origin/topic/jsiwek/autodoc-fixes'
* origin/topic/jsiwek/autodoc-fixes:
  Update doc sources and touch up a few script comments.
  Fixes for script auto-documentation.

Conflicts:
	scripts/base/frameworks/logging/main.bro
2011-08-13 12:09:13 -07:00
Jon Siwek
a3147033e2 Update doc sources and touch up a few script comments. 2011-08-13 09:45:42 -05:00
Jon Siwek
2a9ea6b8ba Merge branch 'master' into topic/jsiwek/autodoc-fixes
Conflicts:
	scripts/CMakeLists.txt
	scripts/base/frameworks/cluster/setup-connections.bro
	scripts/base/frameworks/communication/__load__.bro
	scripts/base/frameworks/metrics/conn-example.bro
	scripts/base/frameworks/metrics/http-example.bro
	scripts/site/local.bro
2011-08-13 09:31:06 -05:00
Robin Sommer
1aff02ea96 Merge remote-tracking branch 'origin/topic/jsiwek/debug-flags'
* origin/topic/jsiwek/debug-flags:
  Workaround for FreeBSD CMake port missing debug flags
2011-08-12 23:37:12 -07:00
Robin Sommer
045fd4690b Merge remote-tracking branch 'origin/topic/seth/piped_exec-update'
* origin/topic/seth/piped_exec-update:
  piped_exec can now write nulls in the "to_write" argument.
2011-08-12 23:35:15 -07:00
Jon Siwek
6f060a58d6 Fix vector initialization for lists of records with optional types.
If possible the list elements now get promoted to the yield type of the
vector.  There was also a problem with the value returned by the record
constructor expression's eval being completely unref'd since the vector
element assignment function doesn't ref the element -- so I changed it
to ref values if they just constructed before assigning them to the
vector.

Addresses #485.
2011-08-12 23:25:01 -07:00
Jon Siwek
560685f1c6 Fix redef'ing records with &default empty set fields.
Attributes have state to track whether they're in a record and should
apply to a record field, but this state wasn't being set for TypeDecls
that are part of a redef'd record.

Closes #460
2011-08-12 23:24:49 -07:00
Gregor Maier
03a73899a9 Fix ConnSize_Analyzer with ConnCompressor.
The num_pkts and num_bytes_ip in endpoint are optional and
should only be assigned to if ConnSize_Anlyzer is active.
2011-08-12 23:24:44 -07:00
Jon Siwek
00de88f4cb Fix reporter using part of the actual message as a format string
When not reporting via events, the final contents of the message buffer
after formatting was being used as a format string to fprintf instead of
writing out the actual string.
2011-08-12 23:24:44 -07:00
Robin Sommer
33b064bdb2 Fixing reporter's location tracking.
Closes #492.
2011-08-12 22:39:36 -07:00
Robin Sommer
46d3570bf5 Turning DNS errors into a warning.
It seems these errors aren't Bro's fault, and in any case it's clearly
not an internal error. This should finally solve the problem in #255.

Closes #255.
2011-08-12 22:29:38 -07:00
Robin Sommer
cb31fd3bb9 Logging's path_func now receives the log record as argument.
Closes #555.
2011-08-12 22:18:45 -07:00
Robin Sommer
c436930acf Functions can now be logged.
The function's code is rendered as ASCII and included as a string.
Closes #506.

Note that I'm not sure if the formatting is as desired: should the LFs
and tabs be rendered as \xXX or removed?.
2011-08-12 22:15:57 -07:00