Commit graph

2138 commits

Author SHA1 Message Date
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
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
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
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
Johanna Amann
5a8eac521c StartTLS support for IRC 2015-07-29 11:47:59 -07:00
Johanna Amann
7c71eca7d0 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol 2015-07-27 14:49:38 -07:00
Albert Zaharovits
7fa96fa040 Appended smtp.trace with CC: header baseline test 2015-07-26 22:48:31 +03:00
Albert Zaharovits
b4e8a44630 SMTP logs include CC: addresses [BIT-1429] 2015-07-26 22:08:43 +03:00
Robin Sommer
30bb17ea8d Baseline update. 2015-07-24 15:07:03 -07:00
Robin Sommer
632ac4bc88 Merge branch 'master' of git.bro.org:bro 2015-07-24 15:05:22 -07:00
Johanna Amann
5ffe76f336 Slightly earlier protocol confirmation for pop3.
This allows, e.g. pop3 sessions that are upgraded via STLS to be
properly marked as such.
2015-07-23 16:55:02 -07:00
Robin Sommer
fb848f795d Merge branch 'master' of https://github.com/aaronmbr/bro
* 'master' of https://github.com/aaronmbr/bro:
  Copy-paste issue
  Allow for logging of the VLAN data about a connection in conn.log
  Save the inner vlan in the Packet object for Q-in-Q setups
2015-07-23 13:05:28 -07:00
Johanna Amann
7f2087af34 also generate an event when starttls is encounterd for imap. 2015-07-23 12:37:40 -07:00
Johanna Amann
1933299543 Add support of getting server capabilities to IMAP parser. 2015-07-23 11:15:57 -07:00
Aaron Brown
ba1facb6c3 Copy-paste issue 2015-07-22 14:19:36 -04:00
Aaron Brown
f29dbb90a5 Allow for logging of the VLAN data about a connection in conn.log 2015-07-22 14:13:17 -04:00
Johanna Amann
4a5737708c Basic IMAP StartTLS analyzer.
Parses certificates out of imap connections using StartTLS. Aborts
processing if StartTLS is not found.
2015-07-22 10:35:49 -07:00
Johanna Amann
0b897c70da Add xmpp dpd sig and fix a few parsing problems for connections that do
not upgrade to TLS.
2015-07-21 13:20:35 -07:00
Johanna Amann
574bcb0a51 Add simple XMPP StartTLS analyzer.
This is a very simple XMPP analyzer that basically only can parse the
protocol until the client and server start negotiating a TLS session. At
that point, the TLS analyzer is attached.

While the basic case seems to be working, I fully expect that I missed
something and that this might break in a lot of cases.
2015-07-21 12:18:14 -07:00
Robin Sommer
c72d191ab5 Refactoring L2 parsing code to reside in the Packet class.
That way it can be reused more easily. This also avoid having to
change the serialization structure for packets, which is a problem as
external sources of packets (via Broccoli) wouldn't have the new
attributes available to send.

Also moving Packet.{h,cc} and Layer2.{h,cc} into iosource/, and
removing header size from properties that packet sources have to
provide, as we can now compute that easily from the link type.

Plus some more cleanup.
2015-07-20 16:21:34 -07:00
Robin Sommer
86440e44fc Adding more cross-checks for IP.
This prevents a few more packets from reaching raw_events(), see
baseline update for the corresponding test.
2015-07-17 13:59:12 -07:00
Robin Sommer
fe3579f1b4 Merge branch 'topic/rework-packets' of https://github.com/jsbarber/bro
* 'topic/rework-packets' of https://github.com/jsbarber/bro:
  One more tinker to Packet -- ensure no uninitialized values
  Packet::IP()-created IP_Hdr should not free
  Make enums work for non-C++11 config
  Refactor to make bro use a common Packet object. Do a better job of parsing layer 2 and keeping track of layer 3 proto. Add support for raw packet event, including Layer2 headers.

Conflicts:
	aux/plugins
2015-07-17 12:56:04 -07:00
Johanna Amann
0d9869a2aa (Hopefully) fix race condition between trace and intel file. 2015-07-15 09:14:36 -07:00
Johanna Amann
0e213352d7 Rename Pacf to NetControl 2015-07-08 12:34:42 -07:00
Johanna Amann
eb9fbd1258 Merge remote-tracking branch 'origin/master' into topic/johanna/openflow 2015-07-08 12:15:09 -07:00
Robin Sommer
5d30be2083 A set of tests exercising IP defragmentation and TCP reassembly. 2015-07-03 08:40:22 -07:00
Robin Sommer
c1f060be63 Merge branch 'topic/yunzheng/bit-1314'
I've worked on this a bit more:

    - Added tcp_max_old_segments to init-bare.bro.
    - Removed the existing call to Overlap() as that now led to
      duplicate events.
    - Fixed the code checking for overlaps, as it didn't catch all the
      cases.

BIT-1314 #merged
GitHub #31 merged

* topic/yunzheng/bit-1314:
  BIT-1314: Added QI test for rexmit_inconsistency
  BIT-1314: Add detection for Quantum Insert attacks
2015-07-03 08:40:12 -07:00
Robin Sommer
264a824fcc Merge remote-tracking branch 'origin/topic/seth/deflate-missing-headers-fix'
I've changed the dynamic allocation of the unzipbuf back to stack
allocation, hope I'm not not missing the reason for doing that ...

* origin/topic/seth/deflate-missing-headers-fix:
  Fixes an issue with missing zlib headers on deflated HTTP content.

BIT-1399 #merged
2015-06-28 12:23:36 -07:00
Robin Sommer
ffa254acd0 Merge remote-tracking branch 'origin/topic/seth/modbus_dpd_fix'
* origin/topic/seth/modbus_dpd_fix:
  Call ProtocolConfirmed on modbus
2015-06-19 14:08:13 -07:00