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, which means I have a lot of things to say. From the simplest introduction to the problem, the idea of the solution and the implementation of the system-wide architecture will be tested in this series one by one. 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 programmer you are, my purpose is only one, this is for everyone to see things. will be in the simplest and most straightforward way to express, if you do not understand, it must be my problem, you can tell me in time, I will try to describe all the problems are easy to understand.
On the Android platform, the problem with repackaging is Android's perennial malaise. Basically, most of the malware inflows are through repackaging.
If you are not familiar with the mobile side, or are unfamiliar with the problem, then you may ask what is repacking?
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 otherwise be hidden behind the scenes. For example, click on a certain button, but the accompanying send a text message to the mobile service agreed to make some services, and in the background to intercept the service provider sent the prompt SMS. You would have thought that everything is normal, but one day to check the charges, suddenly found that a large amount of money, did not receive any service provider's notice, the total mute eat coptis have bitter to say not out of the feeling.
The above example is a typical case of repackaging.
Here are some of the most commonly used means of repackaging:
1. It's the simplest way to add ads to the original app
2. Modified the original app, in the case of ensuring that the user experience is exactly the same and not be discovered by the user secretly added some features
3. Directly rewrite and imitate the entire app, and add some corresponding functions.
After reading these people will ask such questions? How do you identify the original app and the repackaged app, and how do you know that it's not the author who modified it but someone else modified it?
For this question we need to know how a little Android app is posted 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 desired market. Of course, the more formal official website will do some security monitoring, to protect the security of users. But this measure is not always effective. Second, Android developers are numerous, the number of apps added every day is amazing Finally, Android app is very easy to be anti-compiler cracked.
The existence of these problems has led to the long-term existence of the stubborn problem of repackaging.
Now that there is a long way to come, there will be some solutions.
The earliest solution is based on the characteristics of the code. Logic is this, re-packaging must realize the original app does not realize the function, I just detect these redundant code can see that the app has not 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 operating code is huge, Will inevitably produce a huge computational complexity. Plus to detect so many apps, it's bound to be stretched.
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, so that the fastest infection. For example, we set up a database of the original app for the first 100 million. Re-packaged apps are easy to find with signature comparisons
The truth is that, 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, which is the original one that you can 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 considered as resources. A picture, a string, an ID, an XML file, these can all be considered resources. And even if some of the current reinforcement technology still cannot change some resources. This ensures the reliability of our testing.
Since the theory is feasible, so from the resources this is more macroscopic than the code point of view of the problem, the problem of cutting the larger, time complexity down. Second, more reliable.
The idea is that we break down the app. Because we can use intent to get the call relationship between the components of this app. An activity from the big direction to see is a component of components, components of the call relationship can be quickly confirmed by intent. Each app is split into a single image. Second, we refine each node, for example, there may be some components on an activity, and the component may bind related events.
Listen a bit dizzy, look at the following picture, perhaps we will be more easily understood:
What we want to do is to effectively identify the newly added component A7, or a new event added to the original app. For example, as you can tell, the changed button function is recognized.
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