Re: Agent security (was Re: Secure file transfer from unix to windows)

From: Simon Tatham (anakin_at_pobox.com)
Date: 10/28/03

  • Next message: FET: "SetUID GUI programs over SSH"
    Date: 28 Oct 2003 09:33:19 +0000 (GMT)
    
    

    UnixFan <gxy1997@yahoo.com.au> wrote:
    > But in this situation, you also should not assume ssh-agent can
    > provide you the required protection: IMO, ssh-agent is a wrong
    > program which should not exist in security package like SSH: when
    > other programs handling secret keys are trying to shorten the period
    > of unprotected keys in memory, ssh-agent is attracting users to let
    > it to store the unlocked private key in memory for malicious person
    > to retrieve it.

    The point is, though, that greater and greater security is not
    always a desirable goal. If the greater security comes with greater
    inconvenience, then at some point its cost becomes worse than its
    benefit.

    Without ssh-agent, it would be very hard to get many people to use
    public keys at all: why would they be willing to type a huge
    passphrase at every login when they had previously been typing a
    short password instead? They would only do that if they _really_
    needed the additional security of PK authentication. (And perhaps
    some people really do; but certainly not everybody.)

    ssh-agent _can_ be a sensible tradeoff between security and
    convenience, depending on your threat model. For a laptop user in
    particular, it's an obviously sensible option; a major risk to
    laptop users is that their laptop might be stolen and the thief
    might power it up to see what they can find. So ssh-agent makes the
    decrypted private key conveniently accessible to the legitimate user
    of the machine, but if it's stolen while powered down then that key
    is nowhere on the hard disk for the thief to see. (Assuming it
    didn't get swapped out, of course; but encrypting any swap devices
    you've got is doable too.)

    If someone attacks your already-running machine and gets an
    arbitrary process to run as root or as your UID, then yes, they can
    read the decrypted keys out of your ssh-agent's memory. But once
    they've got to that point, they could equally well have replaced
    your ssh-add or your ssh client itself with a trojan which captured
    your password or passphrase, or any number of similar attacks. By
    the time the attacker has arbitrary code running on your system,
    anything else you can throw in their way is basically minor
    inconveniences, and you'd be far better off putting the same effort
    into ensuring that that doesn't happen in the first place.

    -- 
    Simon Tatham         "That all men should be brothers is a
    <anakin@pobox.com>    dream of people who have no brothers."
    

  • Next message: FET: "SetUID GUI programs over SSH"

    Relevant Pages

    • Re: Agent security (was Re: Secure file transfer from unix to windows)
      ... >> it to store the unlocked private key in memory for malicious person ... If the greater security comes with greater ... > Without ssh-agent, it would be very hard to get many people to use ...
      (comp.security.ssh)
    • Re: OT - Kuwait
      ... > strict security procedures to prevent unauthorized release of the keys. ... > established their authority to acquire the content of those communications ... Every one but you knows the government has been evesdropping on email & ... Social Security Administration have computer files on nearly all Americans. ...
      (alt.sports.football.pro.ne-patriots)
    • [Full-Disclosure] Security Industry Under Scrutiny: Part One
      ... >Even the kabbalah is open to anyway wishing to learn. ... The keys to compromising computer systems are placed in the ... Utopian Secure Internet will always be a thing of fantasy, and no security ...
      (Full-Disclosure)
    • Re: [Full-Disclosure] SSH vs. TLS
      ... > frowned upon by network ops and security. ... > - There must be a secure means by which all server keys are distributed to ... > appropriate ssh clients. ... > servers from using expired keys. ...
      (Full-Disclosure)
    • Re: Best Practice for storing TripleDES key and vector?
      ... > factor out of the security equation is the user/administrator trust issue. ... which unlocks the encrypted HMACHSA1 keys is stored securely ... protecting access to the RSA private key credential ... like protecting database encryption keys). ...
      (microsoft.public.dotnet.security)