Commit graph

10798 commits

Author SHA1 Message Date
Gilbert Clark gc355804@ohio.edu
5b6329577f Merge remote-tracking branch 'origin/master' into topic/gilbert/ascii-header
Conflicts:
	testing/btest/Baseline/core.print-bpf-filters-ipv4/conn.log
	testing/btest/Baseline/core.vlan-mpls/conn.log
	testing/btest/Baseline/policy.frameworks.logging.remote-types/receiver.test.log
	testing/btest/Baseline/policy.frameworks.logging.types/ssh.log
	testing/btest/btest.cfg
2011-08-30 11:25:55 -07:00
Gilbert Clark gc355804@ohio.edu
3b411b69f3 Updated header format (see #558) 2011-08-30 11:20:28 -07:00
Jon Siwek
0ae1d8a359 Change default snaplen to 65535, add -l/--snaplen command line option.
Addresses #447.
2011-08-29 15:47:48 -05: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
Jon Siwek
f08ef8350a Fix for a case where nested records weren't coerced even though possible. 2011-08-26 13:59:51 -05:00
Seth Hall
005b1505b8 Fixing an accidently abandoned test. 2011-08-25 16:53:39 -04: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
Seth Hall
562abfb0d1 Merge remote-tracking branch 'origin/topic/gregor/script-polishing'
* origin/topic/gregor/script-polishing:
  Tune when c$conn is set.
  Set c$conn (for logging) in new_connection() event.
  (Semiautomatically) convert the comments in bare-init.bro into autodoc ones.
  Add ConnSize_Analyzer's fields to conn.log
  SSH base scripts: make sure ConnSizeAnalyzer variables are available before using them.
  Make reference to the other script a link
2011-08-25 13:17:49 -04:00
Jon Siwek
38e562dd30 Change ASCII writer to delay creation of log after rotation until next write.
When a given log was rotated, a new log was opened immediately.  If that
log was never written to again, those empty logs perpetually rotate, too.
This change makes it so a log won't be created for a given rotation interval
if there was nothing written to it in that interval.
2011-08-25 10:00:40 -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
Gregor Maier
f6de806a1f Merge remote-tracking branch 'origin/master' into fastpath 2011-08-24 15:25:42 -07:00
Gregor Maier
b90b5a667c Fix missing format string that caused some segfaults (v2)
My previous fix wasn't enough.
2011-08-24 13:44:41 -07:00
Seth Hall
9160898d03 The SSH::Login notice type has returned. 2011-08-24 12:55:28 -04:00
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
1936989422 Fix compile error due to typo. 2011-08-23 20:46:33 -07:00
Gregor Maier
5594f98ec7 Merge remote-tracking branch 'origin/fastpath' into topic/gregor/tunnel 2011-08-23 20:40:43 -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
f3a92ec30b Minor fixes for possible leaks on uncommon code path or on initialization. 2011-08-23 20:28:11 -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
Gregor Maier
4214d8d905 Fixing memleak in tunnel code. 2011-08-17 07:31:25 -07:00
Gregor Maier
08dc84a250 Tunnel decapsulation bugfix when FlipRoles is called.
If FlipRoles() is called the conn_val in Conn.cc gets Unref'ed and thus
my tunnel_partent RecordVal was lost. Fixing this.
2011-08-16 20:41:36 -07: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