Lucene search
K

HSQLDB Server Detection

🗓️ 20 Oct 2005 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 11 Views

The remote host is running HSQLDB, a Java-based open-source database server, and its database engine is listening on TCP port 9001 for network server database connections using JDBC. The script checks for the presence of the HSQLDB server

Refs
Code
SourceLink
hsqldbwww.hsqldb.org/
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description) {
  script_id(20065);
  script_version("1.16");
  script_set_attribute(attribute:"plugin_modification_date", value:"2025/09/24");

  script_name(english:"HSQLDB Server Detection");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is running a database server.");
  script_set_attribute(attribute:"description", value:
"The remote host is running HSQLDB, an open source database written in
Java, and its database engine is listening on TCP port 9001 for
network server database connections using JDBC.");
  script_set_attribute(attribute:"see_also", value:"http://hsqldb.org/");
  script_set_attribute(attribute:"solution", value:
"n/a");
  script_set_attribute(attribute:"risk_factor", value:"None");

  script_set_attribute(attribute:"plugin_publication_date", value:"2005/10/20");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"asset_inventory", value:"True");
  script_set_attribute(attribute:"asset_inventory_category", value:"software_enumeration");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/a:hsql_development_group:hsqldb");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/a:hsqldb:hsqldb");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/a:hypersql_database:hypersql_database");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Service detection");

  script_copyright(english:"This script is Copyright (C) 2005-2025 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_require_ports("Services/unknown", 9001);

  exit(0);
}


include("global_settings.inc");
include("install_func.inc");
include("misc_func.inc");


if (thorough_tests && ! get_kb_item("global_settings/disable_service_discovery")  ) {
  port = get_unknown_svc(9001);
  if (!port) exit(0);
}
else port = 9001;
if (!get_tcp_port_state(port)) exit(0);


# Try to login.
soc = open_sock_tcp(port);
if (!soc) exit(0);

user = toupper("sa");                   # default username
pass = toupper("");                     # default password
db = "";
req = raw_string(
                                        # packet size, to be added later
  0x00, 0x01, 0x00, 0x07,               # ???, perhaps a version number
  0x00, 0x00, 0x00, 0x00,               # ???
  0x00, 0x00, 0x00, 0x00,               # ???
  0x00, 0x00, 0x00, strlen(user), user, # user
  0x00, 0x00, 0x00, strlen(pass), pass, # pass
  0x00, 0x00, 0x00, strlen(db), db,     # database name
  0x00, 0x00, 0x00, 0x00                # ???
);
req = raw_string(
  0x00, 0x00, 0x00, (strlen(req)+4),    # packet size, as promised
  req
);
send(socket:soc, data:req);


# Read the response.
res = recv(socket:soc, length:64);
if (res == NULL) exit(0);


# If it looks like an HSQLDB server because...
if (
  # we got in or ...
  (
    strlen(res) == 20 && 
    raw_string(
      0x00, 0x00, 0x00, 0x14, 
      0x00, 0x00, 0x00, 0x01, 
      0x00, 0x00, 0x00, 0x00
    ) >< res
  ) ||
  # the user name is invalid or ...
  string("User not found: ", user) >< res ||
  # the password is invalid or ...
  "Access is denied" >< res ||
  # the DB is invalid
  string("Database does not exists in statement [", db, "]") >< res
)
{
  # Register and report the service.
  register_service(port:port, ipproto:"tcp", proto:"hsqldb");

  app = "HyperSQL Database (HSQLDB)";
  version = UNKNOWN_VER;
  service = "hsqldb";
  cpe = "x-cpe:/a:hsql_development_group:hsqldb";

  register_install(
    vendor   : "HSQL Development Group",
    product  : "HSQLDB",
    app_name : app,
    version  : version,
    port     : port,
    service  : service,
    cpe      : cpe
  );

  report_installs(app_name:app, port:port);
}

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

24 Sep 2025 00:00Current
5.5Medium risk
Vulners AI Score5.5
11