Android Reverse Engineering Practice Chapter
In this article, we introduce the basic + small demo practice. If you have not seen the students can go to see. (Reverse engineering first article)
This article mainly introduces how to modify the source code after the compilation, and the package runs on the phone.
First introduce the tools and resources used in this article.
1:android Killer 1.3.1.0 (tool)
2:crackme.apk
Have not cracked before you will be prompted to enter the user name password will prompt the following information.
Let's open the APK and see what's going on with the source code.
I first use the tool (Android Killer) to open creckme.apk
This is the project summary. The main thing we see is the Mainactivity class, and the rest doesn't matter. If there is patience and interest, friends can go to see what mainactivity inside the specific written, judging mechanism is what.
Crack steps:
1: Click the Register button, pop-up toast information, here can be analyzed out, what conditions triggered, so that the program pops up Toas. [Search by keyword]
2: This program, on the above step is enough to crack.
Open mainactivity below to see the specific logic.
If you don't understand Smali can use
Below we find the program entry Oncread method. Why did you get this entrance early? We are going to find the function of the initialization control here, for this program, only a Buttong (button) is easier to find, we can find the button in the Oncread monitoring (Setonclicklistener)
The middle is a few lines of code not.
Next is the point, you see the method I mentioned earlier, Setonclicklistener not?? Here is a click event, but no toast-related information is found here. This mainactivity.smali has not been found. Did you get it wrong??. Comrade, don't be discouraged, look at the project list, is there a mainactivity$1.smali, this is an internal class, we open this smali can see there is an OnClick method, here is clicked OnClick, Trigger. So we're going to take a concrete look at the logic inside.
The GetText () method represents what we have entered. The trim () method represents the removal of extra spaces.
If-nez V0,: cond_0 conditional judgment Statement, what will be done when certain conditions are met.
Const V0, 0x1 defines a local variable with a shape of 4 bytes V0 its value is 1. If the conditions are not enough, that is v0!=0 will jump to: Cond_0 to execute another piece of code. If we modify the value of V0, then he will not jump to: Cond_0 inside. That is, crack success. Const V0, 0x0 This allows the program to pop up a successful toast.
The program has been cracked and finished here. Feel the step is very tedious ...
Here's a simple way to do it. It can be done in a minute or so.
You see the first picture, program tip: Invalid user name or registration code this is the most direct crack information. We can search the program for the next keyword.
* Search range Remember to replace the entire project
If the text is turned to Unicode, it is reversed to search.
Above is the result of my search. Next search under 0X7F05000B This is the ID of the unsuccessed, the program will use this ID to find the [invalid user name or registration code] string.
I marked it with arrows. Are you familiar with it??? That's where we've changed. It's so easy to find.
Tools
If you don't find it, download it yourself. I uploaded the csdn, not so quickly displayed.
Link: http://pan.baidu.com/s/1hsunUcc Password: rfbn
Happy New Year to everyone. Take off your order soon!!
http://blog.csdn.net/QQ541159192/article/details/54755685 Original Address
Android Reverse Engineering Practice Chapter