Commit graph

2041 commits

Author SHA1 Message Date
Robin Sommer
647a18e433 Merge remote-tracking branch 'origin/topic/johanna/bit-1612' into topic/robin/bit-1612-merge 2016-07-15 09:03:11 -07:00
Johanna Amann
83b94331cd HLL: make large value test use signed integer, not counts. 2016-07-14 18:13:01 -07:00
Robin Sommer
4d84ee82da Merge remote-tracking branch 'origin/topic/johanna/bit-1612'
Addig a new random seed for external tests.

I added a wrapper around the siphash() function to make calling it a
little bit safer at least.

BIT-1612 #merged

* origin/topic/johanna/bit-1612:
  HLL: Fix missing typecast in test case.
  Remove the -K/-J options for setting keys.
  Add test checking the quality of HLL by adding a lot of elements.
  Fix serializing probabilistic hashers.
  Baseline updates after hash function change.
  Also switch BloomFilters from H3 to siphash.
  Change Hashing from H3 to Siphash.
  HLL: Remove unnecessary comparison.
  Hyperloglog: change calculation of Rho
2016-07-14 16:26:17 -07:00
Johanna Amann
4252c003d0 HLL: Fix missing typecast in test case.
This kind of error apparently triggered a warning in 2.4, but does no
longer on master.
2016-07-14 07:25:33 -07:00
Johanna Amann
499ed5b566 Remove the -K/-J options for setting keys.
The options were never really used and do not seem especially useful;
initialization with a seed file still works.

This also fixes a bug with the initialization of the siphash key.
2016-07-13 16:57:53 -07:00
Johanna Amann
313647ce0e Merge remote-tracking branch 'origin/master' into topic/johanna/bit-1612 2016-07-13 10:58:56 -07:00
Johanna Amann
c625128e4e Add test checking the quality of HLL by adding a lot of elements.
The test adds 170,000 IP addresses. After the recent hashing changes,
HLL estimates 171,250 entries (completely stable). Before, HLL estimated,
depending on the initial seeds, ~700 to 300,000 entries.
2016-07-13 10:36:11 -07:00
Johanna Amann
cdb6a1b6e6 Baseline updates after hash function change. 2016-07-13 10:11:37 -07:00
Johanna Amann
f1bae871e9 Also switch BloomFilters from H3 to siphash.
This removes all dependencies on H3 in our source tree.
2016-07-13 09:04:10 -07:00
Johanna Amann
e1218cc7fa Change Hashing from H3 to Siphash.
This commit mostly changes the hash function that is used for Internal
hashing of data < 36 bytes from H3 to Siphash. This change is motivated
by the fact that it turns out that H3 apparently does not deliver a very
good source of data uniqueness; running HLL with H3 as a hashing
function results in quite poor results (up to of 75% off in my tests).
In difference, running HLL with Siphash (or HMAC-MD5) changes this
factor to ~2%.

This also fixes a long-standing bug in Hash.h which truncated our hash
values to 32 bit on most machines.

Furthermore, it once again fixes a problem with the Rank function in
HLL.
2016-07-13 06:44:51 -07:00
Johanna Amann
1ba33bf66e Merge remote-tracking branch 'origin/topic/robin/missing-syn-2'
* origin/topic/robin/missing-syn-2:
  Change TCP analysis to process connections without the initial SYN as non-partial connections.

BIT-1492 #merged
2016-07-12 11:42:32 -07:00
Robin Sommer
214abc6180 Merge remote-tracking branch 'origin/topic/johanna/sigalg'
BIT-1646 #merged

* origin/topic/johanna/sigalg:
  Forgotten types file for signature algorithm extension
  SSL: add support for signature_algorithms extension.
2016-07-12 10:21:25 -07:00
Robin Sommer
39734255be Change TCP analysis to process connections without the initial SYN as
non-partial connections.

Before, if we saw a responder-side SYN/ACK, but had not seen the
initial orginator-side SYN, Bro would treat the connection as partial,
meaning that most application-layer analyzers would refuse to inspect
the payload. That was unfortunate because all payload data was
actually there (and even passed to the analyzers). This change make
Bro consider these connections as complete, so that analyzers will
just normally process them.

The leads to couple more connections in the test-suite to now being
analyzed.

