mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Fixes to SMB file handling and logging.
There were some cases where the log would be missing a field or data wouldn't get sent to file analysis. At least some of this is fixed now and I get confused a bit less when I look at the logs now. Also, I made the default handling "FILE" so that things like FILE_UNKNOWN wouldn't show up in the logs so regularly. It's technically correct that way, but it doesn't look good and it's correct as FILE often enough that it make sense to make it the default I think.
This commit is contained in:
parent
5721db4be7
commit
e2dfaf8a5b
8 changed files with 82 additions and 76 deletions
|
@ -16,7 +16,8 @@ export {
|
|||
FILE_WRITE,
|
||||
FILE_OPEN,
|
||||
FILE_CLOSE,
|
||||
FILE_UNKNOWN,
|
||||
FILE_DELETE,
|
||||
FILE_RENAME,
|
||||
|
||||
PIPE_READ,
|
||||
PIPE_WRITE,
|
||||
|
@ -91,7 +92,8 @@ export {
|
|||
service : string &log &optional;
|
||||
## File system of the tree.
|
||||
native_file_system : string &log &optional;
|
||||
## If this is SMB2, a share type will be included.
|
||||
## If this is SMB2, a share type will be included. For SMB1,
|
||||
## the type of share will be deduced and included as well.
|
||||
share_type : string &log &default="UNKNOWN";
|
||||
};
|
||||
|
||||
|
@ -137,7 +139,7 @@ export {
|
|||
tree_service : string &log &optional;
|
||||
|
||||
## If the command referenced a file, store it here.
|
||||
referenced_file : FileInfo &optional;
|
||||
referenced_file : FileInfo &log &optional;
|
||||
## If the command referenced a tree, store it here.
|
||||
referenced_tree : TreeInfo &optional;
|
||||
};
|
||||
|
@ -226,7 +228,8 @@ function set_current_file(smb_state: State, file_id: count)
|
|||
smb_state$fid_map[file_id]$fid = file_id;
|
||||
}
|
||||
|
||||
smb_state$current_file = smb_state$fid_map[file_id];
|
||||
smb_state$current_cmd$referenced_file = smb_state$fid_map[file_id];
|
||||
smb_state$current_file = smb_state$current_cmd$referenced_file;
|
||||
}
|
||||
|
||||
function write_file_log(state: State)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue