SSL (HTTPS) will only protect you as long as your client is not compromised.
If someone manages to modify /etc/hosts, he can also manage to modify your browser to not perform the SSL validation of the server you're connecting to, or he can add his fraud server's fake certificate into your system's database of trusted certificates.
If however your client is not compromised and someone manages to redirect your browser to a different IP address (e.g. some kind of DNS-related hack, or cheating you to modify /etc/hosts without anything else), the browser will warn you that something's wrong with the server's certificate, and, provided you don't ignore the warning and proceed, you are safe.
On your second question:
For the https case, is it possible that the phishing website just pass
a certificate from www.google.com to me to prove it is genuine?
No, that is not possible, unless the attacker managed to obtain the server's private key (e.g. by hacking the server itself). Even if a fraud server "passed on" the server's certificate, he will not be able to prove its identity to the client if it does not possess that private key. If he attempted to do that, he will fail and the browser will show a warning.
Are you the IT support guy maintaining your bank's website? cheated into assigning the domain to the IP of a phishing website? Makes no sense. And what do you mean "Assign IPs directly via hosts in windows"? All that normally means is manually or via DHCP. your question doesn't make much sense. – barlop – 2011-07-25T11:08:25.570
If you mean your hosts file got used, that's not called assigning IPs, it's translating. Your question is garbage. Look at your hosts file make sure it's ok. – barlop – 2011-07-25T11:09:24.900
you should try to reword your question. you know what you mean. – barlop – 2011-07-25T11:09:56.350
you did a good editing job there – barlop – 2011-07-25T13:50:35.523