zeek/testing/btest/scripts/base/protocols
Jon Siwek c911d03c30 Adjust modbus register array parsing.
For modbus message types that include variable amount of register values
(uint16[]), setting a &length attribute without an explicit array size
could trigger a parsing assertion since it allows for the "element" data
pointer to travel past the "end of data" (e.g. when &length is odd).
This is changed to now give both an array size and &length to earlier
terminate the parsing of elements before the assert is checked and
so a single out-of-bound check can be done for the entire array
(leaving off &length causes an out-of-bound check for each element).

Added another parameter to modbus events that carry register arrays to
the script-layer which indicates the associated byte count from the
message (allowing for invalid values to be detected):

    modbus_read_holding_registers_response
    modbus_read_input_registers_response
    modbus_write_multiple_registers_request
    modbus_read_write_multiple_registers_request
    modbus_read_write_multiple_registers_response
    modbus_read_fifo_queue_response
2012-11-12 16:40:16 -06:00
..
conn Add an example of a GridFTP data channel detection script. 2012-10-01 12:32:24 -05:00
dns Fix for DNS log problem when a DNS response is seen with 0 RRs. 2012-10-05 13:48:49 -04:00
ftp Enable GridFTP detection by default. Track/log SSL client certs. 2012-10-08 11:38:29 -05:00
http Merge remote-tracking branch 'origin/topic/jsiwek/require-libmagic-libz' 2011-11-15 17:08:24 -08:00
irc Promote libz and libmagic to required dependencies. 2011-11-11 12:39:00 -06:00
modbus Adjust modbus register array parsing. 2012-11-12 16:40:16 -06:00
smtp Promote libz and libmagic to required dependencies. 2011-11-11 12:39:00 -06:00
socks SOCKS and tunnel test updates. 2012-06-20 14:19:49 -04:00
ssl More bugfixs, cleanup, and test for SSL analyzer 2012-05-03 10:52:24 -04:00