Addresses #1492. (I used an HTTP trace for debugging instead of the
HTTPS trace from the ticket, as the clear-text makes it easier to
track the data flow).
2016-07-11 17:18:32 -07:00
Johanna Amann
11ec4903ee SSL: add support for signature_algorithms extension. 2016-07-11 15:01:59 -07:00
Johanna Amann
74e98565f4 Merge remote-tracking branch 'origin/topic/robin/history-rxmit'
* origin/topic/robin/history-rxmit:
  Flagging retransmissions in connection history.
  Removing ack_above_hole event.

BIT-977 #merged
2016-07-08 19:30:10 -07:00
Robin Sommer
0c080bca7a Extendign connection history field to flag when Bro flips a
connection's endpoints.

The character is '^'.

Addresses BIT-1629.
2016-07-08 14:56:52 -07:00
Robin Sommer
394b16e1f2 Flagging retransmissions in connection history.
This adds a t/T letter for the first TCP payload retransmission from
originator or responder, respectively.

Addresses BIT-977.
2016-07-06 15:01:16 -07:00
Robin Sommer
ca3f7eadbe Fix segfault when an existing enum identifier is added again with a
different value.

Addresses BIT-931.

Also switching the internal enum ID map to storing std::string for
easier memory management.
2016-07-05 17:54:10 -07:00
Robin Sommer
721693425f Escape the empty indicator in logs if it occurs literally as a field's
actual content.

Addresses BIT-931.
2016-07-05 16:34:24 -07:00
Johanna Amann
f1267b0b94 Write NetControl framework documentation.
In the process, some of the script documentation of the NetControl
framework was also updated.
2016-06-22 16:02:48 -07:00
Johanna Amann
6361a0d658 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-06-21 12:42:06 -07:00
Robin Sommer
66e7e4be04 Merge branch 'master' of git.bro.org:bro 2016-06-18 13:32:42 -07:00
Robin Sommer
0fc7eb1358 Merge remote-tracking branch 'origin/topic/johanna/bit-1578'
One tweak: I made ts optional and set it to network_time() if not given.

BIT-1578 #merged

* origin/topic/johanna/bit-1578:
  Weird: fix potential small issue when ignoring duplicates
  Rewrite weird logging.
2016-06-18 09:55:11 -07:00
Seth Hall
ba3214cee5 Add some documentation for modbus data types.
This also removes a field named "len" from the ModbusHeaders
record type because it's not really necessary.
2016-06-18 01:46:07 -04:00
Seth Hall
6971a70903 Removed app-stats scripts.
Addresses BIT-1171.
2016-06-17 11:55:26 -04:00
Seth Hall
f5a689a760 Switch the MIME fields in smtp.log back to showing what's actually given.
- SMTP protocol headers now do some minimal parsing to clean up
   email addresses.
 - New function named split_mime_email_addresses to take MIME headers
   and get addresses split apart but including the display name.
 - Update tests.
2016-06-16 16:40:52 -04:00
Seth Hall
9df12a8146 Merge remote-tracking branch 'origin/master' into J-Gras-topic/jgras/bit-1507 2016-06-16 16:18:56 -04:00
Johanna Amann
efab728876 Merge branch 'topic/jgras/input-default' of https://github.com/J-Gras/bro
* 'topic/jgras/input-default' of https://github.com/J-Gras/bro:
  Fixed &default values ignored by input framework.

BIT-1623 #merged
2016-06-15 17:32:50 -07:00
Jan Grashoefer
8d853872a4 Fixed &default values ignored by input framework.
Reading into a record, the input framework will no longer reset a
&default value in case there is no value to read.
2016-06-16 01:02:51 +02:00
Johanna Amann
85220e46aa Weird: fix potential small issue when ignoring duplicates
In all versions so far, the identifier string that was used for
comparisons might have been different from the identifier string that
was added (when certain notices are used).
2016-06-15 14:33:41 -07:00
Johanna Amann
697b2748f5 Rewrite weird logging.
This commit rewrites the way that weirds are logged and fixes a number
of issues on the way. Most prominently, flow weirds now actually log
information about the flow that they occur in (before this change, they
only logged the name of the weird, which is only marginally helpful).

Besides restructuring how weird logging works internally, weirds can now
also be generated by calling Weird::weird with the info record directly,
allowing more fine-granular passing of information. This is e.g. used
for DNS weirds, which do not have the connection record available any
more when they are generated (before data like the connection ID was
just not logged in these instances).

