Skip to content

Commit 5c5988f

Browse files
Fix process() returning None for TRANSACTION2_SECONDARY and unknown Session Setup
Commit 308e315 fixed the AttributeError crash in TRANSACTION2_SECONDARY but the branch still never set a response, so process() returned None. Send an interim success response (matching TRANSACTION_SECONDARY). Also fix the Session Setup unknown-type branch which had the same issue (logged a warning but returned no response). Return STATUS_NOT_SUPPORTED.
1 parent c952b31 commit 5c5988f

File tree

1 file changed

+8
-0
lines changed
  • modules/python/dionaea/smb

1 file changed

+8
-0
lines changed

modules/python/dionaea/smb/smb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,12 @@ def process(self, p):
755755
)
756756
else:
757757
smblog.warning("Unknown Session Setup Type used")
758+
r = SMB_Sessionsetup_AndX_Response2(
759+
NativeOS=self.config.native_os + "\0",
760+
NativeLanManager=self.config.native_lan_manager + "\0",
761+
PrimaryDomain=self.config.primary_domain + "\0",
762+
)
763+
rstatus = 0xC00000BB # STATUS_NOT_SUPPORTED
758764

759765
elif Command == SMB_COM_TREE_CONNECT_ANDX:
760766
r = SMB_Treeconnect_AndX_Response()
@@ -1397,6 +1403,8 @@ def process(self, p):
13971403
h.TotalDataCount if hasattr(h, "TotalDataCount") else 0,
13981404
)
13991405
# TODO: accumulate like TRANSACTION_SECONDARY
1406+
r = SMB_Trans_Response_Simple()
1407+
rstatus = 0x00000000 # STATUS_SUCCESS
14001408
elif Command == SMB_COM_NT_TRANSACT:
14011409
h = p.getlayer(SMB_NT_Trans_Request)
14021410
smblog.info(

0 commit comments

Comments
 (0)