Commit graph

1359 commits

Author SHA1 Message Date
Seth Hall
5607e86ad3 Reporter warnings and error now print to stderr by default.
- Changed the geoip warnings to Info.
2012-07-12 12:55:34 -04:00
Seth Hall
84e91b8b8d Bringing elasticsearch branch up to date with master. 2012-07-09 16:38:05 -04:00
Seth Hall
601d1cf37e Merge remote-tracking branch 'origin/master' into topic/seth/elasticsearch
Conflicts:
	aux/binpac
	aux/bro-aux
	aux/broccoli
	aux/broctl
	scripts/base/frameworks/logging/__load__.bro
	src/logging.bif
2012-07-06 12:01:16 -04:00
Robin Sommer
06d2fd52bd Merge remote-tracking branch 'origin/topic/bernhard/reader-info'
* origin/topic/bernhard/reader-info:
  fix small bug - now configuration actually is passed.
  add mode to readerinfo - no need to have it separately everywhere anymore.
  introduce reader-info struct analogous to writer-info.
  Introduce support for a table of key/value pairs with further configuration options, with the same userinterface as in the logging interface.
  make writer-info work when debugging is enabled

Conflicts:
	testing/btest/Baseline/scripts.base.frameworks.input.event/out
	testing/btest/Baseline/scripts.base.frameworks.input.executeraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.raw/out
	testing/btest/Baseline/scripts.base.frameworks.input.rereadraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.tableevent/out

Closes #841.
2012-07-02 15:33:08 -07:00
Robin Sommer
90763bb2f2 Merge branch 'robin/topic/writer-info'
* robin/topic/writer-info:
  Extending the log writer DoInit() API.
  Reworking log writer API to make it easier to pass additional information to a writer's initialization method.

Conflicts:
	src/logging/WriterBackend.cc
	src/logging/WriterBackend.h
	src/logging/WriterFrontend.cc
2012-07-02 15:20:37 -07:00
Bernhard Amann
b8ad4567fb Merge branch 'topic/bernhard/reader-info' into topic/bernhard/sqlite
Now uses optional dbname configuration option

Conflicts:
	scripts/base/frameworks/logging/__load__.bro
	src/logging.bif
2012-07-02 10:13:54 -07:00
Bernhard Amann
f820ee9f5c Introduce support for a table of key/value pairs with further configuration options,
with the same userinterface as in the logging interface.

Not really tested, but tests still work.
2012-06-28 16:16:48 -07:00
Robin Sommer
19eea409c3 Extending the log writer DoInit() API.
We now pass in a Info struct that contains:

    - the path name (as before)
    - the rotation interval
    - the log_rotate_base_time in seconds
    - a table of key/value pairs with further configuration options.

To fill the table, log filters have a new field "config: table[string]
of strings". This gives a way to pass arbitrary values from
script-land to writers. Interpretation is left up to the writer.

Also splits calc_next_rotate() into two functions, one of which is
thread-safe and can be used with the log_rotate_base_time value from
DoInit().

Includes also updates to the None writer:

    - It gets its own script writers/none.bro.

    - New bool option LogNone::debug to enable debug output. It then
      prints out all the values passed to DoInit(). That's used by a
      btest test to ensure the new DoInit() values are right.

    - Fixed a bug that prevented Bro from terminating..

