Support

Admin Tools

#43034 Advice after hacking

Posted in ‘Admin Tools for Joomla!’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.3.0
PHP version
8.3.16
Admin Tools version
up-to-date

Latest post by nicholas on Thursday, 02 July 2026 07:47 CDT

Richard_Wylde
Nicholas

Got hacked around 2.30 am today - Filefuns.php in /media....and nodoubt a lot more.... but no obvious change in the database


********************
Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
www.terahertz.co.uk
Apache

***************************

I had a copy of htdocs.... so got site back up.... and have changed passwords for both Joomla and root.

Any obvious advice? I am assuming you have seem this before

Richard






moira

Your site was compromised via a malicious PHP file (Filefuns.php) placed in /media. That directory is publicly accessible and, by default, PHP files in it can be executed directly by a visitor. This is the attack vector.

Step 1 — Update everything, right now. Today (16 June 2026), a small number of Joomla extensions — including SP Page Builder — published emergency updates addressing 0-day vulnerabilities that are actively being exploited. If any of those extensions are installed on your site, your site was almost certainly compromised through one of them. Please log into the administrator backend and update every extension and Joomla itself before doing anything else.

Step 2 — Clean the site properly. Restoring /htdocs from a copy gets the site working, but that copy may itself have been compromised at an earlier date, or you may have missed additional backdoor files that the attacker planted elsewhere. A thorough clean-up is required:

  • Run Components → Admin Tools → PHP File Change Scanner and start a new scan. It will flag every PHP file with a non-zero Threat Score, as well as any files that are new or unexpectedly modified compared to your last known-good baseline. Files like Filefuns.php planted in /media, /tmp, /images or other non-code directories will stand out immediately as they have no business being there.
  • If this is the first time you have run the scanner, it will build a baseline from your current state. In that case, focus on files flagged as Suspicious or Threat files, and on any .php files in directories that Joomla does not normally put PHP files in (e.g. /media, /images, /tmp, /cache).
  • After removing any malicious files, change all database credentials, Joomla Super User passwords, and any API keys or credentials stored in the site configuration.

Step 3 — Prevent this class of attack in future. The .htaccess Maker in Admin Tools has a Server Protection feature that generates rules blocking direct HTTP access to PHP files in directories such as /media, /images, /tmp, /cache, /logs, and others where Joomla stores user-uploaded or generated content rather than executable code. If Filefuns.php had been placed there while Server Protection was active, the web server would have refused to execute it with a 403 Forbidden error before PHP even started.

To enable this, go to Components → Admin Tools → .htaccess Maker, scroll to the Server Protection section, enable Frontend protection (and Backend protection for the administrator area), then click Save and Create .htaccess.

Full documentation for Server Protection, including how to add exceptions for legitimate files that need direct access, is at: https://www.akeeba.com/documentation/admin-tools-joomla/server-protection.html

Moira Fari

Support Specialist

🇬🇧English: native 🕐 My time zone is Asia / Nicosia
Kindly note that my replies are fully vetted by our developers.

Richard_Wylde
Moira - Thank for this. Sadly I did not read it until I got hacked again. WWW site back up, via your backups. Latest version of all plugins etc

Now trying to sort out .htaccess. On a version on a Raspberry Pi, the Server protection works (ie .hataccess has not shut the site down) On a Suse box, with the same www site, it fails even if Server protection and everything else is off. Will work away at it, but some advice may still be needed.

Give my Best Wishes to Nicholas

Richard

nicholas
Akeeba Staff
Manager

Hi Richard!

I expanded on what Moira wrote here: https://www.akeeba.com/news/1784-what-to-do-after-and-before-your-site-got-hacked.html 

On a Suse box, with the same www site, it fails even if Server protection and everything else is off.

The version of Apache is far less relevant than its configuration. Do you allow .htaccess files? Which Apache modules have you enabled? IIRC SuSE does not have Apache's mod_rewrite enabled by default. That's the very minimum requirement for the .htaccess in Joomla (and WordPress, and pretty much every other PHP application) to do anything useful.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Richard_Wylde
Nicholas/ Moira

A quick update for benefit for others.... I have had three attempts to get my site back up, to find is was taken down overnight. Kickstart was very useful (and so was Claude in diagnostic Problems). I now have a much better .htacess file and have change all passwords - both on the SUSE box root, the Joomla Login and the Database logging. Ditto for file permissions. All Pluggins are up-to-date

As an example Claude commented thus


.htaccess Hardening
The .htaccess was generated by Akeeba Admin Tools 7.8.9 and provided good baseline protection. One issue was corrected:
• Referrer-Policy was set to 'unsafe-url' (leaks full URLs including query strings to all external sites). Changed to 'strict-origin-when-cross-origin':
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Positive features confirmed active in the .htaccess:
• PHP file execution blocked outside entry points (index.php, api/index.php)
• Extensive bad user-agent and scanner blocking list
• X-Frame-Options: SAMEORIGIN (clickjacking protection)
• X-Content-Type-Options: nosniff
• SVG script neutralisation
• ServerSignature Off and X-Powered-By header suppressed



At the moment it is up but I live in trepidation....

Do you have any advice on how to probe the site?

Richard

Do you have

nicholas
Akeeba Staff
Manager

You can change the Referer Policy in the .htaccess Maker configuration. There's no gap there.

As for probing the site... if you have updated all extensions and removed all of the hacked files as per the link I sent you, you are pretty safe. Beyond that you'd have to know exactly how you got hacked, in case it was a different zero day vulnerability nobody has discovered / reported yet.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!