Mailing List Archive

Making password driven SSH 'immune' to MTM attacks.
[.I know this is the 'port' list, but I can't find a better place to post
this, and with the garbage going on @slashdot I figured I'd get this out.
This belongs on sci.crypt or a general OpenSSH mailing list]

First, a quick rehash of stuff everyone here already knows,

OpenSSH can use two major forms of authentication:

1. Password
2. RSA keys

The RSA method is good because it doesn't rely on the (frequently
non)secrecy of passwords. It's primary disadvantage is that using it
correctly requires a PKI of some form (be it x.509 certs, GPG signed
copies, manual key population) to be secure. Considering the complexity,
cost, and lack of standardaztion, *most* orgs will are not and will not be
using RSA keys anytime in the forseable future.

Passwords are well understood, by both crypto/security heads and by the
common man. Often passwords are not a very good form of authentication,
because of their very nature. However, due to their simplicity many orgs
have developed sufficently secure methods of establishing and protecting
passwords. Unfortuantly, when using passwords with SSH you are fairly
vulnarable to a Man-in-the-middle attack. SSH provides some basic
protection against this in the form of saved host keys. Unfortunatly, this
is insufficent as the network could be comprimised before inital
connection, and often users will just 'okay' the WARNING message anyways
because it is falsely triggered so easily.

I have a proposed solution that will make MTM virtually impossible in a
password authenticated SSH enviroment assuming the password is indeed a
shared secret and the server is not comprimised. MTM against stored keys
is not examined, presumibly the 'PKI' system is use provides sufficent
security against that.

For the rest of this message, we will assume a password is indeed a shared
secret. This makes sence because if it's not a secret, your security is
gone anyways. My scheme does not further reduce security in the situation
where the password is comprimised.

First go to http://srp.stanford.edu/srp/ and read up on SRP. SRP is a
password authentication system with the following properties:

* 'Shadowed' password data stored on server. It's computationally
inplusable that an attacker could derrive the password from the 'shadow'
(like MD5).
* The client sends NON plain-text equivlent data across the wire.
* It's infeasable for an MTM attack to occure unless the MTM knows either
the 'shadow' from the server, or the plain-text password (in which case
why would you bother with a MTM)

SRP is currently used as a 'replacement' for SSH in enviroments that can't
use encryption or are willing to use an enhanced telnet but not a whole
new client.

If we add SRP client code to the OpenSSH client (a small amount of code
that can be easily audited), and a small modification to the server it
will make it possible to use SRP to authenticate on hosts that using an
SRP password file. The most difficult aspect of the implimentation is that
the SRP negoiated secret should be xored into the key used for SSH channel
encryption (this would be rekeying because the ssh encrypted channel is
already established at authentication time).

This would make passworded SSH almost entirely immune to active MTM in the
common case, while not reducing security at all (with the excpetion of
potential implimentation bugs). This would also provide improved
compatibility for systems that are using both SSH and SRP (for other
services perhaps, or clients that can't use strong encryption).

This would probably require a minor change in the protocol that could
still operate in a backwards compatible fashion.

I think that this protection is important for the future of SSH, as
there appears to be no inexpensive, standard, simple, and understabable
PKI implimentation on the horizon. Because of this, people are going to
continue using passwords, at least with this reletivly minor enhancement,
their securiy is brought back to that of the password and not that of the
network during initial connect.

Any comments?

(is this a new idea?)
Re: Making password driven SSH 'immune' to MTM attacks. [ In reply to ]
On Thu, Feb 24, 2000 at 06:22:22PM -0500, Gregory Maxwell wrote:
> The RSA method is good because it doesn't rely on the (frequently
> non)secrecy of passwords. It's primary disadvantage is that using it
> correctly requires a PKI of some form (be it x.509 certs, GPG signed
> copies, manual key population) to be secure.

I think that's nonsense. If you personally exchange RSA public keys or
get them from people you know personally there's no reason why it needs
a PKI. RSA authentication works wonderfully in SSH. It's hardly any
harder to exchange RSA public keys than to exchange a secret password,
except that the former can't be transmitted over a telephone.

