Commit graph

6849 commits

Author SHA1 Message Date
Robin Sommer
b9bab8e4b4 Updating submodule(s).
[nomail]
2014-01-20 14:29:26 -08:00
Robin Sommer
b7dd8e4a78 Updating submodules. 2014-01-20 13:39:32 -08:00
Robin Sommer
2c34101394 Moving existing built-in plugins over to new interface. 2014-01-20 13:39:11 -08:00
Robin Sommer
ea01a1be30 Reworking plugin interface to not rely on macros.
The Plugin.cc file is now just a standard class, with the interface
changed a bit to make it more easy to write. However, there're still
some conventions that one must follow to make everything work (like
using the right namespace structure).

This commit also includes the option to compile built-in plugins
dynamically instead of statically by adding
SET(BRO_PLUGIN_BUILD_DYNAMIC TRUE) to their CMake config. This hasn't
been tested much yet, and I'm still undecided if it's somethign we
would want to do by default--but we could now if wanted. :)

Also some minor other cleanup of plugin APIs and built infrastructure.

All tested on MacOS only currently.
2014-01-20 13:39:11 -08:00
Robin Sommer
dca81174e5 Updating submodule(s).
[nomail]
2014-01-20 12:49:09 -08:00
Robin Sommer
ba9571f9ff Merge remote-tracking branch 'origin/topic/jsiwek/gre'
* origin/topic/jsiwek/gre:
  Simplify FragReassembler memory management.
  BIT-867 - Support GRE tunnel decapsulation.

BIT-867 #merged
2014-01-20 12:27:13 -08:00
Robin Sommer
bd63cf2e36 Merge remote-tracking branch 'origin/topic/jazoff/notice_file_info'
* origin/topic/jazoff/notice_file_info:
  Include file information in notices

BIT-1113 #merged

I'm wondering if there's a way to test creating these emails ... ?
2014-01-20 12:01:44 -08:00
Robin Sommer
04a974f208 Merge remote-tracking branch 'origin/topic/jazoff/ssl-validation-fix'
* origin/topic/jazoff/ssl-validation-fix:
  fix the caching of recently validated certs

BIT-1114 #merged
2014-01-20 11:55:32 -08:00
Robin Sommer
1c9c1147a0 Merge remote-tracking branch 'origin/topic/jazoff/suppression'
* origin/topic/jazoff/suppression:
  change Notice::suppressing to be a table of times

BIT-1115 #merged
2014-01-20 11:53:29 -08:00
Robin Sommer
32707c6c62 Merge remote-tracking branch 'origin/topic/jsiwek/libmagic-integration'
* origin/topic/jsiwek/libmagic-integration:
  Don't use LOG_* options to ExternalProject_Add if not supported.
  Integrate libmagic 5.16 via CMake ExternalProject.

BIT-1116 #merged
2014-01-20 11:42:58 -08:00
Jon Siwek
4901032660 Simplify FragReassembler memory management. 2014-01-16 16:40:23 -06:00
Jon Siwek
7717a3eb67 BIT-867 - Support GRE tunnel decapsulation.
This includes enhanced GRE headers.  GRE tunnels are treated just like
IP-in-IP tunnels by parsing past the GRE header in between the delivery
and payload IP packets.
2014-01-16 16:03:04 -06:00
Jon Siwek
0c7ffe74ee Don't use LOG_* options to ExternalProject_Add if not supported.
They're in CMake 2.8.3 and greater, but not strictly necessary for the
build to work -- they just make build output a bit nicer.
2014-01-15 15:42:18 -06:00
Jon Siwek
c48c531629 Integrate libmagic 5.16 via CMake ExternalProject.
- Bumps CMake requirement to CMake 2.8.
- Bro now always relies on builtin/shipped magic library/database.
2014-01-15 14:19:29 -06:00
Justin Azoff
852af5d02e Include file information in notices
Add file_desc and file_mime_type information to notice output if it
exists in the notice.
2014-01-13 17:01:51 -05:00
Robin Sommer
69ef268a44 Fixing compile problems with some versions of libc++.
Reported by Craig Leres.
2014-01-13 09:31:23 -08:00
Robin Sommer
62527f6430 Updating submodule(s).
[nomail]
2014-01-13 02:02:37 -08:00
Robin Sommer
ca55d14f67 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Improve GeoIP City database support.
  Broxygen init fixes, addresses BIT-1110.
  Fix for packet writing to make it use the global snaplength.
  Fix for traffic with TCP segmentation offloading with IP header len field being set to zero.
