Commit graph

2183 commits

Author SHA1 Message Date
Johanna Amann
ae6dbf17a2 Input Manager: tiny error message fix. 2017-02-23 10:00:52 -08:00
Seth Hall
7bbaa911b0 I missed one test I needed to update for the kerberos commit that I just pushed. 2017-02-22 00:02:51 -05:00
Seth Hall
f562989aa3 Merge remote-tracking branch 'origin/topic/vladg/krb5-ticket-tracking'
* origin/topic/vladg/krb5-ticket-tracking:
  Kerberos ciphertext had some additional ASN.1 content being lumped in.
2017-02-22 00:01:20 -05:00
Seth Hall
623ebea655 Rework the RADIUS base script.
- This fixes BIT-1769 by logging all requests even in the absence of a
   reply.  The way that request and replying matching were being handled
   was restructured to mostly ignore the transaction ids because they
   aren't that helpful for network monitoring and it makes the script
   structure more complicated.
 - Add `framed_addr` field to the radius log to indicate if the radius
   server is hinting at an address for the client.
 - Add `ttl` field to indicate how quickly the radius server is replying
   to the network access server.
 - Fix a bunch of indentation inconsistencies.
2017-02-20 00:07:14 -05:00
Seth Hall
0b8b76cfab Refactor base krb scripts and update tests. 2017-02-18 13:55:39 -05:00
Johanna Amann
5f910e1005 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1785'
* origin/topic/jsiwek/bit-1785:
  BIT-1785: fix scripts able to access uninitialized variables.

BIT-1785 #merged
2017-02-15 16:19:21 -08:00
Johanna Amann
7c7e12ab94 Merge remote-tracking branch 'origin/topic/seth/BIT-1480'
* origin/topic/seth/BIT-1480:
  Small change to avoid potentially over reading memory.
  Implement ERSPAN support.

BIT-1480 #merged
2017-02-15 15:32:47 -08:00
Johanna Amann
2b694a1881 Update failing intel framework test. 2017-02-11 08:36:47 -08:00
Seth Hall
ffa34180df Merge branch 'topic/jgras/bit-1790' of https://github.com/J-Gras/bro into topic/seth/BIT-1790 2017-02-10 09:39:27 -05:00
Jan Grashoefer
c6b16ad2ca Updated expiration test case to cover reinsertion.
Addresses BIT-1790
2017-02-09 19:40:25 +01:00
Jon Siwek
c857f5c4dd BIT-1785: fix scripts able to access uninitialized variables. 2017-02-06 23:30:54 -06:00
Seth Hall
3cfe8cd294 Merge branch 'master' of ssh://git.bro-ids.org/bro 2017-02-06 10:18:05 -05:00
Robin Sommer
d942b0e8e1 Merge branch 'master' of git.bro.org:bro 2017-02-03 16:39:13 -08:00
Johanna Amann
647eb9703f Change snaplens of a few more tests.
Recent pcap versions do not like the huge snaplens that the header in
these files uses.
2017-02-03 14:10:11 -08:00
Robin Sommer
bdbbed64f1 Merge remote-tracking branch 'origin/topic/johanna/l2flip'
BIT-1787 #merged

* origin/topic/johanna/l2flip:
  Fix layer 2 connection flipping.
