Commit graph

6849 commits

Author SHA1 Message Date
Vlad Grigorescu
b981bc6c62 Add support for AP_REQ, AP_REP, PRIV, and CRED message types. 2015-02-04 16:28:44 -05:00
Vlad Grigorescu
3b4bec18d6 Fix parsing error for KRB_Ticket_Sequence 2015-02-04 16:01:13 -05:00
Vlad Grigorescu
0071a1c003 Continue clean-up. Some reformatting, removing hard-coded values, documentation, etc. 2015-02-04 15:29:06 -05:00
Jon Siwek
ec39eee786 Merge branch 'master' into topic/jsiwek/broker 2015-02-03 17:07:04 -06:00
Jon Siwek
67271ea897 Update coverage unit test baselines. 2015-02-03 17:05:54 -06:00
Jon Siwek
565ad360c6 Add x509 canonifier to a unit test. 2015-02-03 17:04:26 -06:00
Jon Siwek
4dfec04135 broker integration: add Comm::enable function
Works like old enable_communication(), but for new broker communication
mechanism.  Scripts have to explicitly call this if they want to use the
broker communication functionality.  Saves a decent chunk of Bros'
initialization time when one doesn't need communication features.
2015-02-03 16:38:56 -06:00
Jon Siwek
0cf982f1d1 broker integration: process debug/diagnostic reports from broker 2015-02-03 15:11:16 -06:00
Seth Hall
4cb0bf6296 Merge remote-tracking branch 'origin/topic/seth/file-entropy' into topic/seth/file-entropy 2015-02-03 15:08:11 -05:00
Jon Siwek
bb9e6583e0 broker integration: Comm::Data/Store::Handle opaque serialization
For now, this is needed when locally cloning Vals.  E.g. "when"
statements will clone an entire frame and data store queries use "when"
statements, so it's likely there will be locals of these opaque types
that get cloned.
2015-02-03 14:05:04 -06:00
Seth Hall
9c692bad39 Update and clean up to file entropy measurement.
- Updated to newer file analyzer api.
2015-02-03 15:04:36 -05:00
Mike Smiley
51203d7193 "id" not defined for debug code
"id" not defined for debug code when using -DPROFILE_BRO_FUNCTIONS
2015-02-03 14:29:34 -05:00
Seth Hall
b81510592a Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy 2015-02-03 14:19:57 -05:00
Jon Siwek
441c46df76 broker integration: add unit test for store clones 2015-02-03 11:57:40 -06:00
Vlad Grigorescu
2d11fafd5e Kerberos analyzer updates:
- Split up the (quite length) krb-protocol.pac into krb-protocol, krb-defs, krb-types and krb-padata
  - Add some supporting types to get rid of awkward and difficult to read case true/false statements
  - Clean up the conversion code in krb-analyzer.pac
2015-02-02 18:47:48 -05:00
Jon Siwek
05a865a907 broker integration: add master data store unti test
And fix bug w/ looking up nonexistent keys -- the resulting value data
should be "null" not "false".
2015-02-02 14:56:28 -06:00
Jon Siwek
6b115c6999 Merge branch 'master' into topic/jsiwek/broker 2015-02-02 11:45:21 -06:00
Jon Siwek
21c7642f62 Fix memory leak in new split_string* functions. 2015-02-02 11:18:06 -06:00
Robin Sommer
f82adb724c Merge remote-tracking branch 'origin/topic/jsiwek/deprecation'
Fixing one missing index adjustment (I believe ...)

BIT-757 #merged

* origin/topic/jsiwek/deprecation:
  Fix typo.
  Update documentation (broken links, outdated tests).
  Update NEWS for deprecated/changed functions.
  Deprecate split* family of BIFs.
  Improve use of &deprecated on functions.
  Add a new attribute: &deprecated.
2015-01-30 14:37:05 -08:00
Jon Siwek
9875f5d3eb broker integration: add distributed data store api
But haven't done the full gamut of testing on it yet.
2015-01-30 14:39:16 -06:00
Seth Hall
8e53e719f3 Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy 2015-01-30 00:52:41 -05:00
Jon Siwek
d2ea87735a broker integration: add bifs to inspect/manipulate broker data
i.e. script-layer functions to convert between bro values and broker
values; mostly for use w/ Bro's data store interface (coming soon).
2015-01-29 10:42:48 -06:00
Jon Siwek
0537711fd4 update broker submodule 2015-01-27 10:48:05 -06:00
Jon Siwek
36bc7ba5b5 Handle guess_lexer exceptions in pygments reST directive 2015-01-27 10:15:22 -06:00
Jon Siwek
5527543601 broker integration: add unit tests for remote log/print/event 2015-01-26 16:53:13 -06:00
Jon Siwek
2b598e3d5a broker integration: add remote logging
It now works a bit differently than before: whether to send a remote log
write is now a property of the logging stream, not the logging filter
and it's now up the the receiver side filters to instantiate the desired
writer.  i.e. the sender now has no say in what the receiver should use
as the log writer backend.

Under the new style of remote logging, the "Log::enable_remote_logging"
option is repurposed to set the default behavior for new logging
streams.  There's also "Comm::{enable,disable}_remote_logging()" to
explicitly set the desired behavior for a given logging stream.  To
receive remote logs, one calls "Comm::subscribe_to_logs(<topic>)", where
senders implicitly use topics of the form "bro/log/<stream id>".
2015-01-26 14:24:42 -06:00
Vlad Grigorescu
1f41c0470c Improve Kerberos DPD and fix a few parse errors. 2015-01-23 17:22:10 -05:00
Jon Siwek
6cedd67c38 DNP3: fix reachable assertion and buffer over-read/overflow.
A DNP3 packet using a link layer header that specifies a zero length can
trigger an assertion failure if assertions are enabled.  Assertions are
enabled unless Bro is compiled with the NDEBUG preprocessor macro
defined.  The default configuration of Bro will define this macro and so
disables assertions, but using the --enable-debug option in the
configure script will enable assertions.  When assertions are disabled,
or also for certain length values, the DNP3 parser may attempt to pass a
negative value as the third argument to memcpy (number of bytes to copy)
and result in a buffer over-read or overflow.

