[Openvas-commits] r3027 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun Apr 5 20:39:43 CEST 2009
Author: mime
Date: 2009-04-05 20:39:41 +0200 (Sun, 05 Apr 2009)
New Revision: 3027
Added:
trunk/openvas-plugins/scripts/cutenews_detect.nasl
trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl
Modified:
trunk/openvas-plugins/ChangeLog
Log:
Added new plugins
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2009-04-05 11:52:05 UTC (rev 3026)
+++ trunk/openvas-plugins/ChangeLog 2009-04-05 18:39:41 UTC (rev 3027)
@@ -1,4 +1,9 @@
2009-04-05 Michael Meyer <mime at gmx.de>
+ * scripts/phpmyfaq_detect.nasl,
+ scripts/cutenews_detect.nasl:
+ Added new plugins
+
+2009-04-05 Michael Meyer <mime at gmx.de>
* scripts/gravity_board_x_detect.nasl,
scripts/oscommerce_34348.nasl,
scripts/JobHut_34300.nasl,
Added: trunk/openvas-plugins/scripts/cutenews_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cutenews_detect.nasl 2009-04-05 11:52:05 UTC (rev 3026)
+++ trunk/openvas-plugins/scripts/cutenews_detect.nasl 2009-04-05 18:39:41 UTC (rev 3027)
@@ -0,0 +1,109 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# CuteNews 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 CuteNews, a powerful and easy to use news
+ management system that uses flat files to store its database.
+
+ See also:
+ http://cutephp.com/cutenews/
+
+ Risk factor : None";
+
+if (description)
+{
+ script_id(100105);
+ script_version ("1.0");
+
+ script_name(english:"CuteNews Detection");
+
+ script_description(english:desc["english"]);
+ script_summary(english:"Checks for the presence of CuteNews");
+ 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("/cutenews","/news",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: "Powered by <a [^>]+>CuteNews", string: buf, icase: TRUE))
+ {
+ if(strlen(dir)>0) {
+ install=dir;
+ } else {
+ install=string("/");
+ }
+
+ vers = string("unknown");
+
+ ### try to get version
+ version = eregmatch(string: buf, pattern: "Powered by <a [^>]+>CuteNews v*([0-9.]+)</a>",icase:TRUE);
+
+ if ( !isnull(version[1]) ) {
+ vers=version[1];
+ }
+
+ set_kb_item(name: string("www/", port, "/cutenews"), value: string(vers," under ",install));
+
+ info = string("None\n\nCuteNews 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/cutenews_detect.nasl
___________________________________________________________________
Name: svn:keywords
+ Id
Added: trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl 2009-04-05 11:52:05 UTC (rev 3026)
+++ trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl 2009-04-05 18:39:41 UTC (rev 3027)
@@ -0,0 +1,109 @@
+###############################################################################
+# OpenVAS Vulnerability Test
+# $Id$
+#
+# phpMyFAQ 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 phpMyFAQ, an open source FAQ system using PHP
+ and available for many databases.
+
+ See also:
+ http://www.phpmyfaq.de
+
+ Risk factor : None";
+
+if (description)
+{
+ script_id(100106);
+ script_version ("1.0");
+
+ script_name(english:"phpMyFAQ Detection");
+
+ script_description(english:desc["english"]);
+ script_summary(english:"Checks for the presence of phpMyFAQ");
+ 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("/faq",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: "Powered by <a [^>]+>phpMyFAQ", string: buf, icase: TRUE))
+ {
+ if(strlen(dir)>0) {
+ install=dir;
+ } else {
+ install=string("/");
+ }
+
+ vers = string("unknown");
+
+ ### try to get version
+ version = eregmatch(string: buf, pattern: "Powered by <a [^>]+>phpMyFAQ</a> ([0-9.]+)",icase:TRUE);
+
+ if ( !isnull(version[1]) ) {
+ vers=version[1];
+ }
+
+ set_kb_item(name: string("www/", port, "/phpmyfaq"), value: string(vers," under ",install));
+
+ info = string("None\n\nphpMyFAQ 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/phpmyfaq_detect.nasl
___________________________________________________________________
Name: svn:keywords
+ Id
More information about the Openvas-commits
mailing list