Site speed, clean design, great content — you can get all of that right and still lose everything to a single line of code you never wrote. Joomla powers hundreds of thousands of real businesses, which makes it a permanent target. And here's the part most site owners learn the hard way: getting hacked is bad, but staying hacked is worse — because a well-built backdoor is designed to survive the very cleanup that's supposed to remove it.
This article walks through how a Joomla compromise actually happens, the tricks attackers use to keep a backdoor hidden so they can use it silently later, and — most importantly — how to tell whether your "cleaned" site is genuinely clean.
It Started With a Door You Forgot to Lock
Let's clear up a myth first: most Joomla sites aren't hacked by a genius who cracked something unbreakable. They're hacked through the door the owner forgot to lock — an out-of-date core or extension with a publicly-known vulnerability.
When a security fix ships for Joomla or a popular extension, the details of the bug it patches become public. From that moment, automated bots begin scanning the entire internet for sites still running the old version. If your site is weeks or months behind on updates, you're not hiding — you're on a list.
The uncomfortable truth: attackers don't beat your security. They beat your patch cadence. Speed of updating matters far more than sophistication of defence.
The Backdoor That Doesn't Look Like Malware
Once an attacker has a way in, they rarely deface the site or steal data immediately. That would get them noticed and locked out. Instead, they plant a backdoor — a quiet way back in — and they go to great lengths to make it invisible. Here's how.

1. It's disguised to blend in. A backdoor is almost never named something obvious like hack.php. It's dropped into a folder full of legitimate files — a template override directory, for example — using a filename that looks like it belongs there. To a human skimming the file list, nothing stands out.
2. It's obfuscated so scanners miss it. A classic Joomla backdoor is a single, innocent-looking line:
eval(base64_decode($u));
Read that carefully: the malicious code isn't in the file. The file just contains an instruction to decode and run whatever the attacker sends at request time (through the variable). So a security scan that greps for known-bad strings sees a short, boring file and moves on. The weapon only assembles itself the moment it's fired.
Why this matters: "We scanned the site and found nothing" is not the same as "the site is clean." A well-obfuscated backdoor is designed to pass a naïve scan.
The Silent Beacon
How does an attacker keep track of which of their thousands of victims still have an open door — without logging in and risking detection? Often with a beacon.
A common trick is a tiny "image" file — for instance, a PNG only a few pixels tall — placed among the site's real assets. It contains no executable code, so it looks harmless to a code scan. But when it loads, it quietly pings the attacker's server, confirming the site is still compromised and reachable. It's a doorbell only the attacker can hear.
These residual artifacts are exactly the kind of thing a rushed cleanup leaves behind: not code, so it "isn't malware," yet still part of the attacker's toolkit.
Cloaking — Why Your Dashboard Looked Fine

Here's the trick that keeps compromises alive for months: cloaking. Attackers add rules — often in the site's .htaccess file — that serve different content depending on who's asking.
A search engine crawler might be redirected to spam or a malicious payload, while a normal visitor (and the site owner) sees the perfectly ordinary homepage. The result: your site looks completely fine when you visit it, your analytics look normal, and the abuse is happening entirely out of your view — until your rankings crater or your host suspends the account.
Why "We Deleted the Bad File" Isn't a Cleanup
Now the crucial lesson. Suppose someone finds one backdoor and deletes it. Problem solved? Almost never — and understanding why is the whole point of this article.
Stealthy compromises are built on redundancy and disguise. A serious attacker plants multiple backdoors in different forms and locations precisely so that removing the one that got noticed leaves the rest untouched. Pull one thread; the garment stays sewn together.
So when a report says "the malicious file has been removed," what it usually means is: the part that got noticed is gone. That is a very different claim from "the intrusion has been fully removed." The residual beacon, the cloaking rule, the second backdoor with a different disguise, and — critically — the original unpatched vulnerability that let them in can all still be sitting there, waiting.
How to Know Your Joomla Site Is Actually Clean
If your site has been compromised, don't settle for "the obvious malware is gone." Verify it. Here's the checklist a proper cleanup follows:
- Patch the entry point first. Update Joomla core and every extension to the latest version. If you don't close the original hole, you'll simply be reinfected — often within hours.
- Compare core files against the official release. Download a clean copy of your exact Joomla version and diff it against your site. Any core file that doesn't match is a red flag.
- Hunt for disguised code, not just known-bad names. Search for tell-tale patterns like
eval(,base64_decode(,gzinflate(, and PHP inside image or upload directories — the places code should never live. - Inspect
.htaccessand server config for cloaking rules. Look for redirects that key off the User-Agent (e.g. treating search-engine bots differently from real visitors). - Audit the database, not just the files. Check the user table for accounts you don't recognise, and review installed extensions and scheduled tasks for anything you didn't add.
- Check for scheduled reinfection (cron jobs). This is the check people miss most — and it's why some sites "heal" and reappear compromised hours after a cleanup. A backdoor can live entirely outside your web root as a scheduled task that re-downloads itself on a timer, so deleting the files does nothing. Inspect the site user's crontab (
crontab -l, or cPanel → Cron Jobs) and the system cron locations (/etc/crontab,/etc/cron.d/,/var/spool/cron/) for anything callingwget,curl,base64, or scripts dropped in/tmp. Note this is separate from Joomla's own scheduler in the step above — it lives at the server level. (Thanks to Miguel Almeida for flagging this one.) - Verify the version that actually goes live. Run your final check on the exact folder you deploy — after any copy or database import — not on the working copy you cleaned. The restore step itself can reintroduce something.
Only when every one of those comes back clean can you honestly say the site is clean.
Bonus Tip: The best cleanup is the one you never need.
The single most effective thing you can do is shrink the window between a patch being released and you applying it. Turn on update notifications, review updates weekly rather than "when you remember," and keep an off-site backup you can actually restore from. A site that's patched within a day of every release almost never ends up on an attacker's scan list in the first place.
Conclusion
A modern Joomla compromise isn't loud. It's patient. It gets in through a missed update, hides behind ordinary-looking filenames and one-line obfuscation, phones home through a silent beacon, and cloaks itself so your own dashboards look reassuringly normal. Every one of those choices serves a single goal: stay hidden long enough to be used on the attacker's schedule, not yours.
That's also why "we removed the malware" and "the site is clean" are two very different sentences. If you take one thing from this: after any breach, treat the cleanup as unproven until you've verified the live, deployed site end-to-end — and until the original door is locked. Doing less looks faster; doing it properly is what actually keeps you safe.
Think your Joomla site might still be compromised?
Cleaning a hacked Joomla site properly — closing the entry point, removing every hidden backdoor, and verifying the live deployment — takes experience most site owners shouldn't have to learn under fire. If you're dealing with a compromise, or you just want a second opinion on a cleanup someone else did, we can help.