From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] OpenSSH upgrade warning
Date: Tue, 10 Nov 2015 20:26:56 +0200 [thread overview]
Message-ID: <564236F0.9020503@gmail.com> (raw)
In-Reply-To: <56421438.4080202@gentoo.org>
On 10/11/2015 17:58, Michael Orlitzky wrote:
> On 11/10/2015 10:30 AM, Alan McKinnon wrote:
>>> Maybe, but your argument isn't convincing. How am I better off doing it
>>> your way (what is your way)?
>>
>> The most common way is to disallow all remote logins as root. Admins log
>> in with their personal unpriv account using an ssh key. To become root
>> they must su or sudo -i with a password.
>>
>> Benefits: two factor auth using different mechanisms. Having the key or
>> the password is not enough to become root, an attacker must have both.
>>
>> Allowing root logins directly over the network is considered bad
>> practice, due to the "one mistake = you lose" aspect.
>>
>
> It sounds good, but what sort of attack on my root password does the
> two-factor authentication prevent? Assume that I'm not an idiot and to
> brute-force my root password would take literally forever.
>
> I'm weighing this against the complexity of adding separate accounts,
> making sure that *those* are secure, risking breakage of the sudoers
> file, granting someone the ability to brute force my SSH key password
> offline,...
>
> All of the good attacks (shoot me, bribe me, steal the hardware, etc.)
> that I can think of work just fine against the two-factor auth. The only
> other way to get the root password is to be there when I transfer it
> from my brain to the terminal, in which case you have the SSH key, too.
I think you are approaching this problem from the wrong viewpoint. You
have to assume an attacker has vastly more resources to bear on the
problem than you have. Thanks to Amazon and the cloud, this is now a
very true reality. Brute force attacking a root password is nowhere near
as complex as the maths would lead you to believe; for one thing they
are decidedly not random. The fact is that they are heavily biased,
mostly due to 1) you need to be able to remember it and 2) you need to
be able to type it.
Humans have been proven to be very bad at coming up with passwords that
are truly good[1] and hard for computers to figure out. And our brains
and very very VERY good at convincing us that our latest dumb idea is
awesome. Are you really going to protect the mother lode (root password)
with a single system proven to be quite broken and deeply flawed by wetware?
Two factor auth is cheap (ssh-keygen and ssh-copy-id) and keys take the
human factor out of the first step. It's not security theatre nor cargo
culting, so why not use it and gain the benefits for minimal effort?
Complexity of separate accounts is a bit of a red herring. If your user
account is weak, I have to assume so is your root account - apart from
UID=0 there is no difference between them. Hopefully you use Puppet or
friends so you set up a decent template once and the system ensures it
stays that way. No having to check if user accounts really are still not
weak.
Finally the root password by it's nature is a shared secret between one
or more admins. On every system a boss has had me look after, I have
shown to my own satisfaction that it is the weak link. It has to exist,
it has to be known an it has to be communicated when it changes. Systems
designed to help make that process safe are themselves weak (such as a
GPG encrypted file protected by .... a never-changing shared password
that every admin knows!) Am I going to build a front line of defence
based on ssh keys? You betcha.
Alan
[1] Our bosses and auditors keep coming up with stupid ideas designed to
improve this but all they succeed in doing is causing the problem they
seek to solve. Such as rotating passwords, insisting on punctuation, no
repeating characters. In the real world all this does is invite *bad*
practices - people have to resort to this to get something that
satisfies the password policy and they can remember. And from there it's
a short step to Post-It-Note syndrome
--
Alan McKinnon
alan.mckinnon@gmail.com
next prev parent reply other threads:[~2015-11-10 18:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 1:38 [gentoo-user] OpenSSH upgrade warning Michael Orlitzky
2015-11-10 3:26 ` Jeff Smelser
2015-11-10 9:53 ` Alan Mackenzie
2015-11-10 10:02 ` Neil Bothwick
2015-11-10 10:05 ` Alan McKinnon
2015-11-10 14:47 ` Michael Orlitzky
2015-11-10 15:30 ` Alan McKinnon
2015-11-10 15:58 ` Michael Orlitzky
2015-11-10 16:13 ` J. Roeleveld
2015-11-10 16:26 ` Michael Orlitzky
2015-11-10 17:17 ` Michael Orlitzky
2015-11-10 20:52 ` wabenbau
2015-11-10 21:00 ` Michael Orlitzky
2015-11-10 21:11 ` wabenbau
2015-11-10 21:23 ` Michael Orlitzky
2015-11-10 21:48 ` Dale
2015-11-10 23:22 ` wabenbau
2015-11-10 18:26 ` Alan McKinnon [this message]
2015-11-10 18:55 ` Michael Orlitzky
2015-11-10 19:00 ` Jeff Smelser
2015-11-10 19:17 ` Michael Orlitzky
2015-11-10 19:20 ` Jeff Smelser
2015-11-10 19:23 ` Stanislav Nikolov
2015-11-10 19:25 ` Michael Orlitzky
2015-11-10 19:32 ` Stanislav Nikolov
2015-11-10 19:38 ` Michael Orlitzky
2015-11-10 19:31 ` Michael Orlitzky
2015-11-10 19:37 ` Stanislav Nikolov
2015-11-10 19:37 ` Jeff Smelser
2015-11-11 4:51 ` Walter Dnes
2015-11-12 12:05 ` Rich Freeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564236F0.9020503@gmail.com \
--to=alan.mckinnon@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox