Commit graph

7254 commits

Author SHA1 Message Date
Johanna Amann
be571986b2 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1750'
* origin/topic/dnthayer/ticket1750:
  Python 3 compatibility fixes for doc/ext/bro.py

BIT-1750 #merged
2016-10-31 14:25:23 -07:00
Seth Hall
ff682b8c2c Merge remote-tracking branch 'origin/master' into topic/seth/smb-auth-fixes 2016-10-31 16:17:01 -04:00
Seth Hall
4f3fe047f4 SMB fixes and cleanup.
SMB error handling improved. The analyzer isn't destroyed when a problem
is encoutered anymore.  The flowbuffer in the parser is now flushed and
the analyzer is set to resync against an SMB command.  This was needed
because there is some state about open files that is kept within the
parser itself which was being destroyed and that was causing analysis
after content gaps or parse errors to be faulty.  The new mechanism
doesn't detroy the parser so parsing after gaps is improved.

DCE_RPC handling in SMB is improved in the edge case where a drive
mapping isn't seen. There is a new const named SMB::pipe_filenames
which is used as a heuristic for identifying "files" opened on named
pipe shares.  If the share mapping type isn't known and a filename
in this set is found, the share type will change to "PIPE" by
generating an event named "smb_pipe_connect_heuristic".  Reads and
writes to that file will be sent to the DCE_RPC analyzer instead of
to the files framework.

The concept of "unknown" share types has been removed due to the new
heuristic detection of share types.

Some general clean up of how the SMB cmd log is written and when.
2016-10-31 13:35:47 -04:00
Johanna Amann
43a127fb89 Update submodule
[nomail]
2016-10-31 10:35:46 -07:00
Daniel Thayer
0fc0a89e4a Python 3 compatibility fixes for doc/ext/bro.py 2016-10-29 15:16:42 -05:00
Johanna Amann
65d7419be4 Update submodules
[nomail]
2016-10-27 14:45:03 -07:00
Daniel Thayer
99a898b6ae Update install instructions
Removed some outdated info, and improved the section for Mac OS X.
2016-10-27 16:35:43 -05:00
Johanna Amann
8d40f99831 Update submodule
[nomail]
2016-10-27 10:40:40 -07:00
Johanna Amann
af1d7d1f21 correct elasticsearch link in plugins 2016-10-27 09:14:53 -07:00
Robin Sommer
0d37c0df7b Fix for Sphinx >= 1.4 compability. 2016-10-27 09:00:34 -07:00
Robin Sommer
ce72a09c0c Merge remote-tracking branch 'origin/topic/johanna/xmpp-ns'
BIT-1743 #merged

* origin/topic/johanna/xmpp-ns:
  XMPP: Fix detection of StartTLS when using namespaces
2016-10-27 08:10:35 -07:00
Johanna Amann
0dc7ef7749 Update submodules
[nomail]
2016-10-26 14:31:51 -07:00
Seth Hall
a836ece4e6 Including a test for raw NTLM in SMB 2016-10-26 10:41:08 -04:00
Seth Hall
31492314d8 Merge remote-tracking branch 'origin/topic/seth/dce_rpc_fixes'
* origin/topic/seth/dce_rpc_fixes:
  Updating tests.
  Moved the DCE_RPC constants into init-bare.bro.
  Adding one more case to the DCE_RPC defrag logic.
  Make DCE_RPC skip input in strange fragment circumstances.
  Stop calling Remove() on DCE_RPC analyzer.
  More DCE_RPC improvements.
2016-10-26 09:47:57 -04:00
Robin Sommer
b0a2586309 Updating tests. 2016-10-25 17:06:25 -07:00
Robin Sommer
b7a774ab28 Moved the DCE_RPC constants into init-bare.bro. 2016-10-25 16:50:48 -07:00
Robin Sommer
1f36ae61ba Adding one more case to the DCE_RPC defrag logic.
(and fixing a couple of compiler warnings)
2016-10-25 16:45:10 -07:00
Robin Sommer
aab3819c70 Merge remote-tracking branch 'origin/master' into topic/seth/dce_rpc_fixes 2016-10-25 16:31:18 -07:00
Johanna Amann
3284e92677 NEWS file tweaks: input error events & OpenFlow.
These were pointed out by Daniel.
2016-10-25 10:21:57 -07:00
Johanna Amann
6aea681832 Merge branch 'patch-2' of https://github.com/balintm/bro
* 'patch-2' of https://github.com/balintm/bro:
  Update smb1-com-open-andx.pac
