Commit graph

6849 commits

Author SHA1 Message Date
Bernhard Amann
597c373fa0 Log chosen curve when using ec cipher suite in TLS. 2014-04-26 09:48:36 -07:00
Robin Sommer
fc5dcc0dd1 Merge branch 'master' into topic/robin/bit-348-merge 2014-04-24 18:51:37 -07:00
Robin Sommer
b029d18336 Merge branch 'topic/mareq/quoted-printable' of https://github.com/mareq/bro
Thanks!

Merged https://github.com/bro/bro/pull/7
2014-04-24 18:38:43 -07:00
Robin Sommer
95cad599ac Merge branch 'master' of https://github.com/jshlbrd/bro
Merged https://github.com/bro/bro/pull/6
2014-04-24 18:23:51 -07:00
Robin Sommer
bd64e52782 Fixing compiler warnings. 2014-04-24 18:14:18 -07:00
Robin Sommer
116ed370a2 Merge remote-tracking branch 'origin/topic/jsiwek/bit-348'
* origin/topic/jsiwek/bit-348:
  Update SNMP analyzer's DeliverPacket method signature.
  Fix reassembly of data w/ sizes beyond 32-bit capacities (BIT-348).

Conflicts:
	src/analyzer/protocol/file/File.cc
	src/analyzer/protocol/file/File.h
2014-04-24 18:14:04 -07:00
Robin Sommer
988ba2e897 Add Java version to software framework
BIT-1168 #merged
2014-04-24 17:09:40 -07:00
Robin Sommer
9e6643e9d4 Updating submodule(s).
[nomail]
2014-04-24 17:07:04 -07:00
Robin Sommer
3b5eabaff3 Merge remote-tracking branch 'origin/topic/jsiwek/remove-val-attribs'
* origin/topic/jsiwek/remove-val-attribs:
  Remove unused Val::attribs member.

BIT-1187 #merged
2014-04-24 17:06:36 -07:00
Robin Sommer
201fc7b25a Merge remote-tracking branch 'origin/topic/bernhard/ssl-analyzer'
* origin/topic/bernhard/ssl-analyzer:
  Fix a few failing tests
  Add very basic ocsp stapling support.
  Add documentation, consts and tests for the new events.
  Support parsing of several TLS extensions.
  Make SSL/TLS version detection less brittle.
  Nicer notices for heartbleed.
  rip out state handline from ssl analyzer.
  enable detection of encrypted heartbleeds.
  also extract payload data in ssl_heartbeat
  add to local.bro, add disclaimer
  make tls heartbeat messages a bit better.
  fix tabs.
  polish script and probably detect encrypted attacks too.
  detect and alert on simple case of heartbleed
  default to TLS when not being able to determine version
  add is_orig to heartbeat event
  Throw new event for heartbeat messages.

BIT-1178 #merged
2014-04-24 17:04:56 -07:00
Robin Sommer
7f9a6f51ca Merge remote-tracking branch 'origin/topic/jsiwek/bit-1156'
I've added a unit test.

* origin/topic/jsiwek/bit-1156:
  BIT-1156: Fix parsing of DNS TXT RRs w/ multiple character-strings.

BIT-1156 #merged
2014-04-24 16:36:47 -07:00
Robin Sommer
de20b4f0fb Merge remote-tracking branch 'origin/topic/jsiwek/faf-perf'
* origin/topic/jsiwek/faf-perf:
  Adapt HTTP partial content to cache file analysis IDs.
  Adapt SSL analyzer to generate file analysis handles itself.
  Adapt more of HTTP analyzer to use cached file analysis IDs.
  Adapt IRC/FTP analyzers to cache file analysis IDs.
  Refactor regex/signature AcceptingSet data structure and usages.
  Enforce data size limit when checking files for MIME matches.
  Refactor file analysis file ID lookup.
2014-04-24 16:16:14 -07:00
Bernhard Amann
3d22692b6e Fix a few failing tests 2014-04-24 14:45:06 -07:00
Jon Siwek
de0ce6deed BIT-1156: Fix parsing of DNS TXT RRs w/ multiple character-strings.
The "dns_TXT_reply" event now uses a "vector of strings" as the final
parameter instead of just a "string" in order to support DNS TXT
resource records that contain multiple character-strings.

