Commit graph

6849 commits

Author SHA1 Message Date
Robin Sommer
b64137761e Updating submodule(s).
[nomail]
2014-02-06 18:20:46 -08:00
Robin Sommer
d81bfed45d Fixing memory leaks in input framework. 2014-02-06 17:58:56 -08:00
Bernhard Amann
4b63b30901 Fix x509-extension test sometimes failing.
For some fields, the format apparently is not consistens over
OpenSSL versions. For the test, we simply skip those.
2014-02-05 10:01:51 -08:00
Robin Sommer
126fbb6ba9 Merge remote-tracking branch 'origin/topic/jsiwek/tcp-improvements'
* origin/topic/jsiwek/tcp-improvements:
  Add script to detect filtered TCP traces, addresses BIT-1119.

BIT-1119 #merged

If we could only disable an event handler dynamically ...
2014-02-04 22:34:35 -08:00
Robin Sommer
aa90eb0786 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Minor unified2 script documentation fix.
2014-02-04 09:10:05 -08:00
Jon Siwek
ab4508486e Minor unified2 script documentation fix. 2014-02-03 16:55:23 -06:00
Jon Siwek
0cb2a90da4 Add script to detect filtered TCP traces, addresses BIT-1119.
If reading a trace file w/ only TCP control packets, a warning is
emitted to suggest the 'detect_filtered_traces' option if the user
doesn't desire Bro to report missing TCP segments for such a trace file.
2014-01-31 17:04:58 -06:00
Robin Sommer
c671491149 Merge remote-tracking branch 'origin/topic/jdopheid/bro/edits_to_installation_and_getting_started'
* origin/topic/jdopheid/bro/edits_to_installation_and_getting_started:
  Added some grammar and spelling corrections to Installation and Quick Start Guide.
  Minor grammar edits to Installation and Quick Start pages

BIT-1123 #merged
2014-01-31 11:43:25 -08:00
Robin Sommer
cdf09b4ace Updating submodule(s).
[nomail]
2014-01-31 09:56:20 -08:00
Robin Sommer
d4b5da1597 Merge remote-tracking branch 'origin/topic/jsiwek/http-file-id-caching'
* origin/topic/jsiwek/http-file-id-caching:
  Revert use of HTTP file ID caching for gaps range request content.
  Extend file analysis API to allow file ID caching, adapt HTTP to use it.

BIT-1125 #merged
2014-01-31 08:41:31 -08:00
Robin Sommer
4621745906 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Also use exec-module test to check for leaks.
2014-01-30 16:02:22 -08:00
Jon Siwek
c61dfb1963 Rewrite DNS state tracking which matches queries and replies.
The previous method of matching queries with replies was still
unreliable in cases where the reply contains no answers.  The new code
also takes extra measures to avoid pending state growing too large in
cases where the condition to match a query with a corresponding reply is
never met, but yet DNS messages continue to be exchanged over the same
connection 5-tuple (preventing cleanup of the pending state).
2014-01-30 17:21:01 -06:00
Jeannette Dopheide
121db68c30 Updates to httpmonitor and mimestats documentation. 2014-01-30 13:23:58 -06:00
Jeannette Dopheide
2e2cb0ffc9 Updates to Logs and Cluster documentation 2014-01-30 13:22:25 -06:00
Jeannette Dopheide
c7cacb56b8 Updates to Bro IDS documentation 2014-01-30 13:13:26 -06:00
Jeannette Dopheide
1ee4734f5d Merge branch 'master' of ssh://git.bro.org/bro 2014-01-30 09:06:41 -06:00
Jon Siwek
2b84af5b80 Revert use of HTTP file ID caching for gaps range request content.
Just an oversight on my part, this makes the use of file ID caching
consistent between the uses of the DataIn and Gap interfaces.
2014-01-29 17:11:20 -06:00
Jon Siwek
1842d324cb Extend file analysis API to allow file ID caching, adapt HTTP to use it.
This allows an analyzer to either provide file IDs associated with some
file content or to cache a file ID that was already determined by
script-layer logic so that subsequent calls to the file analysis
interface can bypass costly detours through script-layer.  This can
yield a decent performance improvement for analyzers that are able to
take advantage of it and deal with streaming content (like HTTP).
2014-01-29 15:34:24 -06:00
Jeannette Dopheide
4c52c378d5 Added some grammar and spelling corrections to Installation and Quick Start Guide. 2014-01-29 11:23:31 -06:00
Robin Sommer
55a8725ce2 Updating submodule(s).
[nomail]
2014-01-29 08:42:48 -08:00
Robin Sommer
dfcb4938d0 Merge remote-tracking branch 'origin/topic/jsiwek/tcp-improvements'
* origin/topic/jsiwek/tcp-improvements:
  Fix file_over_new_connection event to trigger when entire file is missed.
  Improve TCP connection size reporting for half-open connections.
  Improve gap reporting in TCP connections that never see data.
  Improve TCP FIN retransmission handling.

BIT-1119
2014-01-28 15:24:20 -08:00
Bernhard Amann
62b3cb0a5b Also use exec-module test to check for leaks. 2014-01-28 12:28:12 -08:00
Jon Siwek
31866f8f59 Change dns.log to include only standard DNS queries.
The scope of dns.log is now only standard queries (OPCODE == 0).  Other
kinds of queries (e.g. inverse query) were not handled correctly and
could interfere with the state tracking of the default DNS scripts.
2014-01-28 13:56:22 -06:00
Robin Sommer
9d3d31dbac Merge remote-tracking branch 'origin/topic/bernhard/fix-x509-extensions'
* origin/topic/bernhard/fix-x509-extensions:
  Fix x509_extension event.

BIT-1120 #merged
2014-01-28 10:27:39 -08:00
Jon Siwek
0e0e74e49c Improve DNS analysis.
- Fix parsing of empty question sections (when QDCOUNT == 0).  In this
  case, the DNS parser would extract two 2-byte fields for use in either
  "dns_query_reply" or "dns_rejected" events (dependent on value of
  RCODE) as qclass and qtype parameters.  This is not correct, because
  such fields don't actually exist in the DNS message format when
  QDCOUNT is 0.  As a result, these events are no longer raised when
  there's an empty question section.  Scripts that depends on checking
  for an empty question section can do that in the "dns_message" event.

- Add a new "dns_unknown_reply" event, for when Bro does not know how
  to fully parse a particular resource record type.  This helps fix a
  problem in the default DNS scripts where the logic to complete
  request-reply pair matching doesn't work because it's waiting on more
  RR events to complete the reply.  i.e. it expects ANCOUNT number of
  dns_*_reply events and will wait until it gets that many before
  completing a request-reply pair and logging it to dns.log.  This could
  cause bogus replies to match a previous request if they happen to
  share a DNS transaction ID.
2014-01-28 11:04:01 -06:00
Bernhard Amann
f821a13cce Merge remote-tracking branch 'origin/master' into topic/bernhard/file-analysis-x509
Conflicts:
	src/analyzer/protocol/ssl/events.bif

Still broken.
2014-01-28 06:43:08 -08:00
Bernhard Amann
2c7e7f962e Make x509 certificates an opaque type 2014-01-28 06:39:50 -08:00
Robin Sommer
462fd68931 Prototype of a netmap packet source.
TODO: Add userland BPF filtering so that our filters work.
2014-01-27 16:44:21 -08:00
Robin Sommer
9a9451af00 A series of updates and tweaks to the new PktSrc interface. 2014-01-27 15:20:02 -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
191b63e334 Merge branch 'topic/robin/dynamic-plugins-2.3' into topic/robin/pktsrc 2014-01-27 09:31:15 -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