Security isues / PHP

This is a discussion on "Security isues / PHP" within the PHP Forum section. This forum, and the thread "Security isues / PHP are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 24th, 2006, 06:37
New Member
Join Date: Sep 2006
Location: Uitenhage, South Africa
Age: 35
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Security isues / PHP

Hi there, I'm new here so please excuse me if I'm not at the right place, but I'm hoping to get some advice. Don't have much knowladge about PHP either.

I've got a small website to advertize my business, hosted by a hosting company, but I upload the content of the site myself. I don't have access to logs, at least I don't think so. If I do, I don't know where to find them. It is a cheap service with very little customer support. Pretty much DIY.

I found a PHP script that alow you to check your email (a single account) using a WAP browser, but there are no security build into this script and you place your username and password inside the script. The auther sugest you give the script a name that no one can guess, something like hafdghjf.php.

My question: Is it posable to get a directory listing of a website? My gut feeling is that it should not be posable. Sugestions I had so far was to place "Options All -Indexes" in .htaccess file. I was also told that search engine bots could find such a file and I must prevent them from listing that file in robots.txt, but then another person said that hackers like to read robots.txt to see what webmasters are trying to hide from the world. Can a search engine really find a file if there is absolutely no pages linking to it. Always thaught they won't.

Don't want to stick this scrip on the site and then anyone can find it and open my mail. That is all the script does, it does not allow for delete, send or reply.

Also was wondering if there were programs out there that will read/draw the actuall PHP file from the server, instead of the output produced by PHP. I'm thinking along the lines of a PHP script that validate passwords. Such a scrip will contain the passwords so if someone get hold of the actual script, they would also have the passwords.

Thanks for any advise.
Reply With Quote

  #2 (permalink)  
Old Sep 26th, 2006, 18:52
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Security isues / PHP

Quote:
Originally Posted by horsyatza View Post
My question: Is it posable to get a directory listing of a website? My gut feeling is that it should not be posable. Sugestions I had so far was to place "Options All -Indexes" in .htaccess file. I was also told that search engine bots could find such a file and I must prevent them from listing that file in robots.txt, but then another person said that hackers like to read robots.txt to see what webmasters are trying to hide from the world. Can a search engine really find a file if there is absolutely no pages linking to it. Always thaught they won't.
If a directory contains a "home page" such as index.html, then it is not normally possible to get a directory listing. (Of course, you as the web site owner could write and upload a script to do so)

If the directory does NOT contain a home page , then a directory listing WILL be offered when a user calls up the directory if the server configuration file includes Options Indexes or the appropriate .htaccess file does. The best way to find out what the current situation is on your server is to try it out and see - if you get a "forbidden" error 403, you're OK. If not, you'll need to set up the options or (better) add a home page.

If you have a URL with absolutely no links to it, and you don't allow directory listings as described above, the search engines won't find it. However, if you have a single obscure link to it for just a couple of hours, the search engines might find it in that time, and they have LONG memories.

Personally, I would NOT put the name of a secret page into a robots.txt file. It tells well behaved robots to go away, and tells naughty ones where thay can find something juicy!

Quote:
Also was wondering if there were programs out there that will read/draw the actuall PHP file from the server, instead of the output produced by PHP. I'm thinking along the lines of a PHP script that validate passwords. Such a scrip will contain the passwords so if someone get hold of the actual script, they would also have the passwords.

Thanks for any advise.
No - not unless you write and upload them
Reply With Quote
  #3 (permalink)  
Old Sep 26th, 2006, 19:09
New Member
Join Date: Sep 2006
Location: Uitenhage, South Africa
Age: 35
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Security isues / PHP

Ecelent, that make me feel more confident that it would be safe. Not that I think any hacker would be interested in my tiny little web site.

Thanks for the reply.
Reply With Quote
  #4 (permalink)  
Old Sep 27th, 2006, 12:16
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Security isues / PHP

The easy answer: Put index.php in every public directory, even if it's nothing but a redirect header. This gives you a layer of protection.

Or if you want to get cute, do a site map for the files in the directory that you want the public to access, using the default directory index as a template.
Reply With Quote
Reply

Tags
security, isues, php

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS Security ChrisTheSoul Web Page Design 5 Feb 21st, 2008 16:28
php security saltedm8 PHP Forum 22 Sep 27th, 2007 09:22
Help with security wiggles Website Planning 16 Apr 9th, 2007 22:28
Security cbrams9 JavaScript Forum 2 Sep 22nd, 2006 01:47


All times are GMT. The time now is 06:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43