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]

Question on DNS spoofing and CheckHostIP

Subject: Question on DNS spoofing and CheckHostIP
Date: Tue, 10 Apr 2007 23:49:12 +0530
Hi,

I have a question on the IP address check performed by ssh clients as
part of key verification against entries in known_hosts file. ( i.e.
the additional checks that are turned on when we set 'CheckHostIP' to
'Yes' in ssh_config file).

As per the man page of ssh_config:

    CheckHostIP
            If this flag is set to "yes", ssh will additionally check the
            host IP address in the known_hosts file.  This allows ssh to
            detect if a host key changed due to DNS spoofing.  If the option
            is set to "no", the check will not be executed.  The default is
            "yes".
<<<<<

However, I am not able to understand the situations in which this
check will be able to detect any DNS spoofing other what can be
detected by regular host key verification.

Consider this situation:
hostA is IP address is 1.2.3.4
known_hosts file in hostB has entry for hostA, as below:
hostA,1.2.3.4 ssh-rsa <key......>

From hostB, I execute
ssh myuser@hostA

Let us say, there is DNS spoofing and hence I get connected to a different host.

ssh will try to search in the known_hosts for an entry corresponding
to hostA. It tries to match the key found with what was given by the
remote end. There is key mismatch and user is informed.
In such a case, regular host name checking was enough to detect the
DNS spoofing. The IP address check did not even come into picture.

If at all, the remote end had the correct keys, then both host name
and IP address check would have passed. Here, the IP address check
does not give any additional security.

In summary, I am not able to understand the additional benefits in
doing 'CheckHostIP'.

Your comments on this would really help.

regards,
-Jithesh

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