News for hackers. Stuff that matters.
Re:/bin/false is not security (2005) by pecg on Thursday December 28, 2017 @04:53PM (#16025232)
If the password used for the user, in the remote machine, is different from that of the machine he/she is connecting from, the attacker will not be able to gain root access, even if the account has permission to escalate priviledges.
Re:/bin/false is not security (2005) by geofft on Thursday December 28, 2017 @06:18PM (#16025976)
The attacker can still do things like

- attach to an existing screen session that has an existing process under sudo inside it

- edit .bashrc to alias sudo to something that records the password, then come back later

- spawn a background process that waits for the user to run sudo, then opens the pty and uses TIOCSTI to type commands at it

Also, if the attacker actually has control over the sysadmin's local machine, they can do a lot more damage, like any of the above locally, or

- send an email from the admin's account to the team saying "Hi, I'm trying to run this command but I left my RSA token at home, can anyone help?"

- add a browser extension that rewrites all <pre> tags to include a https://thejh.net/misc/website-terminal-copy-paste -style attack

- commit to code or configuration-management repos adding a back door and trigger a deployment

None of these are technically difficult attacks. Requiring a separate sudo password might slow down a script kiddie, but that's about it.

Re:/bin/false is not security (2005) by 616c on Thursday December 28, 2017 @06:45PM (#16026177)
Thanks, kind stranger. You taught even me some I didn't know!
Re:/bin/false is not security (2005) by inetknght on Thursday December 28, 2017 @05:28PM (#16025561)
I don't see how the authentication used for a user on a local machine has anything to do with the authentication of a user on a remote machine unless both are using the same domain authentication (RADIUS, Active Directory, etc). Even then, there can be cache involved.
Re:/bin/false is not security (2005) by closeparen on Thursday December 28, 2017 @05:42PM (#16025681)
There could be a local compromise that exposes the SSH keys (for login) but not the remote password (for sudo).
Re:/bin/false is not security (2005) by inetknght on Thursday December 28, 2017 @05:57PM (#16025814)
My parent comment indicates that the password needs to be different. Your comment does not support that.

First, sudo should not be cached for this very reason. Second, agent caching should never be enabled for this very reason. Third, agent forwarding should never be enabled for this very reason.

Indeed, using key authentication to log in and then using a password to upgrade to sudo is, I think, very reasonable.

Re:/bin/false is not security (2005) by merb on Thursday December 28, 2017 @07:50PM (#16026554)
> Indeed, using key authentication to log in and then using a password to upgrade to sudo is, I think, very reasonable.

which most often is not the default on vps/root/clouds, that's basically my point. if you use sudo, use it with a password.