Git Product home page Git Product logo

Comments (7)

kalpesh2704 avatar kalpesh2704 commented on June 9, 2024 1

We can compare application signature at runtime inside JNI. If signature is matching then only return key else don't return key.

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on June 9, 2024

Hello @Irineu333 ,

1/ the app you are showing does not look obfuscated ? It will be much harder to do the same in a production's app.
2/ If you run a libsecrets.so in another app it won't have the correct key and package name to read the hidden keys.

from hidden-secrets-gradle-plugin.

Irineu333 avatar Irineu333 commented on June 9, 2024
  1. obfuscation would make it difficult, but it would still be possible
  2. i didn't understand what this key would be, but as for the package, what prevents someone from creating an application with the same package? in fact, it wouldn't even be necessary, since the package is passed as an argument, an app with package x could code a package y

I think a more robust way to check the package would be to pass a context and call getPackageName, rather than relying on what the bytecode passed
image

from hidden-secrets-gradle-plugin.

Irineu333 avatar Irineu333 commented on June 9, 2024

@ben-j69 what would this "correct key" be? did i miss something? 🤔

from hidden-secrets-gradle-plugin.

Irineu333 avatar Irineu333 commented on June 9, 2024

@ben-j69 I can't run the libsecrets.so files in an app other than the one they were compiled, but I don't know if it's my lack of knowledge or it's really not possible, but there's still the issue of tampering with the app

I'm trying to code a signature check but it's too complicated

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on June 9, 2024

@Irineu333 as said in Readme:

⚠️ Nothing on the client-side is unbreakable. So generally speaking, keeping a secret in a mobile package is not a smart idea. But when you absolutely need to, this is the best method we have found to hide it.

You should try to investigate with real obfuscated code, it is much more difficult to get what you want. It will be long and difficult to find the necessary info to reveal the hidden keys.

from hidden-secrets-gradle-plugin.

Irineu333 avatar Irineu333 commented on June 9, 2024

@kalpesh2704 It's a great solution!

from hidden-secrets-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.