[Openvas-commits] r13727 - in trunk/openvas-plugins: . scripts

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu Jul 12 19:01:44 CEST 2012


Author: mime
Date: 2012-07-12 19:01:43 +0200 (Thu, 12 Jul 2012)
New Revision: 13727

Added:
   trunk/openvas-plugins/scripts/gb_cobbler_53666.nasl
   trunk/openvas-plugins/scripts/gb_cobbler_detect.nasl
Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/gb_ms_xml_core_services_code_exec_vuln.nasl
Log:
Added new plugins. Fixed dependencies.

Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2012-07-12 12:11:09 UTC (rev 13726)
+++ trunk/openvas-plugins/ChangeLog	2012-07-12 17:01:43 UTC (rev 13727)
@@ -1,5 +1,14 @@
 2012-07-12 Michael Meyer <michael.meyer at greenbone.net>
 
+	* scripts/gb_cobbler_detect.nasl.
+	scripts/gb_cobbler_53666.nasl:
+	Added new plugins.
+
+	* scripts/gb_ms_xml_core_services_code_exec_vuln.nasl:
+	Fixed dependencies.
+
+2012-07-12 Michael Meyer <michael.meyer at greenbone.net>
+
 	* scripts/gb_smc8024l2_54390.nasl:
 	Added new plugin.
 

Added: trunk/openvas-plugins/scripts/gb_cobbler_53666.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cobbler_53666.nasl	                        (rev 0)
+++ trunk/openvas-plugins/scripts/gb_cobbler_53666.nasl	2012-07-12 17:01:43 UTC (rev 13727)
@@ -0,0 +1,90 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# Cobbler Remote Command Injection Vulnerability
+#
+# Authors:
+# Michael Meyer <michael.meyer at greenbone.net>
+#
+# Copyright:
+# Copyright (c) 2012 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.
+###############################################################################
+
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.103515";
+CPE = "cpe:/a:michael_dehaan:cobbler";
+
+if (description)
+{
+ script_oid(SCRIPT_OID);
+ script_bugtraq_id(53666);
+ script_cve_id("CVE-2012-2395");
+ script_tag(name:"cvss_base", value:"7.5");
+ script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
+ script_version ("$Revision$");
+
+ script_name("Cobbler Remote Command Injection Vulnerability");
+
+desc = "Overview:
+Cobbler is prone to a remote command-injection vulnerability.
+
+Attackers can exploit this issue to execute arbitrary commands in the
+context of the affected application.
+
+Solution:
+Updates are available. Please see the references for more information.
+
+References:
+http://www.securityfocus.com/bid/53666
+http://freshmeat.net/projects/cobbler
+https://bugs.launchpad.net/ubuntu/+source/cobbler/+bug/978999
+https://github.com/cobbler/cobbler/issues/141
+https://github.com/cobbler/cobbler/commit/6d9167e5da44eca56bdf42b5776097a6779aaadf";
+
+ script_tag(name:"risk_factor", value:"High");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2012-07-12 16:50:33 +0200 (Thu, 12 Jul 2012)");
+ script_description(desc);
+ script_summary("Determine if installed Cobbler version is vulnerable");
+ script_category(ACT_GATHER_INFO);
+ script_family("Web application abuses");
+ script_copyright("This script is Copyright (C) 2012 Greenbone Networks GmbH");
+ script_dependencies("gb_cobbler_detect.nasl");
+ script_require_ports("Services/www", 80);
+ script_require_keys("Cobbler/installed");
+ exit(0);
+}
+
+include("http_func.inc");
+include("host_details.inc");
+include("http_keepalive.inc");
+include("version_func.inc");
+
+if(!port = get_app_port(cpe:CPE, nvt:SCRIPT_OID))exit(0);
+if(!get_port_state(port))exit(0);
+
+if(!version = get_app_version(cpe:CPE, nvt:SCRIPT_OID, port:port))exit(0);
+
+if(version_is_equal(version:version, test_version:"2.2.0")) {
+
+  security_hole(port:port);
+  exit(0);
+
+}  
+
+exit(0);
+


Property changes on: trunk/openvas-plugins/scripts/gb_cobbler_53666.nasl
___________________________________________________________________
Added: svn:keywords
   + Id Revision Date

Added: trunk/openvas-plugins/scripts/gb_cobbler_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cobbler_detect.nasl	                        (rev 0)
+++ trunk/openvas-plugins/scripts/gb_cobbler_detect.nasl	2012-07-12 17:01:43 UTC (rev 13727)
@@ -0,0 +1,114 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# Cobbler Detection
+#
+# Authors:
+# Michael Meyer <michael.meyer at greenbone.net>
+#
+# Copyright:
+# Copyright (c) 2012 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.
+###############################################################################
+
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.103514";   
+
+if (description)
+{
+ 
+ script_tag(name:"risk_factor", value:"None");
+ script_tag(name:"cvss_base", value:"0.0");
+ script_oid(SCRIPT_OID);
+ script_version ("$Revision$");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2012-07-12 16:08:56 +0200 (Thu, 12 Jul 2012)");
+ script_name("Cobbler Detection");
+ script_description("Detection of Cobbler
+                    
+The script sends a connection request to the server and attempts to
+extract the version number from the reply.");
+
+ script_summary("Checks for the presence of Cobbler");
+ script_category(ACT_GATHER_INFO);
+ script_family("Service detection");
+ script_copyright("This script is Copyright (C) 2012 Greenbone Networks GmbH");
+ script_dependencies("find_service.nes", "http_version.nasl");
+ script_require_ports("Services/www", 80);
+ exit(0);
+}
+
+SCRIPT_DESC = "Cobbler Detection";
+
+include("cpe.inc");
+include("http_func.inc");
+include("http_keepalive.inc");
+include("global_settings.inc");
+include("host_details.inc");
+
+port = get_http_port(default:80);
+if(!get_port_state(port))exit(0);
+
+url = '/cobbler_api';
+host = get_host_name();
+
+xml = '<?xml version="1.0"?>
+<methodCall>
+  <methodName>extended_version</methodName>
+</methodCall>';
+
+len = strlen(xml);
+
+req = string("POST ",url," HTTP/1.1\r\n",
+             "Host: ", host ,"\r\n",
+             "Content-Length:",len,"\r\n",
+             "\r\n",
+             xml);
+
+result = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+
+if("<methodResponse>" >!< result || "<name>version</name>" >!< result) exit(0);
+
+lines = split(result);
+
+for(i=0; i < max_index( lines ); i++) {
+
+  if("<name>version</name>" >< lines[i]) {
+    
+    version = eregmatch(pattern:"<string>([^<]+)</string>", string:lines[i+1]);
+    
+    if(isnull(version[1]))exit(0);
+
+    vers = version[1];
+
+    set_kb_item(name:"Cobbler/installed", value:TRUE);
+
+    cpe = build_cpe(value:vers, exp:"^([0-9.]+)", base:"cpe:/a:michael_dehaan:cobbler:");
+    if(isnull(cpe))
+      cpe = 'cpe:/a:michael_dehaan:cobbler';
+
+    register_product(cpe:cpe, location:url, nvt:SCRIPT_OID, port:port);
+
+    log_message(data: build_detection_report(app:"Cobbler", version:vers, install:url, cpe:cpe, concluded: version[0]),
+                port:port);
+
+    exit(0);
+
+
+  }
+}  
+
+exit(0);


Property changes on: trunk/openvas-plugins/scripts/gb_cobbler_detect.nasl
___________________________________________________________________
Added: svn:keywords
   + Id Revision Date

Modified: trunk/openvas-plugins/scripts/gb_ms_xml_core_services_code_exec_vuln.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ms_xml_core_services_code_exec_vuln.nasl	2012-07-12 12:11:09 UTC (rev 13726)
+++ trunk/openvas-plugins/scripts/gb_ms_xml_core_services_code_exec_vuln.nasl	2012-07-12 17:01:43 UTC (rev 13727)
@@ -77,7 +77,7 @@
   script_dependencies("smb_reg_service_pack.nasl",
                       "secpod_office_products_version_900032.nasl",
                       "gb_ms_sharepoint_sever_n_foundation_detect.nasl",
-                      "gb_ms_web_expression_detect.nasl");
+                      "gb_ms_expression_web_detect.nasl");
   exit(0);
 }
 



More information about the Openvas-commits mailing list