Commit graph

301 commits

Author SHA1 Message Date
Robin Sommer
d6d26a3ea7 Merge branch 'topic/robin/http-connect'
* topic/robin/http-connect:
  HTTP fix for output handlers.
  Expanding the HTTP methods used in the signature to detect HTTP traffic.
  Updating submodule(s).
  Fixing removal of support analyzers, plus some tweaking and cleanup of CONNECT code.
  HTTP CONNECT proxy support.

BIT-1132 #merged
2014-03-03 16:53:46 -08:00
Seth Hall
d0f8edb2a4 Expanding the HTTP methods used in the signature to detect HTTP traffic. 2014-03-02 14:03:59 -08:00
Robin Sommer
02ab000b81 Merge remote-tracking branch 'origin/master' into topic/robin/http-connect
Conflicts:
	scripts/base/protocols/ssl/consts.bro
2014-03-02 13:55:13 -08:00
Robin Sommer
338d521003 Fixing removal of support analyzers, plus some tweaking and cleanup of
CONNECT code.

Removal of support analyzers was broken. The code now actually doesn't
delete them immediately anymore but instead just flags them as
disabled. They'll be destroyed with the parent analyzer later.

Also includes a new leak tests exercising the CONNECT code.

Lines starting # with '#' will be ignored, and an empty message aborts
the commit. # On branch topic/robin/http-connect # Changes to be
committed: # modified: scripts/base/protocols/http/main.bro #
modified: scripts/base/protocols/ssl/consts.bro # modified:
src/analyzer/Analyzer.cc # modified: src/analyzer/Analyzer.h #
modified: src/analyzer/protocol/http/HTTP.cc # new file:
testing/btest/core/leaks/http-connect.bro # modified:
testing/btest/scripts/base/protocols/http/http-connect.bro # #
Untracked files: # .tags # changes.txt # conn.log # debug.log # diff #
mpls-in-vlan.patch # newfile.pcap # packet_filter.log # reporter.log #
src/PktSrc.cc.orig # weird.log #
2014-03-02 13:52:32 -08:00
Bernhard Amann
a1d9150964 Update mozilla root bundle 2014-02-28 03:40:18 -08:00
Bernhard Amann
89bc959cb0 Merge remote-tracking branch 'origin/master' into fastpath 2014-02-26 14:17:11 -08:00
Bernhard Amann
bc75988bd9 More google tls extensions that are being actively used. 2014-02-24 12:56:06 -08:00
Robin Sommer
58eb9bbf28 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  new TLS constants from https://tools.ietf.org/html/draft-bmoeller-tls-downgrade-scsv-01
  Revert "Correct return type of topk_get_top, addresses BIT-1144"
  Correct return type of topk_get_top, addresses BIT-1144
2014-02-24 07:28:34 -08:00
Bernhard Amann
ca2cdd8861 new TLS constants from https://tools.ietf.org/html/draft-bmoeller-tls-downgrade-scsv-01 2014-02-21 11:24:03 -08:00
Robin Sommer
48568c9e1f Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  New alert from https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04
  update 3rdparty submodule (new SQLite version)
2014-02-20 17:31:22 -08:00
Bernhard Amann
18d89d6320 New alert from https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 2014-02-20 14:38:27 -08:00
Robin Sommer
7d0fbcd7b7 Merge remote-tracking branch 'origin/topic/jsiwek/dns-perf'
* origin/topic/jsiwek/dns-perf:
  Refactor DNS script's state management to improve performance.

BIT-1133
2014-02-13 16:42:41 -08:00
Jon Siwek
3c95d1d695 Refactor DNS script's state management to improve performance.
The amount of timers involved in DNS::PendingMessage tables'
expiration attributes have a significant performance hit.  Instead the
script now relies solely on maximum thresholds for pending message
quantities to limit amount of accumulated state.  There's a new option,
"DNS::max_pending_query_ids", to limit the number outstanding messages
across all DNS query IDs ("DNS::max_pending_msgs" still limits number
of outstanding messages for a *given* query ID).
2014-02-13 14:55:45 -06:00
Robin Sommer
eb744fd329 Revert "Expanding the HTTP methods used in the signature to detect HTTP traffic."
This reverts commit 506b26e5ff.

The corresponding patch adding HTTP CONNECT support doesn't work yet
so backing this out until we get that in shape.
2014-02-13 12:49:46 -08:00
Robin Sommer
a57f0ef9a0 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Increase timeouts of some unit tests.
  Fix memory leak in modbus analyzer.
  add channel_id tls extension number.