The format in which the TXT answers are logged by default is now changed
to be a list of strings of the form `fmt("TXT %d %s", |str|, str)`, one
for each character-string in the RR and delimited by a space (' ')
character.
2014-04-24 16:20:01 -05:00
Bernhard Amann
c24629abf4 Add very basic ocsp stapling support.
This only allows access to the ocsp stapling response data. No verification
or anything else at the moment.
2014-04-24 12:37:34 -07:00
Bernhard Amann
9b7eb293f1 Add documentation, consts and tests for the new events.
This also fixes the heartbleed detector to work for encrypted attacks in this
branch again. It stopped working, because the SSL analyzer now successfully detects
established connections, and the scripts usually disable analyzing after that.

(The heartbeat branch should not have been affected)
2014-04-24 12:05:30 -07:00
Jon Siwek
d3b27eb0c1 Adapt HTTP partial content to cache file analysis IDs.
The initial file ID I think is still ambiguous and/or depends on
script-layer state tracking enough that it still needs to request a file
ID via an event at first, but once that is assigned to an HTTP (MIME)
entity, it never makes sense that it can change (so re-using a cached ID
works).
2014-04-24 10:47:57 -05:00
Mareq
d3972afa97 Do not repeat hex-code of decoded quoted-printable. 2014-04-24 16:40:57 +01:00
Jon Siwek
58efa09426 Adapt SSL analyzer to generate file analysis handles itself. 2014-04-23 16:59:27 -05:00
Bernhard Amann
4ae52d9e1c Support parsing of several TLS extensions.
At the moment, we have support for:
elliptic_curves: client supported elliptic curves
ec_point_formats: list of client supported EC point formats
application_layer_protocol_negotiation: list of supported application layer protocols (used for spdy/http2 negotiation)
server_name: server name sent by client. This was supported before, but... a bit brittle.
2014-04-23 14:34:06 -07:00
Jon Siwek
de8f8f87b6 Adapt more of HTTP analyzer to use cached file analysis IDs.
Some EndOfFile calls can re-use a cached file ID.
2014-04-23 16:26:18 -05:00
Jon Siwek
0250489730 Adapt IRC/FTP analyzers to cache file analysis IDs. 2014-04-23 16:14:13 -05:00
Jon Siwek
782615e9dd Remove unused Val::attribs member. 2014-04-23 10:44:47 -05:00
Robin Sommer
b9e956176e Updating submodule(s).
[nomail]
2014-04-22 21:35:30 -07:00
Robin Sommer
2bbe36b4a7 Merge remote-tracking branch 'origin/topic/jsiwek/odesc-escaping'
* origin/topic/jsiwek/odesc-escaping:
  Refactor various hex escaping code.

BIT-1184 #merged
2014-04-22 20:13:59 -07:00
Robin Sommer
e24f3f5fd5 Updating CHANGES and VERSION. 2014-04-22 20:01:55 -07:00
Vlad Grigorescu
8744b66b56 Rely on content inspection and not just is_orig to determine client/server. 2014-04-22 20:31:53 -04:00
Vlad Grigorescu
25d7b71c50 Merge remote-tracking branch 'origin/master' into topic/vladg/sip 2014-04-22 18:58:22 -04:00
Vlad Grigorescu
e67c2c53dd Enable SIP in CMakeLists.txt 2014-04-22 18:50:49 -04:00
Vlad Grigorescu
54352204d6 Merge branch 'topic/vladg/sip' of https://github.com/grigorescu/bro into topic/vladg/sip 2014-04-22 18:43:36 -04:00
Vlad Grigorescu
2698fcea8e SSH: Various updates. 2014-04-22 18:26:39 -04:00
Jon Siwek
171c6ce86b Refactor regex/signature AcceptingSet data structure and usages.
Several parts of that code would do membership checks and that's going
to be more efficient with a set instead of a list data structure.
2014-04-21 16:55:51 -05:00
Jon Siwek
8126f06ffb Enforce data size limit when checking files for MIME matches.
The value of *bof_buffer_size* in the *fa_file* record was supposed to
always limit the amount of data used by the signature matching engine,
but some corner cases would cause matching to be performed on data
beyond that.
2014-04-21 16:51:45 -05:00
Bernhard Amann
594975c93d Make SSL/TLS version detection less brittle.
This still cannot deal with v2 hellos that use the long length.
On the other hand - OpenSSL also cannot deal with these and we should
not see many sslv2 connections in any case - so... they probably
would not work in practice in any case.
2014-04-21 11:23:12 -07:00
Bernhard Amann
8ce3cf65f2 Merge branch 'topic/bernhard/heartbeat' into topic/bernhard/ssl-analyzer
Conflicts:
	src/analyzer/protocol/ssl/ssl-analyzer.pac
	src/analyzer/protocol/ssl/ssl-protocol.pac