2016-10-25 09:46:37 -07:00
Johanna Amann
0f29405d6e Merge remote-tracking branch 'origin/topic/robin/sig-fixes'
* origin/topic/robin/sig-fixes:
  Fix a couple of problems with signature matching.

BIT-1737 #merged
2016-10-25 09:42:29 -07:00
Johanna Amann
860cfa7002 Update submodule
[nomail]
2016-10-25 09:32:11 -07:00
Johanna Amann
784fc7f042 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Python 3 compatibility fix for coverage-calc script
2016-10-25 09:28:44 -07:00
Seth Hall
8276c250bd Updates for SMB auth handling from Martin van Hensbergen.
- Raw NTLM (not in GSSAPI) over SMB is now handled correctly.
 - The encrypted NTLM session key is now passed into scriptland
   through the ntlm_authenticate event.
2016-10-25 02:52:09 -04:00
Johanna Amann
89f9315fb0 XMPP: Fix detection of StartTLS when using namespaces
the starttls command will sometimes be issued with a namespace, e.g. as
<ns2:starttls xmlns:ns2='urn:ietf:params:xml:ns:xmpp-tls'/>. The XMPP
analyzer did not handle this scenario correctly.

This is very similar to the following ejabberd bug:
https://support.process-one.net/browse/EJAB-1123
2016-10-24 11:54:47 -07:00
Robin Sommer
c57f83d8bf Merge remote-tracking branch 'origin/topic/johanna/gcc-6.2.1'
BIT-1732 #merged

* origin/topic/johanna/gcc-6.2.1:
  Fix alignment issue of ones_complement_checksum
2016-10-24 11:12:05 -07:00
Seth Hall
36ae5e6662 Make DCE_RPC skip input in strange fragment circumstances.
If there are too many concurrent fragments or too much
data fragmented, skip further input on DCE_RPC.
2016-10-24 13:50:13 -04:00
Seth Hall
c88719472b Stop calling Remove() on DCE_RPC analyzer.
This was crashing Bro when it was called on DCE_RPC traffic
carried over SMB.
2016-10-24 13:44:44 -04:00
Seth Hall
e4b620673b More DCE_RPC improvements.
- The logic for fragment handling has been rewritten and should be correct now.
 - There are now tunables for fragment handling overflow situations.
   - DCE_RPC::max_cmd_reassembly and DCE_RPC::max_frag_data
   - They result in weirds and analyzer removal.
 - Memory leak fixed by unique_ptr auto cleanup.
 - DCE_RPC is now intolerate of content gaps and will stop
   analyzing traffic if content gaps happen (like most other analyzers currently).
2016-10-24 03:22:20 -04:00
Daniel Thayer
8ae064006b Merge remote-tracking branch 'origin/master' into fastpath 2016-10-21 09:35:04 -05:00
Daniel Thayer
99cd34f57d Python 3 compatibility fix for coverage-calc script 2016-10-21 09:33:04 -05:00
Johanna Amann
3d1f35f85b Update submodule
[nomail]
2016-10-20 11:53:34 -04:00
Johanna Amann
96d14691df Merge remote-tracking branch 'origin/topic/dnthayer/ticket1731'
* origin/topic/dnthayer/ticket1731:
  Fix istate.pybroccoli test on systems using Python 3

BIT-1731 #merged
2016-10-20 11:41:19 -04:00
Robin Sommer
5cf2320fbc Fix a couple of problems with signature matching.
- IPv4 CIDR specifications didn't work with dst-ip/src-ip.

    - The "payload-size" condition was unreliable with UDP traffic.
