Commit graph

11634 commits

Author SHA1 Message Date
Jon Siwek
743303950b Deprecate binpac::bytestring_to_val, replace with binpac::to_stringval 2020-04-20 14:30:49 -07:00
Johanna Amann
cfe6616de1 Update submodule
[nomail]
2020-04-19 19:45:08 -07:00
Jon Siwek
81517bd703 Update deprecated BifEvent::generate_* usages 2020-04-17 18:42:58 -07:00
Jon Siwek
e60a7afbbc Update submodule(s)
[nomail]
2020-04-17 10:22:51 -07:00
Johanna Amann
0eb04da821 Update submodule
[nomail]
2020-04-16 22:15:50 -07:00
Jon Siwek
9b2fb29aca Deprecate Connection::Event and Analyzer::Event methods
And update usages to the "EnqueueEvent" methods.
2020-04-16 19:45:30 -07:00
Jon Siwek
2a63e4a4a2 Deprecate BuildConnVal() methods and update usages to ConnVal()
The later being a new method that returns IntrusivePtr
2020-04-16 17:00:01 -07:00
Jon Siwek
094d6de979 Update all BIFs to return IntrusivePtr instead of Val* 2020-04-16 17:00:01 -07:00
Jon Siwek
d7be84de97 Update deprecated ValManager::GetPort usages 2020-04-16 16:47:19 -07:00
Jon Siwek
de8761f761 Update deprecated ValManager::GetEmptyString usages 2020-04-16 16:46:38 -07:00
Jon Siwek
93f4c5871b Update deprecated ValManager::GetCount usages 2020-04-16 16:46:36 -07:00
Jon Siwek
0ddac4abcf Update deprecated ValManager::GetInt usages 2020-04-16 16:44:35 -07:00
Jon Siwek
d9edd855da Update deprecated ValManager::GetBool usages 2020-04-16 16:44:33 -07:00
Jon Siwek
9af84bb2b0 Update deprecated ValManager GetTrue/GetFalse usages 2020-04-16 16:40:59 -07:00
Jon Siwek
202b3f877d Deprecate all ValManager "Get" methods
Alternate methods that return IntrusivePtr are available in similarly
named methods that omit the "Get" prefix.
2020-04-16 16:40:57 -07:00
Jon Siwek
eb77411dbf Change BIFs to return a wrapper object
That allows returning either Val* or IntrusivePtr<T>.  The former could
eventually be deprecated, but it's used extensively at the moment.
2020-04-16 16:40:07 -07:00
Jon Siwek
8843f69002 Remove ineffective &default in netcontrol cluster event handler args 2020-04-16 15:40:27 -07:00
Johanna Amann
730f78d0c2 Merge remote-tracking branch 'origin/topic/jsiwek/no-vla'
* origin/topic/jsiwek/no-vla:
  GH-895: Remove use of Variable-Length-Arrays

Fixes GH-895
2020-04-16 14:18:38 -07:00
Johanna Amann
df71d963c9 Merge remote-tracking branch 'origin/topic/jsiwek/krb-consts-defaults'
* origin/topic/jsiwek/krb-consts-defaults:
  Add default function for Kerberos constant-lookup-tables
2020-04-16 13:05:05 -07:00
Johanna Amann
7c012f9b91 Merge branch 'master' of https://github.com/mmguero-dev/zeek
* 'master' of https://github.com/mmguero-dev/zeek:
  check for the existance of f?$conns in file_sniff event in policy/protocols/ssl/log-hostcerts-only.zeek
