Most people know what malware means. Fewer people know what it really is—or how it gets onto their sites.

How does malware work?” and “Why is malware used?” are all-too-common questions. If we know one thing, it is that a lack of knowledge on the topic causes major problems. According to recent data, it is estimated that 17.6 million of the world’s websites are infected with malware.

Understanding where it comes from and how it works are the first steps to securing your site. So, how does malware work? Here are a few ways it can infect your site:

  1. Compromised credentials. If any of your admin’s usernames or passwords are compromised, attackers gain full access to your site.
  1. Code vulnerabilities. When you install a CMS like WordPress and add plugins or themes that are not maintained, your site becomes vulnerable.
  1. Cross-site contamination. When multiple sites are hosted on the same hosting account and one becomes infected, the rest become vulnerable as well. This can also happen if multiple testing, development, or backup websites are left installed in a single hosting account.

Onto the next question: why is malware used?Once malware is on your site, attackers can use it to do the following:

  • Website redirects. Malware can redirect visitors to a malicious site—and cause a host of harmful complications.
  • SEO spam. Attackers can leverage your web traffic to artificially inflate their own, compromising your site’s standing with Google.
  • Phishing. Through malware, attackers can hold fake pages for popular websites like Outlook and Google on your website hosting account. This tricks people into logging in, putting their information at risk and rendering your site susceptible to permanent deactivation.
  • Defacements. Whether they consist of attention-grabbing statements, political ideologies, or anything else, defacements are when attackers use your website as a canvas to send a message—overwriting your site material in the process.
  • Backdoor attacks. A particularly tricky form of malware, this allows an attacker to regain access even after the malware is “cleaned,” enabling them to repeatedly re-infect the system.

Looking for a shorter answer to the question, “Why is malware used?” The reality is quite simple—it is used because it is profitable. Largely automated and easily searchable, malware offers a low-effort method for bad actors to break into your site and steal your valuable data.


Luckily, malware can be prevented if you are proactive and use an automated website scanner and web application firewall. Still asking yourself: “How does malware work?” Contact the SiteLock team to get up to speed.