2016-10-19 14:23:43 -07:00
Johanna Amann
8ce746cc25 Merge remote-tracking branch 'origin/topic/vladg/bit-1641'
* origin/topic/vladg/bit-1641:
  Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641.
  Clean up the logic for ssh_auth_failed. Addresses BIT-1641
  Update baselines for adding a field to ssh.log as part of BIT-1641
  Script-land changes for BIT-1641.
  Change SSH.cc to use ssh_auth_attempted instead of ssh_auth_failed. Addresses BIT-1641.
  Revert "Fixing duplicate SSH authentication failure events."
  Create new SSH events ssh_auth_attempt and ssh_auth_result. Add auth_attempts to SSH::Info. Address BIT-1641.

I extended the tests a bit and did some small cleanups. I also moved the
SSH events back to the global namespace for backwards compatibility and
for consistency (the way it was at the moment, some of them were global
some SSH::).

Furthermore, I fixed the ssh_auth_result result event, it was only
raised in the success case. ssh_auth_result is now also checked in the
testcases. I also have a suspicion that the intel integration never
really worked before.

BIT-1641 #merged
2016-10-18 21:57:27 -04:00
Johanna Amann
c5696821c8 Update submodule
[nomail]
2016-10-18 13:53:13 -04:00
balintm
303985e7db Update smb1-com-open-andx.pac
# of bytes in reserved field of request is 4 & response is 6B long.
2016-10-17 10:18:09 +01:00
Johanna Amann
24f74cb52e Fix alignment issue of ones_complement_checksum
The ones_complement_checksum function assumes that the bytes passed into
it are aligned on 16 bit boundaries.

When using gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2) with -O2, this
does not seem to hold true anymore; assuming 16 bit alignment will lead
to accesses to uninitialized memory and wrong checksums.

This commit adds a minimally invasive change that does not assume
alignment anymore. This might have a small performance impact for every
single packet we process.

This error occured reproducibly when called from icmp6_checksum.
2016-10-14 15:40:59 -07:00
Daniel Thayer
6fa9540e47 Fix istate.pybroccoli test on systems using Python 3
Filter out the python 2 "L" suffix on long integers (not valid in Python 3),
and change python 3 "object at" to "instance at" when printing
class instances.
2016-10-14 14:10:40 -05:00
Vlad Grigorescu
70aaffbaac Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641. 2016-10-14 09:14:22 -05:00
Vlad Grigorescu
7caf2d0356 Clean up the logic for ssh_auth_failed. Addresses BIT-1641 2016-10-14 09:14:22 -05:00
Vlad Grigorescu
3e7d143e31 Update baselines for adding a field to ssh.log as part of BIT-1641 2016-10-14 09:14:21 -05:00
Vlad Grigorescu
2920366049 Script-land changes for BIT-1641. 2016-10-14 09:14:21 -05:00
Vlad Grigorescu
20aef04dc7 Change SSH.cc to use ssh_auth_attempted instead of ssh_auth_failed. Addresses BIT-1641. 2016-10-14 09:14:21 -05:00
Vlad Grigorescu
b1c3f1cd9b Revert "Fixing duplicate SSH authentication failure events."
This reverts commit 176d9f23be.
2016-10-14 09:14:21 -05:00
Vlad Grigorescu
93becb1387 Create new SSH events ssh_auth_attempt and ssh_auth_result. Add auth_attempts to SSH::Info. Address BIT-1641. 2016-10-14 09:14:21 -05:00
Robin Sommer
bd0a374c87 Merge remote-tracking branch 'origin/topic/johanna/freebsd-clang'
BIT-1728 #merged

* origin/topic/johanna/freebsd-clang:
  Fix md5 problem with freebsd 11.0 clang 3.8
2016-10-13 16:30:18 -07:00
Robin Sommer
f17d92d3cc Updating submodule(s).
[nomail]
2016-10-13 16:29:52 -07:00
Robin Sommer
c9d449e363 Merge remote-tracking branch 'origin/topic/johanna/tls13'
BIT-1727 #merged

* origin/topic/johanna/tls13:
  Better way to deal with overloaded Assign constructors.
  A few tabbing fixes in TLS 1.3 support
  TLS 1.3 support.
2016-10-13 15:48:27 -07:00
Johanna Amann
38f6ca87ae Merge remote-tracking branch 'origin/topic/dnthayer/ticket1720'
BIT-1720 #merged

* origin/topic/dnthayer/ticket1720:
  Added missing README files for documentation
  List new log files in the log-files.rst document
2016-10-13 14:09:44 -07:00