(scripts.base.frameworks.logging.rotate-custom currently fails.
Haven't yet investigated why.)
2012-06-21 17:42:33 -07:00
Robin Sommer
54670817fa Merge remote-tracking branch 'origin/topic/seth/tunnels-merge'
* origin/topic/seth/tunnels-merge:
  Fixed some problems with the SOCKS analyzer and tests.

Conflicts:
	scripts/base/protocols/socks/main.bro
	src/socks-analyzer.pac
2012-06-20 21:05:04 -07:00
Seth Hall
6b8b4dab71 Fixed some problems with the SOCKS analyzer and tests. 2012-06-20 22:57:46 -04:00
Robin Sommer
6cda00c75e Merge remote-tracking branch 'origin/topic/seth/tunnels-merge'
* origin/topic/seth/tunnels-merge:
  SOCKS DPD fixes.
  Fix a bug in the SOCKS analyzer.
  SOCKS and tunnel test updates.
  Updates for the SOCKS analyzer.
  Very small updates to the tunnels framework.
2012-06-20 14:33:18 -07:00
Seth Hall
f59736cb17 SOCKS DPD fixes.
- Restricted the SOCKS 5 DPD signatures further.

- Added protocol violations.
2012-06-20 15:12:52 -04:00
Seth Hall
896f252a31 Updates for the SOCKS analyzer.
- Now supports SOCKSv5 in the analyzer and the DPD sigs.

- Reworked the core events.

- Tests.

- A SOCKS log!
2012-06-20 13:58:25 -04:00
Seth Hall
c30c0d5ff2 Very small updates to the tunnels framework.
- Make the uid field optional since it's conceptually incorrect
  for proxies being treated as tunnels to have it.

- Reordered two fields in the log.

- Reduced the default tunnel expiration interface to something more
  reasonable (1 hour).
2012-06-20 13:56:42 -04:00
Robin Sommer
b096168318 Merge branch 'topic/robin/tunnels-merge'
* topic/robin/tunnels-merge: (51 commits)
  Updating baselines and NEWS.
  Remove &synchronized from Tunnel::active table.
  Refactor of interal tunnel analysis code.
  Add state management of NetSessions's IP tunnel map.
  Add "encap_hdr_size" option back in.
  Script-layer tunnel interface cleanup.
  Fix performance problem checking packet encapsulation. (addresses #830)
  Adding a SOCKS test case.
  Updating DataSeries baselines.
  Moving my todos over to the tracker ticket.
  Extend weird names that occur in core packet processing during decapsulation.
  Add Teredo analysis option to reduce false positive decapsulation.
  Just some cleanup/documentation of new tunnel-handling code.
  Memory leak fixes
  Add a config.h definition for IPPROTO_IPV4.
  Add AYIYA tunnel decapsulation unit test.
  Add Teredo-specific events.
  Refactor some of the NetSessions routines that recurse on IP packets.
  Add independent options to toggle the different decapsulation methods
  Add more sanity checks before recursing on encapsulated IP packets.
  ...

Conflicts:
	src/event.bif
2012-06-19 13:21:31 -07:00
Jon Siwek
d6286d953d Remove &synchronized from Tunnel::active table. 2012-06-18 17:04:46 -05:00
Jon Siwek
f3b3e73eba Script-layer tunnel interface cleanup.
- Clarify "tunnel_changed" event documentation.

- Make expiration of "Tunnel::active" elements configuration via
  "Tunnel::expiration_interval".

- Remove redundant registration of a connection's tunnels in
  tunnel/main.bro's "tunnel_changed" handler.

- Rename "parents" field of "Conn::Info" to "tunnel_parents"
  to give more context.
2012-06-18 12:29:49 -05:00
Seth Hall
cd8169dda3 Bug fix and feature.
- Fixed bug with how data is sent to elasticsearch.

- Added a feature to only allow data of a certain
  size to be buffered before sending to the
  elasticsearch server.  Configured with the
  LogElasticSearch::max_byte_size variable.
2012-06-16 22:22:40 -04:00
Seth Hall
a4df914ab7 Reduce the batch size to 1000 and add a maximum time interval for batches. 2012-06-15 20:53:09 -04:00
Robin Sommer
19cf93be69 Moving my todos over to the tracker ticket. 2012-06-15 14:45:07 -07:00
Vlad Grigorescu
93a7a46af0 Merge branch 'master' of git://git.bro-ids.org/bro into elasticsearch 2012-06-15 10:46:48 -04:00
Bernhard Amann
c664c40ac2 now the writer supports tables and vectors.
still not tested, but using Log::default_writer=Log::WRITER_SQLITE seems to generate all
the right log-databases, etc.
2012-06-14 15:54:22 -07:00
Daniel Thayer
b66b022be0 Fix a warning message
When building the docs, a WARNING message was visible.  Reworded the
doc comment to prevent this warning.
2012-06-13 12:21:16 -05:00
Robin Sommer
1acb9fd91d Checkpointing the merge. Not done yet.
Merge remote-tracking branch 'origin/topic/tunnels' into topic/robin/tunnels-merge

* origin/topic/tunnels: (41 commits)
  Extend weird names that occur in core packet processing during decapsulation.
  Add Teredo analysis option to reduce false positive decapsulation.
  Just some cleanup/documentation of new tunnel-handling code.
  Memory leak fixes
  Add a config.h definition for IPPROTO_IPV4.
  Add AYIYA tunnel decapsulation unit test.
  Add Teredo-specific events.
  Refactor some of the NetSessions routines that recurse on IP packets.
  Add independent options to toggle the different decapsulation methods
  Add more sanity checks before recursing on encapsulated IP packets.
  Suppress Teredo weirds unless decapsulation was successful once before.
  Tunnel support performance optimization.
  Add Teredo tunnel decapsulation.
  Fix for IP tunnel UID persistence.
  Fix AYIYA analyzer tag.
  Add summary documentation to tunnels/main.bro.
  Make tunnels always identifiable by UID, tunnel.log now gets populated.
  Some improvements to the AYIYA analyzer.
  Remove Tunnel::decapsulate_ip option.
  Remove invalid IP-in-IP encapsulated protocol value.
  ...
2012-06-11 17:24:18 -07:00
Jon Siwek
9ddb70b109 Merge branch 'master' into topic/tunnels
Conflicts:
	scripts/base/init-bare.bro
2012-06-06 14:53:57 -05:00
Jon Siwek
beacf581d3 Just some cleanup/documentation of new tunnel-handling code. 2012-06-06 14:40:11 -05:00
Vlad Grigorescu
a3b330dbc6 Make default index name 'bro'. 2012-06-05 17:24:13 -04:00
Vlad Grigorescu
7bee0b0d8e Added sending messages to ElasticSearch over HTTP. 2012-06-03 22:07:20 -04:00
Jon Siwek
dd4dd0ca6e Add @load-sigs directive for loading signature files (addresses #551). 2012-06-01 14:10:23 -05:00
Daniel Thayer
5f8cbf8a51 Change alarm summary email interval to 24hrs 2012-05-31 17:30:48 -05:00
Jon Siwek
9fb0065696 Merge branch 'master' into topic/tunnels
Conflicts:
	scripts/base/init-bare.bro
	src/Conn.cc
	src/Conn.h
	src/Sessions.cc
	src/Sessions.h
	src/const.bif
	src/types.bif
2012-05-31 16:13:14 -05:00
Robin Sommer
fc907c0090 A set of input framework refactoring, cleanup, and polishing. 2012-05-30 16:38:08 -07:00
Robin Sommer
b37f9e38f6 Input framework merge in progress. 2012-05-25 16:16:53 -07:00
Bernhard Amann
658b188dff filters have been called streams for eternity. And I always was too
lazy to change it everywhere...

Fix that.
2012-05-25 16:11:30 -07:00
Bernhard Amann
2e452dc29f remove last remnants of autostart, which has been removed for quite a while. 2012-05-25 10:49:17 -07:00
Jon Siwek
8cd36f158b Add Teredo tunnel decapsulation.
Also fix header truncation check for IPv6 No Next header and add an
"ipv6_no_next" weird for such packets that aren't tunneled over Teredo
(which it calls "bubbles" and are used to create mappings in NATs).
2012-05-25 12:37:35 -05:00
Bernhard Amann
976d8f7ba7 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads 2012-05-25 10:33:50 -07:00
Robin Sommer
da34266a52 Switching default DS compression to gzip. 2012-05-25 08:36:59 -07:00
Robin Sommer
f7261a7851 Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-comm'
* origin/topic/jsiwek/ipv6-comm:
  Enable Bro to communicate with peers over non-global IPv6 addresses.
  Add unit tests for Broccoli SSL and Broccoli IPv6 connectivity.
  Remove AI_ADDRCONFIG getaddrinfo hints flag for listening sockets.
  Undo communication protocol version bump.
  Add support to Bro for connecting with peers over IPv6.

Closes #820.

Conflicts:
	src/bro.bif
2012-05-24 17:01:34 -07:00
Jon Siwek
0d7d74e11b Merge branch 'master' into topic/tunnels 2012-05-22 16:05:06 -05:00
Bernhard Amann
3b82d69eb3 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads
Conflicts:
	src/CMakeLists.txt
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2012-05-18 15:26:36 -07:00
Robin Sommer
7cc863c5fc Fix for when not producing local output; that hung.
* origin/topic/robin/dataseries:
  Moving trace for rotation test into traces directory.
  Fixing a rotation race condition at termination.
  Portability fixes.
  Extending DS docs with some examples.
  Updating doc.
  Fixing pack_scale and time-as-int.
  Adding format specifier to DS spec to print out double as %.6f.
  DataSeries updates and fixes.
  DataSeries tuning.
  Tweaking DataSeries support.
  Extending log post-processor call to include the name of the writer.
  Removing an unnecessary const cast.
  DataSeries TODO list with open issues/questions.
  Starting DataSeries HowTo.
  Additional test output canonification for ds2txt's timestamps.
  In threads, an internal error now immediately aborts.
  DataSeries cleanup.
  Working on DataSeries support.
  Merging in DataSeries support from topic/gilbert/logging.
  Fixing  threads' DoFinish() method.
2012-05-17 12:38:47 -07:00
Jon Siwek
74f3a32321 Enable Bro to communicate with peers over non-global IPv6 addresses.
This usually requires specifying an additional zone identifier
(see RFC 4007).  The connect() and listen() BIFs have been
changed to accept this zone identifier as an argument.
2012-05-17 12:59:20 -05:00
Robin Sommer
be6567f437 Merge remote-tracking branch 'origin/master' into topic/robin/dataseries 2012-05-14 22:17:26 -07:00
Jon Siwek
1e66fe905a Add support to Bro for connecting with peers over IPv6.
- Communication::listen_ipv6 needs to be redef'd to true in order
  for IPv6 listening sockets to be opened.

- Added Communication::listen_retry option as an interval at which
  to retry binding to socket addresses that were already in use.

- Added some explicit baselines to check in the istate.events
  and istate.events-ssl tests -- the SSL test was incorrectly
  passing because it compared two empty files.  (The files being
  empty because "http/base" was given as an argument to Bro which
  it couldn't handle because that script doesn't exist anymore).
2012-05-09 15:08:36 -05:00
Robin Sommer
c327a0613a Merge remote-tracking branch 'origin/topic/seth/ssl-fixes'
* origin/topic/seth/ssl-fixes:
  More bugfixs, cleanup, and test for SSL analyzer
  Fixed parsing of TLS server extensions.

Closes #817.
2012-05-03 13:32:49 -07:00
Seth Hall
0a6104fe66 More bugfixs, cleanup, and test for SSL analyzer
- SSL related files and classes renamed to remove the "binpac" term.

- A small fix for DPD scripts to make the DPD log more helpful if
  there are multiple continued failures.  Also, fixed the SSL
  analyzer to make it stop doing repeated violation messages for
  some handshake failures.

- Added a $issuer_subject to the SSL log.

- Created a basic test for SSL.
2012-05-03 10:52:24 -04:00
Seth Hall
0c97c3c1de Several final fixes for PacketFilter framework.
- Fixed how the dpd_* variables are written.

- Fixed a bug with the shunting code.

- Updated a few tests.
2012-05-02 21:16:30 -04:00
Jon Siwek
064c5dddb8 Fix for IP tunnel UID persistence. 2012-04-27 10:28:46 -05:00
Jon Siwek
44c4d41d0d Add summary documentation to tunnels/main.bro. 2012-04-26 12:53:20 -05:00