Commit graph

6022 commits

Author SHA1 Message Date
Daniel Thayer
e0fb634f0c Add broctl items to NEWS 2015-04-17 15:02:37 -05:00
Robin Sommer
1e010fbb76 Merge remote-tracking branch 'origin/topic/johanna/conn-threshold'
* origin/topic/johanna/conn-threshold:
  Wrap threshold stuff up - fix two small bugs and update baselines.
  update GridFTP analyzer to use connection thresholding instead of polling
  Add high level api for thresholding that holds lists of thresholds and raises an event for each threshold exactly once.
  Allow setting packet and byte thresholds for connections.

BIT-1377 #merged
2015-04-17 13:02:31 -07:00
Robin Sommer
43a873d9b3 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1376'
* origin/topic/jsiwek/bit-1376:
  Fix attempt for "internal error: unknown msg type 115 in Poll()"

BIT-1376 #merged
2015-04-17 12:40:05 -07:00
Johanna Amann
cbba73ab12 add seeking functionality to raw reader.
one can now add an option "offset" to the config map. Positive offsets
are interpreted to be from the beginning of the file, negative from the
end of the file (-1 is end of file).

Only works for raw reader in streaming or manual mode. Does not work
with executables.

Addresses BIT-985
2015-04-17 11:19:12 -07:00
Johanna Amann
b44b725d59 Wrap threshold stuff up - fix two small bugs and update baselines. 2015-04-17 09:59:34 -07:00
Jon Siwek
ee5f87c634 Add more info about Broker to NEWS. 2015-04-17 10:59:33 -05:00
Johanna Amann
024bb7206e update GridFTP analyzer to use connection thresholding instead
of polling
2015-04-17 07:15:53 -07:00
Johanna Amann
86c54c3dbd Add high level api for thresholding that holds lists of thresholds
and raises an event for each threshold exactly once.
2015-04-17 06:57:58 -07:00
Johanna Amann
f7edf70882 Allow setting packet and byte thresholds for connections.
This extends the ConnSize analyzer to be able to raise events when each
direction of a connection crosses a certain amount of bytes or packets.

Thresholds are set using
set_conn_bytes_threshold(c$id, [num-bytes], [direction]);
and
set_conn_packets_threshold(c$id, [num-packets], [direction]);
respectively.

They raise the event
event conn_bytes_threshold_crossed(c: connection, threshold: count, is_orig: bool)
and
event conn_packets_threshold_crossed(c: connection, threshold: count, is_orig: bool)
respectively.

Current thresholds can be examined using
get_conn_bytes_threshold and get_conn_packets_threshold

Currently only one threshold can be set per connection.

This also fixes a bug where child packet analyzers of the TCP analyzer
where not found using FindChild.
2015-04-17 06:57:51 -07:00
Robin Sommer
a90cd860eb Updating NEWS. 2015-04-16 21:50:50 -07:00
Robin Sommer
7225221c2a In bifs, change ODesc objects to have RAW_STYLE.
This prevents double-escaping with the logging changes of BIT-1333.
2015-04-16 21:50:50 -07:00
Vlad Grigorescu
81bafb6c36 PE: Rehash the log a bit. 2015-04-16 22:56:47 -04:00
Vlad Grigorescu
4753e4a3c2 Make base_of_data optional. 2015-04-16 19:44:39 -05:00
Jon Siwek
effeaa5b13 Fix attempt for "internal error: unknown msg type 115 in Poll()"
Under remote communication overload conditions, the child->parent
chunked IO may start rejecting chunks if over the hard cap.  Some
messages are made of two chunks, accepting the first part, but rejecting
the second can put the parent in a bad state and the next two chunks it
reads are likely to cause the error.

This patch just removes the rejecting functionality completely and so
now relies solely on shutting down remote peer connections to help
alleviate temporary overload conditions. The
"chunked_io_buffer_soft_cap" script variable can now tune when this
shutting down starts happening and the default setting is now double
what it used to be.  For constant overload conditions, communication.log
should keep stating "queue to parent filling up; shutting down heaviest
connection".

