mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/vladg/mysql_nul_string_fix'
* origin/topic/vladg/mysql_nul_string_fix: Add a test with an encrypted MySQL connection Fix parsing of MySQL NUL Strings, where we now require it to have a NUL value at the end.
This commit is contained in:
commit
8c02aa5211
7 changed files with 32 additions and 18 deletions
6
CHANGES
6
CHANGES
|
@ -1,4 +1,10 @@
|
||||||
|
|
||||||
|
2.6-beta2-55 | 2018-10-30 09:59:44 -0500
|
||||||
|
|
||||||
|
* Add a test with an encrypted MySQL connection (Vlad Grigorescu)
|
||||||
|
|
||||||
|
* Fix parsing of MySQL NUL Strings (Vlad Grigorescu)
|
||||||
|
|
||||||
2.6-beta2-51 | 2018-10-26 10:41:42 -0500
|
2.6-beta2-51 | 2018-10-26 10:41:42 -0500
|
||||||
|
|
||||||
* Add missing record field comment (Jon Siwek, Corelight)
|
* Add missing record field comment (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-beta2-51
|
2.6-beta2-55
|
||||||
|
|
|
@ -8,11 +8,11 @@ refine flow MySQL_Flow += {
|
||||||
if ( ${msg.version} == 10 )
|
if ( ${msg.version} == 10 )
|
||||||
BifEvent::generate_mysql_server_version(connection()->bro_analyzer(),
|
BifEvent::generate_mysql_server_version(connection()->bro_analyzer(),
|
||||||
connection()->bro_analyzer()->Conn(),
|
connection()->bro_analyzer()->Conn(),
|
||||||
bytestring_to_val(${msg.handshake10.server_version}));
|
new StringVal(c_str(${msg.handshake10.server_version})));
|
||||||
if ( ${msg.version} == 9 )
|
if ( ${msg.version} == 9 )
|
||||||
BifEvent::generate_mysql_server_version(connection()->bro_analyzer(),
|
BifEvent::generate_mysql_server_version(connection()->bro_analyzer(),
|
||||||
connection()->bro_analyzer()->Conn(),
|
connection()->bro_analyzer()->Conn(),
|
||||||
bytestring_to_val(${msg.handshake9.server_version}));
|
new StringVal(c_str(${msg.handshake9.server_version})));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
%}
|
%}
|
||||||
|
@ -27,11 +27,11 @@ refine flow MySQL_Flow += {
|
||||||
if ( ${msg.version} == 10 )
|
if ( ${msg.version} == 10 )
|
||||||
BifEvent::generate_mysql_handshake(connection()->bro_analyzer(),
|
BifEvent::generate_mysql_handshake(connection()->bro_analyzer(),
|
||||||
connection()->bro_analyzer()->Conn(),
|
connection()->bro_analyzer()->Conn(),
|
||||||
bytestring_to_val(${msg.v10_response.username}));
|
new StringVal(c_str(${msg.v10_response.username})));
|
||||||
if ( ${msg.version} == 9 )
|
if ( ${msg.version} == 9 )
|
||||||
BifEvent::generate_mysql_handshake(connection()->bro_analyzer(),
|
BifEvent::generate_mysql_handshake(connection()->bro_analyzer(),
|
||||||
connection()->bro_analyzer()->Conn(),
|
connection()->bro_analyzer()->Conn(),
|
||||||
bytestring_to_val(${msg.v9_response.username}));
|
new StringVal(c_str(${msg.v9_response.username})));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -151,7 +151,7 @@ enum Expected {
|
||||||
EXPECT_AUTH_SWITCH,
|
EXPECT_AUTH_SWITCH,
|
||||||
};
|
};
|
||||||
|
|
||||||
type NUL_String = RE/[^\0]*/;
|
type NUL_String = RE/[^\0]*\0/;
|
||||||
|
|
||||||
# MySQL PDU
|
# MySQL PDU
|
||||||
|
|
||||||
|
|
BIN
testing/btest/Traces/mysql/encrypted.trace
Normal file
BIN
testing/btest/Traces/mysql/encrypted.trace
Normal file
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
# This tests how Bro deals with encrypted connections. Right now, it doesn't log them as it
|
||||||
|
# can't parse much of value. We're testing for an empty mysql.log file.
|
||||||
|
|
||||||
|
# @TEST-EXEC: touch mysql.log
|
||||||
|
# @TEST-EXEC: bro -b -r $TRACES/mysql/encrypted.trace %INPUT
|
||||||
|
# @TEST-EXEC: btest-diff mysql.log
|
||||||
|
|
||||||
|
@load base/protocols/mysql
|
Loading…
Add table
Add a link
Reference in a new issue