How to protect your eCommerce project from cyber attacks

April 5, 2023
5 min

How to protect your eCommerce project from cyber attacks

According to ThreatPost, NordLocker scientists discovered 1.2 terabytes of stolen information collected from 3.2 million Windows computers in June 2021. Hackers attacked with viral versions of photo editors, pirated games, and Windows hacking tools. They found 6.6 million files, 26 million pieces of bank information, and 2 billion cookies. This proves that nowadays, personal data is more vulnerable than ever.

It’s not just companies that haven’t taken security measures or users who don’t know why you can’t connect to an unsecured connection or what a VPN is that are at risk. As ExpressVPN explains, any of us are potentially vulnerable. Let’s say you have a Mac with Wi-Fi and Ethernet connections available, but the preferred connection is Ethernet. It’s a common situation. At the same time, the IP address in the “DNS Servers” section is 10.x.x.x, 192.168.x.x, or between 172.16.x.x and 172.31.x.x, which is your local IP address. So, the router is acting as a DNS server, and the ISP easily looks up your DNS queries. In this case, you are completely vulnerable to a leak through the DNS server, although the system looks secure at first glance.

PerimeterX research shows that cybercriminals no longer use a single attack model but instead develop an attack tailored to each eCommerce company. This is not surprising: Cyber attack software can easily be purchased for $100 on the dark web. What’s more, as this year’s Verizon report showed, in 61% of incidents, data was leaked after account credentials were stolen. Cybercriminals pay $2 to buy billions of logins and passwords and then use the information to break in and get substantial financial rewards.

In this article, we’ll take a closer look at the cyber risks that eCommerce companies face and how to deal with them.

Cyber threat statistics in eCommerce

Let’s look at the following facts from the WebScale report to determine what to expect in the future.

  • According to Cyberpion, 83% of U.S. eCommerce businesses are vulnerable to cyberattacks.
  • According to a VMWare Carbon Black report, 77% of online store owners have purchased cybersecurity tools, and 69% have expanded their IT departments by hiring experts to assess networks, systems, and vulnerabilities.
  • In 2020, the number of viral bots was 32% higher than in 2019. 38% more DDoS attacks were recorded. Credit card thefts without the online banking user’s knowledge were 43% more common, and financial fraud was 56% more advanced. SQL injection (putting a virus code into a form on the site of an online store to get the buyer’s money at the moment of online payment) increased by 45%.

Those eCommerce representatives who were able to adapt to the threats of the digital age have taken several security measures. Let’s take a look at what this has resulted in, according to the WebScale report.

  • 70% of organizations have invested in two-factor authentication.
  • 54% of brands have taken care of bot management, a system to detect viral bots and block malicious traffic that disrupts the online store.
  • 79% of e-commerce players will invest in a Content Security Protection (CSP) policy. This mechanism protects against the site’s introduction of viral forms and codes. The CSP forms the rules for secure content and blocks any information from outside the site that does not comply with the rules.
  • 64% of the companies will buy online fraud detection systems, and 72% will purchase Real User Monitoring (RUM) software.
  • 68% of online store owners want to automate security management systems.
  • With these measures, 29% of organizations have improved their ability to prevent cyberattacks compared to two years ago. 34% are faster at identifying hacker intent, 24% are better at recovering systems after a leak, and 27% are more accessible at minimizing the impact of incidents on business.

Types of cybercrimes

As we mentioned above, hackers have rarely used the same tactics in recent years, each time coming up with new ways to bypass security. Nevertheless, users are often lazy when it comes to cybersecurity, and cybercriminals may use long-tested attack methods, which we’ll talk about here.


During a DDoS attack, many requests are sent to the system, making it impossible for ordinary users to log in and taking the system down. For example, Amazon suffered such an attack in 2020, after which it took the company three days to get the site back up and running.

What you can do to protect your online store from a DDoS attack:

  • Use only licensed software and don’t ignore updates.
  • Update your server hardware frequently.
  • Install an open-source proxy manager (such as NGINX) to help your server withstand high traffic volumes.
  • Implement traffic analytics to help identify DDoS attacks in advance.
  • Use a firewall to protect network servers, giving access only to administrators.


Skimming is adding virus code to various websites to collect users’ data—for example, to payment and order confirmation pages, giving hackers access to banking data, emails, passwords, etc.

Measures to protect eCommerce projects from skimming include:

  • Using a firewall and two-factor authentication.
  • Regular system updates.
  • Installation of security plugins (if the site was created using free templates).


Phishing is a model of cybercrime in which hackers impersonate a real company while sending emails. When the recipient clicks on a link in an email or opens an attached file, a virus attacks their computer. Often these attacks can be ordered by your competitor, or cyber criminals can steal important data or break your site, demanding a ransom. Unfortunately, the only thing you can do to protect yourself from phishing is to always be on your guard against opening suspicious emails, especially if the link to the site looks strange.

In the first quarter of 2022, according to Statista, 14.6 percent of all phishing attacks worldwide were aimed at retail and eCommerce projects, making them the third most important targets for hackers (after financial institutions and SaaS).

SQL injection

This is probably one of the easiest tactics to infiltrate a site that works with databases, bypassing all authentication procedures. The hacker adds arbitrary code to SQL queries, which gives him access to databases, personal user data, including transaction data, and the ability to encrypt the data to demand a ransom.

What can you do to protect your eCom project from this attack?

  • Don’t make your store code publicly available.
  • Don’t use other people’s code, as it may contain viruses.
  • GET method should be replaced by POST, since GET sends unencrypted requests, which may help cyber criminals to find out the variable names for the attack.
  • If you have had technical problems with your site, don’t tell users which ones because hackers may figure out which vulnerabilities you have.

Why is using Magento 2 a guarantee of security for your site?

Magento 2 has security elements such as permissions and access with different levels and users to protect customer data.

With its modern and secure architecture, Magento 2 ensures PCI and GDPR compliance to protect your users’ data, which will surely help keep not only your site but also your reputation and audience.

If you still have questions about Magento 2 security, we’d love to answer them!

Written by

Table of Contents