An alternative to completely removing the hard cap rejection code could
be ensuring that messages that involve a pair of chunks can never have
the second chunk be rejected when attempting to write it.

Addresses BIT-1376
2015-04-16 17:15:42 -05:00
Jon Siwek
a129911272 Updating submodule(s).
[nomail]
2015-04-16 10:22:32 -05:00
Robin Sommer
175fe2c9de Updating submodule(s).
[nomail]
2015-04-16 08:16:58 -07:00
Robin Sommer
fa039c1c7c Updating submodule(s).
[nomail]
2015-04-16 08:15:04 -07:00
Robin Sommer
fc3e5a5fb0 Updating submodule(s).
[nomail]
2015-04-16 08:14:16 -07:00
Robin Sommer
a7b7397f02 Merge branch 'master' of git.bro.org:bro 2015-04-16 08:14:10 -07:00
Robin Sommer
4059dd9879 Merge remote-tracking branch 'origin/topic/johanna/ca-list'
Note: loading external-ca-list.bro in the external tests increases
execution times by 1-2%; if I remove that @load, things get back to
normal so doesn't seem to indicate a problem.

* origin/topic/johanna/ca-list:
  Update mozilla CA list.

BIT-1375 #merged
2015-04-16 08:12:48 -07:00
Jon Siwek
ceebad38a4 Fix the to_count function to use strtoull versus strtoll. 2015-04-16 09:56:18 -05:00
Robin Sommer
7344052b50 Changing what's escaped when printing.
With this patch the model is:

    - "print" cleans the data so that non-printable characters get
      escaped. This is not necessarily reversible.

    - to print in a reversible way, one can go through
      escape_string(); this escapes backslashes as well to make the
      decoding non-ambigious.

    - Logging always escapes similar to escape_string(), making it
      reversible.

Compared to master, we also change the escaping as follows:

    - We now only escape with "\xXX", no more "^X" or "\0". Exception:
      backslashes.

    - We escape backlashes as "\\".

    - There's no "alternative" output style anymore, i.e., fmt() '%A'
      qualifier is gone.

Baselines in testing/btest are updated, external tests not yet.

Addresses BIT-1333.
2015-04-15 16:59:50 -07:00
Jon Siwek
8789d7f527 Updating submodule(s).
[nomail]
2015-04-15 15:12:15 -05:00
Robin Sommer
e41c623ad0 Merge remote-tracking branch 'origin/topic/seth/ascii-escape-normalization' into topic/robin/ascii-escape-normalization 2015-04-15 09:56:58 -07:00
Robin Sommer
9260638948 Removing error check if an ASCII writer has been properly finished.
Turns out that in error situations, the final finish message might not
reach the writer anymore, as communication between the threads will be
shut down. Instead of aborting, we now just clean up in that case and
proceed. This isn't changing any other behaviour. The original error
check was in place mostly for helping debug the data flow between the
threads anyways.

Addresses BIT-1331.
2015-04-15 09:55:15 -07:00
Vlad Grigorescu
0b5103b41b Fix support for PE32+ files. 2015-04-14 21:09:16 -05:00
Vlad Grigorescu
575e22cfe7 PE Analyzer cleanup. 2015-04-14 20:21:43 -05:00
Johanna Amann
236a895418 Update mozilla CA list.
This also patches a few tests to contain certificates that were removed.
Furthermore, we include the old CA file with the external tests and load
it automatically. Those traces are kind of old now, more and more of the
CAs in them are no longer valid and it does not really make sense to
update them on each change...
2015-04-14 16:40:41 -07:00
Johanna Amann
bafd354711 Update submodule
[nomail]
2015-04-14 15:57:05 -07:00
Vlad Grigorescu
fa7946ae7d Checkpoint - Import Address Table being parsed. 2015-04-13 16:34:18 -05:00
Jon Siwek
63ab936d8c Fix iterator invalidation in broker::Manager dtor. 2015-04-13 10:36:04 -05:00
Robin Sommer
8bd38c2788 Add paragraph to plugin documentation. 2015-04-12 20:50:18 -04:00
Johanna Amann
fe9ff46cc5 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1367'
Bit-1367 #close
2015-04-11 11:01:18 -07:00
Robin Sommer
0620bc970a Make sure to always delete the remote serializer.
There were two problems actually: the iomanager wasn't properly
deleting sourcesl; and in some situations, the remote serialize wasn't
registered with it to begin with.

