Commit graph

182 commits

Author SHA1 Message Date
Seth Hall
7b3ec047d0 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-08-05 11:46:13 -04:00
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
Seth Hall
da7ec8064b Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	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
2016-07-30 01:58:23 -04: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
d1b1a560c0 Add a DCE-RPC test. 2016-07-07 14:17:25 -04:00
Seth Hall
514dfc3479 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	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
2016-06-29 09:43:31 -04:00
Seth Hall
8eb67a0a6c Update tests to match move of smb base scripts into policy/ 2016-06-20 16:22:57 -04:00
Seth Hall
90399db32d Additional test specifically for the HTTP filename handling. 2016-06-15 01:56:07 -04:00
Seth Hall
56a24bdef6 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/site/local.bro
2016-06-14 15:35:05 -04:00
Robin Sommer
d195f1b047 Fixing FTP cwd getting overlue long.
Now storing them compressed.
2016-05-29 08:52:47 -07:00
Seth Hall
e2fb7591f4 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-05-20 14:28:39 -04: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
Seth Hall
bfc06f7e17 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-04-13 01:57:07 -04: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
e2dfaf8a5b Fixes to SMB file handling and logging.
There were some cases where the log would be missing a field
or data wouldn't get sent to file analysis.  At least some of
this is fixed now and I get confused a bit less when I look
at the logs now.

Also, I made the default handling "FILE" so that things like
FILE_UNKNOWN wouldn't show up in the logs so regularly.  It's
technically correct that way, but it doesn't look good and it's
correct as FILE often enough that it make sense to make it the
default I think.
2016-04-01 09:43:13 -04:00
Seth Hall
5721db4be7 Lots of cleanup and improvement to DCE/RPC analyzer.
- It works with DCE/RPC over SMB1+2 now.
   - Using named pipes in 1+2 and the transaction cmd in SMB1.
 - Base scripts based on work by Josh Liburdi.
 - New dce_rpc.log.  Feedback on how to make this log more compact
   and useful would be appreciated.
2016-04-01 09:38:52 -04:00
Seth Hall
802adb66ea Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-03-23 23:10:01 -04: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
Seth Hall
6e842cf4da Fix a problem I introduced with SMB2 file handling.
- Added an SMB2 test that encompasses the problem.
2016-03-07 15:36:25 -05:00
Seth Hall
21d8cab0c0 First SMB test. 2016-03-07 13:50:25 -05: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