Does DexGuard tamper and Environment help?

I am very new to DexGuard and Proguard. I went through their documents and examples. They have dexguard_util which helps you determine if an application is eligible and also helps you determine if it is running in the environment it should be running in. The document suggests that this tampering and environment detection should be encrypted using the following code: dexgaurd-project.txt.

 -encryptclasses A$D
 -encryptstrings A$D

      

follwing is activity

public class A extends Activity
{


    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        new D().c();
    }

    private class D
    {
        public void c()
        {
            //some code to which detects the tampering and environment and takes action accordingly
        }
    }
}

      

What to do if a hacker enters this line of code.

public class A extends Activity
{


    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        //code commented by hacker
        //new D().c();
    }

    private class D
    {
        public void c()
        {
            //some code to which detects the tampering and environment and takes action accordingly
        }
    }
}

      

Then my application will work without running those tests, which I think are a big problem. My understanding of how reverse engineering does not work correctly or there are better ways to do it. Please share the best methods for doing this, if any. Thank you in advance. Note that public class A cannot be encrypted as it is the entry point and is saved using this command in progaurd-project.txt

-keep class somepackage.A

      

+3


source to share





All Articles