Is it possible to spoof or impersonate a destination (server) IP?

陌路散爱 提交于 2019-12-25 03:58:10

问题


Is it possible to spoof or impersonate a server's IP? So that clients wanting to connect to that Server's IP, would actually connect to the attacker's machine? But the attacker would still be able to contact the actual server.

This is all TCP/IP based, no name resolution, and all machines are on the same network or the internet (No NAT-ing).

I am working on a networking application, and I would like to build in some authentication.

What I need to do is to authenticate the server by IP. In other words, I want to make sure that when I open a HTTPS URL to an IP Address, it will go to the machine that has that IP.

Other notes: All communication would be over TLS, but certificates would be blindly accepted.


回答1:


Yes, if you can perform man-in-the-middle attack. Evil transparent proxy in your LAN can do it.




回答2:


What I need to do is to authenticate the server by IP. In other words, I want to make sure that when I open a HTTPS URL to an IP Address, it will go to the machine that has that IP.

This is one of the features of HTTPS (SSL/TLS) - it can prevent a MITM attack and prevent the destination server from being impersonated.

Other notes: All communication would be over TLS, but certificates would be blindly accepted.

This is great, however you will need to stop certificates from being blindly accepted. You should check that the common name or subject of the certificate matches the server that you are expecting to make contact with. You should also check that the root certificate is one that you choose to trust (you could make your own root certificate that is trusted). This will prevent the server certificate being spoofed by an attacker as they will not be able to sign the certificate with the root certificate.

An alternative is certificate pinning. This will enable your application to only communicate with a pre-set list of trusted certificates that are either hard coded into your application, or that are otherwise inaccessible to outsiders on your application server.



来源:https://stackoverflow.com/questions/24576394/is-it-possible-to-spoof-or-impersonate-a-destination-server-ip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!