2014-02-13 12:45:02 -08:00
Seth Hall
dd0856a57f HTTP CONNECT proxy support.
- The HTTP analyzer now supports handling HTTP CONNECT proxies
   same as the SOCKS analyzer handles proxying.
2014-02-12 22:38:59 -05:00
Seth Hall
506b26e5ff Expanding the HTTP methods used in the signature to detect HTTP traffic. 2014-02-11 15:30:22 -05:00
Bernhard Amann
adfe3a0754 add channel_id tls extension number.
This number is not IANA defined, but we see it being
actively used.
2014-02-10 23:56:23 -08:00
Jon Siwek
c61dfb1963 Rewrite DNS state tracking which matches queries and replies.
The previous method of matching queries with replies was still
unreliable in cases where the reply contains no answers.  The new code
also takes extra measures to avoid pending state growing too large in
cases where the condition to match a query with a corresponding reply is
never met, but yet DNS messages continue to be exchanged over the same
connection 5-tuple (preventing cleanup of the pending state).
2014-01-30 17:21:01 -06:00
Jon Siwek
31866f8f59 Change dns.log to include only standard DNS queries.
The scope of dns.log is now only standard queries (OPCODE == 0).  Other
kinds of queries (e.g. inverse query) were not handled correctly and
could interfere with the state tracking of the default DNS scripts.
2014-01-28 13:56:22 -06:00
Jon Siwek
0e0e74e49c Improve DNS analysis.
- Fix parsing of empty question sections (when QDCOUNT == 0).  In this
  case, the DNS parser would extract two 2-byte fields for use in either
  "dns_query_reply" or "dns_rejected" events (dependent on value of
  RCODE) as qclass and qtype parameters.  This is not correct, because
  such fields don't actually exist in the DNS message format when
  QDCOUNT is 0.  As a result, these events are no longer raised when
  there's an empty question section.  Scripts that depends on checking
  for an empty question section can do that in the "dns_message" event.

- Add a new "dns_unknown_reply" event, for when Bro does not know how
  to fully parse a particular resource record type.  This helps fix a
  problem in the default DNS scripts where the logic to complete
  request-reply pair matching doesn't work because it's waiting on more
  RR events to complete the reply.  i.e. it expects ANCOUNT number of
  dns_*_reply events and will wait until it gets that many before
  completing a request-reply pair and logging it to dns.log.  This could
  cause bogus replies to match a previous request if they happen to
  share a DNS transaction ID.
2014-01-28 11:04:01 -06:00
Robin Sommer
d5a48f04ac Tweak to SMTP script to adjust for new string slicing behaviour.
Also updating NEWS with a note.
2013-12-04 13:45:46 -08:00
Robin Sommer
320f2d5ab6 Merge remote-tracking branch 'origin/topic/bernhard/ssl_ciphers_vector'
BIT-1011 #merged

* origin/topic/bernhard/ssl_ciphers_vector:
  Change ciphers in changes ciphers from a set to a vector.
2013-12-04 12:17:22 -08:00
Bernhard Amann
b7dc03bb82 Change ciphers in changes ciphers from a set to a vector.
This preserves the ordering of the cipher suites the client sent,
allowing e.g. better client fingerprinting.
2013-12-04 11:38:15 -08:00
Jon Siwek
96ba5c82a3 Merge branch 'master' into topic/jsiwek/broxygen 2013-11-21 15:46:55 -06:00
Jon Siwek
9967aea52c Integrate new Broxygen functionality into Sphinx.
Add a "broxygen" domain Sphinx extension w/ directives to allow
on-the-fly documentation to be generated w/ Bro and included in files.

This means all autogenerated reST docs are now done by Bro.  The odd
CMake/Python glue scipts which used to generate some portions are now
gone.  Bro and the Sphinx extension handle checking for outdated docs
themselves.

Parallel builds of `make doc` target should now work (mostly because
I don't think there's any tasks that can be done in parallel anymore).

