mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Fix misidentification of SOCKS traffic. Traffic that had a certain bytestring would get incorrectly identified as SOCKS. This seemed to happen a lot with DCE/RPC traffic.
This commit is contained in:
parent
430cf311e9
commit
56acd99d15
1 changed files with 7 additions and 1 deletions
|
@ -64,6 +64,12 @@ refine connection SOCKS_Conn += {
|
|||
bro_analyzer()->ProtocolViolation(fmt("invalid value in reserved field: %d", ${request.reserved}));
|
||||
return false;
|
||||
}
|
||||
if ( ( ${request.command} == 0 ) || ( ${request.command} > 3 ) )
|
||||
{
|
||||
bro_analyzer()->ProtocolViolation(fmt("invalid value in reserved field: %d", ${request.reserved}));
|
||||
bro_analyzer()->SetSkip(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
RecordVal* sa = new RecordVal(socks_address);
|
||||
|
||||
|
@ -105,7 +111,7 @@ refine connection SOCKS_Conn += {
|
|||
function socks5_reply(reply: SOCKS5_Reply): bool
|
||||
%{
|
||||
RecordVal* sa = new RecordVal(socks_address);
|
||||
|
||||
|
||||
// This is dumb and there must be a better way (checking for presence of a field)...
|
||||
switch ( ${reply.bound.addr_type} )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue