Commit graph

5140 commits

Author SHA1 Message Date
Bernhard Amann
2c7e7f962e Make x509 certificates an opaque type 2014-01-28 06:39:50 -08:00
Jeannette Dopheide
af95026348 Minor grammar edits to Installation and Quick Start pages 2014-01-27 15:23:24 -06:00
Bernhard Amann
6d73b8c57e Fix x509_extension event.
The event now really returns the extension. If openssl supports printing
it, it is converted into the openssl ascii output.

The output does not always look pretty because it can contain newlines.

New event syntax:
event x509_extension(c: connection, is_orig: bool, cert:X509, extension: X509_extension_info)

Example output for extension:
  [name=X509v3 Extended Key Usage,
    short_name=extendedKeyUsage,
    oid=2.5.29.37,
    critical=F,
    value=TLS Web Server Authentication, TLS Web Client Authentication]
  [name=X509v3 Certificate Policies,
   short_name=certificatePolicies,
   oid=2.5.29.32,
   critical=F,
   value=Policy: 1.3.6.1.4.1.6449.1.2.1.3.4^J  CPS: https://secure.comodo.com/CPS^J]
2014-01-27 10:24:57 -08:00
Robin Sommer
3f47c5bc87 Merge remote-tracking branch 'origin/master' into topic/robin/dynamic-plugins-2.3 2014-01-24 20:26:00 -08:00
Vlad Grigorescu
56acd99d15 Fix misidentification of SOCKS traffic. Traffic that had a certain bytestring would get incorrectly identified as SOCKS. This seemed to happen a lot with DCE/RPC traffic. 2014-01-24 21:00:55 -05:00
Jon Siwek
e09763e061 Fix file_over_new_connection event to trigger when entire file is missed.
If a file is nothing but gaps (e.g. due to missing/dropped packets), Bro
can sometimes detect a file is supposed to have been present and never
saw any of its content, but failed to raise file_over_new_connection
events for it.  This was mostly apparent because the tx_hosts/rx_hosts
fields in files.log would not be populated in such cases (but are now
with this change).
2014-01-24 16:47:00 -06:00
Jon Siwek
6d46144c3b Improve TCP connection size reporting for half-open connections.
If TCP endpoint A and B are synchronized at some point, but A
closes/aborts/crashes and B goes on without knowledge of it and then A
tries to re-synchronize, Bro could end up seeing something like
(sequence numbers made up):

A: SYN 100
B: ACK 500
A: RST 500

The final sequence number of A, in this case, is not useful in the
context of determining the number of data bytes sent by A, so Bro now
reports that as 0 (where before it could often be misleadingly large).
2014-01-24 16:32:55 -06:00
Jon Siwek
9b12967d40 Improve gap reporting in TCP connections that never see data.
The previous behavior was to accomodate SYN/FIN/RST-filtered traces by
not reporting missing data (via the content_gap event) for such
connections.  The new behavior always reports gaps for connections that
are established and terminate normally, but sequence numbers indicate
that all data packets of the connection were missed.  The behavior can
be reverted by redef'ing "detect_filtered_trace".
2014-01-24 16:21:02 -06:00
Jon Siwek
5b3573394e Improve TCP FIN retransmission handling.
In the case multiple FIN packets are seen from a TCP endpoint (e.g.
when one is retransmitted), only the first counted towards a byte in the
sequence space.  This could cause a subsequent FIN packet to induce an
incorrect wrap around in the sequence numbers (e.g.  the retransmitted
FIN packet now is one sequence number behind the the first) and
misleadingly large connection sizes.  The change is to always treat a
FIN packet as counting one byte in to the sequence space.
2014-01-24 15:51:58 -06:00
Robin Sommer
392d1cb759 Updating submodule(s).
[nomail]
2014-01-23 17:05:48 -08:00
Robin Sommer
18bd20fe29 Fixing initialization context in anonymous functions.
When an anonymoys function was defined inside an initialization
context, that context transfered over to the function body and could
lead to spurious error messages.
2014-01-23 14:18:30 -08:00
Robin Sommer
fdd386a898 A test with a plugin exercising all hooks. 2014-01-22 14:35:31 -08:00
Robin Sommer
ee75958951 Adding meta hooks.
This is mainly an experiment to see if this makes sense. I'm not very
fond of the arguments being wrapped into a discriminating union, but I
like it better than other alternatives at least.

The new code is untested.
2014-01-22 14:29:22 -08:00
Robin Sommer
c4b440b3e7 Updating submodule(s).
[nomail]
2014-01-22 12:14:03 -08:00
Robin Sommer
d35bee4285 Merge remote-tracking branch 'origin/topic/jsiwek/review-rafael-bro-manual-changes'
* origin/topic/jsiwek/review-rafael-bro-manual-changes:
  Add unit tests for new Bro Manual docs.
  Reformat line width of some docs (i.e. `fmt -72`).
  Pass over doc xref links and linking style.
  New Bro Manual Development Edition and basic.css to fix btest output overflow problem (Update 1).

BIT-1118 #merged
2014-01-22 12:13:53 -08:00
Jon Siwek
e18084b68d Add unit tests for new Bro Manual docs. 2014-01-21 16:01:55 -06:00
Jon Siwek
c5ab33d88f Reformat line width of some docs (i.e. fmt -72). 2014-01-21 11:43:35 -06:00
Jon Siwek
e88ac7221d Pass over doc xref links and linking style. 2014-01-21 11:32:55 -06:00
Jon Siwek
7822ebcb2e Merge branch 'master' into topic/jsiwek/review-rafael-bro-manual-changes 2014-01-21 10:46:38 -06:00
Robin Sommer
430cf311e9 Updating submodule(s).
[nomail]
2014-01-21 07:14:03 -08:00
Robin Sommer
b8274e0d44 Updating submodule(s).
[nomail]
2014-01-21 07:12:59 -08:00
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
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
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