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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 19 12:48:40 CEST 2011


Author: hdoreau
Date: 2011-09-19 12:48:36 +0200 (Mon, 19 Sep 2011)
New Revision: 11633

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/cpe.inc
   trunk/openvas-plugins/scripts/gb_ibm_openadmin_tool_detect.nasl
   trunk/openvas-plugins/scripts/gb_tcptrack_detect.nasl
Log:
* scripts/gb_tcptrack_detect.nasl,
scripts/gb_ibm_openadmin_tool_detect.nasl: Directly build and register CPEs.

* scripts/cpe.inc: Removed corresponding entries.


Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-09-19 10:20:33 UTC (rev 11632)
+++ trunk/openvas-plugins/ChangeLog	2011-09-19 10:48:36 UTC (rev 11633)
@@ -1,5 +1,12 @@
 2011-09-19  Henri Doreau <henri.doreau at gmail.com>
 
+	* scripts/gb_tcptrack_detect.nasl,
+	scripts/gb_ibm_openadmin_tool_detect.nasl: Directly build and register CPEs.
+
+	* scripts/cpe.inc: Removed corresponding entries.
+
+2011-09-19  Henri Doreau <henri.doreau at gmail.com>
+
 	* scripts/cpe.inc: Restored CPE entries for emesene and postfix, which
 	are not registered by NVTs.
 

Modified: trunk/openvas-plugins/scripts/cpe.inc
===================================================================
--- trunk/openvas-plugins/scripts/cpe.inc	2011-09-19 10:20:33 UTC (rev 11632)
+++ trunk/openvas-plugins/scripts/cpe.inc	2011-09-19 10:48:36 UTC (rev 11633)
@@ -162,11 +162,7 @@
 "ssh/login/release", "Mac OS X (10\.[0-9]+\.[0-9]+)", "cpe:/o:apple:mac_os_x:",
 
 "Banner/*", "220 .* ESMTP Postfix \(([.0-9]*)\)", "cpe:/a:postfix:postfix:",
-"emesene/ver", "^([0-9.]+)", "cpe:/a:emesene:emesene:",
-
-# TODO register those CPEs from corresponding NVTs
-"Tcptrack/Ver", "^([0-9.]+)", "cpe:/a:rhythm:tcptrack:",
-"www/*/IBM/Open/Admin/Tool", "^([0-9.]+)", "cpe:/a:ibm:openadmin_tool:"
+"emesene/ver", "^([0-9.]+)", "cpe:/a:emesene:emesene:"
 );
 
 

Modified: trunk/openvas-plugins/scripts/gb_ibm_openadmin_tool_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ibm_openadmin_tool_detect.nasl	2011-09-19 10:20:33 UTC (rev 11632)
+++ trunk/openvas-plugins/scripts/gb_ibm_openadmin_tool_detect.nasl	2011-09-19 10:48:36 UTC (rev 11633)
@@ -45,7 +45,14 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802158";
+SCRIPT_DESC = "IBM Open Admin Tool Version Detection";
+
+
 port = get_http_port(default:8080);
 if(!port){
   exit(0);
@@ -69,5 +76,9 @@
                                                 value:ver[1]);
     security_note(data:"IBM Open Admin Tool version " + ver[1] +
                                        " was detected on the host");
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:ibm:openadmin_tool:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_tcptrack_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_tcptrack_detect.nasl	2011-09-19 10:20:33 UTC (rev 11632)
+++ trunk/openvas-plugins/scripts/gb_tcptrack_detect.nasl	2011-09-19 10:48:36 UTC (rev 11633)
@@ -45,7 +45,14 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801972";
+SCRIPT_DESC = "Tcptrack Version Detection";
+
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -75,6 +82,11 @@
       set_kb_item(name:"Tcptrack/Ver", value:tcptVer[1]);
       security_note(data:"Tcptrack version " + sharkVer[1] +
           " installed at location " + binaryName + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tcptVer[1], exp:"^([0-9.]+)", base:"cpe:/a:rhythm:tcptrack:");
+      if(!isnull(cpe))
+        register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
       ssh_close_connection();
     }
   }



More information about the Openvas-commits mailing list