Connecting Tech Pros Worldwide Help | Site Map

security question

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 29th, 2006, 08:45 PM
windandwaves
Guest
 
Posts: n/a
Default security question

Hi Folk

If I have a file in the public html directory (e.g. mypage.php) then can
anyone read this file (i.e. read its actual content rather then the
interpreted contents it returns when someone opens
www.myurl.com/mypage.php)?

If so, how do they do that?

TIA

- Nicolaas





  #2  
Old January 29th, 2006, 08:55 PM
Chris
Guest
 
Posts: n/a
Default Re: security question

Hi,

Unless they have a login to your server, then no they can't. They see
exactly what you see through a browser.

(If they have access to the server however they can see the code).

windandwaves wrote:[color=blue]
> Hi Folk
>
> If I have a file in the public html directory (e.g. mypage.php) then can
> anyone read this file (i.e. read its actual content rather then the
> interpreted contents it returns when someone opens
> www.myurl.com/mypage.php)?
>
> If so, how do they do that?
>
> TIA
>
> - Nicolaas
>
>
>
>[/color]
  #3  
Old January 29th, 2006, 09:45 PM
Sadara
Guest
 
Posts: n/a
Default Re: security question

windandwaves wrote:[color=blue]
> Hi Folk
>
> If I have a file in the public html directory (e.g. mypage.php) then can
> anyone read this file (i.e. read its actual content rather then the
> interpreted contents it returns when someone opens
> www.myurl.com/mypage.php)?
>
> If so, how do they do that?[/color]
if your webserver is not configured to interpret files with the file
extension php by passing them to PHP, then it will most likely display
/mypage.php as plain text when it is requested.

s
  #4  
Old January 29th, 2006, 09:45 PM
xclarky@gmail.com
Guest
 
Posts: n/a
Default Re: security question

If PHP is misconfigured or otherwise fails to run then the file will
not be processed by the engine resulting in the contents of the file
being exposed in plain text format. If everything is configured
correctly and the PHP files are parsed only the output will be received
through the HTTP server.

  #5  
Old January 29th, 2006, 10:15 PM
Iván Sánchez Ortega
Guest
 
Posts: n/a
Default Re: security question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

windandwaves wrote:
[color=blue]
> If I have a file in the public html directory (e.g. mypage.php) then can
> anyone read this file (i.e. read its actual content rather then the
> interpreted contents it returns when someone opens
> www.myurl.com/mypage.php)?[/color]

Not in most cases. As it has been already said, .php files are interpreted
and run, not read, if the webserver configuration is right.
[color=blue]
> If so, how do they do that?[/color]

A way to circumvent this is to make use of some unsecure script that is able
to read files from the server and output it to the client with no or little
checks, something like:

www.myurl.com/download.php?file=../../mypage.php
http://www.myurl.com/download.php?fi.../../etc/passwd

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

http://acm.asoc.fi.upm.es/~mr/ ; http://acm.asoc.fi.upm.es/~ivan/
MSN:i_eat_s_p_a_m_for_breakfast@hotmail.com
Jabber:ivansanchez@jabber.org ; ivansanchez@kdetalk.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3UGQ3jcQ2mg3Pc8RAi40AJ9lvrg5A/oW6MPGkQq7SM7DCeSyIgCffGTw
r182OPuOJZtW21YG9g59g3g=
=ut0r
-----END PGP SIGNATURE-----
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.