Addresses BIT-1578
2016-06-15 13:49:35 -07:00
Robin Sommer
41eb50f9db Updating tests for HTTP filename field change.
(Updating NEWS as well.)
2016-06-15 09:28:49 -07:00
Robin Sommer
4035af4b12 Fixing test portability. 2016-06-15 09:05:36 -07:00
Seth Hall
6bc7c3f1be Merge remote-tracking branch 'origin/master' into J-Gras-topic/jgras/bit-1507
# Conflicts:
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2016-06-15 10:32:46 -04:00
Seth Hall
d89ee3cee0 Change the meaning of some email fields.
We now extract email addresses in the fields that one would expect
to contain addresses.  This makes further downstream processing of
these fields easier like log analysis or using these fields in the
Intel framework.  The primary downside is that any other content
in these fields is no longer available such as full name and any
group information.  I believe the simplification of the content in
these fields is worth the change.

Added "cc" to the script that feeds information from SMTP into the
Intel framework.

A new script for email handling utility functions has been created
as a side effect of these changes.
2016-06-15 10:32:06 -04:00
Seth Hall
90399db32d Additional test specifically for the HTTP filename handling. 2016-06-15 01:56:07 -04:00
Seth Hall
7c2307e079 Move the HTTP "filename" field to "orig_filenames" and "resp_filenames"
This changes the HTTP log format slightly but shouldn't mess
up anything that anyone was doing because the old "filename"
field was never actually filled out.  Tests are updated as well.
2016-06-15 01:44:18 -04:00
Seth Hall
de7396e4a9 Add a round trip time (rtt) field to dns.log.
Updated tests as well.
2016-06-15 00:17:23 -04:00
Robin Sommer
2335a62a07 Preventing the event processing from looping endlessly when an event
reraised itself during execution of its handlers.
2016-06-14 18:11:32 -07:00
Robin Sommer
9da02ecae4 Merge branch 'topic/jgras/expire-redef' of https://github.com/J-Gras/bro
Extended error handling a bit, and increased serialization
data format version.
2016-06-14 17:22:25 -07:00
Johanna Amann
a72112acca Fix precedence of hook
The precedence is now lower than the precedence of &&/|| so that
expressions like

hook a() && doSomething()

work.

Addresses BIT-1619
2016-06-13 16:02:06 -07:00
Jan Grashoefer
8a87055fcc Fixed table expiration evaluation.
The expiration attribute expression is now evaluated for every use. Thus
later adjustments of the value (e.g. by redefining a const) will now
take effect. Values less than 0 will disable expiration.
2016-06-13 21:01:46 +02:00
Robin Sommer
3189276320 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1472'
* origin/topic/dnthayer/ticket1472:
  Add new functions for calculating geographic distance

BIT-1472 #merged
2016-06-07 12:40:31 -07:00
Daniel Thayer
91496543ad Add new functions for calculating geographic distance
Added a new BIF haversine_distance that computes distance between two
geographic locations.

Added a new Bro script function haversine_distance_ip that does the same
but takes two IP addresses instead of latitude/longitude.  This function
requires that Bro be built with libgeoip.
2016-06-07 13:11:10 -05:00
Robin Sommer
58dea28504 Merge remote-tracking branch 'origin/topic/johanna/windows-newlines'
(Added a double-check that line isn't completely empty.)

BIT-1198 #merged

* origin/topic/johanna/windows-newlines:
  Ascii Input: Accept dos/windows newlines.
2016-06-06 18:14:21 -07:00
Robin Sommer
d59bb2e9d1 Merge branch 'topic/jgras/mac-logging' of https://github.com/J-Gras/bro
Thanks! I've tweaked this a bit further, have a look.

BIT-1613 #merged
2016-06-06 17:59:34 -07:00
Jan Grashoefer
50cf694aae Moved link-layer addresses into endpoints.
The link-layer addresses are now part of the connection endpoints
following the originator-responder-pattern. The addresses are printed
with leading zeros. Additionally link-layer addresses are also extracted
for 802.11 plus RadioTap.
2016-06-02 01:46:26 +02:00
Johanna Amann
e8418ad5b0 Ascii Input: Accept dos/windows newlines.
The ascii reader now accepts \r\n newlines without complaining.
Furthermore, the reader was slightly rewritten in a more c++11-y way,
removing all raw pointers from the class.

Addresses BIT-1198
2016-06-01 11:21:44 -07:00
Johanna Amann
990836e868 NetControl: slightly update catch and release logging
Re-drops now contain the location of the original drop.
2016-05-31 11:52:42 -07:00
Robin Sommer
57aef6d49f Add MAC addresses to connection record.
c$eth_src and c$eth_dst now contain the Ethernet address if available.
A new script protocols/conn/mac-logging.bro adds these to conn.log
when loaded.
2016-05-29 17:18:47 -07:00