> Unfortuantly, when using passwords with SSH you are fairly
> vulnarable to a Man-in-the-middle attack. SSH provides some basic
> protection against this in the form of saved host keys. Unfortunatly, this
> is insufficent as the network could be comprimised before inital
> connection, and often users will just 'okay' the WARNING message anyways
> because it is falsely triggered so easily.

If you're worried about a compromise before the initial connection then
exchange the public key of the host separately at the same time you
exchange the individual's key. No big deal. I rarely run into cases where
there's a reason to be suspicious that early, however.

...
> If we add SRP client code to the OpenSSH client (a small amount of code
> that can be easily audited), and a small modification to the server it
> will make it possible to use SRP to authenticate on hosts that using an
> SRP password file.

That's a worthwhile reason to add SRP support to OpenSSH, but I don't see
much value in enabling SRP if your system doesn't already have an SRP
password file.

- Dave Dykstra
Re: Making password driven SSH 'immune' to MTM attacks. [ In reply to ]
On Fri, 25 Feb 2000, Dave Dykstra wrote:

> On Thu, Feb 24, 2000 at 06:22:22PM -0500, Gregory Maxwell wrote:
> > The RSA method is good because it doesn't rely on the (frequently
> > non)secrecy of passwords. It's primary disadvantage is that using it
> > correctly requires a PKI of some form (be it x.509 certs, GPG signed
> > copies, manual key population) to be secure.
>
> I think that's nonsense. If you personally exchange RSA public keys or
> get them from people you know personally there's no reason why it needs
> a PKI. RSA authentication works wonderfully in SSH. It's hardly any
> harder to exchange RSA public keys than to exchange a secret password,
> except that the former can't be transmitted over a telephone.

I should have been more clear:

I was defining PKI as 'some sort of key management system which provides
some level of authentication of key legitimicy'. Not that bastardized
system of 'trust-for-money' called normally called PKI. :)

> If you're worried about a compromise before the initial connection then
> exchange the public key of the host separately at the same time you
> exchange the individual's key. No big deal.

Since I'm not two good at accuratly rembering numbers 1024+ bits in size,
and there is no widespread, standardized, and cheap 'smart card' system.
I can rember several passwords, and carry them around in my
mind. I can't mentally carry even a single RSA key pair.

> I rarely run into cases where
> there's a reason to be suspicious that early, however.

Oh? You don't ever connect to a SSH host for the first time across the
internet? Perhaps you always can get verified keys (using the GPG
ring-of-trust by hand method of PKI). But this isn't something the
computer using world at large will do, they will blissfully see WARNING
and type 'YES' blissfully ignorant of the middle-man.

Someday there will be a simple and well understood method for securly
veryfing RSA key pairs (all hail DNSSEC!). But thats not available today.
Today, most people use passwords, and they arn't willing to goto the
effort of veryfing RSA keys.

> That's a worthwhile reason to add SRP support to OpenSSH, but I don't see
> much value in enabling SRP if your system doesn't already have an SRP
> password file.

I agree with that.

> - Dave Dykstra
Re: Making password driven SSH 'immune' to MTM attacks. [ In reply to ]
På 2000-Feb-25 klokka 15:53:07 -0500 skrivet Gregory Maxwell:

: Since I'm not two good at accuratly rembering numbers 1024+ bits in
: size, and there is no widespread, standardized, and cheap 'smart card'
: system.

<SARCASM type="shameless" height=50%> 1.44 MB floppies have been around
for quite some time. </SARCASM>

: I can rember several passwords, and carry them around in my mind. I
: can't mentally carry even a single RSA key pair.

That's actually part of the benefit of public/private keypairs
protected by passphrases: while passwords are merely something you
know, and ``smart'' cards (or Java jewelry, or fingerprints) are
something you have, a protected private key is both something you have
(the key) *and* something you know (the passphrase).

--
jim knoble
jmknoble@pobox.com