Commit graph

1836 commits

Author SHA1 Message Date
Johanna Amann
a88b32ca03 Add testcase for CVE-2015-3194 2016-01-19 14:45:52 -08:00
Robin Sommer
642ef5d3c1 Tweaking how HTTP requests without URIs are handled.
The change from #49 made it an error to not have a URI. That however
then led requests with an URI yet no version to abort as well.
Instead, we now check if the token following the method is an "HTTP/"
version identifier. If, so accept that the URI is empty (and trigger
a weird) but otherwise keep processing.

Adding test cases for both HTTP requests without URI and without
version.
2016-01-15 12:59:11 -08:00
Robin Sommer
adb3fab019 Updating test baselines for http.log now including version. 2016-01-15 12:18:16 -08:00
Johanna Amann
990726b514 Fix crash when deleting non existing record member.
Addresses BIT-1519
2016-01-12 15:02:20 -08:00
Robin Sommer
aee312b5d2 Adding usage guard to canonifier script. 2015-12-18 12:59:26 -08:00
Robin Sommer
eae21d4d33 Merge branch 'master' of git.bro.org:bro 2015-12-18 11:22:39 -08:00
Robin Sommer
0ba6bec710 Merge remote-tracking branch 'origin/topic/johanna/irc-starttls'
* origin/topic/johanna/irc-starttls:
  StartTLS support for IRC

BIT-1513 #merged
2015-12-18 11:20:59 -08:00
Johanna Amann
25a8d87da9 Change one forgotten bro-ids.org to bro.org 2015-12-14 15:58:16 -08:00
Seth Hall
4e4dece70a SIP scripts code cleanup.
- Daniel Guerra pointed out a type issue for SIP
   request and response code length fields which is now
   corrected.
 - Some redundant code was removed.
 - if/else tree modified to use switch instead.
