Hide Strings Using NDK / JNI from Reverse Engineering

Related: How To Hide Your API Key

On this blog post you will know about how to reverse engineer an Android applications. It is very easy to extract hardcoded strings such as URL's, username, passwords, api keys and api secrets in your app using reverse engineering tools (even if R8 or proguard is enabled in your gradle build) .

Loosing those strings can cause serious privacy issues. The hacker can use this information to create scripts to modify the backend databases (if your backend api do not verify its client).

But there are many ways to make it hard to extract for hacker.

  1. Encrypted properties.
  2. Public / private API key exchange.
    • Digital signature
  3. NDK / JNI (safest).

Android NDK / JNI (Java Native Interface)

Using NDK / JNI is one of the difficult way for hacker to extract secret information. It is hard to reverse engineer a compiled C++ code.

For example projects, you can clone my Protect Strings Using NDK Project



Connect with me on LinkedIn: https://www.linkedin.com/in/ronillo-ang/

Comments

Popular posts from this blog

How To Unit Test Android ViewModel With LiveData & Kotlin Coroutines

CTF Practice - Reverse Engineering Android Apps 101

Strengths and Weaknesses of iOS & Android