2020-04-16 12:59:12 -07:00
Jon Siwek
c8e070b8ee Add default function for Kerberos constant-lookup-tables 2020-04-16 12:34:41 -07:00
SG
42bf41aca1 check for the existance of f?$conns in file_sniff event in policy/protocols/ssl/log-hostcerts-only.zeek
In using the corelight/bro-xor-exe-plugin (https://github.com/corelight/bro-xor-exe-plugin) I noticed this error when running the PCAP trace file in its tests directory:

1428602842.525435 expression error in /opt/zeek/share/zeek/policy/protocols/ssl/log-hostcerts-only.zeek, line 44: field value missing (X509::f$conns)

Examining log-hostcerts-only.zeek, I saw that although f$conns is being checked for length, it's not being checked to see if it exists first.

This commit changes "if ( |f$conns| != 1 )" to "if (( ! f?$conns ) || ( |f$conns| != 1 ))" so that the script returns if there is no f$conns field.

In my local testing, this seems to fix the error. My testing was being done with v3.0.5, but I think this patch can be applied to both the 3.0.x and 3.1.x branches.
2020-04-16 10:19:59 -06:00
Jon Siwek
15a19414ca GH-895: Remove use of Variable-Length-Arrays 2020-04-15 16:25:21 -07:00
Jon Siwek
991501a3d2 Update submodule(s)
[nomail]
2020-04-15 15:14:35 -07:00
Tim Wojtulewicz
ccc0cbdcd5
Update README.md to fix the logo and one of the links 2020-04-15 13:45:25 -07:00
Tim Wojtulewicz
612c59e099 Restore previous url scheme capture group 2020-04-14 16:33:19 -07:00
Jon Siwek
2d91f9d89f Merge remote-tracking branch 'origin/topic/timw/dict-cleanup'
* origin/topic/timw/dict-cleanup:
  A few minor cleanups in Dict
2020-04-14 15:46:03 -07:00
Jon Siwek
f70ecccc34 Fix a confusing variable name shadowing 2020-04-14 15:30:15 -07:00
Jon Siwek
ffe8a018a1 Updating CHANGES and VERSION. 2020-04-14 11:10:07 -07:00
Johanna Amann
bb3250c28e Fix Stack Overflow in POP3_Analyzer::ProcessRequest.
The VLA can overflow given a large enough string. As a small fix, this
commit gets rid of the VLA and assigns the password directly to the
target string.

This was reported by Matteo Rizzo (Google).
2020-04-14 11:06:04 -07:00
Tim Wojtulewicz
ba1c03188f Merge remote-tracking branch 'origin/topic/jsiwek/alternate-hook-event-prototypes'
* origin/topic/jsiwek/alternate-hook-event-prototypes:
  Add warning for ineffective &default arguments in handlers
  Fix frame size allocation of alternate event/hook handlers
  Emit error for alternate event/hook prototype args with attributes
  Improve alternate event/hook prototype matching
  Allow alternate event/hook prototype declarations
2020-04-13 15:00:25 -07:00
Tim Wojtulewicz
d4784f5525 A few minor cleanups in Dict 2020-04-13 13:39:17 -07:00
Tim Wojtulewicz
0d31d39de9 GH-906: Fix the regex in url.zeek to better match for find_all_urls 2020-04-13 13:17:57 -07:00
Jon Siwek
ce9183a2ed Fix Broker topics used to uniquely identify cluster nodes
Node-specific topic prefix subscriptions/publications now add a trailing
slash like "zeek/cluster/node/<name>/".  Without the trailing slash,
messages attempting to target "proxy-10" may also be sent to "proxy-1"
since subscription matching is prefix-based.
2020-04-10 14:36:00 -07:00
Jon Siwek
714e2f736a Update submodule(s)
[nomail]
2020-04-09 22:57:55 -07:00
Jon Siwek
640dbea57c Add warning for ineffective &default arguments in handlers
For event/hook handlers that had a previous declaration, any &default
arguments are ineffective.  Only &default uses in the initial
prototype's arguments have an effect (that includes if the handler
is actually the site at which the declaration occurs).
2020-04-09 22:51:01 -07:00
Jon Siwek
9243341e8c Fix frame size allocation of alternate event/hook handlers
When the only existing handler doesn't use the full argument list, still
have to ensure the full frame is allocated because all arguments get set
regardless.
2020-04-09 22:05:34 -07:00
Jon Siwek
070b28ac05 Emit error for alternate event/hook prototype args with attributes
Argument attributes are only allowed in the canonical prototype.
2020-04-09 21:00:09 -07:00
Jon Siwek
9b6934eab8 Improve alternate event/hook prototype matching
This fixes it to again allow the old behavior of matching a handler
against the canonical prototype as long as all argument types, but not
necessarily names, match.
2020-04-09 20:20:38 -07:00
Johanna Amann
c83567246e Fix include in X509Common.h
Give full path to Analyzer.h, so that X509Common.h is include-able by
plugins.
2020-04-09 16:15:36 -07:00
Johanna Amann
876c803d75 Merge remote-tracking branch 'origin/topic/timw/776-using-statements'
* origin/topic/timw/776-using-statements:
  Remove 'using namespace std' from SerialTypes.h
  Remove other using statements from headers
  GH-776: Remove using statements added by PR 770

Includes small fixes in files that changed since the merge request was
made.

Also includes a few small indentation fixes.
2020-04-09 13:31:07 -07:00
Johanna Amann
a3a38f0849 Merge remote-tracking branch 'origin/topic/timw/nullptr'
* origin/topic/timw/nullptr:
  The remaining nulls
  plugin/probabilistic/zeekygen: Replace nulls with nullptr
  file_analysis: Replace nulls with nullptr
  analyzer: Replace nulls with nullptr
  iosource/threading/input/logging: Replace nulls with nullptr
2020-04-09 08:59:53 -07:00
Jon Siwek
1210257af9 Update submodule(s)
[nomail]
2020-04-08 14:06:56 -07:00
Jon Siwek
5fe2a57356 Merge remote-tracking branch 'origin/topic/timw/structure-packing'
During merge, changed a bit of how Frame OffsetMap
assignments/contruction were handled to keep parity with old version.

* origin/topic/timw/structure-packing:
  Lazy-initalize some of the fields in Frame to reduce the size of all Frames when they're not used
  Set InternalHashTag to a uint16_t so CompositeHash doesn't have a gap in it.
  Mark constants in List constexpr so they don't actually take up space in created objects
  Reorder some class variables to fill in gaps in structure packing
2020-04-08 13:57:44 -07:00
Jon Siwek
ce27b21d67 Merge remote-tracking branch 'origin/topic/timw/finals'
* origin/topic/timw/finals:
  Revert final keywords for PcapSource and reader/writer backends
  Mark the majority of the analyzer classes as final, where appropriate.
  More final markings.
  Mark a large number of common types as final that shouldn't be overrideden
  Mark all timers as final
2020-04-08 13:34:17 -07:00
Tim Wojtulewicz
06bb478552 Revert final keywords for PcapSource and reader/writer backends 2020-04-08 11:35:18 -07:00
Tim Wojtulewicz
0a47588d0b The remaining nulls 2020-04-07 16:08:34 -07:00
Tim Wojtulewicz
41c3256faa plugin/probabilistic/zeekygen: Replace nulls with nullptr 2020-04-07 16:08:34 -07:00
Tim Wojtulewicz
393b8353cb file_analysis: Replace nulls with nullptr 2020-04-07 16:08:34 -07:00
Tim Wojtulewicz
6897912909 analyzer: Replace nulls with nullptr 2020-04-07 16:08:34 -07:00