Alecz
Alecz

Reputation: 2081

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

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.

Upvotes: 0

Views: 1757

Answers (2)

SilverlightFox
SilverlightFox

Reputation: 33538

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.

Upvotes: 2

Splash
Splash

Reputation: 126

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

Upvotes: 0

Related Questions