did you disabled signature checking of scripts. If not, please do it first.

--
Eero

2016-03-01 13:19 GMT+02:00 Míkel Rodríguez <[email protected]>:

> Hello, we are developing a custom NVT which only checks if port 21 is
> open. We have a scanner virtual machine on which OpenVAS is installed and
> we use it to store our custom NVT and to do scans. We have another virtual
> machine which is a clone of the first but it also has an FTP server
> listening on port 21. We use it as a target for the scans. When we use
> openvas-nasl command on the scanner machine to test the new NVT, it works
> and detects that port 21 is open on the target, by using the
> get_port_state() function. The problem is that when we select our custom
> NVT on a scan config of a task and run the task on the GSA, it says that
> port 21 is closed, which is wrong. Our NVT hasn't got any script neither
> port dependency, it only checks the status of port 21. Why does not it work
> on GSA but does with the openvas-nasl command?
>
> Here is the code of the NVT that we are testing:
>
> include("revisions-lib.inc");
> tag_summary = "Parece que se ha detectado un servicio FTP de datos en un
> puerto abierto. Eso podría representar una vulnerabilidad potencial.";
>
> desc = "
>
>  Summary:
>  " + tag_summary;
>
>
> if (description)
> {
>  script_id(30001);
>  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
>  script_version("1.0");
>  script_tag(name:"last_modification", value:"$Date: 2016-02-29 18:00:00
> +0100 (Mon, 29 Feb 2016) $");
>  script_tag(name:"creation_date", value:"2016-02-29 18:00:00 +0100 (Mon,
> 29 Feb 2016)");
>  script_tag(name:"cvss_base", value:"0.0");
>  script_tag(name:"risk_factor", value:"None");
>  script_name("Detección de FTP de datos");
>
>  script_description(desc);
>  script_summary("Comprobar si hay un FTP de datos.");
>  script_category(ACT_GATHER_INFO);
>  script_family("FTP");
>  script_copyright("Copyright (c) 2016 Xeridia");
>  #script_dependencies("find_service.nasl");
>  #script_require_ports("Services/ftp", 21);
>  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
>    script_tag(name : "summary" , value : tag_summary);
>  }
>  exit(0);
> }
>
> include("ftp_func.inc");
>
> include("misc_func.inc");
> include("global_settings.inc");
>
> port = 21;
>
> if(!get_port_state(port)) {
> display("Port ", port, " is closed.");
> security_note(port:port, data:string("Port ", port, " is closed."));
> exit(0);
> }
>
> if(!banner = get_ftp_banner(port:port)) {
> display("Port ", port, " may be open but no FTP banner was found.");
> security_note(port:port, data:string("Port ", port, " may be open but no
> FTP banner was found."));
> exit(0);
> }
>
> if(isnull(banner)) {
> security_note(port:port, data:string("Port ", port, " may be open but no
> FTP banner was found."));
> } else {
> display("An FTP service was detected on port ", port, " with a banner: [",
> banner, "].\n");
> security_note(port:port, data:string("An FTP service was detected on port
> ", port, " with a banner: [", banner, "].\n"));
> exit(0);
> }
>
> exit(0);
>
> _______________________________________________
> Openvas-plugins mailing list
> [email protected]
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins
>
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to