2014-01-13 01:38:56 -08:00
Jon Siwek
e0082e6bcb Improve GeoIP City database support.
When trying to open a city database, it now considers both the "REV0"
and "REV1" versions of the city database instead of just the former.
The extra fields of the "REV1" version (metro/area code) aren't yet put
in geo_location records, this change just allows this version of the
city database to be opened w/ same functionality as the other version.
This should be convenient because libGeoIP expects either version to
live at the same file system path, it's hard to tell which version
you've got, and current free GeoLite databases seem to be "REV1".
2014-01-10 15:17:54 -06:00
Jon Siwek
beea92ce6c Broxygen init fixes, addresses BIT-1110.
- Don't check mtime of bro binary if BRO_DISABLE_BROXYGEN env var set.

- Fix failure to locate bro binary if invoking from a relative
  path and '.' isn't in PATH.
2014-01-10 15:06:10 -06:00
Seth Hall
22f8bb9dd8 Fix for packet writing to make it use the global snaplength. 2014-01-08 21:50:03 -05:00
Seth Hall
28673bd198 Fix for traffic with TCP segmentation offloading with IP header len field being set to zero. 2014-01-08 21:47:38 -05:00
Seth Hall
cb31f9f153 Merge branch 'master' of ssh://git.bro-ids.org/bro 2014-01-08 21:37:53 -05:00
Seth Hall
38dbba7622 More file reassembly work.
- The reassembly behavior can be modified per-file by enabling or
   disabling the reassembler and/or modifying the size of the reassembly
   buffer.

 - Changed the file extraction analyzer to use the stream to avoid
   issues with the chunk based approach not immediately triggering
   the file_new event due to mime-type detection delay.  Early chunks
   frequently ended up lost before.

 - Generally things are working now and I'd consider this in testing.
2014-01-05 04:58:01 -05:00
Justin Azoff
ec3f684c61 change Notice::suppressing to be a table of times
Instead of storing the entire notice in Notice::suppressing,
just store the time the notice should be suppressed until.

This has the same functionality, except that end_suppression can no
longer be generated.
2013-12-31 10:09:44 -05:00
Robin Sommer
1411164d05 Updating submodule(s).
[nomail]
2013-12-24 07:38:17 -08:00
Robin Sommer
a35ff260cd Merge remote-tracking branch 'origin/topic/dnthayer/doc-updates'
* origin/topic/dnthayer/doc-updates:
  Fix typo in Bro 2.2 NEWS
  Fixed typo in the Quick Start Guide
  Add documentation for event parameters
  Fix typos in BIF documentation
  Update the documentation of types and attributes

