feat(kakaotalk): Add bypass request checksums patch to prevent checksum verification
This commit is contained in:
@ -265,14 +265,18 @@ public final class app/revanced/patches/kakaotalk/ghost/GhostModePatchKt {
|
||||
public static final fun getGhostMode ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/misc/RemoveShopTabPatchKt {
|
||||
public static final fun getRemoveShopTabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
public final class app/revanced/patches/kakaotalk/integrity/BypassRequestChecksumsFingerprintKt {
|
||||
public static final fun getBypassRequestChecksumPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/signature/VerifyingSignaturePatchKt {
|
||||
public final class app/revanced/patches/kakaotalk/integrity/VerifyingSignaturePatchKt {
|
||||
public static final fun getVerifyingSignaturePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/misc/RemoveShopTabPatchKt {
|
||||
public static final fun getRemoveShopTabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/versioninfo/VersionInfoPatchKt {
|
||||
public static final fun getVersionInfoPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
package app.revanced.patches.kakaotalk.integrity
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.kakaotalk.common.fingerprints.kotlinUnitInstanceFingerprint
|
||||
import app.revanced.patches.kakaotalk.integrity.fingerprints.bypassRequestChecksumsFingerprint
|
||||
|
||||
@Suppress("unused")
|
||||
val bypassRequestChecksumPatch = bytecodePatch(
|
||||
name = "Bypass requestChecksums",
|
||||
description = "Prevents the execution of checksum verification logic by making it return early."
|
||||
) {
|
||||
compatibleWith("com.kakao.talk"("25.4.0"))
|
||||
|
||||
execute {
|
||||
val findUnit = kotlinUnitInstanceFingerprint.method
|
||||
val unitClass = findUnit.definingClass
|
||||
|
||||
val method = bypassRequestChecksumsFingerprint.method
|
||||
|
||||
// I tried to find the field name, but it's pretty obvious to me, so I hardcode it.
|
||||
// If it changes, we need to fix it
|
||||
method.addInstructions(
|
||||
0,
|
||||
"""
|
||||
sget-object v0, $unitClass->a:$unitClass
|
||||
return-object v0
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package app.revanced.patches.kakaotalk.integrity.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val bypassRequestChecksumsFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("Ljava/lang/Object;")
|
||||
strings(
|
||||
"context"
|
||||
)
|
||||
opcodes(
|
||||
Opcode.INSTANCE_OF,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.IGET,
|
||||
Opcode.CONST_HIGH16,
|
||||
Opcode.AND_INT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.SUB_INT_2ADDR,
|
||||
Opcode.IPUT,
|
||||
Opcode.GOTO,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.IGET,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IF_NE,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.GOTO,
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user