Commit graph

6849 commits

Author SHA1 Message Date
Vlad Grigorescu
61c94d1809 SSH: Added some more events for SSH2 2015-03-18 12:52:46 -04:00
Aaron Eppert
2d98a64831 Merge branch 'master' of https://github.com/bro/bro into develop 2015-03-18 12:08:54 -04:00
Robin Sommer
567073ac09 Updating submodule(s).
[nomail]
2015-03-18 08:46:56 -07:00
Aaron Eppert
2088928fb6 A fatal error, especially in DEBUG, should result in a core.
This issue is especially helpful in the case of the Val::CONVERTER error and having:

"fatal error in <no location>: Val::CONVERTER ..."

Nebulous error and sans location, it is extremely hard to figure out the culprit. Thus, if Bro is built DEBUG, fatal should provide a core.

This subtle change prevents having to change FatalErrors to FatalErrorWithCore everywhere.
2015-03-18 11:15:38 -04:00
Aaron Eppert
e3cc7aa48f Seems to fix a case where an entry in the table may be null on insert.
#0  0x0000000000713b87 in Dictionary::Insert (this=0x1339840, new_entry=0xb18a9d0, copy_key=0) at /root/psdev/bro/src/Dict.cc:419
#1  0x00000000007130b0 in Dictionary::Insert (this=0x1339840, key=0xa23f6d0, key_size=36, hash=658668102, val=0x67fde40, copy_key=0) at /root/psdev/bro/src/Dict.cc:158
#2  0x00000000006cb508 in Dictionary::Insert (this=0x1339840, key=0x7ffff4ba81b0, val=0x67fde40) at /root/psdev/bro/src/Dict.h:47

(gdb) print *this
$59 = {_vptr.Dictionary = 0xaf7810, tbl = 0x215b400, num_buckets = 1347, num_entries = 3879, max_num_entries = 4042, den_thresh = 3, thresh_entries = 4041, tbl2 = 0x1afcc9e0,
  num_buckets2 = 2695, num_entries2 = 181, max_num_entries2 = 181, den_thresh2 = 3, thresh_entries2 = 8085, tbl_next_ind = 60, order = 0x133bfb0, delete_func = 0,
  cookies = {<BaseList> = {entry = 0x133d790, chunk_size = 10, max_entries = 10, num_entries = 0}, <No data fields>}}

(gdb) print *tbl
$60 = (DictEntryPList *) 0x0
2015-03-18 00:28:19 -04:00
Robin Sommer
d3afe97f83 Splitting test-all target into Bro tests and test-aux.
Also making failure of one sub-suite non-fatal.
2015-03-17 15:57:28 -07:00
Robin Sommer
468e7bbce2 Increasing a test timeout to not fail on slower machines. 2015-03-17 15:41:14 -07:00
Robin Sommer
b0e066d3e0 Merge remote-tracking branch 'origin/topic/johanna/cert-validation'
* origin/topic/johanna/cert-validation:
  add x509 canonifiers to test to not make it fail on differing openssl versions.
2015-03-17 15:29:47 -07:00
Johanna Amann
d236643894 Make error message when encountering not existing enums better.
Example:
internal error: Value not 'NoSuch::Notice' for stream 'ignored_notices' is not a valid enum.
Abort trap: 6

Addresses BIT-1199
2015-03-17 13:45:00 -07:00
Johanna Amann
e291ccc14a add x509 canonifiers to test to not make it fail on differing openssl
versions.
2015-03-17 12:51:57 -07:00
Vlad Grigorescu
092a78d14b Merge remote-tracking branch 'origin/master' into topic/vladg/ssh 2015-03-17 12:36:30 -04:00
Vlad Grigorescu
0cffee7694 SSH: Intel framework integration (PUBKEY_HASH) 2015-03-17 12:33:09 -04:00
Robin Sommer
e3be3c9e02 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1305'
* origin/topic/jsiwek/bit-1305:
  Deprecate &rotate_interval, &rotate_size, &encrypt, &mergeable.

BIT-1305 #merged
2015-03-17 09:24:13 -07:00
Robin Sommer
1ec4243ea8 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1077'
* origin/topic/jsiwek/bit-1077:
  BIT-1077: fix HTTP::log_server_header_names.

