News for hackers. Stuff that matters.
Re:Essential security for Linux servers (2013) by hansel_der on Wednesday December 08, 2021 @03:45AM (#29482459)
passwords are a symetric key, hence if the server is compromised, so is the password. with asymetric keys, a compromise of the public key is no problem.

but you are right, key-files on a disk are more vulnerable to theft than secrets in your head. keyfiles with a password ontop are most secure but also most uncomfortable.

Re:Essential security for Linux servers (2013) by zamfi on Wednesday December 08, 2021 @04:30AM (#29482712)
> passwords are a symetric key, hence if the server is compromised, so is the password

Pretty sure that’s not how it works, iirc passwords are stored one-way encrypted. And if it were true, then anyone with root access to a box could comprise every other (Unix) user’s key, which seems like a potentially bigger problem…

Re:Essential security for Linux servers (2013) by atoav on Wednesday December 08, 2021 @06:04AM (#29483365)
Passwords are (or rather should be) indeed stored using crypt. However at login the provided password needs to be compared to the hashed one, which means the clear text password needs to be rehashed. I am not sure this happens on the client.
Re:Essential security for Linux servers (2013) by wang_li on Wednesday December 08, 2021 @06:30AM (#29483536)
It definitely doesn’t happen on the client. If it did then the server’s password file would effectively be plaintext.
Re:Essential security for Linux servers (2013) by zinekeller on Wednesday December 08, 2021 @06:51AM (#29483668)
> If it did then the server’s password file would effectively be plaintext.

Send seed and hashing parameters to the client, then client does hashing, client sends hash, server compares hashes. It's vulnerable to replay attacks, but it's the same with client sending plaintext password to server (assuming that you're not using SSH or similar).

Re:Essential security for Linux servers (2013) by dsr_ on Wednesday December 08, 2021 @08:41AM (#29484549)
You two are working your ways towards defining a zero-knowledge password proof:

https://en.wikipedia.org/wiki/Zero-knowledge_password_proof

I think SRP is the most widely implemented version. https://en.wikipedia.org/wiki/Secure_Remote_Password_protoco...

Re:Essential security for Linux servers (2013) by throw0101a on Wednesday December 08, 2021 @10:17AM (#29485733)
Note that SRP is an older protocol, and things have moved on from there. See various PAKE algorithms:

* https://en.wikipedia.org/wiki/Password-authenticated_key_agr...

Re:Essential security for Linux servers (2013) by oxapentane on Wednesday December 08, 2021 @08:44AM (#29484580)
Quick google led me to RFC4252[0], section 8 of which (as far as I understood) describes ssh auth sending password as UTF8 plaintext string (and the whole packet is encrypted at transport layer). While passwords in /etc/shadow are hashed, if someone got access to your server he can just put malicious listener that will catch this UTF8 string.

I'm not a SSH guru, so if I'm mistaken please shout at me ;D

[0] https://datatracker.ietf.org/doc/html/rfc4252#section-8

Re:Essential security for Linux servers (2013) by throw0101a on Wednesday December 08, 2021 @10:15AM (#29485699)
Anything that is not PAKE (which SSH is not) generally sends the password to the server:

* https://en.wikipedia.org/wiki/Password-authenticated_key_agr...

* https://blog.cryptographyengineering.com/2018/10/19/lets-tal...

   A Password-Authenticated Key Exchange (PAKE) attempts to address this
   issue by constructing a cryptographic key exchange that does not
   result in the password, or password-derived data, being transmitted
   across an unsecured channel.
* https://datatracker.ietf.org/doc/html/rfc8125

I'm sure there are other zero-knowledge protocols besides PAKE-like ones, but I'm not an expert here.

Re:Essential security for Linux servers (2013) by icedchai on Wednesday December 08, 2021 @10:08AM (#29485617)
I wouldn't worry about storage. Anyone with root access can modify the sshd daemon (along with imap, pop3, and whatever else) to log all the passwords received.
Re:Essential security for Linux servers (2013) by hansel_der on Wednesday December 08, 2021 @04:39AM (#29482758)
pretty sure passwords are sent to the server in a way that reveals the actual password to the server. any chance you are thinking about key-agent?