File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,14 @@ def getMachineKerberosSalt(self):
7676 we have the correct information
7777 """
7878 if self .__smbConnection .getServerName () == '' :
79- # Todo: figure out an RPC call that gives us the domain FQDN
80- # instead of the NETBIOS name as NetrWkstaGetInfo does
81- return b''
79+ host , _ = self .getMachineNameAndDomain ()
80+ domain = self .__smbConnection .getRemoteName ().split (f"{ host } ." )[1 ]
8281 else :
8382 host = self .__smbConnection .getServerName ()
8483 domain = self .__smbConnection .getServerDNSDomainName ()
85- salt = b'%shost%s.%s' % (domain .upper ().encode ('utf-8' ), host .lower ().encode ('utf-8' ), domain .lower ().encode ('utf-8' ))
86- return salt
84+ LOG .debug (f"[Secretsdump][getMachineKerberosSalt] Host: { host } / Domain FQDN: { domain } " )
85+ salt = b'%shost%s.%s' % (domain .upper ().encode ('utf-8' ), host .lower ().encode ('utf-8' ), domain .lower ().encode ('utf-8' ))
86+ return salt
8787
8888 def getMachineNameAndDomain (self ):
8989 if self .__smbConnection .getServerName () == '' :
Original file line number Diff line number Diff line change @@ -761,14 +761,14 @@ def getMachineKerberosSalt(self):
761761 we have the correct information
762762 """
763763 if self .__smbConnection .getServerName () == '' :
764- # Todo: figure out an RPC call that gives us the domain FQDN
765- # instead of the NETBIOS name as NetrWkstaGetInfo does
766- return b''
764+ host , _ = self .getMachineNameAndDomain ()
765+ domain = self .__smbConnection .getRemoteName ().split (f"{ host } ." )[1 ]
767766 else :
768767 host = self .__smbConnection .getServerName ()
769768 domain = self .__smbConnection .getServerDNSDomainName ()
770- salt = b'%shost%s.%s' % (domain .upper ().encode ('utf-8' ), host .lower ().encode ('utf-8' ), domain .lower ().encode ('utf-8' ))
771- return salt
769+ LOG .debug (f"[Secretsdump][getMachineKerberosSalt] Host: { host } / Domain FQDN: { domain } " )
770+ salt = b'%shost%s.%s' % (domain .upper ().encode ('utf-8' ), host .lower ().encode ('utf-8' ), domain .lower ().encode ('utf-8' ))
771+ return salt
772772
773773 def getMachineNameAndDomain (self ):
774774 if self .__smbConnection .getServerName () == '' :
You can’t perform that action at this time.
0 commit comments