All Projects → ItinerisLtd → disallow-pwned-passwords

ItinerisLtd / disallow-pwned-passwords

Licence: GPL-2.0 license
Disallow WordPress and WooCommerce users using pwned passwords

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to disallow-pwned-passwords

haveibeenpwned4j
The ultimate Java library for Troy Hunt's ';-- Have I Been Pwned (v3).
Stars: ✭ 13 (-55.17%)
Mutual labels:  hibp, have-i-been-pwned
H8mail
Email OSINT & Password breach hunting tool, locally or using premium services. Supports chasing down related email
Stars: ✭ 2,163 (+7358.62%)
Mutual labels:  password, hibp
PwnedPasswordsChecker
Search (offline) if your password (NTLM or SHA1 format) has been leaked (HIBP passwords list v8)
Stars: ✭ 52 (+79.31%)
Mutual labels:  password, hibp
ootp
OOTP (Open One-time Password) is a supports multiple programming languages. The generated one-time passwords are fully compliant with HOTP (HMAC-based One-time Password) and TOTP (Time-based One-time Password). 🚀It's easy to use!
Stars: ✭ 17 (-41.38%)
Mutual labels:  password
totp
Time-Based One-Time Password Code Generator
Stars: ✭ 76 (+162.07%)
Mutual labels:  password
password-ga
Password Generator using Genetic Algorithm
Stars: ✭ 28 (-3.45%)
Mutual labels:  password
woocommerce
Vue Storefront 2 integration for WooCommerce
Stars: ✭ 27 (-6.9%)
Mutual labels:  woocommerce
woocommerce-cart-stock-reducer
Allow WooCommerce inventory stock to be reduced when adding items to cart
Stars: ✭ 57 (+96.55%)
Mutual labels:  woocommerce
PassHUD
A HUD-style interface for pass on macOS
Stars: ✭ 31 (+6.9%)
Mutual labels:  password
Password-Store
Saves your password with cryptography so only you can decode it.
Stars: ✭ 15 (-48.28%)
Mutual labels:  password
WiFi-View
在 Android 设备上快速查看与管理保存的 WiFi 密码
Stars: ✭ 15 (-48.28%)
Mutual labels:  password
woocommerce-plugin
Accept bitcoins on your wordpress site, payments go directly into your wallet
Stars: ✭ 22 (-24.14%)
Mutual labels:  woocommerce
secrets
Simple Secret Sharing Service for social and decentralised management of passwords
Stars: ✭ 30 (+3.45%)
Mutual labels:  password
qute-keepassxc
Qutebrowser userscript to fetch credentials from KeepassXC password database
Stars: ✭ 44 (+51.72%)
Mutual labels:  password
nextjs-woocommerce-restapi
A React WooCommerce Project Example With REST API
Stars: ✭ 168 (+479.31%)
Mutual labels:  woocommerce
WWWE
💧 Check your email(s) using popular online services to see if it appears in any data-breach
Stars: ✭ 22 (-24.14%)
Mutual labels:  hibp
docker-self-service-password
Dockerized LDAP Tollbox Self Service Password Changer with many customizable options
Stars: ✭ 105 (+262.07%)
Mutual labels:  password
Passky-Desktop
Desktop application for Passky (password manager)
Stars: ✭ 47 (+62.07%)
Mutual labels:  password
7cart
7cart is a php7 project for building online shops, catalogs or service platforms. 7cart built with simple code and database schema. It is easy to support and fast.
Stars: ✭ 27 (-6.9%)
Mutual labels:  woocommerce
longtongue
Customized Password/Passphrase List inputting Target Info
Stars: ✭ 61 (+110.34%)
Mutual labels:  password

Disallow Pwned Password

CircleCI Scrutinizer Code Quality GitHub License Hire Itineris

Packagist: Packagist Version PHP from Packagist Packagist Downloads

WordPress: Wordpress Plugin Version Wordpress Plugin: Required WP Version Wordpress Plugin: Tested WP Version Wordpress Plugin Rating WordPress Plugin Downloads

Goal

Spoiler Alert: User passwords never leave your server, not even in hashed form.

Although reusing passwords is solely users' fault but when evil attackers brute forced users' passwords, and stole all their personal information or spent users' hard earn money through your site. Those lazy users blame you, the site owner/developer.

When processing requests to establish and change memorized secrets, verifiers SHALL compare the prospective secrets against a list that contains values known to be commonly-used, expected, or compromised. For example,...

  • Passwords obtained from previous breach corpuses

-- NIST Digital Identity Guidelines

This plugin's solely purpose is to disallow WordPress and WooCommerce users reusing passwords listed in Have I Been Pwned database.

Explain It Like I'm Five

  • Troy Hunt, a well-kown security expert, collected 6,493,641,194 (and counting) pwned passwords from previous security breaches
  • Pwned passwords stored as SHA-1 hashes on haveibeenpwned.com
  • Whenever WordPress / WooCommerce users attempt to change their passwords, this plugin hashes the user password
  • Take the first 5 characters from the hash
  • Ask haveibeenpwned.com for all pwned passwords with the same first 5 hash characters
  • Check how many times the user password appears on the have I been pwned database
  • Disallow the password change if it has been pwned

Users aged older than five could learn more from:

Minimum Requirements

  • PHP v7.0
  • WordPress v4.9.8
  • (Optional) WooCommerce v3.4.4

Installation

Composer (Recommended)

$ composer require itinerisltd/disallow-pwned-passwords

WP CLI

$ wp plugin install disallow-pwned-passwords --activate

Classic

Download the plugin zip file from https://wordpress.org/plugins/disallow-pwned-passwords/ Then, follow https://codex.wordpress.org/Managing_Plugins#Installing_Plugins

Usage

Activate and forget.

This plugin intercepts when:

  • creating new users on /wp-admin/user-new.php
  • changing other users' passwords on /wp-admin/user-edit.php
  • changing your password on /wp-admin/profile.php
  • new user registration on /wp-login.php?action=rp

Additional interceptions if WooCommerce is installed:

Performance

By default, this plugin caches Have I Been Pwned API responses for 1 week using WP Object Cache.

If you don't have a persistent cache plugin, it has no effect and doesn't cache anything.

In rare cases, persistent cache plugins might not be compatible, you can disable by:

<?php

use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\ClientInterface;
use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\Client;
use League\Container\Container;


add_action('i_dpp_register', function (Container $container): void {
    $container->add(ClientInterface::class, Client::class);
});

FAQ

Did you just send all the passwords to someone else?

No. User passwords never leave your server, not even in hashed form.

How do you compare user passwords with the 6,493,641,194 pwned ones?

Curious users can learn more from:

Paranoia users should check the plugin implementation.

What to do if I don't trust haveibeenpwned.com?

Troy Hunt is a well-kown security expert. You should trust him more than me (the plugin author). Anyways, you can replace the default API client with yours:

<?php

use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\ClientInterface;
use League\Container\Container;

class YourCustomClient implements ClientInterface
{
    // Your implementation.
}

add_action('i_dpp_register', function (Container $container): void {
    $container->add(ClientInterface::class, YourCustomClient::class);
});

This plugin uses league/container. Learn more from its documents.

What to do if I don't trust the plugin author?

Good question! You shouldn't blindly trust any random security guide/plugin from the scary internet - including this one!

Review the plugin implementation.

I have installed this plugin. Does it mean my WordPress site is unhackable?

No website is unhackable.

To have a secure WordPress site, you have to keep all these up-to-date:

  • WordPress core
  • PHP
  • this plugin
  • all other WordPress themes and plugins
  • everything on the server
  • other security practices
  • your mindset

Strongly recommended:

  • WP Password Argon Two - Securely store WordPress user passwords in database with Argon2i hashing and SHA-512 HMAC using PHP's native functions
  • WP Cloudflare Guard - Connecting WordPress with Cloudflare firewall, protect your WordPress site at DNS level. Automatically create firewall rules to block dangerous IPs
  • Two-Factor
  • wp-password-bcrypt

Can strong passwords been pwned?

Yes. Example:

How to disable WooCommerce password strength meter?

For testing only, use at your own risk!

add_action('wp_print_scripts', function () {
    wp_dequeue_script('wc-password-strength-meter');
}, 10000);

Will you add support for older PHP versions?

Never! This plugin will only works on actively supported PHP versions.

Don't use it on end of life or security fixes only PHP versions.

Note: Current version supports PHP 7.0 because wordpress.org svn pre-commit hook rejects PHP 7.1+ syntax. However, you should not use PHP 7.0 because it has reached end of life since 10 January 2019.

It looks awesome. Where can I find some more goodies like this?

Besides wp.org, where can I give a review?

Thanks! Glad you like it. It's important to let my boss knows somebody is using this project. Please consider:

Alternatives

Testing

$ composer test
$ composer phpstan:analyse
$ composer style:check

Pull requests without tests will not be accepted!

Feedback

Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.

Change Log

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Disallow Pwned Password is a Itineris Limited project created by Tang Rufus.

Full list of contributors can be found here.

Special thanks to Troy Hunt whose Have I been pwned database makes this plugin possible. Also, the k-Anonymity validation is an awesome work of Junade Ali from Cloudflare.

License

Disallow Pwned Password is licensed under the GPLv2 (or later) from the Free Software Foundation. Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].