We’re rewarding the question askers & reputations are being recalculated! Read more.
598

Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference. The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is "myRealPassword!" but you submit "...


148

Locking accounts is a bad idea in the first place. It might seem like you're making your organization more secure by keeping out "bad people" who are "guessing" at passwords using brute force attacks, but what have you really solved? Even with this policy and a perfect userbase who never makes security mistakes, an attacker can perform a denial-of-service ...


119

This is an interesting question! The rule of thumb is that if someone else has control of the device (and they're determined enough), they will always be able to monitor and modify all of your actions on the device. We can (to a somewhat limited extent) get around this though! Two-factor authentication can be used to ensure that even if someone has your ...


80

Can I just log out by wiping cookies instead of hitting logout? Frequently yes, for the reasons you supplied in your question: Without the session token in your cookies, a typical web application won't know who you are. What are the issues of just wiping cookies versus clicking the logout button? Web applications that manage authentication following the ...


79

What I see most commonly is allowing the authentication and signing the user in, but locking meaningful features away until the email is verified. You should bubble up an error reminding the user to re-send an activation email if they try to access one of the restricted features. It is poor design to ever lie to a user - if they submit the correct username ...


76

It is long know that Facebook allows you on purpose to log in with the password case reversed or the first character capitalized (see this article). They do this while storing only a hashed password. Are you seeing that more differences are allowed? Apparently, they also have some similar usability features for the email address. Automatically "correcting" ...


61

You can't. The reason is that you can't trust the client at all. An attacker can modify the client as they wish, and circumvent any and all security measures you may have put in place. But what if we digitally sign our code? The attacker can't modify it then, right? Yes, they can. If you sign your code, the machine of the attacker needs to validate the ...


48

You seem to fundamentally misunderstand what TLS does. TLS takes the regular plain HTTP traffic and encrypts it and adds integrity checks. Together with the certificate of the server, this ensures Confidentiality: An attacker who captures the network traffic can not read the content of the communication. Integrity: If an attacker modifies the network ...


48

Is 2FA via mobile the best security there is? No. SMS 2FA is the weakest form of 2FA, however, it's still worthwhile because it does improve security and it has a relatively low barrier of entry especially for non-technical users. What can be improved? You can use TOTP token using apps like Google Authenticator. This still uses your mobile phone, but it ...


44

Instead of invalidating the login code when the link is clicked, have a script on the page that runs and makes a request to your server to invalidate the code. This will only be effective if the "mail scanner" just visits the page and doesn't run any scripts on it. You should also invalidate the code after a period of time (your second option), because if ...


41

once A gets falsely authenticated as B... On any minimally secure system, this isn't how it happens. From the system's point of view, User B is authenticating himself, not User A. It was not falsely authenticated, it was using the real login and password. It's simple case of Credential Theft. You could harden the system using any form of 2FA, but the system ...


39

In my practice, when I need extra security, I usually change the password on my phone (or another trusted device), then log in on the untrusted computer and after everything is done, change my password back (if possible). This relies on the fact that changing password logs you out everywhere, for most websites. It's rather practical. Alternatively, some ...


32

It depends on your lockout mechanism. If invalid logins get reset after some time AND a locked account does not get unlocked, showing a counter can help an attacker not to lock out an account. But a skilled attacker will have determined the lockout policy up front and will take this into account when guessing the password. So the impact is limited. Also, ...


30

If you ignore the certificate warning the encryption still applied, but because it's an unauthenticated encryption, the encryption is useless against active adversary (an MITM adversary that can intercept and modify the data passing through it), as the active adversary can just reencrypt your connection. The best practice to use self signed certificate in ...


26

If you consider the login process as a whole, this measure can actually increase security. Instead of granting users several login attempts to manually fix common misspellings, the site tries to fix those misspellings automatically. As a result, the average number of login attempts a user needs goes down, which means a more strict rate limiting to an ...


26

SMS 2FA is not only a bad idea; it's worse than not having 2FA at all (password only). This is because virtually all services offering "SMS 2FA" are actually delivering SMS 1FA! That is, they allow full account recovery via SMS, with no need to have the account password. This means anyone who can: convince your mobile carrier to port your number convince ...


24

If you encounter this situation regularly, try the following: Create a Tails live USB stick. Tails is a Linux operating system designed to run off a USB, which can be booted on most computers. Using Tails means that you don't need to worry about any software that the hostile computer may have installed. Because you are completely bypassing it from boot. Use ...


17

Use SQRL If a website supports SQRL (https://www.grc.com/sqrl/sqrl.htm) then you have the option of having it display a QR code in the computer's browser that you let the SQRL app in your cell phone read, and thereby negotiate the authentication out of band. SQRL is not yet widely adopted, but this precise use case was designed in from the beginning. (The ...


17

If Alice keeps her correspondent's public key in a database, spreadsheet, text document; then it's feasible that your scenario would work. However, most (including Alice hopefully) would only trust public keys that have been certified as authentic. There are two mainstream methods by which this is currently done: Certified by a central authority The ...


16

How does Alice know Bob's public key? There are several ways for Alice to verify Bob's public key, each with their own pros and cons. Direct and in person This is probably the most secure approach. Alice and Bob meet in person, exchange and possibly sign each others public keys. This would make it virtually impossible for anyone to tamper this process. ...


16

Yes, the communication is still encrypted with self-signed certificates. Self-signed certificates can be made by you, but they also can be made by any attacker. If you insist on using self-signed certificates, I would advice you to mark the certificate as trusted, so that you get a warning if an active man-in-the-middle attack is happening. Creating your ...


13

So, does Plaid have some special access to banking systems, or is it using user passwords to log in to bank accounts, which requires storing them in plaintext (or convertible to plaintext) and convincing users to give their credentials to a third-party, encouraging bad security practice? Plaid, and many other services (Mint comes to mind), are ...


13

It is unclear in which context the password-less login is used. But, if the user gets send the link to login only after visiting the site, then you could issue a cookie to the users browser and expect this cookie when the user logs in. Most users will likely use the same browser to login after getting the link via mail and in this case you could align the ...


11

You are responsible for sending enough of the chain for the server to connect your certificate to a trusted root. For TLS 1.2 this is discussed in RFC 5246. Client certificates are defined in §7.4.6, which (among other things) states: Client certificates are sent using the Certificate structure defined in Section 7.4.2. And if you look in §...


11

Some websites make use of non cookie based methods of storing data on a users computer, such as HTML5 local storage and flash player cache that may contain sensitive information. For example your email client may store your draft email in local storage so that in the event you accidentally refresh the page/close the browser you will be able to resume where ...


10

Log in only on POST request. The link in the email should not cause a login: it should simply link to a login page. The URL code can be extracted from the URL and put into a hidden form field. When the form is submitted, which the email scanner will not do, then, and only then, is the user logged in. If you want to reduce user friction, you can have ...


9

I want to point out that despite Plaids apparently honest attempts at security, their approach is a privacy nightmare, as you give full access to Plaid, to all and every single information your bank has on you, including loans, funds, investment accounts, credit card statements, etc. This makes Plaid differ substantially from other payment services, such as ...


9

Several points against the second model: Hashing the password should take a significant amount of time, so as to slow down brute forcing in the event of a database leak. Checking a password on every request is a waste of resources. Cookies can be vulnerable to XSS attacks, and having your password stolen is worse than having your session stolen (passwords ...


8

is swirling the mouse around in a little area sufficiently random to generate a good SSH-RSA key? Yes, it is. Nobody can predict how you move the mouse, and even if you are asked to copy a pattern, you won't be able to. You don't need to generate the random code elsewhere IF you can be sure that you Windows computer is not infected with malware capable of ...


8

In short: it is not a design flaw. You've just had a misunderstanding of the design. The authentication protocol is that the client signs the challenge provided by the server, the server verifies it and then allows access. The client does not sign a challenge provided by the server. Instead the client signs a structure defined in RFC 4252 section 7 ...


Only top voted, non community-wiki answers of a minimum length are eligible