Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacked apk avoids in-app purchase check and yet passes PiracyChecker signature check #88

Open
drmrbrewer opened this issue Jul 20, 2020 · 6 comments

Comments

@drmrbrewer
Copy link

My app has a routine which checks the validity of an in-app subscription (via my own server). But I have found a hacked apk on a download site which somehow avoids this check, thereby giving free access to the in-app subscription. Nothing is ever received at my verification server, so they must somehow be faking this check.

But somehow this apk is not caught by the "signature" check made by PiracyChecker. How can this be... surely a hacked apk must have a different (and invalid) signature?

The "licence" check made by PiracyChecker does catch the hacked apk but I'm finding that there are too many false positives (apparently genuine users, maybe with slightly unusual setups) that are caught too.

If I can understand how the in-app purchase check is being avoided then maybe I can just tighten up the security within my code to thwart that.

@apapalillo
Copy link

Hi, I'm having the same issue. I also have implemented an in-app validation via my own server and still I have found a hacked apk which seems to completely avoid the validation.

It just starts with premium features. Normally it would start with limited features, then check if there are any licenses, if any it would check on my server and only then it would obtain premium features and show a message saying that. Instead, the hacked apk just starts with premium features with no validation at all.

How can I fix this? I have spent several days implementing a backend validation and now it's suddenly useless, WTF.

@avipars
Copy link
Contributor

avipars commented Oct 20, 2020

No idea... I think we need a new solution. or use Dexguard

@apkunpacker
Copy link

i searched on telegram and found that how they avoiding piracy checker

[MIN_ENGINE_VER]
2
[AUTHOR]

[PACKAGE]
PiracyChecker - Hook

[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
invoke-direct .+}, Lcom/github/javiersantos/piracychecker.+
REGEX:
true
REPLACE:
[/MATCH_REPLACE]

[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
new-instance ([pv]\d+), Lcom/github/javiersantos/piracychecker.+
REGEX:
true
REPLACE:
[/MATCH_REPLACE]

[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
invoke-(virtual|static) .+}, Lcom/github/javiersantos/piracychecker.+Ljava/lang/String;\n\n move-result-object ([pv]\d+)
REGEX:
true
REPLACE:
const-string ${GROUP2}, "uKXl2sfYr1qJ6sVvFPNqWIJvGaY="
[/MATCH_REPLACE]

[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
invoke-(virtual|static) .+}, Lcom/github/javiersantos/piracychecker.+\n\n move-result-object ([pv]\d+)
REGEX:
true
REPLACE:
[/MATCH_REPLACE]

[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
invoke-virtual .+}, Lcom/github/javiersantos/piracychecker.+
REGEX:
true
REPLACE:
[/MATCH_REPLACE]

@avipars
Copy link
Contributor

avipars commented Oct 21, 2020

Any way to avoid this?

@apkunpacker
Copy link

instead of using name like com/github/**** make it to un readable character so just script kid not able to bypass it

@apkunpacker
Copy link

they removing every call of piracy checker as it clear readable , either move it into some famous name like com.android.google or some where else with ambiguous name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants