Hi All,
 I have been looking at OSVDB and I think i can churn out a couple of
plugins...:) I am wondering if there's a standard way of doing it.

1. Do we create a plugin life cycle? e.g.
 - Created plugin is accepted,
 - verified for correctness and then Commited to the tree?

2. Should we have a plugin directory structure - say Year/Month/*.nasl
or Vendor/Product/*.nasl because at the last count we had 3260 files
under the scripts directory.
3. The plugin id.. Where does it come from?

4. License/Copyrights? I mean should it read  "(c) OpenVAS team" or
"This script was written by... for OpenVAS"?


Attached is a simple plugin i've just put together. Please go through
it and comment

This part is obviously wrong
-----
+++ php_apache_openssl_pkcs12_read_dos-39280.nasl       (revision 0)
@@ -0,0 +1,72 @@
+#
+# This script was written by Matt Moore
<[EMAIL PROTECTED]<h/1vpp7vrgh5u03/?v=b&cs=wh&[EMAIL PROTECTED]>
>
+#
+# See the Nessus Scripts License for details
+#
+
+if(description)
+{
+ script_id(10839);


---

Happy Holidays!

Regards,
Laban
Index: php_apache_openssl_pkcs12_read_dos-39280.nasl
===================================================================
--- php_apache_openssl_pkcs12_read_dos-39280.nasl       (revision 0)
+++ php_apache_openssl_pkcs12_read_dos-39280.nasl       (revision 0)
@@ -0,0 +1,72 @@
+#
+# This script was written by Matt Moore <[EMAIL PROTECTED]>
+#
+# See the Nessus Scripts License for details
+#
+
+if(description)
+{
+ script_id(10839);
+ script_cve_id("OSVDB_ID 39280");
+ script_bugtraq_id(3786);
+ script_version ("$Revision: 38 $");
+ name["english"] = "PHP openssl_pkcs12_read() Function DoS";
+ name["francais"] = "PHP openssl_pkcs12_read() Function DoS";
+ script_name(english:name["english"], francais:name["francais"]);
+ 
+ desc["english"] = "
+Unknown or Incomplete at this time
+
+Solution: Upgrade to version 5.2.3 or higher, as it has been reported to fix 
this vulnerability. An upgrade is required as there are no known workarounds.
+
+References:
+http://osvdb.org/39280
+
+Risk factor : High";
+
+ script_description(english:desc["english"]);
+ 
+ summary["english"] = "Tests for PHP openssl_pkcs12_read() Function DoS";
+ 
+ script_summary(english:summary["english"]);
+ 
+ script_category(ACT_ATTACK);
+ 
+ script_copyright(english:"This script is Copyright (C) 2002 Laban Mwangi",
+               francais:"Ce script est Copyright (C) 2002 Laban Mwangi");
+ family["english"] = "CGI abuses";
+ family["francais"] = "Abus de CGI";
+ script_family(english:family["english"], francais:family["francais"]);
+ script_dependencie("find_service.nes", "http_version.nasl");
+ script_require_ports("Services/www", 80);
+ exit(0);
+}
+
+# Check starts here
+
+include("http_func.inc");
+
+port = get_http_port(default:80);
+
+if(get_port_state(port))
+{            
+ if ( ! can_host_php(port:port) ) exit(0);
+ req = http_get(item:"/", port:port);
+ soc = http_open_socket(port);
+ if(soc)
+ {
+ send(socket:soc, data:req);
+ r = http_recv(socket:soc);
+ http_close_socket(soc);
+
+ matches = eregmatch(string:r, 
pattern:"^.*Server:.*PHP/([0-9.A-Za-z]+).*Content-Length:.*$");
+ if (!isnull(matches)) {
+       version = matches[1];
+       if ( ereg(pattern:"^5.([0-1].[0-9]|[2].[0-2])", string:version)) {
+               security_note(port);
+               exit(0);
+       }
+
+  }
+ }
+}
_______________________________________________
Openvas-devel mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-devel

Reply via email to