2014-04-21 10:34:36 -07:00
Bernhard Amann
0b53ff5b92 Merge remote-tracking branch 'origin/master' into topic/bernhard/ssl-analyzer 2014-04-21 10:31:16 -07:00
Bernhard Amann
b283883997 define empty request_key method for sumstats in cluster mode.
This prevents the worker nodes from crashing, when request_key is used
in cluster mode and called on the worker and the manager nodes (i.e. when
a non-cluster-aware script is used).

Addresses BIT-1177
2014-04-18 16:29:51 -07:00
Jon Siwek
bc5c02cb74 Refactor file analysis file ID lookup.
Now using a dictionary instead of std::map as order doesn't matter and
lookup time shouldn't increase as more files are in process of being
analyzed.
2014-04-18 16:35:43 -05:00
Bernhard Amann
a92ff71e19 Merge remote-tracking branch 'origin/master' into topic/bernhard/heartbeat 2014-04-18 14:26:13 -07:00
Jon Siwek
e8a5ea8844 Refactor various hex escaping code. 2014-04-18 13:19:50 -05:00
Robin Sommer
80d7a1482c Merge remote-tracking branch 'origin/topic/jsiwek/ascii-log-memleak-fix'
* origin/topic/jsiwek/ascii-log-memleak-fix:
  Refactor initialization of ASCII log writer options.
  Fix a memory leak in ASCII log writer.
2014-04-17 18:01:41 -05:00
Robin Sommer
1ef4daf0a7 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Change how input/logging threads set their name.
  Fix bug when clearing Bloom filter contents.
2014-04-17 17:49:52 -05:00
Bernhard Amann
ef41cc7189 Nicer notices for heartbleed.
Duplicates are now excluded and the notice texts contain a bit more useful information.
2014-04-16 10:48:22 -07:00
Jon Siwek
c9b40f1ca7 Change how input/logging threads set their name.
Setting the thread name on every heartbeat uses a mild amount of
cycles and there's not much benefit to doing it there to get the
additional info regarding the number of processed messages since thread
names usually get truncated to 16 characters and omit that part anyway.
2014-04-15 16:36:47 -05:00
Jon Siwek
2a5b209f6d Refactor initialization of ASCII log writer options. 2014-04-15 12:50:10 -05:00
jshlbrd
b43c2c347b Update http-headers.bro 2014-04-15 09:15:57 -04:00
jshlbrd
9083b03bd6 Update http-headers.bro 2014-04-15 09:12:09 -04:00
jshlbrd
85bbc39194 Update http-headers.bro 2014-04-15 09:10:38 -04:00
jshlbrd
2dbca1ccd9 Add Intel::ADDR lookup to host field
IP addresses are often seen in the HTTP host field; this change checks if the value in the host field is a valid IP address and processes the Intel::seen event to check for an Intel::ADDR indicator.
2014-04-15 09:07:21 -04:00
Matthias Vallentin
cb4eaf762c Fix bug when clearing Bloom filter contents.
This patch fixes a bug that occurred when calling the BiF bloomfilter_clear,
which used to not only clear the underlying bit vector but also set its size to
zero. As a result, subsequent element access or computations using the bit
vector size caused erroneous behavior.

Reported by @colonelxc.
2014-04-15 12:48:56 +02:00