mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add modbus transaction and unit ids to logs
Add transaction IDs and unit IDs to default modbus over TCP/IP logs. Update the relevant testing baselines to account for the extra fields.
This commit is contained in:
parent
7c24b53b4f
commit
bab2036aa4
4 changed files with 40001 additions and 19996 deletions
|
@ -16,6 +16,10 @@ export {
|
||||||
uid: string &log;
|
uid: string &log;
|
||||||
## Identifier for the connection.
|
## Identifier for the connection.
|
||||||
id: conn_id &log;
|
id: conn_id &log;
|
||||||
|
## Modbus transaction ID
|
||||||
|
tid: count &log &optional;
|
||||||
|
## The terminal unit identifier for the message
|
||||||
|
unit: count &log &optional;
|
||||||
## The name of the function message that was sent.
|
## The name of the function message that was sent.
|
||||||
func: string &log &optional;
|
func: string &log &optional;
|
||||||
## The exception if the response was a failure.
|
## The exception if the response was a failure.
|
||||||
|
@ -48,6 +52,8 @@ event modbus_message(c: connection, headers: ModbusHeaders, is_orig: bool) &prio
|
||||||
}
|
}
|
||||||
|
|
||||||
c$modbus$ts = network_time();
|
c$modbus$ts = network_time();
|
||||||
|
c$modbus$tid = headers$tid;
|
||||||
|
c$modbus$unit = headers$uid;
|
||||||
c$modbus$func = function_codes[headers$function_code];
|
c$modbus$func = function_codes[headers$function_code];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,21 @@
|
||||||
#unset_field -
|
#unset_field -
|
||||||
#path modbus
|
#path modbus
|
||||||
#open XXXX-XX-XX-XX-XX-XX
|
#open XXXX-XX-XX-XX-XX-XX
|
||||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p func exception
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p tid unit func exception
|
||||||
#types time string addr port addr port string string
|
#types time string addr port addr port count count string string
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-156 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-156 -
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-160 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-29 -
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-162 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-160 -
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-175 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-33 -
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-179 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 0 WRITE_SINGLE_REGISTER -
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 unknown-165 -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-162 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 21504 1 unknown-35 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-36 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-37 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 0 unknown-38 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-175 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-179 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 12032 0 unknown-0 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 0 unknown-0 -
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.66.235 2582 166.161.16.230 502 0 1 unknown-165 -
|
||||||
#close XXXX-XX-XX-XX-XX-XX
|
#close XXXX-XX-XX-XX-XX-XX
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,9 +5,11 @@
|
||||||
#unset_field -
|
#unset_field -
|
||||||
#path modbus
|
#path modbus
|
||||||
#open XXXX-XX-XX-XX-XX-XX
|
#open XXXX-XX-XX-XX-XX-XX
|
||||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p func exception
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p tid unit func exception
|
||||||
#types time string addr port addr port string string
|
#types time string addr port addr port count count string string
|
||||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 10.1.1.234 51411 10.10.5.104 502 READ_INPUT_REGISTERS -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 10.1.1.234 51411 10.10.5.104 502 1119 255 READ_INPUT_REGISTERS -
|
||||||
XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h 10.1.1.234 51411 10.10.5.104 502 READ_INPUT_REGISTERS -
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 10.1.1.234 51411 10.10.5.104 502 2606 255 READ_INPUT_REGISTERS -
|
||||||
XXXXXXXXXX.XXXXXX CtPZjS20MLrsMUOJi2 10.1.1.234 51411 10.10.5.104 502 READ_INPUT_REGISTERS -
|
XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h 10.1.1.234 51411 10.10.5.104 502 6714 255 READ_INPUT_REGISTERS -
|
||||||
|
XXXXXXXXXX.XXXXXX C4J4Th3PJpwUYZZ6gc 10.1.1.234 51411 10.10.5.104 502 12993 255 READ_INPUT_REGISTERS -
|
||||||
|
XXXXXXXXXX.XXXXXX CtPZjS20MLrsMUOJi2 10.1.1.234 51411 10.10.5.104 502 17667 255 READ_INPUT_REGISTERS -
|
||||||
#close XXXX-XX-XX-XX-XX-XX
|
#close XXXX-XX-XX-XX-XX-XX
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue