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: Need some education: Man-in-the-Middle Attacks

Subject: Re: Need some education: Man-in-the-Middle Attacks
Date: 30 Aug 2006 21:49:58 -0000
All,

Please pardon my naivete.

I was looking at the diagram on the URL
listed below and contemplating how host
fingerprinting prevents MITM attacks.

http://www.vandyke.com/solutions/ssh_overview/ssh_overview_threats.html

So my question is this... Given the
illustration in the URL above, what
prevents Eve from *first* contacting Alice
to obtain a fingerprint which then gets
passed to Bob on the first connection
attempt?

The host key fingerprint isn't actually
passed between server and client.

Instead, the server provides the entire
public portion of the host key and the client
generates the fingerprint using a hashing
algorithm.

The first time Bob (a client) attempts to
connect to Alice (a server), Bob is
responsible for validating the public portion
of the host key.  Typically Bob would compare
the generated fingerprint to a fingerprint
requested of Alice by some other means (e.g
phone conversation, secure web site, etc.).

During the initial setup of the SSH
connection, the server is required to use its
private portion of the host key to generate a
signature.  This signature is verified by the
client using the public portion of the host
key.

Therefore, even if Eve (MITM/WITM) has the
public portion of Alice's host key, Eve
cannot successfully pretend to be Alice since
Eve does not possess the private portion of
Alice's host key which is required to
generate a valid signature.

Additionally, if Eve attempts to fool Bob by
presenting a different host key, the
fingerprint Bob generates will not match the
fingerprint provided by Alice as described
earlier.

You can find more "light reading" on the
subject of MITM attacks related to SSH in
section 9.3.4 of the SSH Protocol
Architecture RFC:

  http://www.ietf.org/rfc/rfc4251.txt

There is also a white paper treating the
topic of host keys that you might find
useful:

  http://www.vandyke.com/solutions/host_keys/index.html

Does this information help clarify?

--Jake

Jake Devenport
VanDyke Software Technical Support

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