Overall, this seems to simplify things and make the Broxygen-generated
portions of the documentation visible/traceable from the main Sphinx
source tree.  The one odd thing still is that per-script documentation
is rsync'd in to a shadow copy of the Sphinx source tree within the
build dir.  This is less elegant than using the new broxygen extension
to make per-script docs, but rsync is faster and simpler.  Simpler as in
less code because it seems like, in the best case, I'd need to write a
custom Sphinx Builder to be able to get that to even work.
2013-11-21 14:34:32 -06:00
Vlad Grigorescu
d108481e73 Remove resp_size from the log. Refactor when we write out to the log a bit. Geodata now works reliably. 2013-11-05 11:58:00 -05:00
Vlad Grigorescu
2cf90d986e Fix resp_size in ssh.log, require a minimum resp_size for the heuristic. Some work on geodata, but still a WIP. 2013-11-05 11:34:32 -05:00
Robin Sommer
101fbdeff7 Adding source and original copyright statement to Mozilla cert list. 2013-11-01 05:24:43 -07:00
Daniel Thayer
8f2336f531 Add README files for base/protocols
The text from these README files appears on the "Bro Script Packages"
page after building the documentation.
2013-10-17 12:47:32 -05:00
Daniel Thayer
c224fbe7f8 Fix typos and formatting in the other protocol docs 2013-10-16 18:07:34 -05:00
Daniel Thayer
8764850337 Fix typos and formatting in the ssl protocol docs
Also changed one sentence (about setting the Mozilla root CA list) to make
it more clear that the user doesn't need to do anything.
2013-10-16 17:36:27 -05:00
Daniel Thayer
fe60404f0f Fix typos and formatting in the http protocol docs
Also adjusted line numbers in scripting doc due to changes in http/main.bro
2013-10-16 13:13:53 -05:00
Daniel Thayer
98181e829b Fix typos and formatting in the ftp protocol docs 2013-10-15 17:00:01 -05:00
Daniel Thayer
bc337f3d5a Fix typos and formatting in the dns protocol docs 2013-10-15 16:44:28 -05:00
Daniel Thayer
e36fcf0190 Fix typos and formatting in the dhcp protocol docs
Also added a link to an RFC and a Bro script (and corrected the name of the
script being referenced).
2013-10-15 16:19:06 -05:00
Daniel Thayer
3850399fa2 Fix typos and formatting in the conn protocol docs 2013-10-14 17:19:29 -05:00
Bernhard Amann
00b622f54d IANA assigned a couple of new tls extension numbers 2013-10-08 13:52:44 -07:00
Bernhard Amann
737b15aef9 add 3 more really new ciphers. 2013-10-08 13:02:55 -07:00
Bernhard Amann
ea766d71bb add ciphers to cipher_desc table that were already present
but apparently forgotten.
2013-10-01 16:01:37 -07:00
Bernhard Amann
497ada12e8 ...and a few more ciphers. 2013-09-26 10:03:17 -07:00
Bernhard Amann
9264e2e7d3 add new tls cipher suites 2013-09-25 22:21:56 -07:00
Bernhard Amann
8b48a476ec update mozilla root ca list 2013-09-19 12:53:45 -07:00
Jon Siwek
d05a02e848 Update Mozilla root CA certs. 2013-09-19 12:57:14 -05:00
Bernhard Amann
c40a97156a make client and server random available on script-level.
Patch by ewust

Addresses BIT-950
2013-09-11 12:39:23 -07:00
Jon Siwek
db470a637a Documentation fixes.
This cleans up most of the warnings from sphinx (broken :doc: links,
broxygen role misuses, etc.).  The remaining ones should be harmless,
but not quick to silence.

I found that the README for each component was a copy from the actual
repo, so I turned those in to symlinks so they don't get out of date.
2013-09-03 15:59:40 -05:00
Seth Hall
b3a5c5f412 Tiny fix to correct a reporter message. 2013-08-21 19:11:34 -04:00
Robin Sommer
45f1b89f60 Merge branch 'topic/robin/dnp3-merge-v3'
Includes a bit more docs/comments cleanup. We should eventually
document the events further but it should suffice for now.

* topic/robin/dnp3-merge-v3:
  Tiny bit of cleanup and adapting the new test.
  added a test case for dnp3 packets with only link layer
  added condition to check DNP3 packet without app layer data
  Fixing well-known port.
  Pluginizing the DNP3 analyzer, plus a basic script logging requests and replies.
2013-08-12 11:39:03 -07:00
Robin Sommer
36c2433075 Fixing well-known port.
This fixes the remaining test.
2013-08-11 15:59:32 -07:00
Robin Sommer
0e7f51f78c Merge branch 'master' into topic/robin/dnp3-merge-v3
Conflicts:
	scripts/base/init-default.bro
2013-08-09 17:11:51 -07:00