Follow ghost Brother to learn how to modify so. 3. Answer: so

Source: Internet
Author: User

Follow ghost Brother to learn how to modify so. 3. Answer: so


Several analyzed articles:

Http://www.pd521.com/thread-114-1-1.html (xxoo)

Http://www.pd521.com/thread-113-1-1.html myoldid (reply, 1, 2, 3)

 

 

For software analysis, you don't need to talk about this process. Let's just look at it. The following is the idea after the analysis.

Details are not described:


Key points of the smali layer:




Key points of the native layer:




0x1:


Modify the smali layer and set the input parameter v0 to the int value 1.

 

0x2:


For this apk, search for the Normal User displayed by default



Wait for the length to modify the string. Extra spaces are not required to fill in:



0x3:


Determine the input parameter, mainly R2. Therefore, compare R2 with several numbers. Therefore, replace this parameter with the change command 00, then the program must follow the following Gold Vip process.

Here we can also change BNE to BEQ, with the same effect, but we recommend that you use the method above.




0x4:


The core parameter is input R2. According to the assembly code below, R2 = 1 is the key point.

Therefore, after the push command is complete, modify the first CMP and BEQ.

Mov R2, #1, Nop.

If you modify it directly, multiple BEQ operations below are useless, so you can drop the Nop directly.

That is, 01 20, 00 00

 

Source code reference:

 

After reading this, we can compare the results of the so analysis. Naturally, we will understand that we can simply summarize the similar situation in so, either if else or switch.



<span style="font-size:18px;">JNIEXPORT jstring JNICALL Java_com_ggndktest1_JniGg_VipLevel  (JNIEnv * env, jobject this,jint a){int c=(int)a;const char* vip = "";switch(c) {case 1:vip= "Gold Vip";break;case 2:vip="Silvery Vip";break;case 3:vip="Copper Vip";break;default:vip="Normal User";break;}return (*env)->NewStringUTF(env, vip);}</span>


This series of articles were also invited by the webmaster and handed over to www.pd521.com for initial release.



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.