Get started in 5 minutes!

How to secure your Magento store: 5 quick tips

Sansec has investigated thousands of security incidents with online stores and we have good visibility into the latest attack methods. If you implement the guidelines below, your store will be in the top-1% of most secure stores on the Internet.

  1. Use a malware & vulnerability monitor. Preventing an incident is of course the best strategy. To do this, you need live visibility into vulnerabilities of your system and all third party components. It is practically impossible to monitor this manually, so you need an automated vulnerability scanner like eComscan. It will alert you right away when a new issues is discovered. Second, an automated scanner will also alert you immediately to suspicious activity, malicious software and rogue admin accounts.

  2. Restrict access to admin control panels. Allow access for your office/staff IPs only. It is best to use a plugin for your system (see also free plugins we recommend for Magento 1 and Magento 2). If you are unable to use a plugin, second best is to use the IP filter in your webserver or CDN/WAF (it may leave some admin routes open though). If your staff uses dynamic IPs, we recommend to use a VPN service, so that you can tunnel all of your authorized store’s backend usage via a single IP.

  3. In case of malware infection, change ALL admin & database passwords immediately. You should assume attackers have intercepted all passwords. Unfortunately, we often see re-infection of stores where attackers use the same stolen passwords to re-enter & infect. We recommend using a computer-generated password of at least 10 characters. See our example script to change all passwords for Magento.

  4. Train your staff to deal with spearphishing. Many stores get hacked because a staff member clicked a link in the wrong message. Criminals are known to target larger stores by finding all employees on Linkedin and sending them phishing mails for weeks or months on end. It only takes a single click for your admin passwords to leak.

  5. Activate 2FA. We recommend to activate/install 2FA on all business related admin logins. While 2FA is not a full solution against breaches/hacks, it does provide an additional layer of security. For Magento 2: 2FA is bundled with the base install.

This page was last updated at Oct 1st, 2021

Need expert advice?

We are here to help!

Get in touch