2015-11-29 00:24:53 -05:00
Robin Sommer
9d7ec6b6d2 Merge branch 'master' of https://github.com/aeppert/bro
Cleaned up the surrounding code a bit and also added '[' as another
case (not sure that can happen, but doesn't hurt eihter).

* 'master' of https://github.com/aeppert/bro:
  Whitespace
  Remove
  Remove.
  Fix for JSON formatter
  A fatal error, especially in DEBUG, should result in a core.
  Seems to fix a case where an entry in the table may be null on insert.
2015-10-26 16:52:47 -07:00
Robin Sommer
a83d97937e Extending rexmit_inconsistency() event to receive an additional
parameter with the packet's TCP flags, if available.
2015-10-26 14:16:08 -07:00
Robin Sommer
41ebce097d Merge remote-tracking branch 'origin/topic/johanna/tls_early_alert'
* origin/topic/johanna/tls_early_alert:
  Add missing pcap file for tls dpd test.
2015-10-23 15:23:19 -07:00
Johanna Amann
c7f0945f54 Add missing pcap file for tls dpd test. 2015-10-23 15:04:26 -07:00
Robin Sommer
a1c0d9d91c Merge remote-tracking branch 'origin/topic/johanna/tls_early_alert'
* origin/topic/johanna/tls_early_alert:
  Extend ssl dpd signature to allow alert before server_hello.

BIT-1496 #merged
2015-10-23 14:04:43 -07:00
Robin Sommer
ecc09c11ca Merge remote-tracking branch 'origin/topic/johanna/string_vec_null'
* origin/topic/johanna/string_vec_null:
  Make join_string_vec work with vectors containing empty elements.

BIT-1495 #merged
2015-10-23 13:12:42 -07:00
Robin Sommer
c151a25843 Fix support for HTTP connect when server adds headers to response.
Patch by Eric Karasuda.

I slightly tweaked the patch to not need a new member variable. Also
turned the provided trace into a test case.
2015-10-23 13:10:33 -07:00
Johanna Amann
401e6c9102 Extend ssl dpd signature to allow alert before server_hello.
The alert in this case is caused by the server name in the SNI not being
recognized by the server, which triggers an alert. Since the server is
an apache, and this might happen reasonably often, the new signature
allows one TLS alert before the server hello is expected.
2015-10-22 13:36:21 -07:00
Johanna Amann
551a7d7394 Make join_string_vec work with vectors containing empty elements.
Without this patch, this scenario results in a segmentation fault.

I opted to keep the separator present for non-existing elements. Hence,
a vector a, [empty], b with separator "|" will result in
a||b
2015-10-22 13:08:47 -07:00
Johanna Amann
77c79bd010 Load static CA list for validation tests too.
This fixes test failures in some cases (and should protect against future test failures).
2015-10-02 15:12:32 -04:00
Johanna Amann
0e0dd9a5f7 Remove cluster certificate validation script for the moment.
Since we always have wallclock time in --pseudo-realtime, there
currently is no way to make this test reliable.
2015-10-02 11:32:15 -07:00
Johanna Amann
630e9f22d2 Merge remote-tracking branch 'origin/master' into topic/dnthayer/ticket1467 2015-10-02 11:31:00 -07:00
Robin Sommer
45078e1d8c Merge remote-tracking branch 'origin/topic/yunzheng/x509-generalizedtime'
* origin/topic/yunzheng/x509-generalizedtime:
  Make x509 end-of-string-check nicer.
  Refactor X509 generalizedtime support and test.
  Fixed parsing of V_ASN1_GENERALIZEDTIME timestamps in x509 certificates
2015-10-01 16:48:16 -07:00
Robin Sommer
f3bf7b6c7b Merge remote-tracking branch 'origin/topic/johanna/bit-1479'
BIT-1479 #merged

* origin/topic/johanna/bit-1479:
  Fix offset=-1 (eof) for raw reader
2015-10-01 16:13:16 -07:00
Robin Sommer
10bc4ad353 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1481'
BIT-1481 #merged

* origin/topic/dnthayer/ticket1481:
  Improve a few test canonifiers
  Remove unnecessary use of TEST_DIFF_CANONIFIER
  Fixed some test canonifiers to read only from stdin
2015-09-29 09:56:42 -07:00
Daniel Thayer
6519103890 Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-fixes
Conflicts:
	scripts/base/protocols/conn/main.bro
2015-09-23 11:45:10 -05:00
Daniel Thayer
34adce126b Update some doc tests and baselines 2015-09-23 11:39:36 -05:00
Daniel Thayer
b1d1d90de4 Fix a bug in diff-remove-x509-names canonifier
The last field in a log was being ignored, due to an off-by-one
error in a "for" loop.  Also simplified the script by combining
two patterns into one.
2015-09-20 00:21:04 -05:00
Daniel Thayer
a7aa393aef Improve a few test canonifiers 2015-09-19 18:08:31 -05:00
Daniel Thayer
8a16145e31 Remove unnecessary use of TEST_DIFF_CANONIFIER
Removed a TEST_DIFF_CANONIFIER from a test, because it is already
set in btest.cfg, and this one also doesn't actually specify the
path to the script.
2015-09-18 17:32:30 -05:00
Daniel Thayer
6f1e07f6d5 Fixed some test canonifiers to read only from stdin
Fixed some test canonifier scripts to read from stdin instead of
from a filename specified as a cmd-line argument.  This is needed
in order to be able to reliably use them in a pipeline with other
test canonifiers.

Also removed some unused test canonifier scripts.
2015-09-18 17:30:26 -05:00
Johanna Amann
708ede22c6 Refactor X509 generalizedtime support and test.
The generalizedtime support in for certificates now fits more
seamlessly to how the rest of the code was structured and does the
different processing for UTC and generalized times at the beginning,
when checking for them.

The test does not output the common name anymore, since the output
format might change accross openssl versions (inserted the serial
instead).

I also added a bit more error checking for the UTC time case.
2015-09-18 12:46:49 -07:00
Johanna Amann
a052dc4e35 Fix offset=-1 (eof) for raw reader
Addresses BIT-1479
2015-09-16 15:16:04 -07:00
Yun Zheng Hu
2327f5bba5 Fixed parsing of V_ASN1_GENERALIZEDTIME timestamps in x509 certificates 2015-09-10 10:50:35 +02:00
Johanna Amann
ab57c72251 Merge remote-tracking branch 'origin/topic/vladg/bit-1458'
* origin/topic/vladg/bit-1458:
  Move SIP analyzer to flowunit instead of datagram

BIT-1458 #merged
2015-09-03 20:21:19 -07:00
Vlad Grigorescu
d85e5d776d Move SIP analyzer to flowunit instead of datagram
Moving to flowunit simplifies the BinPAC constructs by allowing
the use of &oneline instead of relying on regular expressions
which sometimes didn't work as intended.

Addresses BIT-1458
2015-09-03 16:29:58 -05:00
Daniel Thayer
6df54a3168 Merge remote-tracking branch 'origin/master' into topic/dnthayer/ticket1467 2015-09-01 13:08:24 -05:00
Robin Sommer
0494a6d882 Merge remote-tracking branch 'origin/topic/johanna/bit-1463'
* origin/topic/johanna/bit-1463:
  Refactor oob tests using different approach.
  Add a number of out_of_bound checks to Packet.cc

BIT-1463 #merged
2015-08-31 14:35:49 -07:00
Johanna Amann
fd6f9e470f Add a number of out_of_bound checks to Packet.cc
Mostly this verifies that we actually have the full headers that we are
trying to read in a packet.

Addresses BIT-1463
2015-08-31 13:09:18 -07:00
Robin Sommer
36b5a4db08 Merge branch 'master' of https://github.com/knielander/bro
I reworked this a bit:

    - Moved the globals into a new Pcap::* namespace, and renamed them
      slightly.

    - Moved the definitions of the globals into pcap/const.bif.

    - Also moved the existing 'snaplen' into Pcap::* and removed
      SnapLen() from the PktSrc API (it's really a pcap thing).

    - Likewise moved the existing functions precompile_pcap_filter,
      install_pcap_filter, and pcap_error, into Pcap::*.

    - Did some more refactoring for the pcap code.

* 'master' of https://github.com/knielander/bro:
  Refactored patch (removed options, less ambiguous name)
  Allow Bro to run in fanout mode.
  Allow libpcap buffer size to be set manually.
  Allow Bro to run in fanout mode.
  Allowed libpcap buffer size to be set via configuration.
2015-08-30 22:09:32 -07:00
Robin Sommer
f2dbe7f01d Merge branch 'topic/jgras/base64-logging' of https://github.com/J-Gras/bro
* 'topic/jgras/base64-logging' of https://github.com/J-Gras/bro:
  Update calls of Base64 functions.
  Refactoring of Base64 functions.

I've removed the additional bif for encoding with a connection, as I'm
not sure there's much of a use case for it; we can always add it back
later if it turns out there is. I've also renamed
decode_base64_intern() to decode_base64_conn() to be a bit more
explicit about the difference.
2015-08-30 20:24:55 -07:00
Robin Sommer
1b9ee38e69 Fix potential crash TCP headers were captured incompletely.
Test case provided by Jonathan Ganz.

BIT-1425 #close
2015-08-30 18:49:05 -07:00
Daniel Thayer
4788e4e715 Fix some test canonifiers in scripts/policy/protocols/ssl 2015-08-22 21:56:55 -05:00
Daniel Thayer
92c5885f06 Remove unnecessary blank lines from some broker doc files 2015-08-18 15:50:58 -05:00
Daniel Thayer
f3fb2b2f52 Fix diff-canonifier-external to use basename of input file
Use basename of the input filename because sometimes it will have
directory components, such as for the baseline files.
2015-08-15 21:05:40 -05:00
Robin Sommer
ac5c4f117f Removing the yielding_teredo_decapsulation option.
With the more precise Teredo option, it seems no longer needed, and it
was a bit of a fragile mechanism to begin with.
2015-08-14 08:36:16 -07:00
Robin Sommer
c91792b762 Merge branch 'topic/jswaro/feature/HookAddToAnalyzer-tcprs-support' of https://github.com/jswaro/bro
Making two changes here:

    - Renaming the hook to SetupAnalyzerTree.

    - Reverting the reversal of the script load order. Instead, I'm
      adding an additional script that Bro looks for to load first,
      "__preload__.bro". Also extending the plugin docs to cover this.

    - Increasing plugin API version, as I suppose adding a new virtual
      function may invalidate binary compatibility.

* 'topic/jswaro/feature/HookAddToAnalyzer-tcprs-support' of https://github.com/jswaro/bro:
  Add hook 'HookAddToAnalyzerTree' to support TCPRS plugin
2015-08-10 15:05:48 -07:00
Jan Grashoefer
8f3ded5e2d Refactoring of Base64 functions.
Base64Converter now uses a connection directly, instead of an analyzer
redirecting to the underlying connection for reporting to Weird. The new
built-in functions en-/decode_base64_intern make use of this to send
encoding-errors to Weird instead of Reporter.

According to the documentation, using the empty string as alphabet in
the built-in functions, will use the default alphabet. Therefore the
built-in functions can now use default arguments and
en-/decode_base64_custom is deprecated.

The tests have been updated accordingly.
2015-08-04 15:46:24 +02:00
Daniel Thayer
33cebe1150 Fix a test that is failing very frequently 2015-08-03 15:10:06 -05:00
Robin Sommer
4c2aa804e1 Merge branch 'master' of https://github.com/albertzaharovits/bro
* 'master' of https://github.com/albertzaharovits/bro:
  Appended smtp.trace with CC: header baseline test
  SMTP logs include CC: addresses [BIT-1429]
2015-07-31 08:56:39 -07:00
Robin Sommer
46e584daa2 Adding tests for Flash version parsing and plugin detection.
(The plugin detection isn't testing the Chrome behaviour actually,
don't have a trace for that.)
2015-07-30 07:23:14 -07:00