Recently, We developed an application that we want it's users to pay for a monthly subscription in order to use it. So the first thing that came to our minds how to implement a secure way for our application to check for the User validity and those ideas came up
- Using
WebClient
to enter to our website andLogin
using the user provided credentials : However, this might be vulnerable toMITM
attack. - Using the first approach but using
SSL
certificate (to make sure that we are connecting to our server and not the attackers') : However,Fiddler
can easily do aMITM
attack and decrypt theSSL
communication, which will result in the same vulnerability as the first approach.
Due to the internet's lack of documentation of what we need, we had to ask here for someone to explain how could we make sure that:
- Our application
only
connects to our server and not any fake hosted server (by the attacker). - The communication is secure. Not altered or edited some how in order to grand unfair access to our application. (by sending a fake response to the app or editing the original response before the application receives it).
Note: we totally understand that the attacker may just deobfuscate the application and do whatever he want to it. So we are planning to get a good
obfuscatorin order to at least make it harder for the attacker to do so.