Your Web Site Has Been Hijacked! Gaa... .:-[ ]
By admin on Jun 13, 2010 | In Advanced Topics | 2 feedbacks »
Our articles directory was hijacked on 6th June and restored to it's normal order on 10th June.
Learned some valuable lessons and would like to share it with you:
Follow up:
Due to the presence of PHP shells in this account, the most likely compromise is due to insecure scripts that are allowing RFI or LFI to be used to add malicious scripts to this account.
Here is a list of steps that you can take to ensure your sites remain secure:
1. Use the following online vulnerability scanner and ensure your software is up-to-date.
2. Download anti-virus and fully scan your PC for malicious files. Here are some free online scanners for Windows, which is typically the most vulnerable to infection. If you have a different OS, there are similar programs that can be located and run on your system to protect it in the same way:
MalwareBytes and ComboFix have been reported to be able to clean a recent strain of malware that resists detection by almost all other anti-virus agents. It is highly suggested that you one or both of them and one of the following:
- -housecall.trendmicro.com
- -bitdefender.com/scan8/ie.html
- -kaspersky.com/virusscanner
- -support.f-secure.com/enu/home/ols.shtml
- -eset.com
3. Update all passwords for any account that you access/own that may not be up to standards. Any passwords that have been compromised will need to be changed as well. Standards for secure passwords are available: en.wikipedia.org/wiki/Password_strength#Guidelines_for_strong_passwords
4. Ensure that all scripts/plugins/modules/components are updated to the most recent released version, as new versions are released primarily to address known security vulnerabilities in these sites.
5. Keep your computer secure from malware infecting it. If your computer is compromised, your account can be compromised through your password being used to access it.
- - Ensure you use the latest browser version; Ensure that said browser subscribes to Google's blacklist API (Mozilla Firefox, Google Chrome, Safari)
- - Disable javascript
- - Use the firefox addon noscript
- - Make sure your antivirus has a subscription to new database and version releases. This may cost some amount of money, but is well worth the expense.
- - Use avg.com.au/index.cfm?section=avg&action=onlinescan to test suspicious links you are given in emails or find online.
6. Ensure that all database configurations for your account are using a custom generated user and password combination, and that this information is not stored in plain text if this is feasible. Using your cPanel username and password to access your databases for your site may be convenient, but it introduces an incredible security risk.
7. Audit your account for unnecessary scripts, such as file uploaders. Ensure that if they are necessary that they are password protected, or if that is not feasible that they check the file type before allowing upload, to prevent upload of certain types of files.
8. Confirm that the permissions on the public_html folder is set to 750, as permissions of 755 will allow excessive amounts of malicious activity to the account.
9. Ensure that extended logging is enabled on your account so that any compromise can be investigated, as logs are regularly removed when statistics are run.
Using a custom PHP.ini file to change settings to secure the server better:support.hostgator.com/articles/getting-started/general-help/what-is-php-ini
The following settings are encouraged to better protect scripts:
disable_functions = exec,system,shell_exec,passthru,dl
open_basedir = /home/user/public_html
allow_url_fopen = Off
register_globals = Off
expose_php = Off
display_errors = Off
log_errors = On
To protect against RFI/LFI: trap17.com/forums/Rfi-remote-File-Inclusion-It-Stop-It-t61805.html
Here's a tutorial on MYSQL injection and how to prevent it: php.net/manual/en/security.database.sql-injection.php
Blocking access to certain private files in .htaccess. You will want to modify the match to reflect the files you are interested in securing.

A guide to some of the things you can do with .htaccess: javascriptkit.com/howto/htaccess.shtml perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
Content contributors, special thanks to:
Benjamin Davis Abuse, Network Security, and Blacklist Administrator HostGator.com LLC
Christine Jaa Home Business Elite Host Solutions LockHost.com
Reference: support.hostgator.com/articles/getting-started/general-help/register-globals-and-other-php-settings
2 comments
http://earn-money-online-review.com/webhostreview/blog1.php?tempskin=_rss2&disp=comments&p=51
with your link published, you are also risking exposing yourself to all the junk mail stuff...
best of luck
This post has 174 feedbacks awaiting moderation...
Leave a comment
| Set Up My Own Email Server For This Website Week I » |



