Results 1 to 4 of 4
Thread: i want a command ... !!
-
08-26-2009, 09:27 PM #1Newbie
- Join Date
- Aug 2009
- Posts
- 18
i want a command ... !!
Hello Friends,
my last thread was about ifram infection and i've found good idea
i need someone to write to me cronjob command that do the following
every 4 hours it runs an php file at following path
/home/my_hosting_un/public_html/size_detect.php
how could be the cronjob command i do write ????
*** since it attack index.php we can record its size and which size_detect.php when it run and found different in size it send you an mail >>
if it worked i will write here the code the of idea after improvment , i just need the command in order to test it
thanks in advance
-
08-26-2009, 09:40 PM #2Web Hosting Guru
- Join Date
- Oct 2007
- Location
- CA,USA
- Posts
- 323
Try to setup this command as a Cron Job
0 4 * * * php -q /home/my_hosting_un/public_html/size_detect.php
If you want to test the file use
php -q /home/my_hosting_un/public_html/size_detect.php
-
08-26-2009, 11:58 PM #3Web Hosting Master
- Join Date
- Mar 2009
- Location
- Gods Own Country
- Posts
- 681
it will still report if customers change their php files for good..
may be, you can monitor the ftp logs for immediate download and upload of files.. usually iframe attacks are done like this
1. A file is downloaded from server using FTP ( in 99% of cases )
2. The file is changed at attackers end.
3. The file is uploaded back to server.
The entire operation takes less than 1 second. So, if there is frequent download and upload of files in short time ( say less than 3 seconds ), then some sort of attack is happening.█ Fabin Mundattil @ Xieles Support
█ High Quality Server Management | support @ xieles.com
█ https://xieles.com
-
08-27-2009, 07:13 AM #4Disabled
- Join Date
- Apr 2005
- Location
- Cochin
- Posts
- 2,452
You could prbably use a diff command
diff <reference file > index.html
Similar Threads
-
command to stop the wget command?
By shippuuden in forum Hosting Security and TechnologyReplies: 9Last Post: 05-01-2007, 10:18 AM -
Perl: how to run a command line command from inside perl
By fozzy in forum Programming DiscussionReplies: 3Last Post: 10-28-2005, 11:34 AM -
what does this command do ?
By AndyJ in forum Hosting Security and TechnologyReplies: 2Last Post: 07-21-2005, 03:00 PM -
Linux command/script to run a command for every file in a directory tree?
By civ in forum Hosting Security and TechnologyReplies: 5Last Post: 01-25-2004, 08:48 PM -
Need some help with SSH command
By Tazzman in forum Hosting Security and TechnologyReplies: 12Last Post: 06-06-2002, 10:09 PM