add realm handling to psexec

oops, forgot to create the realm when applicable
This commit is contained in:
David Maloney 2014-06-02 14:53:40 -05:00
parent 361b9a1616
commit 07093ada58
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 7 additions and 0 deletions

View File

@ -123,6 +123,13 @@ class Metasploit3 < Msf::Exploit::Remote
username: datastore['SMBUser'].downcase
}
if datastore['SMBDomain'] and datastore['SMBDomain'] != 'WORKGROUP'
credential_data.merge!({
realm_key: Metasploit::Credential::Realm::Key::ACTIVE_DIRECTORY_DOMAIN,
realm_value: datastore['SMBDomain']
})
end
if datastore['SMBPass'] =~ /[0-9a-fA-F]{32}:[0-9a-fA-F]{32}/
credential_data.merge!({:private_type => :ntlm_hash})
else