Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

OpenSSH and keystroke timings

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


hyc at symas

Sep 8, 2009, 2:44 PM

Post #1 of 5 (821 views)
Permalink
OpenSSH and keystroke timings

Old news, but ... http://lwn.net/Articles/298833/

I first posted about this back in 2001 and it's still not resolved:
http://osdir.com/ml/ietf.secsh/2001-09/msg00000.html

1) high latency networks are a reality that will never go away. In fact they
will only become more prevalent since distributed networks continue to grow
broader but (surprise) the speed of light remains a constant.
2) character-at-a-time protocols have both security and performance costs.
3) a solution for this has existed in common operating systems for a couple of
decades already (LINEMODE tty support).

It's strange how the secsh group at the IETF refused to learn from the lessons
already gained from the years of experience with the telnet protocol.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


dan at doxpara

Sep 8, 2009, 3:10 PM

Post #2 of 5 (772 views)
Permalink
Re: OpenSSH and keystroke timings [In reply to]

Well, there's a lot here. Lets go down the line.

1) Password entry only occurs during keyboard-interactive mode, which at
least isn't used by default (though it may be set on some distros). There's
no way to downgrade someone as a MITM either.
2) Passwords in general are a terribly flawed technology, made only
palatable by the disaster that is everything else (yes, this includes
rsa/dsa in SSH).
3) Only the most basic of interactions with a server are line based. Even
something as simple as vi requires full character mode interactivity. Heck,
tab completion doesn't even work without it.
4) The right way to solve this class of problem isn't with LINEMODE tty,
it's with constant timing / constant bandwidth padding in the underlying
transport -- or at least, to make changes in timing and bandwidth happen a
few orders of magnitude slower than the data that's driving them. SSH1 and
SSH2 as protocols have full support for contentless packets that contain
only padding; I'd love to see a patch.

On Tue, Sep 8, 2009 at 11:44 PM, Howard Chu <hyc [at] symas> wrote:

> Old news, but ... http://lwn.net/Articles/298833/
>
> I first posted about this back in 2001 and it's still not resolved:
> http://osdir.com/ml/ietf.secsh/2001-09/msg00000.html
>
> 1) high latency networks are a reality that will never go away. In fact
> they will only become more prevalent since distributed networks continue to
> grow broader but (surprise) the speed of light remains a constant.
> 2) character-at-a-time protocols have both security and performance costs.
> 3) a solution for this has existed in common operating systems for a couple
> of decades already (LINEMODE tty support).
>
> It's strange how the secsh group at the IETF refused to learn from the
> lessons already gained from the years of experience with the telnet
> protocol.
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev [at] mindrot
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
>
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


hyc at symas

Sep 8, 2009, 3:38 PM

Post #3 of 5 (771 views)
Permalink
Re: OpenSSH and keystroke timings [In reply to]

Dan Kaminsky wrote:
> Well, there's a lot here. Lets go down the line.
>
> 1) Password entry only occurs during keyboard-interactive mode, which at
> least isn't used by default (though it may be set on some distros).
> There's no way to downgrade someone as a MITM either.

Password entry is not the only point of vulnerability. Character timing can be
analyzed continuously, to create a profile of the user generating the input.

> 2) Passwords in general are a terribly flawed technology, made only
> palatable by the disaster that is everything else (yes, this includes
> rsa/dsa in SSH).

Yes, but that's only one specific example of the overall problem.

> 3) Only the most basic of interactions with a server are line based.
> Even something as simple as vi requires full character mode
> interactivity. Heck, tab completion doesn't even work without it.

Please read the telnet RFCs regarding LINEMODE. Tab completion is still
supported; the protocol allows "forwarding characters" to be specified on the
fly. You can have complete local editing when in command-line mode without
losing any of the conveniences that modern shells provide. Obviously vi still
requires character-at-a-time mode, but if you're connecting to a distant
system over a tin-can-and-string network you should know about ex, ed, or
sed... There's also tn3270, for a model of page-at-a-time full screen editing.
Again: these are problems that were solved decades ago in the telnet
specifications. Why not take the few minutes to read them, rather than suffer
from the same problems over and over again... Interactivity is best handled on
the local client; forcing people to wait a full packet roundtrip time for
every byte of data they type is a waste of life.

> 4) The right way to solve this class of problem isn't with LINEMODE tty,
> it's with constant timing / constant bandwidth padding in the underlying
> transport -- or at least, to make changes in timing and bandwidth happen
> a few orders of magnitude slower than the data that's driving them.
> SSH1 and SSH2 as protocols have full support for contentless packets
> that contain only padding; I'd love to see a patch.

"This class of problem" is only a part of the problem. If you "solve" this by
injecting additional packets/padding, you only make usage over congested high
latency networks worse. Bandwidth is neither unlimited nor free, and here's
another truism: congestion, like latency, will only increase over time, it
will never decrease.

Someday, someone on Earth is going to want to open a secure shell session to a
machine on the moon, or on Mars, or wherever, or vice versa. You can fix this
in ssh now, or let people keep reinventing remote login protocols for decades
to come...

