开发者

How to detect if my website is relayed through the hosts file or an application

I have an application that connect to my website to verify user data (hardware id), but if somebody puts a line in the windows hosts file, it could be relayed to another site. Then it gets bad data and my app gets cheated (cracked).

So, how to detect 开发者_高级运维if my website is relayed through the hosts file or another application?


Could you cryptograhpically sign the data (perhaps salted per client)? The client can have the public key, and you can use that (safely) to prove that the data came from your server.


Use SSL and refuse to operate with an invalid client certificate. That way a request faked through hosts (or any other way to redirect where you connect to) won't pass, a proxy can't see it, and a proxy playing man-in-the-middle with the certificate won't be accepted (think of how when you use Fiddler to debug HTTPS traffic you get the "do you trust" message on your browser; your application will be doing the equivalent of saying "no, I don't").

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