Skip to main content

App hardening packs

Set a domain's Type to the software the site runs and turn Website protection on, and the sentry adds rules made for that software. Packs are available for Drupal, Joomla, Laravel, Magento / Adobe Commerce, MediaWiki, Moodle, Nextcloud, OpenCart, PrestaShop and WHMCS. WordPress has its own WordPress rules, and WordPress sites that run WooCommerce can add the WooCommerce add-on.

You'll find the pack on Edit domain, under the pack's name (for example Joomla hardening pack). The domain's page shows whether it is in log mode or blocking.

These rules need Website protection. See Network protection vs Website protection and HTTPS inspection: while a domain's HTTPS is passed through, the pack only covers plain HTTP.

What every pack does​

  • Blocks known exploits and private files. Requests for installers, configuration files and their backups, logs, debug tools, version files and scripts inside upload folders get the block page.
  • Limits login attempts. Once the pack blocks, each IP address can make 6 login attempts in a row, then about 6 a minute. Only form posts to the login, sign-up and password reset pages count, so opening the login page never does. Going over gets a short wait (429).
  • Limits checkout attempts on online stores (Magento, OpenCart, PrestaShop, WHMCS and the WooCommerce add-on). Each IP address can make 5 checkout or payment attempts in a row, then about 3 a minute. This stops card testing, where bots try stolen card numbers one after another.
  • Stops the WAF flagging the app's normal requests, where the app needs it. For example, Nextcloud's file sync uses WebDAV methods and uploads, MediaWiki page edits contain text that looks like code, and Moodle's text editor fields contain HTML.

Log mode first​

Every pack starts in log mode. It records what it would have blocked and lets the request through, and the limits aren't applied. It also records login and checkout floods: once an IP address goes over a limit, the requests the limit would have refused are recorded with reasons such as Drupal pack: Too many login attempts (the login limit would have applied). You'll see what it recorded under Would have blocked, last 24 hours on the domain's Blocks tab, with reasons such as Joomla pack: configuration.php and its backups.

When you're happy nothing real is caught, open Edit domain and click Switch pack to blocking. A pack only blocks while the domain itself isn't in log mode. To go back, click Switch pack to log mode.

What each pack blocks​

Drupal​

The install and rebuild scripts, the update and authorize scripts (update.php and authorize.php, see below), site settings files (settings.php, services.yml), scripts in sites/*/files, files that show the Drupal version (CHANGELOG.txt and others), xmlrpc.php (Drupal 7), Drupalgeddon render array requests, and PHP files in the vendor folder. Login limit: /user/login, /user/password and /user/register, and their Drupal 7 ?q= forms. The WAF keeps the official CRS Drupal exclusions.

Once the pack blocks, Drupal's web updates (update.php) and installing modules from the admin area (authorize.php) are blocked too. Run database updates with Drush (drush updatedb) instead, or switch the pack to log mode while you update.

Joomla​

configuration.php and its backups, the installation folder, the public API config and user lists (CVE-2023-23752), scripts in images, tmp, cache and logs, the tmp and logs folders, files that show the Joomla version, and PHP files in the vendor folder. Login limit: the administrator login, and site login, password reminder and registration.

Laravel​

Debug tools (Ignition, including /_ignition/execute-solution, and Debugbar), logs and framework storage, scripts in public storage, app source and project files when the web root is the project folder (artisan, composer.json, config/*.php and others), copies of the environment file, the Telescope and Horizon dashboards (/telescope, /horizon), and PHP files in the vendor folder. If you use Telescope or Horizon on a live site, use the admin login lock for your addresses and leave the pack in log mode, or keep them on a separate domain. Login limit: /login, /register, /forgot-password, password reset and two-factor pages, also under /admin, /nova and /dashboard. The WAF doesn't check Laravel's encrypted XSRF-TOKEN and laravel_session cookies, and allows PUT, PATCH and DELETE for APIs.

Magento / Adobe Commerce​

Internal folders (app/etc, var, generated, setup and others), files that show the version (including /magento_version), scripts in media and static, and PHP files in the vendor folder. Login limit: customer login, account creation and password reset, REST API token requests, and the admin login. Checkout limit: the REST payment step for guest and signed-in carts. The WAF doesn't check Magento's JSON storefront cookies, and allows PUT, PATCH and DELETE for the REST API. The admin is at /admin unless the store uses its own admin folder.

MediaWiki​

LocalSettings.php and the installer (mw-config), internal folders (maintenance, includes, cache and others), scripts in the images folder, and PHP files in extensions and skins. Login limit: login, account creation and password reset, including the API login. The WAF doesn't flag page edits, whose wikitext often looks like code.

Moodle​

Internal files that Moodle's security guide says to hide (vendor, node_modules, test fixtures, upgrade notes, composer.json and others), config.php and the config template, and command-line scripts. Login limit: login, sign-up, password reset and web service token requests. The WAF doesn't flag HTML in Moodle's text editor fields, such as forum posts, assignment text and quiz questions.

Nextcloud​

Internal folders (config, data, lib, 3rdparty and others, as in Nextcloud's own web server guide), and scripts in the data and custom apps folders. Login limit: login and password reset. Nextcloud also has its own brute force protection. The WAF allows the WebDAV methods file sync uses (PROPFIND, MOVE and others), doesn't inspect file uploads, and accepts any file type over WebDAV.

OpenCart​

config.php (store and admin), the system and storage folders, the install folder, scripts in the image folder, files that show the version, and PHP files in the vendor folder. Login limit: customer and admin login, password reset and registration. Checkout limit: checkout confirm and payment steps.

PrestaShop​

The install folder, internal folders (app, config, var, classes and others), scripts in image and upload folders, files that show the version, and PHP files in the vendor folder. Login limit: login, password recovery and registration, and the back office login. Checkout limit: payment module validation. PrestaShop gives its admin folder a random name, starting with admin, when it's installed. Enter it as the admin folder, or the pack uses any folder whose name starts with admin.

WHMCS​

configuration.php and its backups, the install folder, private folders (attachments, downloads, templates_c, crons), and PHP files in the vendor folder. Login limit: client and admin login (including a renamed admin folder), password reset and registration. The admin area is at /admin unless you enter its admin folder. Checkout limit: card payment and cart checkout.

WooCommerce add-on​

For WordPress domains that run WooCommerce. Open Edit domain, then WooCommerce add-on, and click Turn on the WooCommerce add-on. It starts in log mode like the packs. It:

  • limits checkout attempts from one IP address (classic and block checkout, PayPal Payments and Stripe order requests), which stops card testing
  • blocks the store REST API (/wp-json/wc/v1 to v3) for requests with no API key, no Authorization header and no signed-in WordPress user. WooCommerce refuses those anyway; blocking them at the sentry stops key guessing.
  • blocks WooCommerce logs and private uploads in wp-content/uploads

Payment notifications (wc-api, payment webhooks) and the public Store API that themes use for the cart are never affected. The WordPress rules apply as before.

Admin login lock​

Like the WordPress admin login lock, you can limit a pack site's login page and admin area to IP addresses you choose. Open Edit domain, then Admin login lock under the pack, list the addresses and turn the lock on. Everyone else gets a 403 error page. The lock always blocks, even while the pack or the domain is in log mode. It covers:

AppPages
Drupal/user/login, /user and /admin, and their Drupal 7 ?q= forms
Joomla/administrator
Laravel/admin and /nova
Magento / Adobe Commercethe admin folder (/admin, or your own)
MediaWikithe login and account creation pages (Special:UserLogin, Special:CreateAccount) and the API login
Moodle/admin
Nextcloudadmin settings, user management and apps (/settings/admin, /settings/users, /settings/apps)
OpenCart/admin
PrestaShopthe admin folder (your own, or any folder starting with admin)
WHMCSthe admin folder (/admin, or your own)

Customer logins on stores, Nextcloud file sync and app logins, and Moodle course pages aren't covered, so customers and users still sign in from anywhere. MediaWiki is the exception: the lock covers its login page, so every wiki user has to sign in from a listed address. Make sure the list has your own address before you turn it on. On Moodle, the web cron (/admin/cron.php) is under /admin, so if a site runs cron over the web, add the address that calls it to the list.

Admin folder​

Magento, PrestaShop and WHMCS let you rename the admin folder. If yours isn't the default, open Edit domain, enter the folder's name under Admin folder (for example admin_x7k2, without slashes) and click Save admin folder. The admin login lock and the login limit then use it. Leave it empty for the default. Saving the folder doesn't change the pack's mode.

Domain owners​

With owner access, owners see the pack's status on their Overview and Protection tabs. To let them switch it between log mode and blocking, turn the WooCommerce add-on on or off and set the admin folder, tick Switch their site's app hardening pack between log mode and blocking, turn the WooCommerce add-on on or off, and set the admin folder on Owner access. It's off by default. If you untick it later, their setting is kept but the pack goes back to log mode, and Edit domain says so. Your own save on Edit domain replaces theirs. The pack's admin login lock follows the Lock their login page and admin area to IP addresses they choose (WordPress sites and sites with an app hardening pack) permission. The admin folder an owner sets always applies, even if you untick the pack permission.

Captcha Protection presets​

Under Captcha Protection Chosen pages, Add common login pages: has a button for each pack app and for WooCommerce, which adds its usual login, sign-up and password reset pages. See Common login pages for the pages each button adds.

Good to know​

  • The pack follows the domain's Type. If a site runs different software, change the type on Edit domain. Changing the type keeps the pack's mode setting.
  • A pack only applies to domains with Website protection.
  • Admin areas stay open to everyone unless you turn on the admin login lock. The packs themselves only limit repeated login attempts and block installers and private files.
  • Packs, the admin login lock on pack domains, the admin folder, login and checkout floods in log mode, and the Drupal update and Laravel Telescope and Horizon rules need a current sentry. Older sentries ignore them. Sentries update themselves.