Live data from Hacker News

Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

pbxscience.com

111–120 of 421 posts

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#112
post #51

Earlier quoted context omitted.

I don't understand your suggestion. If you're still showing one character after each character entered, what's changed? What's the benefit of having a random character from a random set, instead of just a random character?

There's no persistent reveal of password length after you're finished typing. It reduces the length-reveal leak from anyone who eventually sees the terminal log to people who are actively over-the-shoulder as you type it.

If you can see 1 char from set of 4 you know the number of characters modulo 4. If the minimum length of a password is 6, and probably it is no longer than 12 characters, then you can narrow the length to 1 or 2 numbers. It is marginally better than asterisks of course, of course, but it is still confusing.

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#113
I'd think this is OK but I'm not sure if another Option to just give feedback of keyboard activity would combine the best of both worlds.

A space with a cursor instead of an asterisk would make it harder to count the Chars

Adding a random 1 to 3 output chars instead of one would obfuscate this even more.

A delayed output could make you submit the password prompt before showing anything.

A single asterisk that switches back to space after 250ms inactivity may even be better.

I don't know, but somehow this feels underthought even if it probably is not. Simple is probably the best approach

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#114
post #33

Earlier quoted context omitted.

You got some sources or did you just make that up? Because to hell with UX when it comes to security. Knowing the exact length of a password absolutely makes it significantly less secure, and knowing the timing of the keystrokes doubly so.

Yet somehow, none of the other high security tools I have ever interacted with seem to do this for some reason. No auditor flags it. No security standard recommends hiding it. But SUDO is the one bastion where it is absolutely essential to not offer hiding keystrokes as an obscure config option, but enable for everyone and their mother?

[deleted]

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#115
post #31

Earlier quoted context omitted.

It narrows down the brute force domain by several orders of magnitude

No, it doesn't. The set of all passwords of exactly length N is about 1% smaller than the set of all passwords up to and including length N.

The point is that you know that the password is not longer than N.

This indeed reduces the search domain by many orders of magnitude, i.e. by more than an order of magnitude for each character that you now know that it is not used by the password.

Knowing the length of the password does not matter only in antediluvian systems, which had severe restrictions on the length of a password, so you already knew that the password is no longer than, e.g., 8 characters.

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#116

The number of times I've been stuck wondering if my keystrokes are registering properly for a sudo prompt over a high latency ssh connection. These servers I had an account setup too were, from what I observed, partially linked with the authentication mechanism used by the VPN and IAM services. Like they'd have this mandatory password reset process and sometimes sudo was set to that new password, other times it was w…

I agree that this move is good.

But you should not type sudo passwords on remote machine. Instead setup your machinr to have nopassword for special sdmin account and enable pubkey only authentication.

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#117
post #36

Earlier quoted context omitted.

It narrows down the brute force domain by several orders of magnitude

That's obviously false. It narrows it down less than a factor the length of the password, so unless your password is several orders of magnitude, it lowers narrows by a factor of ~8.

That is obviously true, not false.

If you know that a password is no longer than, e.g., 10 characters, that narrows down the search domain by many, many orders of magnitude, in comparison with the case when you did not know this and you had to assume that the password could have been, e.g. 18 characters long.

If you test the possible passwords in increasing length, then knowing the length would not shorten much the search, but not knowing the length may prevent an attempt to search the password by brute force, as such an attempt would fail for longer passwords, so it is not worthwhile to do unless success is expected.

With modern hashing schemes, which require both a lot of time and a lot of memory for each tested password, even one extra character in the password can make the difference between a password that can be cracked in a useful time and one that would take too much time to crack, so knowing the length can be very important for the decision of an attacker of trying the exhaustive search approach.

Knowing the length is less important only for the users who are expected to choose easy to guess passwords, as there are much less of those than the possible random passwords.

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#118

The number of times I've been stuck wondering if my keystrokes are registering properly for a sudo prompt over a high latency ssh connection. These servers I had an account setup too were, from what I observed, partially linked with the authentication mechanism used by the VPN and IAM services. Like they'd have this mandatory password reset process and sometimes sudo was set to that new password, other times it was w…

I agree that this move is good. But you should not type sudo passwords on remote machine. Instead setup your machinr to have nopassword for special sdmin account and enable pubkey only authentication.

Yeah but am I going to really open another ssh connection just to run an admin specific command. They also didn't provide an admin user, it setup with all of the extra security configurations. You couldn't even `su`

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#119

Earlier quoted context omitted.

> easier to turn echo on and off than to echo asterisks. One implies the other. You turn echo off. Then you write asterisks. > Not for security. Consider the case of copy and pasting parts of your terminal to build instructions or to share something like a bug report. Or screen sharing in general. You are then leaking the length of your password. This isn't necessarily disastrous for most use cases but it is a negati…

> One implies the other. You turn echo off. Then you write asterisks. That's not how it works. Sudo turns off echo but otherwise keeps the terminal in it's normal cooked canonocal mode, meaning sudo only sees what you've entered after you hit enter. To print asteriks as you type requires putting the terminal in raw mode, which has the addition consequence of needing to implement shit like backspace yourself. Still a…

You're correct, but, the echo and canonical mode flags are literally in the same termios structure member. One is no more complicated to change than the other. You can also easily switch to character at a time read() which makes handling backspace, erase or kill exceedingly simple.

I still doubt the claim the scheme employed by sudo was done because it "was easier."

Re: Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

#120
post #31

Earlier quoted context omitted.

It narrows down the brute force domain by several orders of magnitude

No, it doesn't. The set of all passwords of exactly length N is about 1% smaller than the set of all passwords up to and including length N.

> is about 1% smaller

Isn't it 10%?

Post reply on HN