Exploring the Android Apk decryption Project (1) -- a simple example

Source: Internet
Author: User

First, decrypt the simplest apk program. The apk interface is as follows:

 

This apk is simple and easier to use. Enter the content in the input box and click "verify". If the serial number is correct, "lisence correct!" is displayed in the input box !"

The entered serial number is incorrect. The input box displays "lisence uncorrect !"

Click the Clear button to enter the content in the condition input box.

Our goal is to find the correct serial number.

Decryption process: 1.1. apktool decompile the apk File

After decompression, the folder crackme_constantstring.apk with the same name is displayed:

1.2 understand the meaning of the Code in LisenceCheck $1. smali and get the excerpt of the serial number code :... // Obtain the content in EditText and save it in v0. 1 iget-object v0, p0, Lcom/mstar/test/LisenceCheck $1;-> this $0: lcom/mstar/test/LisenceCheck; 2 3 iget-object v0, v0, Lcom/mstar/test/LisenceCheck;-> medittext: Landroid/widget/EditText; 4 5 invoke-virtual {v0}, Landroid/widget/EditText;-> getText () Landroid/text/Editable; 6 7 move-result-object v0 8 9 invoke-interface {v0}, Landroid/text/Editable;-> toString () Ljava/lang/String; 1 0 11 move-result-object v0 www.2cto.com/add a regular string of youwinin to v1, 1 const-String v1, "youwin" 2 3 invoke-virtual {v0, v1}, Ljava/lang/string; -> equals (Ljava/lang/Object;) Z 4 5 move-result v0 // compare v0 and v1. if not, jump to the cond_0 position 1 if-eqz v0 ,: cond_0 // We have estimated that youwin is the serial number, and then look down at cond_0 to verify our ideas... // Starts at cond_0. The unequal result is "listence uncorrect !" 1: cond_0 2 3 iget-object v0, p0, Lcom/mstar/test/LisenceCheck $1;-> this $0: Lcom/mstar/test/LisenceCheck; 4 5 iget-object v0, v0, Lcom/mstar/test/LisenceCheck;-> medittext: Landroid/widget/EditText; 6 7 const-string v1, "lisence uncorrect! "8 9 invoke-virtual {v0, v1}, Landroid/widget/EditText;-> setText (Ljava/lang/CharSequence;) V 10 11 goto: goto_0 jump here, lisence uncorrect is displayed in EditText !, Youwin is the serial number we are looking. Here, we have completed the first crackme, simple constant string cracking. If the apk is stored in my shared resources, the address will not be pasted. Thank you.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.