I was hacked – how to prevent saying those words…
It can come as a terrible shock to hear your website has been hacked. But some of the steps to restoring your website and steps to secure your computer are actually things you should do before you find your site was hacked. Secure passwords are no longer enough and taking some precautions can only benefit you. Having a secure desktop environment greatly improves your websites security.
From our experience, when there is a password compromise, this is typically due to a virus or other malicious software on a device used to access the account. The virus gives passwords entered on the device to malicious users who can use it to install phishing sites, send spam, and other malicious activities. Less frequently, the malicious user manages to guess the password.
To avoid this often costly experience again, we recommend you take a look at these steps to reduce and remove the risk of having your website hacked:
- Use the following online vulnerability scanner and ensure your software is up-to-date: http://secunia.com/vulnerability_scanning/online/?task=load
- 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 ( http://www.malwarebytes.org/ ) and
- ComboFix ( http://www.bleepingcomputer.com/combofix/how-to-use-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 use one or both of them and one of the following:
- 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: http://en.wikipedia.org/wiki/Password_strength#Guidelines_for_strong_passwords
- 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.
- 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)
- 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 http://www.avg.com.au/index.cfm?section=avg&action=onlinescan to test suspicious links you are given in emails or find online.
- 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.
- 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.
- 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.
- 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.
If you would like help with cleaning malware from a personal computer, we’ve found this forum post to give an in-depth description of things to consider: http://forums.majorgeeks.com/