BIT-1077 #merged
2015-03-17 09:12:55 -07:00
Robin Sommer
0cfe431f15 Merge remote-tracking branch 'origin/topic/johanna/cert-validation'
* origin/topic/johanna/cert-validation:
  and still use the hash for notice suppression.
  add knob to revert to old validation behavior
  Update certificate validation script - new version will cache valid intermediate chains that it encounters on the wire and use those to try to validate chains that might be missing intermediate certificates.

BIT-1332 #merged
2015-03-17 09:09:54 -07:00
Robin Sommer
62a3a23a2b Updating submodule(s).
[nomail]
2015-03-17 09:02:46 -07:00
Robin Sommer
1d40d5c6e9 Updating submodule(s).
[nomail]
2015-03-17 09:02:12 -07:00
Jon Siwek
c09411bc8b BIT-1077: fix HTTP::log_server_header_names.
Before, it just re-logged fields from the client side.
2015-03-16 15:12:48 -05:00
Vlad Grigorescu
65d982acc1 Update baselines for new SSH analyzer. 2015-03-16 16:12:18 -04:00
Vlad Grigorescu
8218461d35 Update SSH policy scripts with new events. 2015-03-16 13:50:43 -04:00
Vlad Grigorescu
370f4f2179 SSH: Add documentation 2015-03-16 13:32:13 -04:00
Pete Nelson
3ef2cd70a4 Add defensive check for localtime_r() call 2015-03-14 16:56:35 -04:00
Seth Hall
19f498b4a4 Even more file type ident clean up.
- Add detection for ColdFusion scripts.
 - Support detection of XML/HTML with prefixed comment blocks.
2015-03-14 00:25:13 -04:00
Seth Hall
ee3e885712 Lots of fixes for file type identification.
- Plain text now identified with BOMs for UTF8,16,32
   (even though 16 and 32 wouldn't get identified as plain text, oh-well)
 - X.509 certificates are now populating files.log with
   the mime type application/pkix-cert.
 - File signatures are split apart into file types
   to help group and organize signatures a bit better.
 - Normalized some FILE_ANALYSIS debug messages.
 - Improved Javascript detection.
 - Improved HTML detection.
 - Removed a bunch of bad signatures.
 - Merged a bunch of signatures that ultimately detected
   the same mime type.
 - Added detection for MS LNK files.
 - Added detection for cross-domain-policy XML files.
 - Added detection for SOAP envelopes.
2015-03-13 22:14:44 -04:00
Jon Siwek
5e2defebe5 Make INSTALL a symlink to doc/install/install.rst
BIT-1275 #close
2015-03-13 15:45:20 -05:00
Jon Siwek
778b37b5d0 Deprecate &rotate_interval, &rotate_size, &encrypt, &mergeable.
Addresses BIT-1305.
2015-03-13 14:54:46 -05:00
Jon Siwek
46f7d23888 Fix Broxygen coverage. 2015-03-13 14:53:11 -05:00
Jon Siwek
0b957cbe75 Include timestamp in default extracted file names.
And add a policy script to extract all files.

BIT-1335 #close
2015-03-13 14:25:30 -05:00
Jon Siwek
6fbceb6a98 Identify GRE tunnels as Tunnel::GRE, not Tunnel::IP.
BIT-1311 #close
2015-03-13 13:03:58 -05:00
Jon Siwek
51010eccd4 Add Connection class getter methods for flow labels.
BIT-1309 #close
2015-03-13 13:00:29 -05:00
Johanna Amann
88beb31270 Only force logging of SSL if it actually was the SSL analyzer that
failed.
2015-03-12 16:10:26 -07:00
Johanna Amann
991e4f5dc3 DTLS working.
The only thing that is missing is a signature to detect the protocol (it
has no well-known port).

Reassembly is kind of fidgety - at the moment we only support
re-assembling one simultaneous message per direction (which looking at
our test-traffic might not be a problem). And I am not quite sure if I
got all cases correct...

But - it works :)
2015-03-12 15:46:17 -07:00
Jon Siwek
c56df225b0 Fix Broker leak tests.
Forgot to update Broker module names when they changed.
2015-03-12 16:17:34 -05:00
Jon Siwek
b47376b8e4 Updating submodule(s).
[nomail]
2015-03-12 13:09:44 -05:00
Jon Siwek
ccd5387a9f Update NEWS file.
BIT-1338 #close
2015-03-12 11:03:20 -05:00
Jon Siwek
0a31fd7a69 Give broker python bindings default install path within --prefix. 2015-03-12 10:19:52 -05:00
Johanna Amann
ba27bb54d4 Implement correct parsing of TLS record fragmentation.
Finally. Our test-case is a >400kb certificate with 10,000 alternative
names. :)
2015-03-11 18:23:08 -07:00
Johanna Amann
47de906612 Make handshake analyzer flow-based. This means we can feed data to it in
chunks, which makes dealing with fragmentation a little bit more
convenient.
2015-03-11 16:17:14 -07:00
Johanna Amann
1ae97e7e62 When setting the SSL analyzer to fail, also stop processing data
that already has been delivered to the analyzer, not just future data.

