Cosmetic changes
parent
a06d49a8be
commit
6e6e90d733
|
@ -31,10 +31,11 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
and connected to a database this module will record successful
|
and connected to a database this module will record successful
|
||||||
logins and hosts so you can track your access.
|
logins and hosts so you can track your access.
|
||||||
},
|
},
|
||||||
'Author' => [
|
'Author' =>
|
||||||
'tebo <tebo [at] attackresearch [dot] com>', # Original
|
[
|
||||||
'Ben Campbell <eat_meatballs [at] hotmail.co.uk>' # Refactoring
|
'tebo <tebo [at] attackresearch [dot] com>', # Original
|
||||||
],
|
'Ben Campbell <eat_meatballs [at] hotmail.co.uk>' # Refactoring
|
||||||
|
],
|
||||||
'References' =>
|
'References' =>
|
||||||
[
|
[
|
||||||
[ 'CVE', '1999-0506'], # Weak password
|
[ 'CVE', '1999-0506'], # Weak password
|
||||||
|
@ -45,15 +46,18 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
deregister_options('RHOST','USERNAME','PASSWORD')
|
deregister_options('RHOST','USERNAME','PASSWORD')
|
||||||
|
|
||||||
@accepts_guest_logins = {}
|
@accepts_guest_logins = {}
|
||||||
@correct_credentials_status_codes = ["STATUS_INVALID_LOGON_HOURS",
|
|
||||||
"STATUS_INVALID_WORKSTATION",
|
@correct_credentials_status_codes = [
|
||||||
"STATUS_ACCOUNT_RESTRICTION",
|
"STATUS_INVALID_LOGON_HOURS",
|
||||||
"STATUS_ACCOUNT_EXPIRED",
|
"STATUS_INVALID_WORKSTATION",
|
||||||
"STATUS_ACCOUNT_DISABLED",
|
"STATUS_ACCOUNT_RESTRICTION",
|
||||||
"STATUS_ACCOUNT_RESTRICTION",
|
"STATUS_ACCOUNT_EXPIRED",
|
||||||
"STATUS_PASSWORD_EXPIRED",
|
"STATUS_ACCOUNT_DISABLED",
|
||||||
"STATUS_PASSWORD_MUST_CHANGE",
|
"STATUS_ACCOUNT_RESTRICTION",
|
||||||
"STATUS_LOGON_TYPE_NOT_GRANTED"]
|
"STATUS_PASSWORD_EXPIRED",
|
||||||
|
"STATUS_PASSWORD_MUST_CHANGE",
|
||||||
|
"STATUS_LOGON_TYPE_NOT_GRANTED"
|
||||||
|
]
|
||||||
|
|
||||||
# These are normally advanced options, but for this module they have a
|
# These are normally advanced options, but for this module they have a
|
||||||
# more active role, so make them regular options.
|
# more active role, so make them regular options.
|
||||||
|
@ -63,7 +67,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
OptString.new('SMBUser', [ false, "SMB Username" ]),
|
OptString.new('SMBUser', [ false, "SMB Username" ]),
|
||||||
OptString.new('SMBDomain', [ false, "SMB Domain", '']),
|
OptString.new('SMBDomain', [ false, "SMB Domain", '']),
|
||||||
OptBool.new('PRESERVE_DOMAINS', [ false, "Respect a username that contains a domain name.", true]),
|
OptBool.new('PRESERVE_DOMAINS', [ false, "Respect a username that contains a domain name.", true]),
|
||||||
OptBool.new('RECORD_GUEST', [ false, "Record guest-privileged random logins to the database", false]),
|
OptBool.new('RECORD_GUEST', [ false, "Record guest-privileged random logins to the database", false])
|
||||||
], self.class)
|
], self.class)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -98,19 +102,22 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
connect()
|
connect()
|
||||||
status_code = ""
|
status_code = ""
|
||||||
begin
|
begin
|
||||||
simple.login( datastore['SMBName'],
|
simple.login(
|
||||||
user,
|
datastore['SMBName'],
|
||||||
pass,
|
user,
|
||||||
domain,
|
pass,
|
||||||
datastore['SMB::VerifySignature'],
|
domain,
|
||||||
datastore['NTLM::UseNTLMv2'],
|
datastore['SMB::VerifySignature'],
|
||||||
datastore['NTLM::UseNTLM2_session'],
|
datastore['NTLM::UseNTLMv2'],
|
||||||
datastore['NTLM::SendLM'],
|
datastore['NTLM::UseNTLM2_session'],
|
||||||
datastore['NTLM::UseLMKey'],
|
datastore['NTLM::SendLM'],
|
||||||
datastore['NTLM::SendNTLM'],
|
datastore['NTLM::UseLMKey'],
|
||||||
datastore['SMB::Native_OS'],
|
datastore['NTLM::SendNTLM'],
|
||||||
datastore['SMB::Native_LM'],
|
datastore['SMB::Native_OS'],
|
||||||
{:use_spn => datastore['NTLM::SendSPN'], :name => self.rhost})
|
datastore['SMB::Native_LM'],
|
||||||
|
{:use_spn => datastore['NTLM::SendSPN'], :name => self.rhost}
|
||||||
|
)
|
||||||
|
|
||||||
# Windows SMB will return an error code during Session Setup, but nix Samba requires a Tree Connect:
|
# Windows SMB will return an error code during Session Setup, but nix Samba requires a Tree Connect:
|
||||||
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")
|
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")
|
||||||
status_code = 'STATUS_SUCCESS'
|
status_code = 'STATUS_SUCCESS'
|
||||||
|
@ -212,7 +219,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
print_status(output_message % "GUEST LOGIN")
|
print_status(output_message % "GUEST LOGIN")
|
||||||
report_creds(domain,user,pass,true)
|
report_creds(domain,user,pass,true)
|
||||||
elsif datastore['VERBOSE']
|
elsif datastore['VERBOSE']
|
||||||
print_status(output_message % "GUEST LOGIN")
|
print_status(output_message % "GUEST LOGIN")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue