Commit graph

169 commits

Author SHA1 Message Date
Johanna Amann
bac1bd5bdf Merge remote-tracking branch 'origin/topic/robin/bit-1641'
* origin/topic/robin/bit-1641:
  Fixing duplicate SSH authentication failure events.

I changed the test slightly; the output of uniq is not stable between
operating systems (on OS-X, it emits a space, on Linux it apparently
emits a tab). I removed the call to uniq - sort by itself is enough to
create a difference if there are duplicate entries.

Addresses BIT-1641
2016-08-02 15:28:31 -07:00
Robin Sommer
176d9f23be Fixing duplicate SSH authentication failure events.
We now do not raise more than one failure event per connection.

Addresses BIT-1641.
2016-08-01 12:42:03 -07:00
Robin Sommer
3513cfc219 Merge remote-tracking branch 'origin/topic/johanna/bit-1644'
BIT-1644 #merged

* origin/topic/johanna/bit-1644:
  Correct endianness of IP addresses in SNMP.
2016-08-01 08:14:54 -07:00
Johanna Amann
93db6cd876 Fix behavior of connection_pending event
It is now really only raised when Bro is terminating. Also adds a
test-case that raises the event.
2016-07-26 15:49:51 -07:00
Johanna Amann
7603567782 Correct endianness of IP addresses in SNMP.
Addresses BIT-1644
2016-07-26 15:02:11 -07:00
Johanna Amann
11ec4903ee SSL: add support for signature_algorithms extension. 2016-07-11 15:01:59 -07:00
Seth Hall
90399db32d Additional test specifically for the HTTP filename handling. 2016-06-15 01:56:07 -04:00
Robin Sommer
d195f1b047 Fixing FTP cwd getting overlue long.
Now storing them compressed.
2016-05-29 08:52:47 -07:00
Robin Sommer
85213e6b55 Merge remote-tracking branch 'origin/topic/johanna/fix-analyzer-addition'
* origin/topic/johanna/fix-analyzer-addition:
  DTLS: Use magix constant from rfc5389 for stun detection.
  DTLS: Fix binpac bug with DTLSv1.2 client hellos
  Forgot to remove debug output.
  DTLS: Fix interaction with STUN
  Fix the way that child analyzers are added.

BIT-1604 #merged
2016-05-18 07:41:18 -07:00
Johanna Amann
39bdc397a0 DTLS: Fix interaction with STUN
Now the DTLS analyzer cleanly skips all STUN messages; no warnings
should be logged to dpd.log and parsing should work flawlessly with
intermixed STUN messages.
2016-05-17 16:36:46 -07:00
Johanna Amann
d091e9ca89 Fix duplication of new_connection_contents event
Addresses BIT-1602
2016-05-17 10:32:13 -07:00
Johanna Amann
6905984ee7 Merge remote-tracking branch 'origin/master' into topic/johanna/xmpp-starttls 2016-04-29 12:56:12 -07:00
Robin Sommer
2eeddac401 Merge remote-tracking branch 'origin/topic/johanna/imap-starttls'
BIT-1574 #merged

* origin/topic/johanna/imap-starttls:
  IMAP: add c++11 header file that gcc complains about.
  IMAP: documentation and test updates
  also generate an event when starttls is encounterd for imap.
  Add support of getting server capabilities to IMAP parser.
  Basic IMAP StartTLS analyzer.
2016-04-28 10:11:43 -07:00
Johanna Amann
3a70289e91 ARP: remove unnecessary variables and add testcase
BIT-1573 #close
2016-04-27 06:51:04 -07:00
Johanna Amann
3669b6aa9c Merge remote-tracking branch 'origin/master' into topic/johanna/imap-starttls 2016-04-26 10:52:16 -07:00
Johanna Amann
a705b2c08d Add DNS tests for huge TLL and CAA 2016-04-25 15:43:20 -07:00
Martin van Hensbergen
849875e8be Analyzer and bro script for RFB protocol (VNC)
This analyzer parses the Remote Frame Buffer
protocol, usually referred to as the 'VNC protocol'.

It supports several dialects (3.3, 3.7, 3.8) and
also handles the Apple Remote Desktop variant.

It will log such facts as client/server versions,
authentication method used, authentication result,
height, width and name of the shared screen.

It also includes two testcases.

Todo: Apple Remote Desktop seems to have some
bytes prepended to the screen name. This is
not interepreted correctly.
2016-04-11 10:35:00 +02:00
Seth Hall
08399da6cb Files transferred over FTP were showing incorrect sizes.
The server-reported file size was being collected poorly and if
a file name had a number in it, that was reported as the file
size instead of the actual size.

