Lucene search
+L

VMware vCenter Server Detection (HTTP)

🗓️ 06 Feb 2013 00:00:00Reported by Copyright (C) 2013 Greenbone AGType 
openvas
 openvas
🔗 plugins.openvas.org👁 20 Views

VMware vCenter Server Detection through HTT

Code
# SPDX-FileCopyrightText: 2013 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.103659");
  script_version("2025-03-19T05:38:35+0000");
  script_tag(name:"last_modification", value:"2025-03-19 05:38:35 +0000 (Wed, 19 Mar 2025)");
  script_tag(name:"creation_date", value:"2013-02-06 17:30:38 +0100 (Wed, 06 Feb 2013)");
  script_tag(name:"cvss_base", value:"0.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
  script_name("VMware vCenter Server Detection (HTTP)");
  script_category(ACT_GATHER_INFO);
  script_family("Product detection");
  script_copyright("Copyright (C) 2013 Greenbone AG");
  script_dependencies("find_service.nasl", "httpver.nasl", "global_settings.nasl");
  script_require_ports("Services/www", 443);
  script_exclude_keys("Settings/disable_cgi_scanning");

  script_tag(name:"summary", value:"HTTP based detection of VMware vCenter Server.");

  script_tag(name:"qod_type", value:"remote_banner");

  exit(0);
}

include("host_details.inc");
include("http_func.inc");
include("port_service_func.inc");

port = http_get_port(default:443);
host = http_host_name(port:port);

soc = open_sock_tcp(port);
if(!soc)
  exit(0);

req  = string("GET / HTTP/1.1\r\n");
req += string("Host: ", host, "\r\n\r\n");

send(socket:soc, data:req);
buf = recv(socket:soc, length:8192);
close(soc); # needed for the strange behaviour of esx 3.x

if(!buf || "VMware" >!< buf)
  exit(0);

soc = open_sock_tcp(port);
if(!soc)
  exit(0);

version = "unknown";
build = "unknown";

url = "/sdk";
req  = string("POST ", url, " HTTP/1.1\r\n");
req += string("Host: ", host, "\r\n");
req += string("Content-Type: application/x-www-form-urlencoded\r\n");
req += string("Content-Length: 348\r\n\r\n");
req += string('
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
\t\t\t<env:Body>
\t\t\t<RetrieveServiceContent xmlns="urn:vim25">
\t\t\t\t<_this type="ServiceInstance">ServiceInstance</_this>
\t\t\t</RetrieveServiceContent>
\t\t\t</env:Body>
</env:Envelope>');
req += string("\r\n");

send(socket:soc, data:req);
buf = recv(socket:soc, length:8192);
close(soc);

if(!buf || "RetrieveServiceContentResponse" >!< buf ||
   "<fullName>VMware vCenter Server" >!< buf)
  exit(0);

set_kb_item(name:"vmware/vcenter/server/http/" + port + "/concludedUrl",
            value:http_report_vuln_url(port:port, url:url, url_only:TRUE));

# <version>6.5.0</version>
vers = eregmatch(pattern:"<version>([0-9.]+)</version>", string:buf);
if(!isnull(vers[1]))
  version = vers[1];

# <build>7070488</build>
bld = eregmatch(pattern:"<build>([0-9]+)</build>", string:buf);
if(!isnull(bld[1]))
  build = bld[1];

r = eregmatch(pattern:"<returnval>(.*)</returnval>", string:buf);
if(!isnull(r[1]))
  set_kb_item(name:"vmware/vcenter/server/http/" + port + "/concluded", value:r[1]);

set_kb_item(name:"vmware/vcenter/server/detected", value:TRUE);
set_kb_item(name:"vmware/vcenter/server/http/detected", value:TRUE);
set_kb_item(name:"vmware/vcenter/server/http/port", value:port);
set_kb_item(name:"vmware/vcenter/server/http/" + port + "/version", value:version);
set_kb_item(name:"vmware/vcenter/server/http/" + port + "/build", value:build);

# nb: script_mandatory_keys for e.g. gb_apache_struts_CVE_2017_5638.nasl
set_kb_item(name:"www/action_jsp_do", value:TRUE);

exit(0);

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation