[Openvas-commits] r6054 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 3 12:57:47 CET 2009
Author: mime
Date: 2009-12-03 12:57:42 +0100 (Thu, 03 Dec 2009)
New Revision: 6054
Added:
trunk/openvas-plugins/scripts/awstats_detect.nasl
trunk/openvas-plugins/scripts/pligg_37185.nasl
trunk/openvas-plugins/scripts/pligg_cms_detect.nasl
Modified:
trunk/openvas-plugins/ChangeLog
trunk/openvas-plugins/cve_current.txt
Log:
Added new plugins
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2009-12-03 11:50:23 UTC (rev 6053)
+++ trunk/openvas-plugins/ChangeLog 2009-12-03 11:57:42 UTC (rev 6054)
@@ -1,3 +1,10 @@
+2009-12-03 Michael Meyer <michael.meyer at intevation.de>
+
+ * scripts/pligg_cms_detect.nasl,
+ scripts/pligg_37185.nasl,
+ scripts/awstats_detect.nasl:
+ Added new plugins.
+
2009-12-02 Michael Meyer <michael.meyer at intevation.de>
* * scripts/phpmyfaq_37180.nasl,
Modified: trunk/openvas-plugins/cve_current.txt
===================================================================
--- trunk/openvas-plugins/cve_current.txt 2009-12-03 11:50:23 UTC (rev 6053)
+++ trunk/openvas-plugins/cve_current.txt 2009-12-03 11:57:42 UTC (rev 6054)
@@ -329,3 +329,4 @@
37182 Greenbone svn R
37180 Greenbone svn R
33698 Greenbone svn R
+37185 Greenbone svn R
Added: trunk/openvas-plugins/scripts/awstats_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/awstats_detect.nasl 2009-12-03 11:50:23 UTC (rev 6053)
+++ trunk/openvas-plugins/scripts/awstats_detect.nasl 2009-12-03 11:57:42 UTC (rev 6054)
@@ -0,0 +1,120 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# AWStats Detection
+#
+# Authors:
+# Michael Meyer
+#
+# Copyright:
+# Copyright (c) 2009 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.
+###############################################################################
+
+# need desc here to modify it later in script.
+desc = "Overview:
+This host is running AWStats, a free powerful and featureful tool that
+generates advanced web, streaming, ftp or mail server statistics,
+graphically.
+
+See also:
+http://awstats.sourceforge.net/
+
+Risk factor : None";
+
+if (description)
+{
+ script_id(100376);
+ script_version ("1.0-$Revision$");
+
+ script_name("AWStats Detection");
+ script_description(desc);
+ script_summary("Checks for the presence of AWStats");
+ script_category(ACT_GATHER_INFO);
+ script_family("Service detection");
+ script_copyright("This script is Copyright (C) 2009 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("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("/awstats","/stats","/logs","/awstats/cgi-bin","/statistics","/statistik/cgi-bin","/awstats-cgi",cgi_dirs());
+
+foreach dir (dirs) {
+
+ url = string(dir, "/awstats.pl?framename=mainright");
+ 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: 'content="Awstats - Advanced Web Statistics', string: buf, icase: TRUE) ||
+ egrep(pattern: "AWStats UseFramesWhenCGI", string: buf) ||
+ egrep(pattern: "Created by awstats", string: buf) ||
+ egrep(pattern: "CreateDirDataIfNotExists", string: buf)) {
+
+ if(strlen(dir)>0) {
+ install=dir;
+ } else {
+ install=string("/");
+ }
+
+ vers = string("unknown");
+ ### try to get version
+ version = eregmatch(string: buf, pattern: "Advanced Web Statistics ([0-9.]+)",icase:TRUE);
+
+ if ( !isnull(version[1]) ) {
+ vers=chomp(version[1]);
+ }
+
+ set_kb_item(name: string("www/", port, "/awstats"), value: string(vers," under ",install));
+ if("unknown" >!< vers) {
+ set_kb_item(name: string("cpe:/a:awstats:awstats:",vers), value: TRUE);
+ } else {
+ set_kb_item(name: string("cpe:/a:awstats:awstats"), value: TRUE);
+ }
+
+ info = string("None\n\nAwstats 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,
+ pattern:"None$",
+ replace:info
+ );
+
+ if(report_verbosity > 0) {
+ security_note(port:port,data:desc);
+ }
+ exit(0);
+
+ }
+}
+exit(0);
+
Property changes on: trunk/openvas-plugins/scripts/awstats_detect.nasl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: trunk/openvas-plugins/scripts/pligg_37185.nasl
===================================================================
--- trunk/openvas-plugins/scripts/pligg_37185.nasl 2009-12-03 11:50:23 UTC (rev 6053)
+++ trunk/openvas-plugins/scripts/pligg_37185.nasl 2009-12-03 11:57:42 UTC (rev 6054)
@@ -0,0 +1,90 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# Pligg Cross Site Scripting And Request Forgery Remote Vulnerabilities
+#
+# Authors:
+# Michael Meyer
+#
+# Copyright:
+# Copyright (c) 2009 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(100375);
+ script_bugtraq_id(37185);
+ script_version ("1.0-$Revision$");
+
+ script_name("Pligg Cross Site Scripting And Request Forgery Remote Vulnerabilities");
+
+desc = "Overview:
+Pligg is prone to multiple cross-site scripting vulnerabilities and a
+cross-site request-forgery vulnerability.
+
+An attacker can exploit these issues to steal cookie-based
+authentication credentials or perform unauthorized actions when
+masquerading as the victim. Other attacks are also possible.
+
+Versions prior to Pligg 1.0.3 are vulnerable.
+
+Solution:
+Vendor updates are available. Please see the references for details.
+
+References:
+http://www.securityfocus.com/bid/37185
+http://holisticinfosec.org/content/view/130/45/
+http://www.pligg.com/blog/775/pligg-cms-1-0-3-release/
+http://www.pligg.com/
+
+Risk factor : Medium";
+
+ script_description(desc);
+ script_summary("Determine the version of Pligg");
+ script_category(ACT_GATHER_INFO);
+ script_family("Web application abuses");
+ script_copyright("This script is Copyright (C) 2009 Greenbone Networks GmbH");
+ script_dependencies("pligg_cms_detect.nasl");
+ script_require_ports("Services/www", 80);
+ script_exclude_keys("Settings/disable_cgi_scanning");
+ exit(0);
+}
+
+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);
+
+if(!version = get_kb_item(string("www/", port, "/pligg")))exit(0);
+if(!matches = eregmatch(string:version, pattern:"^(.+) under (/.*)$"))exit(0);
+
+vers = matches[1];
+
+if(!isnull(vers) && vers >!< "unknown") {
+
+ if(version_is_less(version: vers, test_version: "1.0.3")) {
+ security_warning(port:port);
+ exit(0);
+ }
+
+}
+
+exit(0);
Property changes on: trunk/openvas-plugins/scripts/pligg_37185.nasl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: trunk/openvas-plugins/scripts/pligg_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/pligg_cms_detect.nasl 2009-12-03 11:50:23 UTC (rev 6053)
+++ trunk/openvas-plugins/scripts/pligg_cms_detect.nasl 2009-12-03 11:57:42 UTC (rev 6054)
@@ -0,0 +1,132 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# Pligg CMS Detection
+#
+# Authors:
+# Michael Meyer
+#
+# Copyright:
+# Copyright (c) 2009 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.
+###############################################################################
+
+# need desc here to modify it later in script.
+desc = "Overview:
+This host is running Pligg CMS, an open source CMS.
+
+See also:
+http://www.pligg.com/
+
+Risk factor : None";
+
+if (description)
+{
+ script_id(100374);
+ script_version ("1.0-$Revision$");
+
+ script_name("Pligg CMS Detection");
+ script_description(desc);
+ script_summary("Checks for the presence of Pligg CMS ");
+ script_category(ACT_GATHER_INFO);
+ script_family("Service detection");
+ script_copyright("This script is Copyright (C) 2009 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("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("/pligg","/cms",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: "Copyright 2009.*Pligg <a.*http://www.pligg.com.*Content Management System", string: buf, icase: TRUE))
+ {
+ if(strlen(dir)>0) {
+ install=dir;
+ } else {
+ install=string("/");
+ }
+
+ vers = string("unknown");
+
+ url = string(dir, "/readme.html");
+ req = http_get(item:url, port:port);
+ buf = http_keepalive_send_recv(port:port, data:req,bodyonly:TRUE);
+
+ if("Pligg Readme" >< buf) {
+ version = eregmatch(string: buf, pattern: "Version ([0-9.]+)",icase:TRUE);
+ if ( !isnull(version[1]) ) {
+ vers=chomp(version[1]);
+ }
+ } else {
+
+ url = string(dir, "/languages/lang_english.conf");
+ req = http_get(item:url, port:port);
+ buf = http_keepalive_send_recv(port:port, data:req,bodyonly:TRUE);
+
+ if("Pligg English language" >< buf) {
+ version = eregmatch(string: buf, pattern: "//<VERSION>([0-9.]+)</VERSION> ",icase:TRUE);
+ if ( !isnull(version[1]) ) {
+ vers=chomp(version[1]);
+ }
+ }
+ }
+
+ set_kb_item(name: string("www/", port, "/pligg"), value: string(vers," under ",install));
+ if("unknown" >!< vers) {
+ set_kb_item(name: string("cpe:/a:pligg:pligg_cms:",vers), value: TRUE);
+ } else {
+ set_kb_item(name: string("cpe:/a:pligg:pligg_cms"), value: TRUE);
+ }
+
+ info = string("None\n\nPligg CMS 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,
+ pattern:"None$",
+ replace:info
+ );
+
+ if(report_verbosity > 0) {
+ security_note(port:port,data:desc);
+ }
+ exit(0);
+
+ }
+}
+
+exit(0);
+
Property changes on: trunk/openvas-plugins/scripts/pligg_cms_detect.nasl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
More information about the Openvas-commits
mailing list