mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Merge remote-tracking branch 'origin/topic/vladg/ssh'
I replaced a few strcmps with either calls to std::str.compare or with the == operator of BroString. Also changed two of the input framework tests that did not pass anymore after the merge. The new SSH analyzer no longer loads the scripts that let network time run, hence those tests failed because updates were not propagated from the threads (that took a while to find.) * origin/topic/vladg/ssh: (25 commits) SSH: Register analyzer for 22/tcp. SSH: Add 22/tcp to likely_server_ports SSH: Ignore encrypted packets by default. SSH: Fix some edge-cases which created BinPAC exceptions SSH: Add memleak btest SSH: Update baselines SSH: Added some more events for SSH2 SSH: Intel framework integration (PUBKEY_HASH) Update baselines for new SSH analyzer. Update SSH policy scripts with new events. SSH: Add documentation Refactoring ssh-protocol.pac: SSH: Use the compression_algorithms const in another place. Some cleanup and refactoring on SSH main.bro. SSH: A bit of code cleanup. Move SSH constants to consts.pac SSH: Cleanup code style. SSH: Fix some memleaks. Refactored the SSH analyzer. Added supported for algorithm detection and more key exchange message types. Add host key support for SSH1. Add support for SSH1 Move SSH analyzer to new plugin architecture. ... Conflicts: scripts/base/protocols/ssh/main.bro testing/btest/Baseline/core.print-bpf-filters/output2 testing/btest/Baseline/plugins.hooks/output BIT-1344: #merged
This commit is contained in:
commit
f79b5adc08
38 changed files with 1494 additions and 324 deletions
|
@ -12,11 +12,11 @@ export {
|
|||
redef enum Notice::Type += {
|
||||
## Indicates that a host has been identified as crossing the
|
||||
## :bro:id:`SSH::password_guesses_limit` threshold with
|
||||
## heuristically determined failed logins.
|
||||
## failed logins.
|
||||
Password_Guessing,
|
||||
## Indicates that a host previously identified as a "password
|
||||
## guesser" has now had a heuristically successful login
|
||||
## attempt. This is not currently implemented.
|
||||
## guesser" has now had a successful login
|
||||
## attempt. This is not currently implemented.
|
||||
Login_By_Password_Guesser,
|
||||
};
|
||||
|
||||
|
@ -34,8 +34,7 @@ export {
|
|||
const guessing_timeout = 30 mins &redef;
|
||||
|
||||
## This value can be used to exclude hosts or entire networks from being
|
||||
## tracked as potential "guessers". There are cases where the success
|
||||
## heuristic fails and this acts as the whitelist. The index represents
|
||||
## tracked as potential "guessers". The index represents
|
||||
## client subnets and the yield value represents server subnets.
|
||||
const ignore_guessers: table[subnet] of subnet &redef;
|
||||
}
|
||||
|
@ -70,7 +69,7 @@ event bro_init()
|
|||
}]);
|
||||
}
|
||||
|
||||
event SSH::heuristic_successful_login(c: connection)
|
||||
event SSH::ssh_auth_successful(c: connection, auth_method_none: bool)
|
||||
{
|
||||
local id = c$id;
|
||||
|
||||
|
@ -79,7 +78,7 @@ event SSH::heuristic_successful_login(c: connection)
|
|||
$where=SSH::SUCCESSFUL_LOGIN]);
|
||||
}
|
||||
|
||||
event SSH::heuristic_failed_login(c: connection)
|
||||
event SSH::ssh_auth_failed(c: connection)
|
||||
{
|
||||
local id = c$id;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ function get_location(c: connection): geo_location
|
|||
return lookup_location(lookup_ip);
|
||||
}
|
||||
|
||||
event SSH::heuristic_successful_login(c: connection) &priority=5
|
||||
event SSH::ssh_auth_successful(c: connection, auth_method_none: bool) &priority=3
|
||||
{
|
||||
# Add the location data to the SSH record.
|
||||
c$ssh$remote_location = get_location(c);
|
||||
|
@ -45,7 +45,7 @@ event SSH::heuristic_successful_login(c: connection) &priority=5
|
|||
}
|
||||
}
|
||||
|
||||
event SSH::heuristic_failed_login(c: connection) &priority=5
|
||||
event SSH::ssh_auth_failed(c: connection) &priority=3
|
||||
{
|
||||
# Add the location data to the SSH record.
|
||||
c$ssh$remote_location = get_location(c);
|
||||
|
|
|
@ -27,7 +27,7 @@ export {
|
|||
/^ftp[0-9]*\./ &redef;
|
||||
}
|
||||
|
||||
event SSH::heuristic_successful_login(c: connection)
|
||||
event SSH::ssh_auth_successful(c: connection, auth_method_none: bool)
|
||||
{
|
||||
for ( host in set(c$id$orig_h, c$id$resp_h) )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue