Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Deny Access To configuration file using php scripts |
|---|---|
| Date: | Tue, 01 Mar 2005 21:26:29 -0500 |
Hi,
There are a couple of things you can try, First you can use apache directives to deny access to the file. To do that add the following text to the httpd.conf file:
<Files ~ "\.inc$"> Order allow, deny Deny from all </Files>
While that may stop the web-server from server the files up, it would not stop a php script from accessing the files.
I'm not sure that this can easily be solved. If the file needs to be readable by apache, then it can also be read by any other process running as the same user as apache, which would be every php script.
If you are using virtual hosts, then you may be able to solve the problem using apaches per-user virtual-host configuration. This allows scripts to run as someone other than 'nobody' (or whoever apache is running as).
The second thing I would suggest is to disable access to the system()
They could also use functions like fopen(), require(), include(), etc to
read the files.
- Suramya
-- ---------------------------------------------------------- Some days you're the dog; some days you're the hydrant. ---------------------------------------------------------- Name : Suramya Tomar Homepage URL: http://www.suramya.com -------------------------------------------------
************************************************************ Disclaimer: Any errors in spelling, tact, or fact are transmission errors. ************************************************************
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Deny Access To configuration file using php scripts, Scott Fagg |
|---|---|
| Next by Date: | Re: Deny Access To configuration file using php scripts, Jan Urbancik |
| Previous by Thread: | Re: Deny Access To configuration file using php scripts, John Georgelas |
| Next by Thread: | A question about passwords and login/authentication, Roman L. Daszczyszak II |
| Indexes: | [Date] [Thread] [Top] [All Lists] |