Site icon QHU Blog

5 Tips For Keeping Your Magento Store Safe From Hackers

With the growing popularity of Magento shopping cart the numbers of attacks reported to Magento community have also been growing. Many of these attacks could be easily prevented, if the administrators of Magento store have kept these few simple rules in mind:

1. Create a custom admin path

The default path for administrators in Magento is store-name.com/admin, but if you keep the default settings, you are only making it easier for the hackers to get to the login page and start guessing the password. You can easily change the admin path if you go to /app/etc/local.xml, locate and put any words you like in the place of “admin”. If you apply additional solutions, such as the two step authentication, you can also set a limit on the number of unsuccessful log in attempts to make it more difficult for the hacker to guess your password and to receive a notification when someone is trying to access the admin site.

2. Apply two-step verification solutions

Even the strongest passwords cannot provide you with solid protection and if your email account was attacked or your computer has been infected, the chances that the hacker will discover your passwords are much higher. This is why you should apply solutions, such as the two-stage verification process: one step being the traditional authentication with a password and the second stage being, for example, verification via mobile phone. Two factor verification greatly increases your chances of avoiding a hacker attack.

3. Check the payment processing files

If you suspect that your store might have been hacked, the first feature you should be checking are the payment processing files. Go to the folders: /app/code/local/ and /app/code/community/ to look for any overwrites of the extension classes and any other suspicious codes.

4. Check the log files

In a similar fashion you should also regularly check the log files – the error log and ssl error log. To find the log files in Magento go to /var/log/ folder. Perform a quick scan to detect anything unusual or simply compare the size of the log files from the past weeks/ months with the current log file: a sudden change in the size of the file might indicate that the security of your online store was compromised or that there is some other issue, which needs to be resolved. If you do observe potentially dangerous signs, but do not have enough experience with Magento to determine how serious the problem is and how to deal with it, hire Magento developers or ask the Magento community for help.

5. Check for code changes

Another easy way to say whether the security of your online store was breached or not, is to look for any code changes. If you apply revision control systems such as SVN or Git to maintain the past versions of your source code, you can quickly discover unwanted changes. A good tip is to check the code before making an update via Magento Connect Manager, otherwise you will be facing several dozens of changes, making it more difficult to track the potentially dangerous ones.

Marta Gromadzka is a writer and editor with a wide variety of experience, including writing for websites internationally and editing books on many different subjects and in a variety of formats.