Skip to content

Commit a0aa613

Browse files
committed
Update ca_arcserve_rpc_authbypass to use the new cred API
1 parent 4ee0a14 commit a0aa613

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,33 @@ def initialize(info = {})
5858
], self.class )
5959
end
6060

61+
def report_cred(opts)
62+
service_data = {
63+
address: opts[:ip],
64+
port: opts[:port],
65+
service_name: opts[:service_name],
66+
protocol: 'tcp',
67+
workspace_id: myworkspace_id
68+
}
69+
70+
credential_data = {
71+
module_fullname: fullname,
72+
post_reference_name: self.refname,
73+
session_id: session_db_id,
74+
origin_type: :session,
75+
private_data: opts[:password],
76+
private_type: :password,
77+
username: opts[:user]
78+
}.merge(service_data)
79+
80+
login_data = {
81+
core: create_credential(credential_data),
82+
status: Metasploit::Model::Login::Status::UNTRIED,
83+
}.merge(service_data)
84+
85+
create_credential_login(login_data)
86+
end
87+
6188
def exploit
6289
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
6390

@@ -105,16 +132,13 @@ def exploit
105132
end
106133

107134
# report the auth
108-
auth = {
109-
:host => datastore['RHOST'],
110-
:port => 445,
111-
:sname => 'smb',
112-
:proto => 'tcp',
113-
:user => user,
114-
:pass => pass,
115-
:active => true
116-
}
117-
report_auth_info(auth)
135+
report_cred(
136+
ip: datastore['RHOST'],
137+
port: 445,
138+
service_name: 'smb',
139+
user: user,
140+
password: pass
141+
)
118142

119143
srvc = {
120144
:host => datastore['RHOST'],

0 commit comments

Comments
 (0)