ID OPENVAS:1361412562310112118 Type openvas Reporter Copyright (C) 2017 Greenbone Networks GmbH Modified 2019-06-11T00:00:00
Description
The script reports a detected pfSense including the
version number and exposed services.
###############################################################################
# OpenVAS Vulnerability Test
#
# pfSense Detection (Version)
#
# Authors:
# Adrian Steins <adrian.steins@greenbone.net>
#
# Copyright:
# Copyright (C) 2017 Greenbone Networks GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################
if(description)
{
script_oid("1.3.6.1.4.1.25623.1.0.112118");
script_version("2019-06-11T14:05:30+0000");
script_tag(name:"last_modification", value:"2019-06-11 14:05:30 +0000 (Tue, 11 Jun 2019)");
script_tag(name:"creation_date", value:"2017-11-13 08:56:05 +0100 (Mon, 13 Nov 2017)");
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("pfSense Detection (Version)");
script_category(ACT_GATHER_INFO);
script_family("Product detection");
script_copyright("Copyright (C) 2017 Greenbone Networks GmbH");
script_dependencies("gb_pfsense_detect_http.nasl", "gb_pfsense_detect_ssh.nasl", "gb_pfsense_detect_snmp.nasl");
script_mandatory_keys("pfsense/installed");
script_tag(name:"summary", value:"The script reports a detected pfSense including the
version number and exposed services.");
script_tag(name:"qod_type", value:"remote_banner");
exit(0);
}
include("host_details.inc");
if( ! get_kb_item( "pfsense/installed" ) )
exit( 0 );
detected_version = "unknown";
detected_patch = "unknown";
foreach source( make_list( "ssh", "http", "snmp" ) ) {
version_list = get_kb_list( "pfsense/" + source + "/*/version" );
foreach version( version_list ) {
if( version != "unknown" && detected_version == "unknown" ) {
detected_version = version;
set_kb_item( name:"pfsense/version", value:version );
}
}
patch_list = get_kb_list( "pfsense/" + source + "/*/patch" );
foreach patch( patch_list ) {
if( patch != "unknown" && detected_patch == "unknown" ) {
detected_patch = patch;
set_kb_item( name:"pfsense/patch", value:patch );
}
}
}
if( detected_version != "unknown" ) {
cpe = "cpe:/a:pfsense:pfsense:" + version;
if( detected_patch != "unknown" )
cpe += ":" + detected_patch;
} else {
cpe = "cpe:/a:pfsense:pfsense";
}
location = "/";
extra = '\nDetection methods:\n';
if( http_port = get_kb_list( "pfsense/http/port" ) ) {
foreach port( http_port ) {
extra += '\nHTTP(s) on port ' + port + '/tcp';
register_product( cpe:cpe, location:location, port:port, service:"www" );
}
}
if( ssh_port = get_kb_list( "pfsense/ssh/port" ) ) {
foreach port( ssh_port ) {
extra += '\nSSH login on port ' + port + '/tcp';
concluded = get_kb_item( "pfsense/ssh/" + port + "/concluded" );
if( concluded )
extra += '\nConcluded: ' + concluded + '\n';
register_product( cpe:cpe, location:location, port:port, service:"ssh-login" );
}
}
if( snmp_port = get_kb_list( "pfsense/snmp/port" ) ) {
foreach port( snmp_port ) {
extra += '\nSNMP on port ' + port + '/udp';
concluded = get_kb_item( "pfsense/snmp/" + port + "/concluded" );
if( concluded )
extra += '\nConcluded from SNMP SysDesc: ' + concluded + '\n';
register_product( cpe:cpe, location:location, port:port, service:"snmp", proto:"udp" );
}
}
log_message( data:build_detection_report( app:"pfSense",
version:detected_version,
patch:detected_patch,
install:location,
cpe:cpe,
extra:extra ),
port:0 );
exit( 0 );
{"id": "OPENVAS:1361412562310112118", "type": "openvas", "bulletinFamily": "scanner", "title": "pfSense Detection (Version)", "description": "The script reports a detected pfSense including the\n version number and exposed services.", "published": "2017-11-13T00:00:00", "modified": "2019-06-11T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310112118", "reporter": "Copyright (C) 2017 Greenbone Networks GmbH", "references": [], "cvelist": [], "lastseen": "2019-06-12T20:41:58", "viewCount": 8, "enchantments": {"dependencies": {"references": [], "modified": "2019-06-12T20:41:58", "rev": 2}, "score": {"value": -0.2, "vector": "NONE", "modified": "2019-06-12T20:41:58", "rev": 2}, "vulnersScore": -0.2}, "pluginID": "1361412562310112118", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# pfSense Detection (Version)\n#\n# Authors:\n# Adrian Steins <adrian.steins@greenbone.net>\n#\n# Copyright:\n# Copyright (C) 2017 Greenbone Networks GmbH\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###############################################################################\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.112118\");\n script_version(\"2019-06-11T14:05:30+0000\");\n script_tag(name:\"last_modification\", value:\"2019-06-11 14:05:30 +0000 (Tue, 11 Jun 2019)\");\n script_tag(name:\"creation_date\", value:\"2017-11-13 08:56:05 +0100 (Mon, 13 Nov 2017)\");\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(\"pfSense Detection (Version)\");\n script_category(ACT_GATHER_INFO);\n script_family(\"Product detection\");\n script_copyright(\"Copyright (C) 2017 Greenbone Networks GmbH\");\n script_dependencies(\"gb_pfsense_detect_http.nasl\", \"gb_pfsense_detect_ssh.nasl\", \"gb_pfsense_detect_snmp.nasl\");\n script_mandatory_keys(\"pfsense/installed\");\n\n script_tag(name:\"summary\", value:\"The script reports a detected pfSense including the\n version number and exposed services.\");\n\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n\n exit(0);\n}\n\ninclude(\"host_details.inc\");\n\nif( ! get_kb_item( \"pfsense/installed\" ) )\n exit( 0 );\n\ndetected_version = \"unknown\";\ndetected_patch = \"unknown\";\n\nforeach source( make_list( \"ssh\", \"http\", \"snmp\" ) ) {\n\n version_list = get_kb_list( \"pfsense/\" + source + \"/*/version\" );\n foreach version( version_list ) {\n if( version != \"unknown\" && detected_version == \"unknown\" ) {\n detected_version = version;\n set_kb_item( name:\"pfsense/version\", value:version );\n }\n }\n\n patch_list = get_kb_list( \"pfsense/\" + source + \"/*/patch\" );\n foreach patch( patch_list ) {\n if( patch != \"unknown\" && detected_patch == \"unknown\" ) {\n detected_patch = patch;\n set_kb_item( name:\"pfsense/patch\", value:patch );\n }\n }\n}\n\nif( detected_version != \"unknown\" ) {\n cpe = \"cpe:/a:pfsense:pfsense:\" + version;\n if( detected_patch != \"unknown\" )\n cpe += \":\" + detected_patch;\n} else {\n cpe = \"cpe:/a:pfsense:pfsense\";\n}\n\nlocation = \"/\";\nextra = '\\nDetection methods:\\n';\n\nif( http_port = get_kb_list( \"pfsense/http/port\" ) ) {\n foreach port( http_port ) {\n extra += '\\nHTTP(s) on port ' + port + '/tcp';\n register_product( cpe:cpe, location:location, port:port, service:\"www\" );\n }\n}\n\nif( ssh_port = get_kb_list( \"pfsense/ssh/port\" ) ) {\n foreach port( ssh_port ) {\n extra += '\\nSSH login on port ' + port + '/tcp';\n concluded = get_kb_item( \"pfsense/ssh/\" + port + \"/concluded\" );\n if( concluded )\n extra += '\\nConcluded: ' + concluded + '\\n';\n\n register_product( cpe:cpe, location:location, port:port, service:\"ssh-login\" );\n }\n}\n\nif( snmp_port = get_kb_list( \"pfsense/snmp/port\" ) ) {\n foreach port( snmp_port ) {\n extra += '\\nSNMP on port ' + port + '/udp';\n concluded = get_kb_item( \"pfsense/snmp/\" + port + \"/concluded\" );\n if( concluded )\n extra += '\\nConcluded from SNMP SysDesc: ' + concluded + '\\n';\n\n register_product( cpe:cpe, location:location, port:port, service:\"snmp\", proto:\"udp\" );\n }\n}\n\nlog_message( data:build_detection_report( app:\"pfSense\",\n version:detected_version,\n patch:detected_patch,\n install:location,\n cpe:cpe,\n extra:extra ),\n port:0 );\n\nexit( 0 );\n", "naslFamily": "Product detection"}