From 06863aeca181b4dbb593ddb3b530e6aaf7d7ef70 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Fri, 3 Jan 2025 22:01:11 +1000 Subject: [PATCH] Add SMB2 attribute tag and fix SMB2 query results (#1835) 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 efd1ec740..556e3e6f0 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','