=== S-CRIB OTP Authenticator === Contributors: s-crib Tags: security, login, authentication, sCrib, otp, oath, hotp, google, authenticator, google authenticator Requires at least: 3.0 Tested up to: 3.8 Stable tag: 2.0 License: GPLv2 Plugin URI: http://www.w-crib.com/wpotp/ Author URI: http://www.linkedin.com/in/dancvrcek Donate Link: http://www.s-crib.com/buy/ Easy secure login, use password or OTP as you need. Works with Smart Crib dongles and free apps: Google Authenticator, Pledge, DS3 OATH, AWToken. == Description == Version 2.0 supports TOTP (Time OTP) as well as HOTP (Event/counter OTP) versions of one-time passwords! S-CRIB OTP Authenticator for WordPress works with Smart Crib (Password sCrib), Google Authenticator, Pledge (McAfee), DS3 OATH, AWToken, and other OTP generators. It creates QR codes (Google Authenticator or Pledge) and also allows to type OTP secrets manually. S-CRIB OTP Authenticator introduces one time password (OTP) authentication into Wordpress (we now support counter/event mode as well as time-based OTP according to standard OATH). The plugin has been design for use with Password sCrib dongles but we also tested it with Google Authenticator (iOS, Android), Pledge (iOS, Android), DS3 OATH (iOS, Android), and AWToken. It is compliant with RFC4226 when the OTP code can be 6, 7, or 8 digits long. You can enable OTP on your account through "Edit My Profile" page (accessible from top right corner when logged in). Administrators can do the same for other users by selecting their names from from the list of users You can set OTP secret as well as PIN - highly recommended as the minimum length of OTP codes should be 10 digits! When PIN is set, users get a full 2 factor authentication. The PIN can be any string of up to 32 characters - so you can use a password as the PIN. To login, just enter your PIN (if set) and OTP code into the password box. Your previous static password will still work so you can use it to login if/when you want. OTP login will require an additional OTP code if there were 5 (6-digit OTP) or 10 (7 and 8 digit OTP) unsuccessful tries. This is a new policy replacing timeouts. It turns out that the internet is indeed a toxic place and OTP authentication got locked-down way too often. You can purchase Password sCrib from http://www.s-crib.com/buy-channel/ - Amazon UK, Amazon US or Paypal. == Installation == Either 1. Log into WordPress as na administrator. 1. Select Plugins -> Add New in the menu on the left. 1. Search for "s-crib otp". 1. Find "S-CRIB OTP Authenticator". 1. Select "Install Now" and wait for installation to complete. 1. Select "Activate". 1. Click on Settings --> S-CRIB OTP and check that there is no problem with RND generator. Let us know if this is the case and please mention your platform. 1. To associate a token with a user, click on "Users" (users can do that on their own via "Edit My Profile", under their username in the top right corner). 1. Click "Edit" next to a user. 1. Follow instructions below "To change your OTP generator". OR (using a zip file) 1. Download the S-CRIB OTP for WordPress package. 1. Extract the ZIP into ~/wp-content/plugins. 1. Log into WordPress as an administrator. 1. In the Site Administration section go to "Plugins". 1. Activate the plugin "S-CRIB OTP Authenticator". 1. Click on Settings --> S-CRIB OTP and check that there is no problem with RND generator. Let us know if this is the case and please mention your platform. 1. To associate a token with a user, click on "Users" (users can do that on their own via "Edit My Profile", under their username in the top right corner). 1. Click "Edit" next to a user. 1. Follow instructions below "To change your OTP generator". Any users who do not have a token specified will just use their standard username and password to log into WordPress. == Frequently Asked Questions == = Why Should I use this plugin for OTP? = 1. We made it very simple to use, when you're at home, you can still use your password only, when you're travelling, you can use OTP. 1. We do not require password AND OTP as we believe it is overkill and it is much better to use OTP with a PIN. 1. The plugin was tested with Google Authenticator but it works with any event based OTP generator (HOTP OATH). 1. The plugin was tested with Google Authenticator but it works with any time based OTP generator (TOTP OATH) 1. We encrypt OTP secrets to make it more difficult for attackers to fully compromise OTP authentication. 1. When you go to your Profile (Edit My Profile), you can see an IP address of the last unsuccessful login - this gives a bit of information about someone's possibly trying to hack into your Wordpress account. 1. The plugin now implements event-based as well as time-based OTP. (see FAQs for a bit more about this). = Mobile phone apps that work with S-CRIB OTP = We have not done extensive testing but we have scanned about 160 applications one can find in AppStore. The following four apps work with this plugin: * Google Authenticator (Google) * Pledge (McAfee) * DS3 OATH (DS3 - Data Security Systems Solutions) * AWToken (oathtoken.googlecode.com) = Can I still use my old password? = Yes, the plugin does not disable static password. If you decide not to use normal passwords any more, set them to some random and long values. = Just one password for OTP - is it secure? = We have noticed that existing plugins basically add an additional password box when you start using OTP. It means that you need your old password and OTP codes as well. I have put some security arguments on the plugin web page: http://www.s-crib.com/wpotp and here is a summary: 1. Even 6 digit OTP is as strong an average password - based on a large study of Yahoo passwords conducted by Joseph Bonneau at the University of Cambridge (http://www.cl.cam.ac.uk/~jcb82/doc/B12-IEEESP-analyzing_70M_anonymized_passwords.pdf - see Figure 6 (success rate with increasing number of guesses and Table V for just 1,000 guesses). 1. While 6 digit OTP is as strong as an average password, it is actually much more secure as once an OTP value is guessed, it cannot be re-used. This makes attacks more complicated as the tool for guessing passwords must also apply the "payload". 1. Many of you may think that OTP is overkill. Well, it may be true when you login from your "secure" network but we sometimes really need to login from insecure network and if you can just use OTP when you need it, it justifies the additional hassle. = What if someone hacks my server, is OTP still secure? = Actually, OTP is more vulnerable than passwords when your server gets hacked. The problem is that while passwords can be scrambled (only values computed with one-way function like SHA1, SHA256, ... are stored), OTP secrets must be available in plaintext. Once the secret is compromised, all future values of your OTP codes can be computed by the attacker - you may remember RSA SecurID incident a couple of years back - one article from many: http://arstechnica.com/security/2011/06/rsa-finally-comes-clean-securid-is-compromised/ Our plugin encrypts seeds with AES-256 so they cannot be read directly but the key is still stored somewhere on our server. We hope to improve this with our management and monitoring system that we intend to launch in Q3 2013. = Sure, OTP is more secure but there is still a chance of being hacked = That is very true. There are so many Wordpress users that there is a good chance of someone getting hacked every day. One needs monitoring and auditing system to detect attempts to hack someone's account. We have been building such system for some time now and we hope to launch it in Q3 2013. This system will also offer additional security improvements. We want to use cryptographic modules like this (http://hsm.utimaco.com/en/products/product-release-safeguard-cryptoserver-lan-v4/ ) to store your secrets. = OTP - Time based or Event based? = OTP codes can be computed using an incrementing counter or real time. Each of them has its advantages and disadvantages. We decided to do Event-based OTP (aka Counter-based aka HOTP) first. Our reasons were: 1. Event based OTP does not require synchronised time between your mobile phone and server - this may be sometimes quite difficult to do as you may not be the master of the server where your Wordpress is running. 2. Time based OTP assumes trusted time source on both sides. However, it is fairly easy to change time on your mobile phone and write down OTP codes that will be valid in an hour or next day. 3. There is a danger of Event-based OTP codes to be eavesdropped and used by attackers - from your point of view it looks like you can't login to your server and get a message like "Server Is Down", "Try Again Later", and so on. Version 2.0 implements time-based OTP as well. Neither option is better - Time-based may be a bit more secure (sometime), Event-based is a little bit easier to use (other time). If you are new to OTP, try this one first as it is easier and more reliable. = Why do we promote Smart Crib? = Smart Crib (Password sCrib) is our product. It is a physical dongle that gives you OTP and a set of 4 secure passwords. Forget what I said about passwords above as the strength of these makes them unbreakable. In some situations, these passwords are much better than OTP - probability of guessing an 8 digit OTP with 4 digit PIN is 1:2^40, while for these passwords it is 1:2^120 (each increment between 40 and 120 means trying twice as many passwords). Smart Crib is a digital key you have in your pocket with powerful password recovery support options - from a hardcopy in your strongbox to an online recovery and management system. = Where can I get a Smart Crib dongle? = Tokens can be obtained from Amazon UK, Amazon US and Paypal - start at: http://www.s-crib.com/buy/ or get in touch via email to sales@s-crib.com as we can offer substantial discounts if you buy more of them. = I need more help! = If you get stuck, you can always contact us at support@s-crib.com. == Screenshots == 1. Sample login page 2. Configuration in the user profile page == Changelog == = 1.0 = * Initial release - testes with Password sCrib and Google Authenticator, supports HOTP OATH wit lengths of 6, 7, and 8. Secrets are stored encrypted with a unique key and AES256. Secrets can be entered as hex strings or scanned from QR codes. = 1.1 = * Fixing a typo in a string formatting and the maximum length of the OTP secret (now it is indeed 64 bytes). * Showing the secret encoded in the QR code so that it can be typed to a mobile phone app - base32 and hex formats. * User ID in the QR code now shows login name and URL of the blog. = 1.2 = * Removing the length of OTP codes - this is now computed automatically from the first OTP code. * Adding a couple of cryptographic keys for future security monitoring. * Extending database for new token types - TOTP and MOTP. * Fixing a bug where the version is not correctly stored in the WP options. = 1.3 = * No actual changes to the code. = 1.4 = * The internet is indeed a toxic place. The timeout policy did not work as it locked-out accounts far too often. A new policy has been implemented: * When a password is shorter than 7 characters or on the list of weak passwords (weak_passwords.txt), user has to enter it twice. * When there have been at least 5 (for 6 digit OTP) or 10 (7 & 8 digit OTP) unsuccessful login attempts, users have to enter additional OTP code. = 1.5 = * When entering an additional OTP code, it would accepted even when the PIN is missing. = 2.0 = * Simplifying the administration form. * Update of weak passwords. * Introducing TOTP. * Enforcing the minimum length of the secret to 80 bits (common is 160 bits, but Google uses 80 bits only). * Window (the number of acceptable values around expected time <-D,+D> / counter <0,D>) is set to D=2 for OTP long 6 digits and D=4 for OTP long 8 digits. * We attempt to identify the size of the time window for TOTP from values 30 seconds, 60 seconds, and 90 seconds. * If OTP is left empty (in the administration form), only PIN and counter are updated. * Fixing bug and enabling editing of the counter for HOTP. == Upgrade Notice == Version 1.2 updates the plugin's database table if an older version is installed.