Commit graph

1760 commits

Author SHA1 Message Date
Vlad Grigorescu
05ea2d43c7 BIT-1410: Update baselines 2015-06-01 20:38:59 -05:00
Seth Hall
097354a43f Updates for the urls.bro script. Fixes BIT-1404. 2015-06-01 11:38:26 -04:00
Johanna Amann
5147b0bb02 set fedora 21 specific environment variable to not make it complain about
md5 signed certs.

Addresses BIT-1402
2015-05-27 12:24:21 -07:00
Johanna Amann
8be8f2e725 update local-compat.test 2015-05-07 21:55:59 -07:00
Robin Sommer
1e66c6718a Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add /sbin to PATH in btest.cfg
2015-05-06 09:58:30 -07:00
Daniel Thayer
f6248994e4 Add /sbin to PATH in btest.cfg
Added /sbin to PATH so that a couple of tests that require ifconfig
are not skipped on systems (such as debian) which don't have /sbin
in PATH by default.

Also removed a duplicate default_path.
2015-05-04 14:47:56 -05:00
Robin Sommer
31e75c8eac Baseline update. 2015-04-29 20:34:37 -07:00
Jon Siwek
48fccb3bce BIT-1350: improve record coercion type checking.
For a field of the same name in both the target type and the coerced
type, a type mismatch is now reported as an error at parse-time.
2015-04-27 16:37:40 -05:00
Jon Siwek
f73b4f2a21 Fix some outdated documentation unit tests. 2015-04-23 12:30:54 -05:00
Robin Sommer
03a29368fe Merge branch 'topic/robin/ascii-escape-normalization'
* topic/robin/ascii-escape-normalization:
  Updating NEWS.
  In bifs, change ODesc objects to have RAW_STYLE.
  Changing what's escaped when printing.
  Remove several BroString escaping methods that are no longer useful.

BIT-1333 #merged
2015-04-21 15:59:54 -07:00
Robin Sommer
5b32791edb Merge remote-tracking branch 'origin/topic/vladg/sip'
* origin/topic/vladg/sip:
  Update NEWS.
  Update baselines.
  Spruce up SIP events.bif documentation a bit.
  Register SIP analyzer to well known port.
  Fix indenting issue in main.bro
  Add SIP btests.
  Small update for the SIP logs and DPD sig.
  SIP: Fix up DPD and the TCP analyzer a bit.
  SIP: Move to the new string BIFs
  SIP: Move to new analyzer format.
  Move the SIP analyzer to uint64 sequences, and a number of other small SIP fixes.
  Rely on content inspection and not just is_orig to determine client/server.
  Enable SIP in CMakeLists.txt
  Merge topic/seth/faf-updates.

BIT-1370 #merged
2015-04-21 15:30:25 -07:00
Robin Sommer
8b722c484d Renaming krb.log to kerberos.log. 2015-04-21 12:22:58 -07:00
Robin Sommer
9911993c6f Merge remote-tracking branch 'origin/topic/vladg/kerberos'
* origin/topic/vladg/kerberos:
  Fix doc on krb_cred
  Update the KRB tests a bit.
2015-04-21 11:58:44 -07:00
Robin Sommer
87eb5ef811 Merge remote-tracking branch 'origin/topic/vladg/kerberos'
* origin/topic/vladg/kerberos: (27 commits)
  Add Kerberos to NEWS.
  Add Kerberos memleak btest.
  Add Kerberos analyzer btest.
  Update baselines for Kerberos analyzer.
  Add known ports to krb/main.bro
  KRB: Clean up krb.log a bit.
  Kerberos: Remove debugging output.
  Kerberos: Fix a memleak.
  Kerberos: A couple small tweaks.
  Kerberos: Fix parsing of the cipher in tickets, and add it to the log.
  Kerberos: A couple more formatting fixes.
  Change krb Info string to success bool
  Clean up formatting.
  Documentation update, and rework events a bit.
  Add support for the SAFE message type.
  Add support for AP_REQ, AP_REP, PRIV, and CRED message types.
  Fix parsing error for KRB_Ticket_Sequence
  Continue clean-up. Some reformatting, removing hard-coded values, documentation, etc.
  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
  Improve Kerberos DPD and fix a few parse errors.
  ...

BIT-1369 #merged
2015-04-21 11:15:43 -07:00
Vlad Grigorescu
9f9bad48a4 Merge remote-tracking branch 'origin/master' into topic/vladg/kerberos
Conflicts:
	NEWS
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/plugins.hooks/output
	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2015-04-21 12:59:54 -04:00