Addresses BIT-1306 and probably also BIT-1356.
2015-04-10 21:51:44 -07:00
Robin Sommer
1132470b05 Cleaning up --help.
-D and -Y/y were still listed, even though they had no effect anymore.
Removing some dead code along with -D.

BIT-1372 #closed
2015-04-10 17:05:49 -07:00
Jon Siwek
a55ce01ef3 API changes to file analysis mime type detection.
Removed "file_mime_type" and "file_mime_types" event, replacing them
with a new event called "file_metadata_inferred".  It has a record
argument of type "inferred_file_metadata", which contains the mime type
information that the earlier events used to supply.  The idea here is
that future extensions to the record with new metadata will be less
likely to break user code than the alternatives (adding new events or
new event parameters).

Addresses BIT-1368.
2015-04-10 16:31:29 -05:00
Robin Sommer
bd1191c60b Updating submodule(s).
[nomail]
2015-04-10 08:11:37 -07:00
Robin Sommer
51aed48d67 Adding back in a call to match pure rules when clearing signature
state.

Previous change had removed this, but I believe we still need it.
2015-04-10 08:09:47 -07:00
Seth Hall
49926ad7bf Merge remote-tracking branch 'origin/master' into topic/seth/more-file-type-ident-fixes 2015-04-09 23:58:52 -04:00
Seth Hall
0ee7d82e19 Make HTTP 206 reassembly require ETags by default. 2015-04-09 23:58:46 -04:00
Robin Sommer
a0bb139f22 Sorting test output for stability. 2015-04-09 15:22:59 -07:00
Robin Sommer
ea7bc11aa1 Merge remote-tracking branch 'origin/topic/jsiwek/bit-844'
BIT-844 #merged

* origin/topic/jsiwek/bit-844:
  Remove stale signature benchmarking code (-L command-line option).
  BIT-844: fix UDP payload signatures to match packet-wise
2015-04-09 14:52:44 -07:00
Robin Sommer
a4edc0df08 Fixing input readers' component type.
A reader is a reader, not a writer.
2015-04-09 12:07:17 -07:00
Seth Hall
3335da67e0 Tiny spelling correction. 2015-04-09 11:08:13 -04:00
Seth Hall
e8c87e19bd More file type identification improvements
- Split fonts into their own file.
 - Improved JSON matching.
 - Added XML-RPC content matching using application/xml-rpc
 - Added OCSP requests
2015-04-09 01:23:55 -04:00
Seth Hall
6162d986a2 Fix an issue with files having gaps before the bof_buffer is filled.
When files had gaps prior to the bof_buffer completely filling, the
file gap handling code was never sniffing and passing along as much
data as possible so file type identification wasn't working correctly.
2015-04-08 13:41:03 -04:00
Seth Hall
89d66af792 Fix an issue with packet loss in http file reporting.
The HTTP analyzer was propogating Gaps to the files framework even
in the case of a packet drop occurring immediately after the headers
are completed in an HTTP response when the response content length
was declared to be zero (no file started, so no loss).

Includes passing test.
2015-04-08 13:39:42 -04:00
Vlad Grigorescu
b4498a4142 Some changes to fix PE analyzer on master. 2015-04-07 14:45:15 -07:00
Vlad Grigorescu
010cd80f2f Merge remote-tracking branch 'origin/master' into topic/vladg/file-analysis-exe-analyzer 2015-04-07 14:19:15 -07:00
Seth Hall
8fd5e7f382 Adding WOFF fonts to file type identification. 2015-04-07 02:06:02 -04:00