RE: RE: [PHP-WIN] PHP4 on IIS 5 with MsSQL 7.0
| From: | David Harrison | Date: | Thu, 17 Aug 2000 23:16:00 +0000 |
| Subject: | RE: RE: [PHP-WIN] PHP4 on IIS 5 with MsSQL 7.0 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1939@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Frank M. Kromann [mailto:fmk@swwwing.com]
> Sent: Friday, August 18, 2000 8:02 AM
> To: David Harrison
> Cc: php-windows@lists.php.net
> Subject: Re: RE: [PHP-WIN] PHP4 on IIS 5 with MsSQL 7.0
>
>
> Hi All,
>
> php_mssql70.dll should be in the same directory as php.exe or
> php_isapi.dll and IUSR_? needs to have execute rights to this
> directory and files. On the other hand this directry woud not
> be included in the web (or ftp) structure so it would not be
> a security risk.
>
> - Frank
It doesn't matter if the directory is part of the web directory structure -
if the IUSR has access to the directory, he can manipulate it. For example,
the following code enumerates the contents of your c:\winnt directory,
creates a file and writes to it.
<?
$handle=opendir("c:\\winnt");
while ($file = readdir($handle))
{
if ($file != "." && $file != "..")
{
echo "$file<BR>\n";
}
}
closedir($handle);
$fh = fopen("c:\\winnt\\testfile.txt", "w");
fwrite($fh, "this is a test string");
fclose($fh);
?>
If your C:\winnt directory has everyone full access, which is I think the
default setting (which is very clever), with a bit of alteration to that
code you could start doing nasty things like overwriting system files.
--david