BIT-1109 #merged
2013-12-24 07:36:57 -08:00
Jon Siwek
58c7fcbbf1 Canonify output of a unit test. 2013-12-20 11:44:06 -06:00
Seth Hall
0b78f444a1 Initial commit of file reassembly. 2013-12-20 00:05:08 -05:00
Robin Sommer
9227a57935 Updating submodule. 2013-12-19 09:42:19 -08:00
Robin Sommer
bc3e3034e6 Removing a stale piece of CMake code. 2013-12-19 08:31:36 -08:00
Daniel Thayer
6bf8e892b3 Fix typo in Bro 2.2 NEWS
The examples about string indexing for Bro 2.2 had a typo (comma should
be colon).
2013-12-18 14:51:08 -06:00
Daniel Thayer
0a90ddc1dd Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-updates 2013-12-18 14:35:22 -06:00
Daniel Thayer
415fe678e2 Fixed typo in the Quick Start Guide
Also clarified the instructions about modifying crontab.
2013-12-18 14:31:56 -06:00
Robin Sommer
ae9e0d4cb6 Fixing segfault with mismatching set &default in record field. 2013-12-18 09:17:05 -08:00
Robin Sommer
540ae8ad51 Updating submodule. 2013-12-16 20:15:28 -08:00
Robin Sommer
5efce5c7e4 Compile fix. 2013-12-16 12:26:12 -08:00
Robin Sommer
b91b62b2b1 Test updates. 2013-12-16 11:57:57 -08:00
Robin Sommer
5a8360af24 Updating submodules. 2013-12-16 11:57:57 -08:00
Robin Sommer
87a1618309 Start of a plugin writing how-to.
See doc/devel/plugins.rst. It includes a simple example and background
on how things work.
2013-12-16 11:57:57 -08:00
Robin Sommer
a80dd10215 Updates of the dynamic plugin code.
Includes:

    - Cleanup of the plugin API, in particular generally changing
      const char* to std::string

    - Renaming environment variable BRO_PLUGINS to BRO_PLUGIN_PATH,
      defaulting to <prefix>/lib/bro/plugins

    - Reworking how dynamic plugins are searched and activated. See
      doc/devel/plugins.rst for details.

    - New @load-plugin directive to explicitly activate a plugin

    - Support for Darwin. (Linux untested right now)

    - The init-plugin updates come with support for "make test", "make
      sdist", and "make bdist" (see how-to).

    - Test updates.

Notes: The new hook mechanism, which allows plugins to hook into Bro's
core a well-defined points, is still essentially untested.
2013-12-16 11:57:56 -08:00
Robin Sommer
987452beff Cleanup of plugin component API.
- Move more functionality into base class.
- Remove cctors and assignment operators (weren't actually needed anymore)
- Switch from const char* to std::string.
2013-12-16 10:07:20 -08:00
Robin Sommer
207b7e7102 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Improve warnings emitted from raw/execute input reader.
2013-12-16 08:50:54 -08:00
Vlad Grigorescu
8688c764a0 Fix a couple memleaks. 2013-12-13 15:04:43 -05:00
Robin Sommer
e9413c9361 New default for plugin installation path. 2013-12-12 16:50:56 -08:00
Jon Siwek
8ea56ae567 Improve warnings emitted from raw/execute input reader.
Some return values of the setpgid() call in that parent proc are ok
(or contradict reality).
2013-12-12 13:26:19 -06:00
Robin Sommer
928a5881b1 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Another attempt to improve core.when-interpreter-exceptions unit test.
2013-12-12 07:13:33 -08:00
Robin Sommer
61ee2b9172 Fixing rebase relicts. 2013-12-11 20:57:05 -08:00
Robin Sommer
93d9dde969 IOSource reorg.
A bunch of infrastructure work to move IOSource, IOSourceRegistry (now
iosource::Manager) and PktSrc/PktDumper code into iosource/, and over
to a plugin structure.

Other IOSources aren't touched yet, they are still in src/*.

It compiles and does something with a small trace, but that's all I've
tested so far. There are quite certainly a number of problems left, as
well as various TODOs and cleanup; and nothing's cast in stone yet.

Will continue to work on this.
2013-12-11 18:00:34 -08:00
Jon Siwek
63c36d58f3 Another attempt to improve core.when-interpreter-exceptions unit test.
lookup_hostname("localhost") occassionally timed out (after allowed 10
secs) when running test suite on some systems.  Not sure why, but
changed to use the Exec module for when block conditions instead as the
scope of the test doesn't depend on a particular type of condition, it
just needs something that will work reliably/quickly.
2013-12-11 14:28:23 -06:00