[CLUE-Tech] Cracking websites

Jed S. Baer thag at frii.com
Sat Feb 21 18:33:37 MST 2004


Hi Folks.

I'm wondering about website security. In a shared hosting environment,
under Apache, is there anything to prevent me from reading other users'
files -- that is, any files which must be readable by the httpd user for
the site to function?

For example, I could set up a PHP script which executes any shell command
I enter.

 <?php htmlspecialchars(system($mycmd)); ?>

And feed it "ls -la ../.." as a start -- given what I've seen of the
directory structure of some shared hosting environments, that would give
me a list of all user directories on the same server (or disk volume).

Proceeding from there, I could look for config files, include files, etc.,
searching for database user/pass strings, and other things of interest,
using cat and grep.

This seems like such an obvious crack, I have to think there's a standard,
effective measure to prevent it. Presumably something in the virtual
hosting setup that creates the equivalent of a chroot jail -- or is that
possible only using a virtual server?

jed
-- 
http://s88369986.onlinehome.us/freedomsight/

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-tech mailing list