No testcase because this is hard to reproduce, this was only found due
to mistakenly triggering an error in life traffic at a site...
2015-03-11 15:21:35 -07:00
Johanna Amann
038fbf9b9e First step for a DTLS analyzer.
This commit mostly does a lot of refactoring of the current SSL
analyzer, which is split into several parts.

The handshake protocol is completely taken out of the SSL analyzer and
was refactored into its own analyzer (called tls-handshake-analyzer).
This will also (finally) make it possible to deal with TLS record
fragmentation.

Apart from that, the parts of the SSL analyzer that are common to DTLS
were split into their own pac files. Both the SSL analyzer and the (very
basic, mostly nonfunctional) DTLS analyzer use their own pac files and
those shared pac files.

All SSL tests still pass after refactoring so I hope I did not break
anything too badly.

At the moment, we have two different modules in one directory and I
guess the way I am doing this might be an abuse of the system. It seems
to work though...
2015-03-11 15:07:13 -07:00
Jon Siwek
9bb00639ba Updating submodule(s).
[nomail]
2015-03-11 17:01:13 -05:00
Jon Siwek
2d82cab998 Updating submodule(s).
[nomail]
2015-03-11 16:48:38 -05:00
Vlad Grigorescu
82c4037929 Refactoring ssh-protocol.pac:
- Simplify and unify some types
  - Fix parsing of the key exchange messages, so we can transition
  - states properly again.
2015-03-11 11:58:31 -04:00
Johanna Amann
31795e7600 When setting the SSL analyzer to fail, also stop processing data
that already has been delivered to the analyzer, not just future data.

No testcase because this is hard to reproduce, this was only found due
to mistakenly triggering an error in life traffic at a site...
2015-03-10 14:29:40 -07:00
Jon Siwek
cb5902d1ad Fix broker data stores in absence of --enable-debug.
Oops, put too much inside the assert() macro, so the registering of data
stores got preprocessed out of optimized builds.
2015-03-10 13:27:13 -05:00
Vlad Grigorescu
3ad6b3004b SSH: Use the compression_algorithms const in another place. 2015-03-10 11:57:12 -04:00
Vlad Grigorescu
d9b4693240 Some cleanup and refactoring on SSH main.bro.
Specifically, an overhaul of how the algorithm negotiation is
calculated, to simplify a lot of the code.
2015-03-09 16:04:35 -04:00
Johanna Amann
d208c95e9a and still use the hash for notice suppression. 2015-03-09 12:56:55 -07:00
Johanna Amann
144302d3e7 add knob to revert to old validation behavior 2015-03-09 12:53:29 -07:00
Johanna Amann
6ab5701ad0 Update certificate validation script - new version will cache valid
intermediate chains that it encounters on the wire and use those to try
to validate chains that might be missing intermediate certificates.

This vastly improves the number of certificates that Bro can validate.
The only drawback is that now validation behavior is not entirely
predictable anymore - the certificate of a server can fail to validate
when Bro just started up (due to the intermediate missing), and succeed
later, when the intermediate can be found in the cache.

Has been tested on big-ish clusters and should not introduce any
performance problems.
2015-03-09 12:46:33 -07:00