Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protect string constant against reverse-engineering

I have android application that has hard coded (static string constants) credentials (user/pass) for sending emails via SMTP.

The problem is that .dex file in .apk can be easily reverse-engineered and everybody can see my password.

Is there a way how to secure these credentials, while i will still be able to use them in my classes?

like image 973
D-Fox Avatar asked Sep 07 '25 16:09

D-Fox


2 Answers

We can use "jni module" to keep 'Sensitive Hardcoded Strings' in the app. when we try to reverse engineer APK file we get lib folder and .so files in respective process-folders. which can not decrypt.

like image 110
Anuj Jindal Avatar answered Sep 10 '25 04:09

Anuj Jindal


You can save your string obfuscated by AES.

In Licensing Verification Library you can find AESObfuscator. In LVL it is used to obfuscate cached license info that is read instead of asking Android Market to find out application is licensed or not. LVL can be downloaded as component of SDK.

like image 42
Salw Avatar answered Sep 10 '25 06:09

Salw