I need to make requests to a web service via android application. The webservice can be designed as needed.
It seems to me that no matter which approach I will choose, someone who wants to hack it, will just need to reverse engineer My android appliaction code (which isn`t very hard) and could see exactly what I do, wheather I encrypt the data, use hardcoded Password or any other solution for that matter.
Is there a solution which will be 100% secure?
The general rule of thumb is to always assume all communication between and with web services contain sensitive features. Any transfer of data (especially sensitive or regulated data), and any authenticated session, must be encrypted using well-configured Transport Layer Security (TLS) protocols.
HTTPS Secure: The HTTPS protocol is the Secure Hypertext Transfer Protocol, which is basically an Internet standard protocol for the encryption and confidentiality of the normal HTTP protocol on the Internet.
Web request services serve the web applications that you deploy either via a web server (for example, Apache, IIS, or NGINX) or within web containers (for example, Java, .NET, Node.js, or PHP).
One of the security measures available for the HTTP is the HTTPS protocol. HTTPS is the secure way of communication between the client and the server over the web. HTTPS makes use of the Secure Sockets layer or SSL for secure communication.
There is no 100% secure, all you can do is make things harder for your attacker. Things you can consider:
Encryption - Passing your requests over encrypted channels will stop basic sniffing (this can be countered with MITM)
Obfuscation - Make your intent harder to understand when they do decompile your app
The second part to this is mitigation - the ability to notice when your app has been compromised and deal with it. A typical way of handling this is to assign a unique token to each client on first run then pass this as an argument on each call to your service.
This way if somebody decompiles your app and figures out how to call your service you can at least start monitoring where the abusive requests are coming from and also monitor for suspicious behaviour (i.e. multiple requests from the same key in a short period across different IP addresses). From there you can start blocking keys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With