> On Tue, Sep 8, 2009 at 11:44 PM, Howard Chu <hyc [at] symas
> <mailto:hyc [at] symas>> wrote:
>
> Old news, but ... http://lwn.net/Articles/298833/
>
> I first posted about this back in 2001 and it's still not resolved:
> http://osdir.com/ml/ietf.secsh/2001-09/msg00000.html
>
> 1) high latency networks are a reality that will never go away. In
> fact they will only become more prevalent since distributed networks
> continue to grow broader but (surprise) the speed of light remains a
> constant.
> 2) character-at-a-time protocols have both security and performance
> costs.
> 3) a solution for this has existed in common operating systems for a
> couple of decades already (LINEMODE tty support).
>
> It's strange how the secsh group at the IETF refused to learn from
> the lessons already gained from the years of experience with the
> telnet protocol.

--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


wknox at mitre

Sep 8, 2009, 8:01 PM

Post #4 of 5 (765 views)
Permalink
RE: OpenSSH and keystroke timings [In reply to]

Your point 1) is a very narrow interpretation of the problem space - password entry that can be exposed happens not only during initial authentication in specific modes, but rather whenever you are prompted to enter a password (or private key passphrase). A case where entry of either of these is obvious on the network and for which this timing attack would work very nicely is as follows:

User is connected from A to B via SSH (authentication method unimportant)
User then connects within the above session from B to C and is required to enter authentication credentials (either a password or the passphrase of a private key)

In this case, an adversary watching at B from the network perspective sees the A -> B connection open. There is a then a brief spurt of activity B to C as that session is set up, followed by the prompt being written back from B to A for authentication and then the typing from A to B of the SSH passphrase or the password, each character of which is sent in its own packet (this scenario is based upon the response to the LWN article found at http://lwn.net/Articles/299112/) and which, based on an empirical test just now, is very easily discernible. Even if you can't figure out the passphrase based on timing if jitter were added (one of the ideas proposed in response to the article), or even if it is a password or a private key passphrase, you at least now know how long it is.

And to partially answer 2), even if passwords are a terribly flawed technology, they are still, along with SSH keys, what a significant number of people use, and it is potentially useful to try and overcome data leakage in SSH related to password/passphrase usage instead of discounting them as flawed authentication methods.

I'll leave giving you a hard time about your points 3) and 4) to those more knowledgeable than myself. :-)

Bill Knox
Lead Infosec Engineer/Scientist
The MITRE Corporation


-----Original Message-----
From: openssh-unix-dev-bounces+wknox=mitre.org [at] mindrot [mailto:openssh-unix-dev-bounces+wknox=mitre.org [at] mindrot] On Behalf Of Dan Kaminsky
Sent: Tuesday, September 08, 2009 6:10 PM
To: Howard Chu
Cc: openssh-unix-dev [at] mindrot
Subject: Re: OpenSSH and keystroke timings

Well, there's a lot here. Lets go down the line.

1) Password entry only occurs during keyboard-interactive mode, which at
least isn't used by default (though it may be set on some distros). There's
no way to downgrade someone as a MITM either.
2) Passwords in general are a terribly flawed technology, made only
palatable by the disaster that is everything else (yes, this includes
rsa/dsa in SSH).
3) Only the most basic of interactions with a server are line based. Even
something as simple as vi requires full character mode interactivity. Heck,
tab completion doesn't even work without it.
4) The right way to solve this class of problem isn't with LINEMODE tty,
it's with constant timing / constant bandwidth padding in the underlying
transport -- or at least, to make changes in timing and bandwidth happen a
few orders of magnitude slower than the data that's driving them. SSH1 and
SSH2 as protocols have full support for contentless packets that contain
only padding; I'd love to see a patch.

On Tue, Sep 8, 2009 at 11:44 PM, Howard Chu <hyc [at] symas> wrote:

> Old news, but ... http://lwn.net/Articles/298833/
>
> I first posted about this back in 2001 and it's still not resolved:
> http://osdir.com/ml/ietf.secsh/2001-09/msg00000.html
>
> 1) high latency networks are a reality that will never go away. In fact
> they will only become more prevalent since distributed networks continue to
> grow broader but (surprise) the speed of light remains a constant.
> 2) character-at-a-time protocols have both security and performance costs.
> 3) a solution for this has existed in common operating systems for a couple
> of decades already (LINEMODE tty support).
>
> It's strange how the secsh group at the IETF refused to learn from the
> lessons already gained from the years of experience with the telnet
> protocol.
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev [at] mindrot
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
>
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


djm at mindrot

Sep 9, 2009, 7:56 AM

Post #5 of 5 (760 views)
Permalink
Re: OpenSSH and keystroke timings [In reply to]

On Tue, 8 Sep 2009, Howard Chu wrote:

> Old news, but ... http://lwn.net/Articles/298833/
>
> I first posted about this back in 2001 and it's still not resolved:
> http://osdir.com/ml/ietf.secsh/2001-09/msg00000.html

So, if you were thinking about it back in 2001 then why haven't you
implemented it yet?

We don't really care for wishlists, but if you come up with a concrete
specification (in the form of a Internet-draft) or a patch to implement
your desired behaviour the we can talk about it. Complaining that we
aren't working to your program is neither effective nor respectful.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.