mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
SSH protocol now assesses the packet length at an earlier stage within binpac. Stops SSH analyzer constantly raising binpac exceptions. Seems to be because a packet continues to go through binpac when empty and only calls the next packet when asked for more data and not on operations.
This commit is contained in:
parent
1c25df6f26
commit
f07fdc255f
2 changed files with 25 additions and 12 deletions
|
@ -173,6 +173,18 @@ refine flow SSH_Flow += {
|
|||
connection()->bro_analyzer()->ProtocolConfirmation();
|
||||
return true;
|
||||
%}
|
||||
|
||||
function get_kex_length(v: int, packet_length: uint32): int
|
||||
%{
|
||||
switch (v) {
|
||||
case SSH1:
|
||||
return packet_length + 4 + 8 -(packet_length%8);
|
||||
case SSH2:
|
||||
return packet_length + 4;
|
||||
default:
|
||||
return 1; //currently causes the rest of the packet to dump
|
||||
}
|
||||
%}
|
||||
};
|
||||
|
||||
refine typeattr SSH_Version += &let {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue