=== Admin Bruteforce Protection ===
Contributors: siteguarding
Tags: security, login, brute force, two-factor, 2fa
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Protects the login of your site: limits failed logins, bans attackers, hides the login page and adds two-step verification.

== Description ==

Admin Bruteforce Protection stops password guessing on the login of your WordPress site and of your WooCommerce shop.

Free:

* Limits failed logins and bans the address for longer each time.
* Trap usernames such as "admin": a guess with them bans at once.
* Allowed and blocked addresses, and up to 3 allowed countries for the login.
* A secret login address: the usual login page answers "not found".
* A security check against bots, built in, with no third-party service. reCAPTCHA, Turnstile or hCaptcha if you prefer.
* Two-step verification for administrators: authenticator app, code by email, backup codes, trusted devices.
* Same answer for an unknown username and a wrong password; usernames hidden from author pages, REST and oEmbed.
* Alerts by email, an activity log for 30 days and a dashboard of attacks.
* Monitor only mode for the first day, an emergency switch and a one-time unlock link, so you never lock yourself out.

Pro (a separate add-on with a licence key):

* Protection from distributed attacks on one username and from whole networks.
* Any number of countries and addresses, with notes and expiry dates.
* Two-step rules for every role with a grace period, and for customers.
* A list of trusted devices with sign-out, one session per user, log out everywhere.
* Alerts in Telegram and Slack and to a webhook; 90 days of history with export to CSV.

== Installation ==

1. Upload the plugin and activate it.
2. Open Bruteforce Protection in the admin menu.
3. Add your own address to the allowlist before you turn on countries or the secret login address.

== Frequently Asked Questions ==

= I lost the secret login address. How do I get in? =

The address was emailed to the administrators when you turned it on. If you cannot find it, put an empty file named sgabp-disable.txt in the root folder of the site: all checks stop until you remove the file. You can also add define('SGABP_DISABLE', true); to wp-config.php.

= I banned my own address. =

The "Access blocked" page has a link "Locked out of your own site?". Enter the email of your administrator account and open the one-time link from the email.

= Does it work with page caches? =

The login pages tell page caches not to store them. After you turn on the secret login address, clear the page cache once.

= I copied the site to another server and two-step verification stopped working. =

The secret keys live in wp-content/uploads/sgabp/. Copy that folder with the site. Users can still log in with a code by email or a backup code.

= Does it send data to other services? =

No, unless you choose reCAPTCHA, Turnstile or hCaptcha for the security check, or Telegram, Slack or a webhook for the alerts (Pro). The country database is updated from siteguarding.com in the background, never on a visit.

== Privacy ==

The activity log keeps the address, the country, the username, the time and the result of each login attempt: 30 days (Pro: 90 days). Passwords and codes are never stored or sent. Secrets of two-step verification are encrypted; email codes and backup codes are stored as hashes only.

== External services ==

Admin Bruteforce Protection contacts these services in the background or from its own screens, never while a visitor loads a page of the site. The captcha services are the only exception: when you choose one, its widget loads in the login forms.

* SiteGuarding (www.siteguarding.com): at most once a day, whether the country database has a new version, and the database itself when it has (sent: the domain of the site and the name of the plugin). Twice a day, whether a new version of the plugin is published (the update manifest; WordPress sends its version and the address of the site in the User-Agent header, as for every update check).
* Google reCAPTCHA (www.google.com), only if you choose reCAPTCHA for the security check: the widget script loads in the login forms, and your server checks the answer of the visitor (sent: the answer, your secret key and the IP address of the visitor). Terms: https://policies.google.com/terms, privacy: https://policies.google.com/privacy
* Cloudflare Turnstile (challenges.cloudflare.com), only if you choose Turnstile: the same as above. Terms: https://www.cloudflare.com/website-terms/, privacy: https://www.cloudflare.com/privacypolicy/
* hCaptcha (js.hcaptcha.com, api.hcaptcha.com), only if you choose hCaptcha: the same as above. Terms: https://www.hcaptcha.com/terms, privacy: https://www.hcaptcha.com/privacy

The built-in security check of the plugin uses no external service. Alerts by email go through the mail of your site.

== Changelog ==

= 2.0 =
* New: one product for the login - limits and bans, countries, secret login address, security check, two-step verification, alerts and the activity log.
* New: WooCommerce login and lost password forms are protected too.
