Lucene search
+L

Synology DiskStation Manager (DSM) Detection (UPnP)

🗓️ 14 Nov 2022 00:00:00Reported by Copyright (C) 2022 Greenbone AGType 
openvas
 openvas
🔗 plugins.openvas.org👁 19 Views

Synology DiskStation Manager (DSM) Detection (UPnP) - UPnP based detection of Synology NAS devices, DiskStation Manager (DSM) OS and application

Code
# SPDX-FileCopyrightText: 2022 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.170226");
  script_version("2026-04-30T06:27:06+0000");
  script_tag(name:"last_modification", value:"2026-04-30 06:27:06 +0000 (Thu, 30 Apr 2026)");
  script_tag(name:"creation_date", value:"2022-11-14 22:03:50 +0000 (Mon, 14 Nov 2022)");
  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_tag(name:"qod_type", value:"remote_banner");

  script_name("Synology DiskStation Manager (DSM) Detection (UPnP)");

  script_category(ACT_GATHER_INFO);
  script_copyright("Copyright (C) 2022 Greenbone AG");
  script_family("Product detection");
  script_dependencies("gb_upnp_tcp_detect.nasl");
  script_mandatory_keys("upnp/tcp/detected", "upnp/tcp/port");

  script_tag(name:"summary", value:"UPnP based detection of Synology NAS devices,
  DiskStation Manager (DSM) OS and application.");

  exit(0);
}

include("host_details.inc");
include("synology_func.inc");

if ( ! ports = get_kb_list( "upnp/tcp/port" ) )
  exit( 0 );

foreach port( ports ) {

  if( ! vendor = get_kb_item( "upnp/tcp/" + port + "/device/manufacturer" ) )
    exit( 0 );

  if( "Synology" >< vendor ) {

    concluded  = '\n    - Manufacturer: ' + vendor;
    model_nr = get_kb_item( "upnp/tcp/" + port + "/device/modelNumber" );
    if( model_nr ) {
      concluded  += '\n    - Model:        ' + model_nr;
      # DS212j 6.2-25556
      # FS3400 7.2-69057
      info = split( model_nr, sep:" ", keep:FALSE );
      model = info[0];
      if( model ) {
        product = "dsm";
        # nb: UPnP looks the same for NAS and router devices from Synology
        # we need to filter by router models
        if( check_is_synology_router( model:model ) ) {
          product = "srm";
        } else {
          # nb: Version for router (SRM OS) exposed via mDNS is not correct, only extract for DSM
          if( info[1] ) {
            vers = split( info[1], sep:"-", keep:FALSE );
            # nb: UPnP has incomplete version therefore we use build number to map to correct one
            if ( vers[1] ) {
              version = synology_dsm_build_number_to_full_version( buildNumber:vers[1] );
              set_kb_item( name:"synology/dsm/upnp/" + port + "/version", value:version );
            }
          }
        }

        set_kb_item( name:"synology/" + product + "/detected", value:TRUE );
        set_kb_item( name:"synology/" + product + "/upnp/detected", value:TRUE );
        set_kb_item( name:"synology/" + product + "/upnp/port", value:port );
        set_kb_item( name:"synology/" + product + "/upnp/" + port + "/model", value:model );
        set_kb_item( name:"synology/" + product + "/upnp/" + port + "/concluded", value:concluded );
      }
    }
  }
}

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

30 Apr 2026 00:00Current
5.2Medium risk
Vulners AI Score5.2
19