A new test is included to avoid reintroducing the problem.
2016-03-11 12:56:28 -05:00
Johanna Amann
f89874b9e9 Merge branch 'patch-4' of https://github.com/aeppert/bro
* 'patch-4' of https://github.com/aeppert/bro:
  (BIT-1545) Add "disable_analyzer_after_detection" en lieu of "skip_processing_after_detection"

I also removed the old disable_analyzer_after_detection option
completely - if someone wants that, they can just catch the event
themselves and call skip_further_processing.

I also adjusted the ssh test case to contain conn.log to prevent
re-addition of this problem in the future.

BIT-1545 #merged
2016-03-07 13:39:28 -08:00
Johanna Amann
642542ab17 Merge branch 'topic/http-evasion' of https://github.com/0xcc-labs/bro
* 'topic/http-evasion' of https://github.com/0xcc-labs/bro:
  updated weird message and tests
  update of http btest
  detect possible HTTP evasion attempts
2016-03-07 13:09:56 -08:00
wglodek
9ebe7b2a21 updated weird message and tests 2016-03-04 18:03:24 -05:00
Johanna Amann
baa3cd986c Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Better multi-space separator handling.

Also tweak multi-space separator handline some more and add test-case
triggering the new behavior.
2016-02-12 18:55:25 -08:00
Johanna Amann
9cdf869456 Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Removed duplicate parameter for IRC "QUIT" event handler.

Also add a test-case that checks the output of the quit
event handler.
2016-02-08 13:02:09 -08:00
wglodek
93f52fcdd2 detect possible HTTP evasion attempts 2016-02-07 11:22:09 -05:00
Robin Sommer
72f0c2bd65 Merge remote-tracking branch 'origin/topic/johanna/cve-2015-3194'
* origin/topic/johanna/cve-2015-3194:
  Add testcase for CVE-2015-3194

BIT-1527 #merged
2016-02-01 12:36:54 -08:00
Johanna Amann
aff555c95e Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Correct irc_privmsg_message handling.
2016-01-27 13:55:28 -08:00
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
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
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
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
5a8eac521c StartTLS support for IRC 2015-07-29 11:47:59 -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
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
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
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
Seth Hall
7d105935b1 Call ProtocolConfirmed on modbus
After a PDU is successfully parsed from both sides of a
modbus connection we're now declaring the protocol confirmed.

A small extension to the modbus/events test was added to verify
that "modbus" was identified in the service field in conn.log.
2015-06-19 07:00:38 -04:00
Vlad Grigorescu
847b16442b BIT-1410: Add btest 2015-06-01 20:49:04 -05:00
Seth Hall
ea2ce67c5f Fixes an issue with missing zlib headers on deflated HTTP content.
- Includes a test.
2015-05-18 14:30:32 -04:00
Robin Sommer
5b32791edb Merge remote-tracking branch 'origin/topic/vladg/sip'
* origin/topic/vladg/sip:
  Update NEWS.
  Update baselines.
  Spruce up SIP events.bif documentation a bit.
  Register SIP analyzer to well known port.
  Fix indenting issue in main.bro
  Add SIP btests.
  Small update for the SIP logs and DPD sig.
  SIP: Fix up DPD and the TCP analyzer a bit.
  SIP: Move to the new string BIFs
  SIP: Move to new analyzer format.
  Move the SIP analyzer to uint64 sequences, and a number of other small SIP fixes.
  Rely on content inspection and not just is_orig to determine client/server.
  Enable SIP in CMakeLists.txt
  Merge topic/seth/faf-updates.

BIT-1370 #merged
2015-04-21 15:30:25 -07:00
Robin Sommer
8b722c484d Renaming krb.log to kerberos.log. 2015-04-21 12:22:58 -07:00
Vlad Grigorescu
9f9bad48a4 Merge remote-tracking branch 'origin/master' into topic/vladg/kerberos
Conflicts:
	NEWS
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/plugins.hooks/output
	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2015-04-21 12:59:54 -04:00
Vlad Grigorescu
32284c753b Update the KRB tests a bit. 2015-04-21 12:27:14 -04:00
Robin Sommer
ed91732e09 Merge remote-tracking branch 'origin/topic/seth/more-file-type-ident-fixes'
* origin/topic/seth/more-file-type-ident-fixes:
  File API updates complete.
  Fixes for file type identification.
  API changes to file analysis mime type detection.
  Make HTTP 206 reassembly require ETags by default.
  More file type identification improvements
  Fix an issue with files having gaps before the bof_buffer is filled.
  Fix an issue with packet loss in http file reporting.
  Adding WOFF fonts to file type identification.
  Extended JSON matching and added OCSP responses.
  Another large signature update.
  More signature updates.
  Even more file type ident clean up.
  Lots of fixes for file type identification.

BIT-1368 #merged
2015-04-20 13:31:00 -07:00
Vlad Grigorescu
d5ea6b8457 Add SIP btests. 2015-04-19 22:25:37 -04:00