Reported by Travis Emmert.
2015-01-23 11:25:00 -06:00
Jon Siwek
d6d5276d76 Update binpac: Fix potential out-of-bounds memory reads in generated code.
Field lengths derived from other data in the input could potentially
lead to reading from outside the bounds of the input buffer.

Reported by John Villamil and Chris Rohlf - Yahoo Paranoids
2015-01-23 10:43:28 -06:00
Jon Siwek
5df71ddc91 broker integration: add auto sending remote events
i.e. ability to toggle whether all local dispatches of an event also
generate a remote event message to peers.
2015-01-22 11:29:53 -06:00
Robin Sommer
4d0a09a037 Updating submodule(s).
[nomail]
2015-01-22 07:25:27 -08:00
Jon Siwek
e62c711e09 Fix typo. 2015-01-21 16:57:16 -06:00
Jon Siwek
7b2316262d Update documentation (broken links, outdated tests). 2015-01-21 16:38:31 -06:00
Jon Siwek
f4d18e6940 Update NEWS for deprecated/changed functions. 2015-01-21 16:15:17 -06:00
Jon Siwek
23f04835c6 Deprecate split* family of BIFs.
These functions are now deprecated in favor of alternative versions that
return a vector of strings rather than a table of strings.

Deprecated functions:

- split: use split_string instead.
- split1: use split_string1 instead.
- split_all: use split_string_all instead.
- split_n: use split_string_n instead.
- cat_string_array: see join_string_vec instead.
- cat_string_array_n: see join_string_vec instead.
- join_string_array: see join_string_vec instead.
- sort_string_array: use sort instead instead.
- find_ip_addresses: use extract_ip_addresses instead.

Changed functions:

- has_valid_octets: uses a string_vec parameter instead of string_array.

Addresses BIT-924, BIT-757.
2015-01-21 15:34:42 -06:00
Jon Siwek
011e2cdd32 Improve use of &deprecated on functions.
- Don't report warnings on function definition if declaration is marked
  deprecated.
- Allow &deprecated to apply to a standalone function definition.
2015-01-21 12:27:09 -06:00
Jon Siwek
87962a48dd Add a new attribute: &deprecated.
While scripts are parsed, a warning is raised for each usage of an
identifier marked as &deprecated.  This also works for BIFs.

Addresses BIT-924, BIT-757.
2015-01-21 09:40:50 -06:00
Vlad Grigorescu
b8376ca733 Add Kerberos support for PKINIT (x509 cert authentication) 2015-01-20 20:43:51 -05:00
Vlad Grigorescu
3c3920bfbc Kerberos - Add TCP support 2015-01-20 17:46:26 -05:00
Vlad Grigorescu
2e8eb574f5 A number of Kerberos fixes, following testing. Added some fields to the log, and parsed some more data. 2015-01-19 18:16:27 -05:00
Robin Sommer
f51dc5cbb8 Fixing (harmless) Coverity warning. 2015-01-17 08:07:18 -08:00
Jon Siwek
7e563b7275 broker integration: add remote events 2015-01-15 15:45:08 -06:00
Robin Sommer
c67c7c6196 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  small changes to ec curve names in a newer draft
2015-01-15 09:44:41 -08:00
Robin Sommer
0024881f3d Merge remote-tracking branch 'origin/topic/vladg/mysql'
* origin/topic/vladg/mysql:
  Updating MySQL with Robin's suggestions:

BIT-1285 #merged
2015-01-14 14:21:00 -08:00
Robin Sommer
41ff1c4cd0 Merge remote-tracking branch 'origin/topic/robin/dnp3-merge-v4'
* origin/topic/robin/dnp3-merge-v4:
  add test trace in which DNP3 packets are over UDP; update test scripts and baseline results
  A bit more DNP3 tweaking.
  remove redundnt codes; find a way to use the analyzer function, such as Weird; fix a small bug in ProcessData function in DNP3.cc; passed the test
  Renameing the DNP3 TCP analyzer
  quickly fix another bug; adding missing field of the declaration of dnp3_request_application_header and dnp3_response_application_header
  Removing the debug printf in DNP3.cc
  fixed the bug of deciding the size of object 1 varition 1 in DNP3
  Fix some things in DNP3 UDP analyzer.
  changed a bug, but still not working
  modify DNP3.cc and DNP3.h to add DNP3_UDP_Analyzer; binpac unchanged

BIT-1231 #merged
2015-01-14 13:25:42 -08:00
Jon Siwek
1e462481dc broker integration: add remote printing 2015-01-14 13:28:34 -06:00
Jon Siwek
0daa954ddb broker integration: add remote connection status events. 2015-01-14 10:40:11 -06:00
Jon Siwek
1e8d6cd917 broker integration: add API for connecting to peers 2015-01-13 17:14:21 -06:00
Vlad Grigorescu
2c8a3fce49 Merge remote-tracking branch 'origin/master' into topic/vladg/kerberos
Conflicts:
	testing/btest/Baseline/core.print-bpf-filters/output2
	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2015-01-13 14:46:18 -05:00
Vlad Grigorescu
272916c189 Updating MySQL with Robin's suggestions:
- Use a boolean success instead of a result string
 - Change the affected_rows response detail string to a "rows" count
 - Fix the state tracking to log incomplete commands
2015-01-13 14:39:25 -05:00