Jump to content

Best program for monitoring /


KirstyScott

Recommended Posts

I'm not sure of any. However, you could probably whip something up pretty quickly. If the site is small, you could in theory create a white-list array and then scan the directory and if a non-whitelisted file exists send an email or just delete the file etc etc. You could probably build a CRON for that (To be honest, I've never dealt with CRON, but I know it does time based stuff).

Link to comment
Share on other sites

Well, you have to think about it logically.  Any access point you have could be potentially compromised.  For example, any script that uploads files could be a potential hazard unless the security is correct on it.

 

 

If you're on shared hosting, you need to watch out for other people.  I've seen some shared hosting where there is little protection to keep clients from each other.

 

If you're not on shared hosting, one thing you can do is make Apache run as a user with access only to the web docs.

 

That's pretty much it.  When it comes down to it, you only need to make sure the ways your server is exposed are secure.  Most of those ways will be on purpose.  I see lots of security problems in upload scripts on phpfreaks, for example.

 

 

 

 

If you don't want to go the securing route, though, or maybe you want to do both, a script really wouldn't be hard to write that would catalog files and then see if anything had changed.  You could get really paranoid you wanted and even do md5 hashes of the files (or some other kind of hash).

 

This is the basic gist of what I would do:

 

Here's the psuedo-code of what I would do:

 

-load old list of files into an array.  I would probably store them in a serialized array in a file somewhere.

-loop through the input directory, and make sure folders/files are in the old list

-recurse through any folders.

-If you ever come across a file not in the old list, email your self or something.

 

 

You could even make a safe list of folders, in case you ever wanted to make an upload script or something.  You would just have to check if the file path started with a safe path.

Link to comment
Share on other sites

 

If you're not on shared hosting, one thing you can do is make Apache run as a user with access only to the web docs.

 

 

This may sound stupid to yah but i'm quite new at php if yah can't tell already  :P

But how can i make Apache run as a user with access only to the web docs? steps plz  :P

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.