9.2.3.Hardening Options

9.2.3.Hardening Options

With the Hardening Options section you are able to harden the way some basic Joomla! features work. These are advanced settings, so please make sure you understand what each option does before you enable it.

Block common usernames

This feature will prevent the creation of a user account whose username is one of the disallowed usernames.

The forbidden usernames are those which belong to the default forbidden username list, plus the Usernames explicitly forbidden set up below. However, any usernames in the Username explicitly allowed list below will not be blocked, even if it belongs to either of the previous two lists.

You can find the default list of forbidden usernames (1062 entries) in the file plugins/system/admintools/assets/forbidden_usernames.php.

Usernames explicitly forbidden

Usernames in this list will not be allowed for new user accounts. These usernames are forbidden on top of those in the default list described above.

Usernames explicitly allowed

Usernames in this list will be allowed for new user accounts. Use this to add exceptions to forbidden usernames found in the default list described above.

Warn about use of well-known passwords

When this option is enabled, Admin Tools will connect to the Have I Been Pwned database and check if the hash of the current password is known. If a match is found, the user will be blocked from using an insecure password.

Wait, are you sharing my password? Is that service secure?

First of all, we do not share your password. We're only sending a fraction (only first 5 chars) of the hash of your password. This method is called k-anonymity and it's a very secure way to share sensitive data without compromising its privacy. Your password CAN NOT be derived from this partial information. If you want to read the whole details of this implementation, you can take a look at this page.

Regarding the external service, it is powered by two well known figures: Troy Hunt (a security research) and CloudFlare (leader in Content Deliver System services). The service is so important for the security of computer systems that even the United States of America Federal Bureau of Investigation (FBI) contributes to it.

User groups to check for well-known passwords

Most likely you want to enable this feature only for specific groups: Admin Tools will check for well-known passwords only users belonging to those groups (default is Super Users)

Disable password reset for specific User Groups

Joomla allows all users who do not have the Super User permission to request a self-service password reset. This is typically through the “Forgot your password?” feature in the frontend login module and the frontend users component, both of which go through the frontend users component to send an email to the user to help them reset their password.

In some cases it is prudent to disallow this feature for certain types of users. For example, you may have user groups which do not have the Super User permission but can be critical to the operation of your site such as people doing end user support, handle personal or privileged information, control content publication workflows etc. A successful account takeover could have far-reaching implications for the operation of your site and/or business.

This feature allows you to disable the self-service password reset feature for users belonging in specific user groups.

Please note that this feature DOES NOT control whether users with Super User permissions are allowed to reset their password! Joomla itself automatically disallows self-service password resets for these users and this cannot be changed (it's a hard-coded check no third party plugin can change). This means that Super Users cannot reset their own password using the Forgot Your Password feature; this has to be done either by logging in and editing their user profile OR by having their user profile edited by another user with sufficient permissions to edit user profiles. This is a built-in Joomla feature, not under the control of Admin Tools.

Finally, please note that this feature only applies to self-service password resets sent by Joomla's frontend com_users component. It DOES NOT prevent third party software implementing its own password reset feature from allowing these users to reset their passwords.

User groups blocked from resetting the password

Choose the user groups which will be prevented from using Joomla's self-service password reset. Only visible and applicable when the “Disable password reset for specific User Groups” option is enabled.

Only users which are directly assigned a user group will be disallowed to reset their password. That is to say, you cannot just select the Public group and expect nobody to be able to use this feature; the restriction is NOT applied to child user groups.

Also note that you do not need to select the Super Users group or any other group which grants the Super User permission. Joomla itself automatically disallows self-service password resets for these users and this cannot be changed (it's a hard-coded check no third party plugin can change). This means that Super Users cannot reset their own password using the Forgot Your Password feature; this has to be done either by logging in and editing their user profile OR by having their user profile edited by another user with sufficient permissions to edit user profiles. This is a built-in Joomla feature, not under the control of Admin Tools.

Disable editing user properties

When enabled, Admin Tools will prevent editing a user which belongs to or is added to one of the user groups set in the option below. This restriction applies to the backend, frontend, and API applications and cannot be overridden even by Super Users.

If you do not select specific user groups, Admin Tools will apply this restriction to all users who can log into the site's backend.

The idea behind this feature is that it provides an additional protection against privilege escalation, and cross-site scripting attacks. For example, a malicious user may exploit a vulnerability in your browser, browser extension, or email programme to trick you into visiting a URL while logged into your site as a privileged user so that a known user account is granted privileged access to your site (e.g. Super User), or a new user account with privileged access is created. With this protection in place this will be impossible.

Important

If you want to make any changes to a user account protected by this feature you need to temporarily disable this feature first.

Disable editing user properties for these user groups

Choose the user groups which will be protected by the “Disable editing user properties” feature.

If you do not select specific user groups, Admin Tools will automatically determine which user groups have backend login privileges and protect them.

If your site has user groups which have elevated privileges in the frontend or backend of the site such as e-commerce store managers, forum moderator, support ticket system user agents etc we recommend that you select these user groups in addition to the standard privileged backend user groups (for most sites that would be Manager, Administrator, and Super Users).

Disable creating / editing users from the frontend

This feature allows to prevent creating or editing users from the frontend of the site, as long as this users belong to or are added to one or more user groups selected in the option below. The default (when no group is selected) is to prevent editing or creating users which belong or are added to any group which has backend access privileges.

The idea behind this feature is that you should not be able to create a new user with administrative backend login privileges from the public frontend, as this creates an opportunity for privilege escalation. That is to say, if an attacker finds a vulnerability which allows them to surreptitiously create new user accounts which belong in one or more privileged user groups (e.g. Administrator, Super User, etc), or add an existing user account to privileged user groups they would be able to convert a standard, unprivileged account into something much more powerful with detrimental impact to the security of your site.

This feature addresses some of the most notorious zero day attacks in Joomla! which took place between 2015 and 2016 and we recommend having it turned on at all times. If you need to disable it we strongly recommend rethinking whatever leads you to disable this setting because it's creating a gaping security hole on your site.

Disable creating / editing users in these groups from the frontend

Select the user groups the Disable creating / editing users from the frontend feature above applies to.

If you make no selection, Admin Tools will automatically determine which user groups have backend login privileges and apply this feature to these user groups.

If your site has user groups which have elevated privileges in the frontend of the site such as e-commerce store managers, forum moderator, support ticket system user agents etc we recommend that you select these user groups in addition to the standard privileged backend user groups (for most sites that would be Manager, Administrator, and Super Users).

Monitor Global Configuration

When this is enabled and someone tries to change the Global Configuration of Joomla!, either from the back-end or the front-end, you will either be notified or they will get blocked (depending on your settings below). This feature is designed to protect you against sly hackers or malicious administrators who subtly change your site's configuration for nefarious purposes, e.g. by elevating the global privileges of user groups.

Monitor component configuration

When this is enabled and someone tries to change the configuration of any core Joomla! or third party component (what you see when you click Options in a component's toolbar) from the back-end of your site you will either be notified or they will get blocked (depending on your settings below). This feature is designed to protect you against sly hackers or malicious administrators who subtly change your components' configuration for nefarious purposes, e.g. by elevating the privileges of user groups with regards to a particular component.

Action for configuration monitoring

This option works in conjunction with the two above. You define what do you want to do when either global or component configuration is enabled and a change is detected in the configuration.

  • Email will simply send a warning email to the email addresses you've configured in Email this address after an automatic IP ban. The changes in configuration will go through. This is the recommended setting for most sites.

  • Block will treat any such changes as a reason to block the request. The changes in configuration will NOT go through. This setting should only be used on "locked down" sites where configuration changes are not expected (or will only be performed by an administrator who has adequate access to modify Admin Tools' configuration).

Monitor Critical Files

Critical files commonly modified by hackers (index.php, administrator/index.php and the index.php, error.php and component.php of all templates installed on the site) will be monitored for changes on every page load. If a change is detected, an email will be sent to the email addresses configured in Email this address on blocked request. This usually lets you get an ahead warning in case of a successful hacking attempt.

Admin Tools checks these files every time your site loads a page. The size of the file, the file's last modification date, the MD5 checksum of the file's contents and the SHA-1 checksum of the file's contents are calculated by PHP and compared against the information stored in the database table #__admintools_storage (where #__ is the common table name prefix of your site, as defined in your site's configuration.php file), in the row with the key criticalfiles. If any of this information has changed since the last request to your site, Admin Tools considers the file changed and triggers an email to you about changed files. Every time a change is detected the aforementioned information for each file is updated in the #__admintools_storage database table. This way you will not get any further e-mails about the changed file unless it changes once again.

It is possible for an external application or process to modify these files, then restore them back to their previous state — including the last modified date. If a request to your site takes place while any of these files is in a modified state you will receive an email. This may be perceived as a “false positive” because by the time you check your site again the change has been reverted. This is NOT a false positive, something really DID change. Admin Tools deliberately sends you an email because this is something which can also happen during a legitimate attack: the attacker modifies one of these files to gain access to your site, then covers up their tracks by restoring the file to its previous state.

It is also possible that you will receive an email if someone or something modifies the #__admintools_storage database table row. In this case the contents of the database table may not reflect the files currently on the server's filesystem. As a result, Admin Tools perceives the files as changed. For example, this may happen if the host automatically rolled back the state of your database or when you restore a database-only backup / SQL dump of your database.

Finally, you will most likely receive this kind of email after updating the Joomla version on your site, after updating your site's template, and after updating the Global Configuration of your site — even if this happens automatically without your interaction. In both cases some of the critical files have changed. When you update Joomla its index.php files are changed. When you update your template its index.php, error.php and component.php files are changed. When you save your site's Global Configuration —or a third party extension or external software updates your site's Global Configuration— the configuration.php file is changed. These are expected changes. If they happen without your knowledge you should track down what is causing them and decide whether it's acceptable behaviour or not.

Monitor these files for changes

Monitor the following files (one per line) for changes. If a change is detected, an email will be sent to the email addresses configured in Email this address on blocked request.

The file paths must be entered relative to the site's root, without a leading forward slash.

Monitor Super User accounts

Admin Tools will keep track of the user accounts with Super User access. If a new Super User is added outside of Joomla's Users page, an email will be sent to the email addresses configured in Email this address on blocked request. Moreover, the detected new Super User accounts will be automatically blocked. The idea is that these Super Users are most likely create as the result of a hack or rogue code.

Please note that users created or added by other Super Users in the backend of the site using Joomla's Users page will NOT be blocked by this feature. If you wish to disable this please use the Disable editing backend users' properties feature.

Disable Joomla!'s Two-Factor Authentication on password reset

When enabled, Admin Tools will disable the Joomla! Two Factor Authentication (2FA) / Multi-Factor Authentication (MFA) configuration for a user when they are resetting their password.

Joomla! allows every user of the site to enable MFA for their user account. In case the user misplace their MFA device or is otherwise unable to use MFA they are given emergency one time passwords. However, many people forget to note them down or do not understand how to use them. Every time they cannot use MFA they have to contact an administrator of the site to disable MFA on their account. Even worse, when the user is a Super User themselves they have no way to disable MFA without editing the database. This is where this Admin Tools feature comes in handy.

The workflow is the following: The locked out user starts by using the "Forgot your password?" link in Joomla! to request a password reset. The receive an email with instructions. They follow the link which takes them back to the site where they enter their username and the password reset authorisation code found in the email. Now they enter their new password. When the password changes, the "Disable Joomla!'s Two-Factor Authentication on password reset" feature of Admin Tools kicks in and disables MFA on this user's account. The user can now log in to the site using just their username and password.

Important

Please remember that this ONLY applies to the MFA feature built in Joomla! itself. If you are using third party Two Factor Authentication / Multi-Factor Authentication solutions this option will have NO effect on them.

Caution

We recommend AGAINST using this option because it can degrade the security of your user accounts. If an attacker gains control of the email account of a privileged user of your site, e.g. an Administrator or Super User, they will be able to reset their password AND disable their Two Factor Authentication at the same time. This will allow them to log into and take over your site.

We strongly advise you to instead use more than one authentication methods in Joomla's Multi-Factor Authentication. We recommend using passkeys as your MFA method, setting up at least two separate passkeys handled by two separate devices.

Alternatively, you can set up and use passkeys for logging into your site (you need your username and your passkey, not your password). This method bypasses the MFA and is far more secure than using a username, password and MFA to log into your site. Please note that many Joomla! 5.1 versions have a bug where they will ask you for MFA even if you use a passkey for authentication. This bug has been identified, but is unlikely to be fixed before Joomla! 5.2.

Forbid front-end Super Administrator login

When enabled, it will not be possible for Super Administrators to log in to your site's front-end. This is a security precaution against password brute forcing. One common method is an attacker trying to login to the front-end of your site as a Super Administrator, trying different password until he finds the correct one. When this option is enabled, he will not be able to log in as a Super Administrator in the front-end of the site, crippling this brute forcing method of determining the Super Administrator password.

Treat failed logins as a reason for blocking the request

When enabled, failed login attempts of any kind of user (even simple registered users) count as a reason to block the request and are being logged in Admin Tools' Blocked Requests Log. There is a very useful implication to that. Since they count as security blocked requests they count towards the limit you set up in the automatic IP blocking. Therefore, after a number of failed login attempts, the user's IP will be automatically blocked for the duration you have set up.

Warning

This feature can very easily get you locked out of your site. We strongly advise you to not use it unless all your backend users are using a password manager or passkeys for authentication.

Log usernames

By default, when a failed login is treated as a blocked request no other information is logged except the IP address of the failed login. This is very unhelpful if a user gets blocked and they can't figure out what is their IP address. Enabling this option will also log the username they used for the failed login. The downside is that your Blocked Requests Log now contains the usernames of all failed logins which can be a privacy issue if the log file is leaked to an attacker or other unauthorised person due to a vulnerability in a third party extension or by a mistake by one of the administrators of the site.

Please note that Admin Tools WILL NOT log passwords for failed logins and we WILL NOT consider any feature request to implement this kind of option. If were to log failed logins' passwords we'd be essentially storing a password the user may be using on a different service OR a slight variation of their real password in plain text in the database. This can be a major security concern.

Deactivate users on failed login

Admin Tools can optionally deactivate existing user accounts when there are multiple failed attempts to log in using their username, protecting user accounts from brute force attacks. In here you can specify the number of failed logins and the time period these have to occur before the user is deactivated, e.g. 3 failed logins in 1 minute.

In order for this feature to work you must have enabled the Treat failed logins as a reason for blocking the request option above and NOT include Login failure in the Do not log these reasons option in the Logging And Reporting area of this configuration page.

The behaviour of this feature depends on the user registration setup of your site, as defined in Users, User Manager, Options in your site's back-end. When Allow User Registration is set to No this Admin Tools feature does not do anything at all! When Allow User Registration is set to Yes there are three possible behaviours depending on the setting of the New User Account Activation option:

  • Self: The user is deactivated and an activation email is sent to them by Admin Tools using the User re-activation email template.

  • Admin: The user is deactivated and an activation email is sent to all of your site's Super Users by Admin Tools using the User re-activation email template.

  • None: This Admin Tools feature does absolutely nothing at all. The user is not deactivated and the fields for this feature are not editable. You are also shown an error message stating “User registration on your site is disabled, therefore Admin Tools can't deactivate users”.

There are three further options, Number of failed logins, Failed logins period, and Unit of time measurement which control after how many failed logins in which period of time the account will be disabled.

Warning

This feature can be abused to lock you out of your site (Denial of Service). We strongly recommend using it together with Forbid frontend Super User Login and either Administrator Secret URL Parameter or Administrator Password Protection to prevent this situation.

Warn about self XSS

Display a message in browser console to warn the user to avoid running any command inside it. This can lead to hacking yourself (a.k.a. Self XSS attacks) and steal your account data.

Filter user registration by email

Admin Tools can block user registration based on the email domain they are using (listed in the field below):

  • Allow Will allow registration only if the email domain is contained inside the list. A typical use case is to allow registration only from site company addresses or student of a campus

  • Block Registration will be blocked if the user tries to use a domain contain in the list. This is usually useful if you want to block people from using temporary or disposable email accounts.

Email domains

Enter one domain per line. Having no non-empty lines disables this feature.

Below that you will find the Forgotten backend users section. This feature lets you automatically block or force a password reset for users with backend access who have not logged into the site for a very long time. This feature was inspired by a tweet by Jeff Atwood (of Discourse fame) and our observations by logging into real world sites when our clients request us to do so.

The idea is that privileged user accounts who have not logged into the site for a very long time are probably left over user accounts the site owner forgot to disable when the person stopped having a reason to log into the site's administrator backend. The password of the forgotten user account may have been compromised in the meantime. For example, the user may have reused their password on a different site which got hacked; or they may had used an easy to guess password. If Two Factor Authentication isn't enabled on the account, an attacker who has successfully compromised the password could now log into your site. Since they are using a legitimate user account they do not get their request blocked and they have full access to your site with everything that entails about your site's integrity.

This Admin Tools feature is designed to prevent this kind of awkward situation. If a user with backend access has not logged in for the configured time period (default: 90 days) they will either be completely blocked from accessing the site or they will be forced to reset their password (default and recommended action). In the first case only another Super User can unblock them, by editing their user account. In the latter case the user will try to log in and Joomla! will immediately force them to reset their password. Password reset requires providing information sent by email. This way an attacker cannot use a compromised password; they cannot read the email sent to the legitimate account holder's email address, therefore they cannot reset the password and log into your site.

For even better protection of your site we recommend that you take two more optional steps. Make sure that all privileged users have Two Factor Authentication set up on their user account. Joomla has Two Factor Authentication built in. Alternatively, you can use our more thorough, free of charge Akeeba LoginGuard extension to provide Two Step Verification (it also lets you force certain user groups to enable it). Moreover, it is recommended to have inactive user accounts automatically deleted. This can be done, for example, with our free of charge Akeeba DataCompliance component for Joomla! (however, it will not delete Super User accounts by default to prevent any accidents -- deletion through Akeeba DataCompliance is irreversible by design as it implements the GDPR requirements of Data Minimization and the Right To Be Forgotten).

The following options are available for this feature:

Prevent forgotten backend users from logging in

Should this feature be enabled at all?

Check every [minutes]

For performance reasons, this feature only runs periodically, checking which backend user accounts are inactive and disabling / forcing a password reset on them. Here you can define how often it will run. The default is 60 minutes which means that it will run at most once every 60 minutes. Other useful values are 1440 (at most once a day) and 10080 (at most once a week).

Backend user groups

Which user groups this feature should apply to? We recommend choosing at the very least the Administrator and Super User groups. If you have other user groups with backend login we recommend you add them as well.

If you do not specify any groups, or choose the "Show All Groups" option, Admin Tools will consider users from all user groups which have the Admin Login privilege, as set up in the Global Configuration of your site.

Even though you can select user groups without backend access they are NOT taken into account. The user groups list is rendered by Joomla! and it does not provide a way to remove user groups which lack backend access.

Maximum number of days since last login

Users who have not logged into the site for at least this many days will be blocked or forced to reset their password. The default is 90 days (three months). Reasonable values are between 30 and 365 days. If you set this to 0 or leave this blank the feature will effectively be disabled.

Login prevention method

What should Admin Tools do with the user accounts which have not logged in for a long time?

Block means that the user will be completely blocked from accessing the site. This is implemented by setting the Block User to Yes. The blocked users cannot unblock themselves. A Super User will have to do that by editing the user from the Joomla backend Users, Manage menu item.

Force Password Reset is the recommended and selected by default method. In this case the user account is allowed to log in but they will have to immediately reset their password and log back in before they can do anything on the site. The password reset takes place through Joomla's built in password reset method. It is NOT handled by Admin Tools.

Protected users

Any users you select here are not going to be prevented from logging into the site. We recommend that you add the site owner here. Moreover, if you are building a site for a client, you should add your user account as well. This will let you log into the site to provide technical assistant should your client require it.

It is worth noting that if Login prevention method is set to Block and Protected Users is empty Admin Tools will NOT block ANY Super Users, even if they haven't logged in for a time period longer than the specified maximum number of days. This is a precaution against losing all access to the site by accident (if all Super Users get blocked then nobody is left to unblock you). If you have a site with multiple Super Users and use the Block method you MUST specify at least one Protected User for Admin Tools to provide a sensible level of protection against forgotten user accounts.

Password authentication when passkey login is enabled for a user account

Controls what happens when a user enables login with passkey on their account.

  • Always allowed (Joomla default). The user can log in with either a passkey or a password.

  • Let the users decide. The users can decide for themselves if they want to disable password login on their accounts.

  • Disabled for back-end users, allowed for others. Users with backend access will not be allowed to log into the site with a password; they will have to use their passkey. Everyone else can login with a password or a passkey.

The reason this feature exists is that passkeys are far more secure than passwords coupled with Multi-factor Authentication (MFA). Passwords can be guessed or stolen. Many forms of MFA can possibly be defeated either with a brute force attack, or with a “spearphishing” attack. In the end of the day, MFA is only as strong as the weakest link – and having recovery codes is exactly that, so even if you use passkeys as your MFA it might not be as safe as you would like it to be.

Using passkeys for logging in instead of a password, on the other hand, is the most secure method possible. The passkey is cryptographically tied to the specific user account, enforces the use of HTTPS, and the web browser validates you are on the correct domain thereby making phishing attacks impossible. Again, this is only as strong an authentication option as the least secure authentication option available for your user account. If that option is a password, you are not safe. Hence the need to disable password logins and why this feature exists.