Talk about Android re-packaging--The first language

Source: Internet
Author: User

write it in front.This series is dedicated only to my csdn friends who love me.
affirmThis article is forbidden to reprint, thank you cooperation

Preface
At the beginning it would be a series, that means I have so much to say. From the simplest introduction to the question of the presentation. The concept of the solution and the architecture of the whole system test will be in this series one by one description. If you are still confused about how to go into a problem, a little solution, then I try to pass this series to give you a little insight. If you have a list of mountains and small, then please give me a lot of advice.
No matter what level of procedural ape you are, my purpose is only one. This is something for everyone to see.

will be expressed in the simplest and most straightforward way. Suppose you don't understand, it must be my problem. You can tell me in time, I will try to make the whole question descriptive narrative simple and understandable.


On the Android platform, the problem with repackaging is Android's perennial malaise. Basically, most of the malware inflows are through repackaging.


Assuming you don't understand the mobile side or are unfamiliar with the problem, you might ask what is RePack?
We can give a simple example. You've downloaded two seemingly identical apps from different platforms, but one app may have some activities in addition to the normal functionality that might be secretly hidden in the background.

Let's say click on a certain button to click clearly. But the accompanying send a text message to the mobile service agreed to make certain services. And in the background to intercept the service provider sent the prompt SMS.

You would have thought everything was normal. But one day to check the charges, suddenly found that the charge is a lot less. Did not receive no matter what service provider's notice, total mute eat coptis have bitterness to say not out of feeling.


The example above is a typical case of repackaging.


Here are some of the most frequently used means of repackaging:
1. Added ads in the original app, which is the simplest way
2. The original app has been changed, and some features have been secretly added to ensure that the user experience is completely the same and is not discovered by the user
3. Directly rewrite and imitate the entire app, and add some corresponding functions.



After reading these people will ask this question? How do you identify the original app and the repackaged app, how do you know it's not the author who changed it but someone else changed it?
For this question we need to know how a little Android app is published to our market. Every app developer wants to publish their app online so everyone can use it. You must apply for an account and pay a fee to upload your app to the market you want.

Of course. The official official website will do some security monitoring to protect the user's safety.

But this measure is not always effective.

Second, Android has many developers, and the number of apps added every day is staggering. Android app is very easy to be anti-compiled hack.
The existence of these problems has led to the long-term existence of the stubborn problem of repackaging.
Now that there has been so long there will be some way to solve it, what is the solution now?
The earliest solution is based on the characteristics of the code.

The logic is this, repack must realize the original app does not implement the function, I just have to detect these redundant code to see if the app has been repackaged but now the problem is, the weight of the code point of view to solve the problem, the most important challenge the number of opcode is huge, is bound to produce huge computational complexity. And it's bound to be stretched to detect so many apps.



At this point, some people will say that in order to expand the scope of the impact, the general packaging software producers will choose some popular apps for processing. This is the fastest infection. We're testing it for the first 100 million, for example. Create a database of the original app. Easy to find repackaged apps with signature control
The truth is this, according to the signature comparison to achieve true.

So you can avoid the complexity of computing.

Think about how to find the original app in 10,000 apps. Is it original to download on Google Play? The number of third-party markets is so numerous that it really can reduce the complexity of time effectively.



What's the new plan?
That's the problem I'm going to solve today and beyond. --based on resources to detect

You might be asking? Is this a reliable way?

First, let's solve a problem first. What is a resource in Android
In Android, an activity can be seen as a resource, service. Receiver Provider These components can be seen as resources. A picture, a string. ID, an XML file that can be seen as a resource. And even if some of today's hardening techniques still do not change some resources. This ensures the reliability of our tests.
Since it is theoretically feasible. This looks at the problem in terms of resources, which are more macroscopic than the code. Divide the problem bigger, the time complexity falls down. Secondly. More reliable.
The idea is that we break down the app. Since we are able to get a call relationship between the components of this app through intent.

An activity from a generous upward view is a component of components, components of the call relationship can be intent very fast confirmation. Each app is split into a graph. Second, we refine each node, for example, there might be some components on an activity. The component may be bound to a related event.


Listen to a bit dizzy, look at the following picture, perhaps we will be more easy to understand:










All we have to do is be able to effectively identify the newly added component A7, or a newly added event on the original app. For example, as the upward text says. The ability to identify changed button functions.



In this series of the future we will be a little bit to explain how to solve the problem of repackaging through resources.







































Talk about Android re-packaging--The first language

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.