Vlad Grigorescu
32284c753b Update the KRB tests a bit. 2015-04-21 12:27:14 -04:00
Robin Sommer
770f833ea2 Removing deprecated fields from the connection record.
Removing "hot" and "addl", which haven't been used anymore for a long
time. Also removing the functions append_addl() and append_addl_marker().
2015-04-20 20:07:24 -07:00
Robin Sommer
de1e2fe20b Removing the NetFlow analyzer.
Since the command-line option for reading NetFlow went away, the has
been neither used nor tested anymore. We might bring this back later,
but for now I'd rather remove it than having dead code that seems to
suggest that we support it.
2015-04-20 20:07:24 -07:00
Robin Sommer
a9979d56a4 Merge remote-tracking branch 'origin/topic/vladg/file-analysis-exe-analyzer'
* origin/topic/vladg/file-analysis-exe-analyzer: (31 commits)
  Tweak the PE OS versions based on real-world traffic.
  Update pe/main.bro to user register_for_mime_types, ensuring it will also work with the upcoming Files framework changes.
  A bit of final core-level cleanup.
  A bit of final script cleanup.
  Update baselines.
  Add a btest for the PE analyzer.
  Add a PE memleak test, and fix a memleak.
  Documentation and a bit of overall cleanup.
  Add data about which tables are present.
  Remove the .idata parsing, as it can be more complicated in some cases.
  Fix a PE analyzer failure where the IAT isn't aligned with a section boundary.
  PE: Rehash the log a bit.
  Make base_of_data optional.
  Fix support for PE32+ files.
  PE Analyzer cleanup.
  Checkpoint - Import Address Table being parsed.
  Some changes to fix PE analyzer on master.
  Parse PE section headers.
  Updated PE analyzer to work with changes in master.
  In progress checkpoint.  Things are starting to work.
  ...

BIT-1369 #merged
2015-04-20 19:23:31 -07:00
Robin Sommer
ed91732e09 Merge remote-tracking branch 'origin/topic/seth/more-file-type-ident-fixes'
* origin/topic/seth/more-file-type-ident-fixes:
  File API updates complete.
  Fixes for file type identification.
  API changes to file analysis mime type detection.
  Make HTTP 206 reassembly require ETags by default.
  More file type identification improvements
  Fix an issue with files having gaps before the bof_buffer is filled.
  Fix an issue with packet loss in http file reporting.
  Adding WOFF fonts to file type identification.
  Extended JSON matching and added OCSP responses.
  Another large signature update.
  More signature updates.
  Even more file type ident clean up.
  Lots of fixes for file type identification.

BIT-1368 #merged
2015-04-20 13:31:00 -07:00
Vlad Grigorescu
d0e4d17f31 Tweak the PE OS versions based on real-world traffic. 2015-04-20 12:49:42 -04:00
Vlad Grigorescu
928f870f58 Update pe/main.bro to user register_for_mime_types, ensuring it will also work with the upcoming Files framework changes. 2015-04-20 11:54:34 -04:00
Seth Hall
ed375167c8 File API updates complete.
Addresses BIT-1368.
2015-04-20 10:46:48 -04:00
Seth Hall
038e4c24f6 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1368' into topic/seth/more-file-type-ident-fixes
Conflicts:
	src/file_analysis/File.cc
	testing/btest/Baseline/plugins.hooks/output
2015-04-20 09:36:40 -04:00
Seth Hall
faabe8a5e3 Fixes for file type identification.
- Backed out eTag changes.  The real world is more complicated
   than just using eTags to identify the same file.
 - A bit of code simplication in the http base scripts.
 - Test updates (more existing small problems were identified!).
 -
2015-04-20 09:34:09 -04:00
Vlad Grigorescu
9683d8419f Update baselines. 2015-04-19 23:09:19 -04:00
Vlad Grigorescu
d5ea6b8457 Add SIP btests. 2015-04-19 22:25:37 -04:00
Vlad Grigorescu
71230fec81 Update baselines. 2015-04-19 21:16:35 -04:00
Vlad Grigorescu
0199ac5ece Add a btest for the PE analyzer. 2015-04-19 20:27:24 -04:00
Vlad Grigorescu
93b84463f5 Add a PE memleak test, and fix a memleak. 2015-04-19 20:22:42 -04:00
Vlad Grigorescu
5cf8001cb0 Add Kerberos memleak btest. 2015-04-17 21:44:59 -04:00
Vlad Grigorescu
569f43d625 Add Kerberos analyzer btest. 2015-04-17 21:28:22 -04:00
Vlad Grigorescu
3d13e404b1 Update baselines for Kerberos analyzer. 2015-04-17 21:27:48 -04:00
Robin Sommer
d6dda8e984 Merge remote-tracking branch 'origin/topic/johanna/bit-985'
* origin/topic/johanna/bit-985:
  add seeking functionality to raw reader.

BIT-985 #merged
2015-04-17 13:13:45 -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
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
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
Robin Sommer
a7b7397f02 Merge branch 'master' of git.bro.org:bro 2015-04-16 08:14:10 -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
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
fe9ff46cc5 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1367'
Bit-1367 #close
2015-04-11 11:01:18 -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
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
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
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