[Openvas-commits] r1330 - in trunk/openvas-plugins: . scripts
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 11 17:11:50 CEST 2008
Author: kost
Date: 2008-09-11 17:11:49 +0200 (Thu, 11 Sep 2008)
New Revision: 1330
Modified:
trunk/openvas-plugins/ChangeLog
trunk/openvas-plugins/scripts/ike-scan.nasl
Log:
fix false positive if the ike-scan is executing on the same box as openvas,
added more options to pass to ike-scan (like -2 for IKE v2)
Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog 2008-09-11 12:02:49 UTC (rev 1329)
+++ trunk/openvas-plugins/ChangeLog 2008-09-11 15:11:49 UTC (rev 1330)
@@ -1,3 +1,9 @@
+2008-09-09 Vlatko Kosturjak <kost at linux.hr>
+
+ * scripts/ike-scan.nasl: fix false positive if the ike-scan
+ is executing on the same box as openvas, added more options
+ to pass to ike-scan (like -2 for IKE v2)
+
2008-09-10 Chandrashekhar B <bchandra at secpod.com>
* scripts/secpod_ms08-054_900045.nasl,
scripts/secpod_wireshark_mult_vuln_sept08_lin_900213.nasl,
Modified: trunk/openvas-plugins/scripts/ike-scan.nasl
===================================================================
--- trunk/openvas-plugins/scripts/ike-scan.nasl 2008-09-11 12:02:49 UTC (rev 1329)
+++ trunk/openvas-plugins/scripts/ike-scan.nasl 2008-09-11 15:11:49 UTC (rev 1330)
@@ -15,7 +15,7 @@
if(description)
{
script_id(80000);
- script_version ("1.11");
+ script_version ("1.12");
name["english"] = "ike-scan (NASL wrapper)";
script_name(english:name["english"]);
@@ -42,6 +42,9 @@
script_add_preference(name:"Run ike-scan in main mode", type:"checkbox", value: "yes");
# aggressive mode is safe, so it's yes by default
script_add_preference(name:"Run ike-scan in aggressive mode", type:"checkbox", value: "yes");
+ script_add_preference(name:"ike-scan use IKE v2", type:"checkbox", value: "no");
+ script_add_preference(name:"ike-scan source port", type:"entry", value: "");
+ script_add_preference(name:"ike-scan destination port", type:"entry", value: "");
script_add_preference(name:"ike-scan retry", type:"entry", value: "");
script_add_preference(name:"ike-scan timeout", type:"entry", value: "");
@@ -70,7 +73,35 @@
ikea = script_get_preference("Run ike-scan in aggressive mode");
retry = script_get_preference("ike-scan retry");
timeout = script_get_preference("ike-scan timeout");
+ ikev2 = script_get_preference("ike-scan use IKE v2");
+ srcport = script_get_preference("ike-scan source port");
+ destport = script_get_preference("ike-scan destination port");
+ if (destport) {
+ argv[i++] = "-s";
+ argv[i++] = srcport;
+ } else {
+ destport=500;
+ }
+
+ if (srcport) {
+ argv[i++] = "-s";
+ argv[i++] = srcport;
+ } else {
+ srcport=500;
+ }
+
+ # if test is running on the same box as server, skip running ike-scan
+ # but report ike-scan finished
+ if (islocalhost() && srcport==destport) {
+ ikea = 0;
+ ikem = 0;
+ }
+
+ if (ikev2) {
+ argv[i++] = "-2";
+ }
+
if (retry) {
argv[i++] = "-r";
argv[i++] = retry;
@@ -93,7 +124,7 @@
v = eregmatch(string: line, pattern: '^'+esc_ip+' *(.*)$');
if (! isnull(v))
{
- port = 500;
+ port = destport;
proto = "udp";
scanner_add_port(proto: proto, port: port);
security_note(port: port, data:
@@ -116,7 +147,7 @@
v = eregmatch(string: line, pattern: '^'+esc_ip+' *(.*)$');
if (! isnull(v))
{
- port = 500;
+ port = destport;
proto = "udp";
scanner_add_port(proto: proto, port: port);
security_hole(port: port, data:
More information about the Openvas-commits
mailing list