2017-02-03 12:31:55 -08:00
Seth Hall
59f0477d29 Implement ERSPAN support.
This is a small caveat to this implementation.  The ethernet
header that is carried over the tunnel is ignored.  If a user
tries to do MAC address logging, it will only show the MAC
addresses for the outer tunnel and the inner MAC addresses
will be stripped and not available anywhere.
2017-02-03 12:29:22 -08:00
Daniel Thayer
6812a7febe Fix to_json() to not lose precision for values of type double
Also changed a few values in the tests for better numerical diversity.
2017-02-02 13:03:05 -06:00
Daniel Thayer
65d6e5a4f7 Fix the to_json() function for bool, enum, and interval types 2017-02-02 12:09:40 -06:00
Daniel Thayer
9370db8980 Add tests for the to_json() function 2017-02-02 11:58:38 -06:00
Robin Sommer
5ab3b86c72 Merge remote-tracking branch 'origin/master' into topic/robin/file-analysis-fixes 2017-01-31 14:53:33 -08:00
Robin Sommer
e21cca4ba8 Adding test with command line that used to trigger a crash. 2017-01-31 14:52:37 -08:00
Johanna Amann
6487446f27 Change snaplen of test trace from 1,000,000 to 10,000
Recent versions of libpcap are unhappy with values bigger than 262,144
and will refuse reading the file.
2017-01-31 13:10:36 -08:00
Johanna Amann
7feaf4499f Fix layer 2 connection flipping.
If connection flipping occured in Sessions.cc code (invoked e.g. when
the original SYN is missing), layer 2 flipping was not performed. This
change switches to always use the connection flipping code in Conn.cc
which performs the switch correctly.
2017-01-30 15:13:56 -08:00
Seth Hall
08bc5ccd42 Fixing tests 2017-01-25 02:06:35 -05:00
Seth Hall
2d1f007186 Extend file extraction log.
- New fields: extracted_cutoff and extracted_size.
   These fields will be null if the file isn't extracted.

 - Extended the extraction test to test the files log too.
2017-01-25 01:16:46 -05:00
Johanna Amann
e991189fff Remove brocon event.
It make the plugins/hooks test fail, because the number of the current
year shows up in the Baseline.
2017-01-19 13:01:35 -08:00
Johanna Amann
8eddeed78f Allow access to global variables using GLOBAL:: namespace.
Addresses BIT-1758. Patch was contributed by François Pennaneach
<francois.pennaneach@free.fr>.
2016-12-07 15:28:34 -08:00
Daniel Thayer
0581364d86 Fix a failing test on OpenBSD
Update a test due to the changes in commit e198fba2.
2016-12-06 10:46:29 -06:00
Daniel Thayer
de1c13e3a3 Fix test core.pcap.dumper to work on OpenBSD
The sdiff command on OpenBSD truncates the output at a different
position than sdiff on other platforms.  Simple fix is to use diff
instead of sdiff.
2016-12-01 16:35:54 -06:00
Daniel Thayer
53d05fb24f Update a test baseline
The number of lines in scripts/base/frameworks/intel/main.bro changed
recently.
2016-11-14 14:59:19 -06:00
Johanna Amann
c92060a8ca Merge remote-tracking branch 'origin/topic/seth/smb-auth-fixes'
* origin/topic/seth/smb-auth-fixes:
  Disable SMB2 error data parsing.
  Removed some files that aren't being used.
  Fix SMB tree connect handling.
  Fix a small issue where DCE_RPC commands were improperly being logged.
  SMB fixes and cleanup.
  Including a test for raw NTLM in SMB
  Updates for SMB auth handling from Martin van Hensbergen.

BIT-1721 #merged
2016-11-02 10:25:33 -07:00
Johanna Amann
681efc2b8d Version parsing scripts now supports several beta versions.
Versions such as 2.5-beta2 now don't throw an error.
2016-11-01 11:19:14 -07:00
Seth Hall
ff682b8c2c Merge remote-tracking branch 'origin/master' into topic/seth/smb-auth-fixes 2016-10-31 16:17:01 -04:00
Seth Hall
4f3fe047f4 SMB fixes and cleanup.
SMB error handling improved. The analyzer isn't destroyed when a problem
is encoutered anymore.  The flowbuffer in the parser is now flushed and
the analyzer is set to resync against an SMB command.  This was needed
because there is some state about open files that is kept within the
parser itself which was being destroyed and that was causing analysis
after content gaps or parse errors to be faulty.  The new mechanism
doesn't detroy the parser so parsing after gaps is improved.

DCE_RPC handling in SMB is improved in the edge case where a drive
mapping isn't seen. There is a new const named SMB::pipe_filenames
which is used as a heuristic for identifying "files" opened on named
pipe shares.  If the share mapping type isn't known and a filename
in this set is found, the share type will change to "PIPE" by
generating an event named "smb_pipe_connect_heuristic".  Reads and
writes to that file will be sent to the DCE_RPC analyzer instead of
to the files framework.

The concept of "unknown" share types has been removed due to the new
heuristic detection of share types.

