[Openvas-commits] r3159 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Apr 23 00:18:41 CEST 2009
Author: edjenguele
Date: 2009-04-23 00:18:39 +0200 (Thu, 23 Apr 2009)
New Revision: 3159
Added:
trunk/openvas-plugins/scripts/remote-detect-Opentaps_ERP_CRM.nasl
Modified:
trunk/openvas-plugins/ChangeLog
Log:
Added Opentaps ERP + CRM software detection
TODO: also set the version, I'll commit it later
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2009-04-22 21:25:10 UTC (rev 3158)
+++ trunk/openvas-plugins/ChangeLog 2009-04-22 22:18:39 UTC (rev 3159)
@@ -1,4 +1,8 @@
2009-04-22 Christian Eric Edjenguele <christian.edjenguele at owasp.org>
+ * scripts/remote-detect-Opentaps_ERP_CRM.nasl:
+ Added new script
+
+2009-04-22 Christian Eric Edjenguele <christian.edjenguele at owasp.org>
* scripts/remote-ApacheOfbiz-htmlInjection.nasl:
Added new script
Added: trunk/openvas-plugins/scripts/remote-detect-Opentaps_ERP_CRM.nasl
===================================================================
--- trunk/openvas-plugins/scripts/remote-detect-Opentaps_ERP_CRM.nasl 2009-04-22 21:25:10 UTC (rev 3158)
+++ trunk/openvas-plugins/scripts/remote-detect-Opentaps_ERP_CRM.nasl 2009-04-22 22:18:39 UTC (rev 3159)
@@ -0,0 +1,108 @@
+# OpenVAS Vulnerability Test
+# $Id$
+# Description: This script ensure that the Opentaps ERP + CRM is installed and running
+#
+# remote-detect-Opentaps_ERP_CRM.nasl
+#
+# Author:
+# Christian Eric Edjenguele <christian.edjenguele at owasp.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 and later,
+# 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(101021);
+name["english"] = "Opentaps ERP + CRM service detection";
+script_name(english:name["english"]);
+
+desc["english"] = "
+The remote host is running Opentaps ERP + CRM.
+opentaps is a full-featured ERP + CRM suite which incorporates several open source projects,
+including Apache Geronimo, Tomcat, and OFBiz for the data model and transaction framework;
+Pentaho and JasperReports for business intelligence; Funambol for mobile device and Outlook integration;
+and the opentaps applications which provide user-driven applications for CRM, accounting and finance,
+warehouse and manufacturing, and purchasing and supply chain mmanagement.
+
+Solution :
+It's recommended to allow connection to this host only from trusted hosts or networks,
+or disable the service if not used.
+
+Risk factor : None";
+
+script_description(english:desc["english"]);
+
+summary["english"] = "Detect a running Opentaps ERP + CRM";
+
+script_summary(english:summary["english"]);
+
+script_category(ACT_GATHER_INFO);
+
+script_copyright(english:"This script is Written by Christian Eric Edjenguele <christian.edjenguele at owasp.org> and released under GPL v2 or later");
+family["english"] = "Service detection";
+script_family(english:family["english"]);
+script_dependencies("find_service.nes");
+script_require_ports("Services/www");
+
+
+exit(0);
+
+}
+
+#
+# The script code starts here
+#
+
+include("misc_func.inc");
+include("http_func.inc");
+include("http_keepalive.inc");
+
+
+aport = get_http_port(default:8080);
+
+pages = make_array(0,'/',1,'webtools/control/main');
+report = '';
+
+# TODO: also add version detection
+softwareRequest = string("GET ", pages[0], " HTTP/1.1\r\n","Host: ", get_host_name(), "\r\n\r\n");
+versionRequest = string("GET ", pages[1], " HTTP/1.1\r\n","Host: ", get_host_name(), "\r\n\r\n");
+
+softwareReply = http_send_recv(port:aport, data:softwareRequest);
+versionReply = http_send_recv(port:aport, data:softwareRequest);
+
+
+if(softwareReply){
+
+ servletContainer = eregmatch(pattern:"Server: Apache-Coyote/([0-9.]+)",string:softwareReply, icase:TRUE);
+ opentapsTitlePattern = eregmatch(pattern:"<title>([a-zA-Z +]+)</title>",string:softwareReply, icase:TRUE);
+
+ if(opentapsTitlePattern){
+ if('opentaps' >< opentapsTitlePattern[0]){
+ report += " Detected " + opentapsTitlePattern[1];
+ replace_or_set_kb_item(name:"opentapsERP/installed", value:TRUE);
+ }
+ }
+
+ if((servletContainer)){
+ replace_or_set_kb_item(name:"ApacheCoyote/installed", value:TRUE);
+ replace_or_set_kb_item(name:"ApacheCoyote/version", value:servletContainer[1]);
+ report += "\n " + servletContainer[0];
+ }
+
+}
+
+if(report)
+ security_note(port:port, data:report);
More information about the Openvas-commits
mailing list