Commit graph

17 commits

Author SHA1 Message Date
Jon Siwek
05cf511f18 GH-1119: add base/protcols/conn/removal-hooks.zeek
This adds two new functions: `Conn::register_removal_hook()` and
`Conn::unregister_removal_hook()` for registering a hook function to be
called back during `connection_state_remove`.  The benefit of using hook
callback approach is better scalability: the overhead of unrelated
protocols having to dispatch no-op `connection_state_remove` handlers is
avoided.
2020-09-11 12:12:10 -07:00
Jon Siwek
5f435c2644 Remove connection_successful and successful_connection_remove events
Related to https://github.com/zeek/zeek/issues/1119
2020-09-10 12:06:50 -07:00
Justin Azoff
80469a1fde fix NTLM field value access
The fields being checked for existence were not the same as the fields
being accessed.
2020-01-08 11:40:28 -05:00
Jon Siwek
31f60853c9 GH-646: add new "successful_connection_remove" event
And switch Zeek's base scripts over to using it in place of
"connection_state_remove".  The difference between the two is
that "connection_state_remove" is raised for all events while
"successful_connection_remove" excludes TCP connections that were never
established (just SYN packets).  There can be performance benefits
to this change for some use-cases.

There's also a new event called ``connection_successful`` and a new
``connection`` record field named "successful" to help indicate this new
property of connections.
2019-11-11 19:52:59 -08:00
Jon Siwek
a994be9eeb Merge remote-tracking branch 'origin/topic/seth/zeek_init'
* origin/topic/seth/zeek_init:
  Some more testing fixes.
  Update docs and tests for bro_(init|done) -> zeek_(init|done)
  Implement the zeek_init handler.
2019-04-19 11:24:29 -07:00
Seth Hall
8cefb9be42 Implement the zeek_init handler.
Implements the change and a test.
2019-04-14 08:37:35 -04:00
Daniel Thayer
18bd74454b Rename all scripts to have ".zeek" file extension 2019-04-11 21:12:40 -05:00
Seth Hall
be9f97d8b4 Updates to NTLM script handling.
- This separates NTLM handling away from SMB.
 - It logs more accurately when logins are succeed or fail
   or even if the resulting status of an authentication is
   unknown.
 - Adds some new fields where the server is indicating information
   about itself (server_nb_computer_name, server_dns_computer_name,
   and server_tree_name)
2018-04-06 13:09:24 -04:00
Daniel Thayer
23a5f83c94 Added missing README files for documentation
These are the one-line script package descriptions.
2016-10-10 22:55:50 -05:00
Seth Hall
c06dca3565 Fixes for NTLM.
- Attempted fix for some NTLM handling fixes that were leading
   to DPD errors.
 - Added some status codes to the list of auth failure status codes.
2016-08-14 01:31:07 -04:00
Seth Hall
ce26dee408 Fix a small script bug that was causing a test failure. 2016-08-09 15:42:07 -04:00
Seth Hall
117b5c3ac7 Lots of SMB1 parsing fixes. 2016-08-08 15:36:07 -04:00
Seth Hall
91161f790c SMB test clean up and docs 2016-06-28 10:30:41 -04:00
Seth Hall
72f2c2ded2 More SMB/DCERPC/NTLM cleanup.
- NTLM Authentication failures over SMB2 are now marked as such in
   the ntlm.log.
 - Slightly updated filtering mechanism for DCE/RPC operations.
 - Uncommented the atsvc file so it compiles now.
2016-04-15 10:39:08 -04:00
Seth Hall
a176e053ca Improve NTLM authentication logging.
If only one side of a connection was seen, the ntlm.log
would indicate that the authentication failed.  This has been
modified so that the success is listed as null since it's not
known whether or not the authentication was successful.

It can be inferred from continued SMB analysis though because
activity will continue taking place.  I changed it though
because the log shouldn't assume more than what it sees.
2016-04-13 12:26:07 -04:00
Seth Hall
5d33ac773b Add success indicator to the ntlm.log.
This changes the single gssapi event slightly too.
2016-04-13 12:09:05 -04:00
Seth Hall
5b5589e167 Complete breakout of SMB, GSSAPI, and NTLM
- Looser coupling between these analyzers.
 - New ntlm.log (still pretty early)
 - Improved string handling for NTLM (convert UTF16 to UTF8)
 - SMB2 analyzer now supports GSSAPI.
 - Improved abstraction of DCE_RPC operations (still not finished)
 - Lots of whitespace cleanup.
2016-04-03 04:17:20 -04:00