Some general clean up of how the SMB cmd log is written and when.
2016-10-31 13:35:47 -04:00
Seth Hall
a836ece4e6 Including a test for raw NTLM in SMB 2016-10-26 10:41:08 -04:00
Robin Sommer
b0a2586309 Updating tests. 2016-10-25 17:06:25 -07:00
Johanna Amann
0f29405d6e Merge remote-tracking branch 'origin/topic/robin/sig-fixes'
* origin/topic/robin/sig-fixes:
  Fix a couple of problems with signature matching.

BIT-1737 #merged
2016-10-25 09:42:29 -07:00
Daniel Thayer
8ae064006b Merge remote-tracking branch 'origin/master' into fastpath 2016-10-21 09:35:04 -05:00
Daniel Thayer
99cd34f57d Python 3 compatibility fix for coverage-calc script 2016-10-21 09:33:04 -05:00
Johanna Amann
96d14691df Merge remote-tracking branch 'origin/topic/dnthayer/ticket1731'
* origin/topic/dnthayer/ticket1731:
  Fix istate.pybroccoli test on systems using Python 3

BIT-1731 #merged
2016-10-20 11:41:19 -04:00
Robin Sommer
5cf2320fbc Fix a couple of problems with signature matching.
- IPv4 CIDR specifications didn't work with dst-ip/src-ip.

    - The "payload-size" condition was unreliable with UDP traffic.
2016-10-19 14:23:43 -07:00
Johanna Amann
8ce746cc25 Merge remote-tracking branch 'origin/topic/vladg/bit-1641'
* origin/topic/vladg/bit-1641:
  Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641.
  Clean up the logic for ssh_auth_failed. Addresses BIT-1641
  Update baselines for adding a field to ssh.log as part of BIT-1641
  Script-land changes for BIT-1641.
  Change SSH.cc to use ssh_auth_attempted instead of ssh_auth_failed. Addresses BIT-1641.
  Revert "Fixing duplicate SSH authentication failure events."
  Create new SSH events ssh_auth_attempt and ssh_auth_result. Add auth_attempts to SSH::Info. Address BIT-1641.

I extended the tests a bit and did some small cleanups. I also moved the
SSH events back to the global namespace for backwards compatibility and
for consistency (the way it was at the moment, some of them were global
some SSH::).

Furthermore, I fixed the ssh_auth_result result event, it was only
raised in the success case. ssh_auth_result is now also checked in the
testcases. I also have a suspicion that the intel integration never
really worked before.

BIT-1641 #merged
2016-10-18 21:57:27 -04:00
Daniel Thayer
6fa9540e47 Fix istate.pybroccoli test on systems using Python 3
Filter out the python 2 "L" suffix on long integers (not valid in Python 3),
and change python 3 "object at" to "instance at" when printing
class instances.
2016-10-14 14:10:40 -05:00
Vlad Grigorescu
70aaffbaac Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641. 2016-10-14 09:14:22 -05:00
Vlad Grigorescu
3e7d143e31 Update baselines for adding a field to ssh.log as part of BIT-1641 2016-10-14 09:14:21 -05:00
Robin Sommer
c9d449e363 Merge remote-tracking branch 'origin/topic/johanna/tls13'
BIT-1727 #merged

* origin/topic/johanna/tls13:
  Better way to deal with overloaded Assign constructors.
  A few tabbing fixes in TLS 1.3 support
  TLS 1.3 support.
2016-10-13 15:48:27 -07:00
Robin Sommer
4477b8a1ab Merge remote-tracking branch 'origin/topic/seth/dce_rpc_fixes'
* origin/topic/seth/dce_rpc_fixes:
  Fixes for DCE_RPC analyzer
2016-10-10 08:29:14 -07:00
Robin Sommer
54191cc390 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1719'
BIT-1719 #merged

* origin/topic/dnthayer/ticket1719:
  Fix httpd.py test script for Py3 compatibility
2016-10-10 08:24:04 -07:00
Seth Hall
029d92183e Fixes for DCE_RPC analyzer
- DCE_RPC fragmentation handling returns!
  - Fixed some general parsing issues
  - Fixed an issue with the DCE_RPC signature not working for IPv6 connections.
2016-10-08 10:00:26 -04:00
Johanna Amann
fdef28ce7c TLS 1.3 support.
Well, at least -draft-16, and we don't quite parse all extensions yet
(not that there is that much left to parse).
2016-10-07 12:51:43 -07:00