From 734722114df00b5500db1b6fcec375091face8d0 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Sat, 12 Oct 2024 15:29:53 +1000 Subject: [PATCH] Add SMB2 attribute tag and fix SMB2 query results Adds the FILE_ATTRIBUTE_TAG_INFORMATION structure that can be requested in an SMB2 query info request. Returns the SMB2_FILE_BASIC_INFO result for SMB2 queries and return the SMB2 not the SMB1 structure for SMB2_FILE_STANDARD_INFO. --- impacket/smb3structs.py | 6 ++++++ impacket/smbserver.py | 39 +++++++++++++++++++++++++++------------ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/impacket/smb3structs.py b/impacket/smb3structs.py index efd1ec7402..556e3e6f06 100644 --- a/impacket/smb3structs.py +++ b/impacket/smb3structs.py @@ -1496,6 +1496,12 @@ class FILE_ALL_INFORMATION(Structure): ('NameInformation',':',FILE_NAME_INFORMATION), ) +class FILE_ATTRIBUTE_TAG_INFORMATION(Structure): + structure = ( + ('FileAttributes','