Mailing List Archive

cgibin() & locate_cgi() philosophical questions...
There is a NASL cgibin() function that reads the content of the
cgi_path preference. This function forks and returns one directory to
each child process.

The risk of having several alerts on the same port is very low
(e.g. if /scripts/bad.cgi and /cgi-bin/bad.cgi both exists), however I
don't like this behaviour.
More, I suspect that 99% of users will never change the "preference"
from the defaulkt setting and might miss some bad CGI.

That's where locate_cgi() is suppose to help.
1. It stops as soon as it finds the CGI, so there is no fork.
2. The CGI path is automatically detect (my current code is probably
buggy) and is host & port dependant.

Here is a new version of the beast.

Even if everybody agrees, I'd suggest that we do not use it in 1.2.x
so that we do not change the behaviour of the scanner before a new
release...
Re: cgibin() & locate_cgi() philosophical questions... [ In reply to ]
On Saturday 23 November 2002 01:17 pm, Michel Arboi wrote:
> There is a NASL cgibin() function that reads the content of the
> cgi_path preference. This function forks and returns one directory to
> each child process.

Some ISP setups have multiple copies of the same script scattered about,
it would be nice to have a function which checked each CGI directory and
then returned a list of the files found, without forking. The function
should depend the directory scanner and webmirror plugins, so it can take
advantage of the www/port/content/directories list. The biggest problem
with all the changes I made* is that is_cgi_installed() still doesn't say
which directory the script was found in, so the user still has to hunt
for it. What would also be nice is a CGI function with an optional
pattern argument, if set, the page would have to match the regex for the
check to be sucessful.

* http://www.digitaloffense.net/nessus_cgi/

-HD