Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: How necessary is SSH_AUTH_SOCK?

Subject: Re: How necessary is SSH_AUTH_SOCK?
Date: Sun, 01 Oct 2006 09:38:56 -0500
On Fri, 2006-09-29 at 11:11 +0200, Markus Friedl wrote:
On Thu, Sep 28, 2006 at 12:17:17AM -0500, Steven Elliott wrote:
So my question is - Why doesn't ssh-agent default the location of the
socket file to some well known fixed secure location such
$HOME/.ssh/agent? 

$HOME might be on a nfs server, so -a $HOME/.ssh/agent
is not the default.

How is having the socket file on an NFS server a problem?  I know that
other applications do it, such as evolution / spamd:
    /home/sle/.evolution/cache/tmp/spamd-socket-path-bz4CuE

We at least assume that $HOME/.ssh is secure for ordinary files and
directories.  Also, the namespace that has to do with applications
binding to socket files is per machine.  So I don't see what harm would
be done by an untrusted machine binding to it.

But there is a problem with a socket file existing when the bind()
system call is run on it (it fails with EADDRINUSE).  I tried modifying
ssh-agent.c to set SO_REUSEADDR on the socket just before binding to it,
and that did not help.

Maybe this is the problem you are referring to.  Maybe what I suggested
could be amended to include the hostname in the name of the socket file.
Maybe it could just be placed in the /tmp directory as it currently is,
but with some fixed name if that location is available and it can be
secured.

Someone privately sent me an email suggesting that I just capture the
output of ssh-agent and source it later:
    ssh-agent -s > foo
    source foo
and I agree that will work, but my thought is that it would be nice to
do this once in ssh-agent rather than having various cron jobs, long
running daemons or whatever each trying to figure it out.

-- 
Steven Elliott


<Prev in Thread] Current Thread [Next in Thread>