Description
Consolidation of Western Digital My Cloud product (Called
{"id": "OPENVAS:1361412562310108488", "vendorId": null, "type": "openvas", "bulletinFamily": "scanner", "title": "Western Digital My Cloud / WD Cloud Products Detection Consolidation", "description": "Consolidation of Western Digital My Cloud product (Called\n ", "published": "2018-11-28T00:00:00", "modified": "2022-03-28T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "cvss2": {}, "cvss3": {}, "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310108488", "reporter": "Copyright (C) 2018 Greenbone Networks GmbH", "references": ["https://support.wdc.com/cat_products.aspx?ID=1"], "cvelist": [], "immutableFields": [], "lastseen": "2022-03-30T11:40:27", "viewCount": 8, "enchantments": {"dependencies": {}, "score": {"value": -0.7, "vector": "NONE"}, "backreferences": {}, "exploitation": null, "vulnersScore": -0.7}, "_state": {"dependencies": 1659862649, "score": 1659805755, "epss": 1678874978}, "_internal": {"score_hash": "9a287a419bb6fcae34e8aad5570f9c82"}, "pluginID": "1361412562310108488", "sourceData": "# Copyright (C) 2018 Greenbone Networks GmbH\n# Some text descriptions might be excerpted from (a) referenced\n# source(s), and are Copyright (C) by the respective right holder(s).\n#\n# SPDX-License-Identifier: GPL-2.0-or-later\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\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\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.108488\");\n script_version(\"2022-03-28T10:48:38+0000\");\n script_tag(name:\"last_modification\", value:\"2022-03-28 10:48:38 +0000 (Mon, 28 Mar 2022)\");\n script_tag(name:\"creation_date\", value:\"2018-11-28 14:02:54 +0100 (Wed, 28 Nov 2018)\");\n script_tag(name:\"cvss_base\", value:\"0.0\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:N/I:N/A:N\");\n script_name(\"Western Digital My Cloud / WD Cloud Products Detection Consolidation\");\n script_category(ACT_GATHER_INFO);\n script_family(\"Product detection\");\n script_copyright(\"Copyright (C) 2018 Greenbone Networks GmbH\");\n script_dependencies(\"gb_wd_mycloud_snmp_detect.nasl\", \"gb_wd_mycloud_ssh_login_detect.nasl\", \"gb_wd_mycloud_http_detect.nasl\");\n script_mandatory_keys(\"wd-mycloud/detected\");\n\n script_xref(name:\"URL\", value:\"https://support.wdc.com/cat_products.aspx?ID=1\");\n\n script_tag(name:\"summary\", value:\"Consolidation of Western Digital My Cloud product (Called\n 'WD Cloud' in Japan) detections.\");\n\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n\n exit(0);\n}\n\ninclude(\"host_details.inc\");\ninclude(\"os_func.inc\");\n\nif( ! get_kb_item( \"wd-mycloud/detected\" ) )\n exit( 0 );\n\ndetected_version = \"unknown\";\ndetected_model = \"unknown\";\n\n# ssh-login: most detailed one\n# snmp: offers detailed version and sometimes the model via the default hostname\n# http: offers detailed model name but only the major version like 2.30\nforeach source( make_list( \"ssh-login\", \"snmp\", \"http\" ) ) {\n\n version_list = get_kb_list( \"wd-mycloud/\" + source + \"/*/version\" );\n foreach version( version_list ) {\n if( version != \"unknown\" && detected_version == \"unknown\" ) {\n detected_version = version;\n set_kb_item( name:\"wd-mycloud/version\", value:version );\n break;\n }\n }\n\n model_list = get_kb_list( \"wd-mycloud/\" + source + \"/*/model\" );\n foreach model( model_list ) {\n if( model != \"unknown\" && detected_model == \"unknown\" ) {\n detected_model = model;\n set_kb_item( name:\"wd-mycloud/model\", value:model );\n break;\n }\n }\n}\n\n# nb: NVD is currently using various different CPEs like e.g.:\n#\n# cpe:/a:western_digital:mycloud_nas\n# cpe:/o:wdc:my_cloud_firmware\n# cpe:/h:wdc:my_cloud\n# cpe:/o:wdc:my_cloud_pr4100_firmware\n# cpe:/h:wdc:my_cloud_pr4100\n#\n# We're trying to stick with the most sane one to have the firmware registered as an OS\n# including the model name as well as to register the Hardware and the model as well.\n\nif( detected_model != \"unknown\" ) {\n\n # nb: Some special handling from gb_wd_mycloud_http_detect.nasl to differ between the various\n # different models like MyCloud, MyCloud Mirror and WD Cloud (the variant for the Japanese market).\n if( model == \"base\" ) {\n os_app = \"Western Digital My Cloud Firmware\";\n os_cpe = \"cpe:/o:wdc:my_cloud_firmware\";\n hw_app = \"Western Digital My Cloud Device\";\n hw_cpe = \"cpe:/h:wdc:my_cloud\";\n } else if( model == \"WD Cloud\" ) {\n os_app = \"Western Digital WD Cloud Firmware\";\n os_cpe = \"cpe:/o:wdc:wd_cloud_firmware\";\n hw_app = \"Western Digital WD Cloud Device\";\n hw_cpe = \"cpe:/h:wdc:wd_cloud\";\n } else {\n os_app = \"Western Digital My Cloud \" + detected_model + \" Firmware\";\n os_cpe = \"cpe:/o:wdc:my_cloud_\" + tolower( detected_model ) + \"_firmware\";\n hw_app = \"Western Digital My Cloud \" + detected_model + \" Device\";\n hw_cpe = \"cpe:/h:wdc:my_cloud_\" + tolower( detected_model );\n }\n} else {\n os_app = \"Western Digital My Cloud / WD Cloud Unknown Model Firmware\";\n os_cpe = \"cpe:/o:wdc:my_cloud_unknown_model_firmware\";\n hw_app = \"Western Digital My Cloud / WD Cloud Unknown Model Device\";\n hw_cpe = \"cpe:/h:wdc:my_cloud_unknown_model\";\n}\n\nif( detected_version != \"unknown\" )\n os_cpe += \":\" + detected_version;\n\nos_register_and_report( os:os_app, cpe:os_cpe, desc:\"Western Digital My Cloud / WD Cloud Products Detection Consolidation\", runs_key:\"unixoide\" );\nset_kb_item( name:\"wd/product/detected\", value:TRUE );\nlocation = \"/\";\n\nif( ssh_login_ports = get_kb_list( \"wd-mycloud/ssh-login/port\" ) ) {\n foreach port( ssh_login_ports ) {\n\n detection_methods += '\\nSSH login on port ' + port + '/tcp\\n';\n\n concluded = get_kb_item( \"wd-mycloud/ssh-login/\" + port + \"/concluded\" );\n if( concluded )\n detection_methods += 'Concluded: ' + concluded + '\\n';\n\n register_product( cpe:hw_cpe, location:location, port:port, service:\"ssh-login\" );\n register_product( cpe:os_cpe, location:location, port:port, service:\"ssh-login\" );\n }\n}\n\nif( http_ports = get_kb_list( \"wd-mycloud/http/port\" ) ) {\n foreach port( http_ports ) {\n\n detection_methods += '\\nHTTP(s) on port ' + port + '/tcp\\n';\n\n concluded = get_kb_item( \"wd-mycloud/http/\" + port + \"/concluded\" );\n concludedUrl = get_kb_item( \"wd-mycloud/http/\" + port + \"/concludedUrl\" );\n if( concluded && concludedUrl )\n detection_methods += 'Concluded: ' + concluded + '\\nfrom URL(s): ' + concludedUrl + '\\n';\n else if( concluded )\n detection_methods += 'Concluded: ' + concluded + '\\n';\n\n extra = get_kb_item( \"wd-mycloud/http/\" + port + \"/extra\" );\n extraUrl = get_kb_item( \"wd-mycloud/http/\" + port + \"/extraUrl\" );\n if( extra && extraUrl )\n extra_info += extraUrl + ': ' + extra + '\\n';\n\n register_product( cpe:hw_cpe, location:location, port:port, service:\"www\" );\n register_product( cpe:os_cpe, location:location, port:port, service:\"www\" );\n }\n}\n\nif( snmp_ports = get_kb_list( \"wd-mycloud/snmp/port\" ) ) {\n foreach port( snmp_ports ) {\n\n detection_methods += '\\nSNMP on port ' + port + '/udp\\n';\n\n concludedVers = get_kb_item( \"wd-mycloud/snmp/\" + port + \"/concludedVers\" );\n concludedVersOID = get_kb_item( \"wd-mycloud/snmp/\" + port + \"/concludedVersOID\" );\n if( concludedVers && concludedVersOID )\n detection_methods += 'Concluded from: \"' + concludedVers + '\" via OID: \"' + concludedVersOID + '\"\\n';\n\n concludedMod = get_kb_item( \"wd-mycloud/snmp/\" + port + \"/concludedMod\" );\n concludedModOID = get_kb_item( \"wd-mycloud/snmp/\" + port + \"/concludedModOID\" );\n if( concludedMod && concludedModOID )\n detection_methods += 'Concluded from: \"' + concludedMod + '\" via OID: \"' + concludedModOID + '\"\\n';\n\n register_product( cpe:hw_cpe, location:location, port:port, service:\"snmp\", proto:\"udp\" );\n register_product( cpe:os_cpe, location:location, port:port, service:\"snmp\", proto:\"udp\" );\n }\n}\n\nreport = build_detection_report( app:os_app,\n version:detected_version,\n install:location,\n cpe:os_cpe );\nreport += '\\n\\n';\nreport += build_detection_report( app:hw_app,\n skip_version:TRUE,\n install:location,\n cpe:hw_cpe );\n\nif( detection_methods )\n report += '\\n\\nDetection methods:\\n' + detection_methods;\n\nreport = chomp( report );\n\nif( extra_info )\n report += '\\n\\nExtra info collected (URL:Info):\\n' + extra_info;\n\nlog_message( port:0, data:chomp( report ) );\n\nexit( 0 );\n", "naslFamily": "Product detection"}
{}