rapid7/metasploit-framework — pull request #3360 by R3dy (2014-05-14 14:30:22+00:00)
Title: Update psexec_command.rb

I'm not sure what the reason for the refactoring is but it causes authentication errors with valid credentials.

Here is output using valid credentials
[-] 169.6.233.46:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.44:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.81:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.22:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.18:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.56:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.66:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[-] 169.6.233.50:445 - Unable to authenticate with given credentials: Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)

Here is output from exact same credentials using different module that wasn't "refactored"
[-] 169.6.233.96:445 - Login Failed: The server responded with error: STATUS_LOGON_FAILURE (Command=115 WordCount=0)
[+] 169.6.233.66:445 SUCCESS. User has local admin. .\Rodaircmmm aad3b435b51404eeaad3b435b51404ee:b3f318163db34ef4e3870841637a0a7f - Windows Server 2008 R2 Standard 7601 Service Pack 1
[+] 169.6.233.31:445 SUCCESS. User has local admin. .\Rodaircmmm aad3b435b51404eeaad3b435b51404ee:b3f318163db34ef4e3870841637a0a7f - Windows Server 2003 3790 Service Pack 2
[+] 169.6.233.38:445 SUCCESS. User has local admin. .\Rodaircmmm aad3b435b51404eeaad3b435b51404ee:b3f318163db34ef4e3870841637a0a7f - Windows Server 2003 3790 Service Pack 2
[+] 169.6.233.21:445 SUCCESS. User has local admin. .\Rodaircmmm aad3b435b51404eeaad3b435b51404ee:b3f318163db34ef4e3870841637a0a7f - Windows Server 2003 3790 Service Pack 2
[+] 169.6.233.50:445 SUCCESS. User has local admin. .\Rodaircmmm aad3b435b51404eeaad3b435b51404ee:b3f318163db34ef4e3870841637a0a7f - Windows Server 2003 3790 Service Pack 2

I have made the following adjustments which appear to fix the unnecessary issue on my system.