| Source | Link |
|---|---|
| nbd | www.nbd.sourceforge.io/ |
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
include('deprecated_nasl_level.inc');
include("compat.inc");
if (description) {
script_id(20340);
script_version("1.12");
script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");
script_name(english:"Network Block Device Server Detection");
script_set_attribute(attribute:"synopsis", value:
"The remote host is running a remote storage service.");
script_set_attribute(attribute:"description", value:
"The remote host is running a Network Block Device (NBD) server, which
allows one Linux host to use another as one of its block devices.");
script_set_attribute(attribute:"see_also", value:"https://nbd.sourceforge.io/");
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/12/24");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"asset_inventory", value:"True");
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-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("find_service1.nasl");
script_require_ports("Services/unknown", 2000);
exit(0);
}
include("global_settings.inc");
include("misc_func.inc");
# nb: 2000 is used in the examples in the man pages but
# there's no default port.
if (thorough_tests && ! get_kb_item("global_settings/disable_service_discovery") ) {
port = get_unknown_svc(2000);
if ( ! port ) exit(0);
}
else port = 2000;
if (!get_tcp_port_state(port)) exit(0);
# Establish a connection and examine the banner.
soc = open_sock_tcp(port);
if (soc) {
res = recv(socket:soc, length:256);
if (res == NULL) exit(0);
# It's an NBD server if ...
#
# nb: clieserv.h from the source describes the initial packets from the server.
if (
# it is the right size and...
strlen(res) == 152 &&
# it starts with INIT_PASSWD and...
stridx(res, "NBDMAGIC") == 0 &&
# it's followed by cliserv_magic
stridx(res, raw_string(0x00, 0x00, 0x42, 0x02, 0x81, 0x86, 0x12, 0x53)) == 8
) {
# Register and report the service.
register_service(port:port, ipproto:"tcp", proto:"nbd");
security_note(port);
}
close(soc);
}
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